1 | <?php |
||
10 | class Message |
||
11 | { |
||
12 | |||
13 | use SendsParameters; |
||
14 | |||
15 | public $service; |
||
16 | |||
17 | public $preload = false; |
||
18 | |||
19 | /** |
||
20 | * Optional parameter for getting single and multiple emails |
||
21 | * |
||
22 | * @var array |
||
23 | */ |
||
24 | protected $params = []; |
||
25 | |||
26 | /** |
||
27 | * Message constructor. |
||
28 | * |
||
29 | * @param LaravelGmailClass $client |
||
30 | */ |
||
31 | public function __construct( LaravelGmailClass $client ) |
||
35 | |||
36 | /** |
||
37 | * Returns a collection of Mail instances |
||
38 | * |
||
39 | * @param null $pageToken |
||
40 | * |
||
41 | * @return \Illuminate\Support\Collection |
||
42 | */ |
||
43 | public function all( $pageToken = null ) |
||
58 | |||
59 | /** |
||
60 | * @param $id |
||
61 | * |
||
62 | * @return Mail |
||
63 | */ |
||
64 | public function get( $id ) |
||
70 | |||
71 | /** |
||
72 | * Filter to get only unread emalis |
||
73 | * |
||
74 | * @return $this |
||
75 | */ |
||
76 | public function unread() |
||
82 | |||
83 | /** |
||
84 | * Filter to get only emails from a specific email address |
||
85 | * |
||
86 | * @param $email |
||
87 | * |
||
88 | * @return $this |
||
89 | */ |
||
90 | public function from( $email ) |
||
96 | |||
97 | /** |
||
98 | * Filters emails by tag |
||
99 | * Example: |
||
100 | * * starred |
||
101 | * * inbox |
||
102 | * * spam |
||
103 | * * chats |
||
104 | * * sent |
||
105 | * * draft |
||
106 | * * trash |
||
107 | * |
||
108 | * @param $box |
||
109 | * |
||
110 | * @return Message |
||
111 | */ |
||
112 | public function in( $box = 'inbox' ) |
||
118 | |||
119 | /** |
||
120 | * Determines if the email has attachments |
||
121 | * |
||
122 | * @return $this |
||
123 | */ |
||
124 | public function hasAttachment() |
||
130 | |||
131 | /** |
||
132 | * Preload the information on each Mail objects. |
||
133 | * If is not preload you will have to call the load method from the Mail class |
||
134 | * @see Mail::load() |
||
135 | * |
||
136 | * @return $this |
||
137 | */ |
||
138 | public function preload() |
||
144 | } |