1 | <?php |
||
14 | class DirectMessage |
||
15 | { |
||
16 | /** |
||
17 | * ENDPOINT CONSTANTS |
||
18 | */ |
||
19 | const RETRIEVE_MESSAGES_ENDPOINT = 'direct_messages.json'; |
||
20 | const RETRIEVE_SENT_MESSAGES_ENDPOINT = 'direct_messages/sent.json'; |
||
21 | |||
22 | use OptionsFilter; |
||
23 | |||
24 | /** |
||
25 | * Twitter Client, needed for making requests |
||
26 | * |
||
27 | * @var TwitterClient $client |
||
28 | */ |
||
29 | private $client; |
||
30 | |||
31 | /** |
||
32 | * Constructor |
||
33 | * |
||
34 | * @param TwitterClient $client |
||
35 | */ |
||
36 | public function __construct(TwitterClient $client) |
||
40 | |||
41 | /** |
||
42 | * Method to retrieve the most recent direct messages sent to the |
||
43 | * authenticated user |
||
44 | * |
||
45 | * @param Array $options |
||
46 | * - since_id int returns results with an ID more recent than the provided ID |
||
47 | * - max_id int returns results with an ID older than the provided ID |
||
48 | * - count int number of results to return, up to 200, if omitted returns 20 |
||
49 | * - include_entities boolean entities node will be excluded when set to false |
||
50 | * - skip_status boolean statues will not be returned with the user objects when true |
||
51 | * @return string |
||
52 | */ |
||
53 | public function retrieveLatestMessages(Array $options = []) |
||
65 | |||
66 | /** |
||
67 | * Method to retrieve the most recent direct messages sent from the |
||
68 | * authenticated user |
||
69 | * |
||
70 | * @param Array $options |
||
71 | * - since_id int returns results with an ID more recent than the provided ID |
||
72 | * - max_id int returns results with an ID older than the provided ID |
||
73 | * - count int number of results to return, up to 200, if omitted returns 20 |
||
74 | * - include_entities boolean entities node will be excluded when set to false |
||
75 | * - page int the page of results to retrieve |
||
76 | * @return string |
||
77 | */ |
||
78 | public function retrieveLatestSentMessages(Array $options = []) |
||
90 | } |
||
91 |