| @@ 10-61 (lines=52) @@ | ||
| 7 | /** |
|
| 8 | * @link https://dev.twitter.com/rest/reference/get/statuses/mentions_timeline |
|
| 9 | */ |
|
| 10 | class MentionsTimeline extends BaseRequest |
|
| 11 | { |
|
| 12 | const METHOD = 'GET'; |
|
| 13 | const ENDPOINT = '/statuses/mentions_timeline.json'; |
|
| 14 | ||
| 15 | public function __construct() |
|
| 16 | { |
|
| 17 | parent::__construct(self::METHOD, self::ENDPOINT); |
|
| 18 | } |
|
| 19 | ||
| 20 | public function amount(int $amount): MentionsTimeline |
|
| 21 | { |
|
| 22 | $this->parameters['count'] = (string) $amount; |
|
| 23 | ||
| 24 | return $this; |
|
| 25 | } |
|
| 26 | ||
| 27 | public function minimumId(int $id): MentionsTimeline |
|
| 28 | { |
|
| 29 | $this->parameters['since_id'] = (string) $id; |
|
| 30 | ||
| 31 | return $this; |
|
| 32 | } |
|
| 33 | ||
| 34 | public function maximumId(int $id): MentionsTimeline |
|
| 35 | { |
|
| 36 | $this->parameters['max_id'] = (string) $id; |
|
| 37 | ||
| 38 | return $this; |
|
| 39 | } |
|
| 40 | ||
| 41 | public function trimUser(): MentionsTimeline |
|
| 42 | { |
|
| 43 | $this->parameters['trim_user'] = 'true'; |
|
| 44 | ||
| 45 | return $this; |
|
| 46 | } |
|
| 47 | ||
| 48 | public function includeContributorDetails(): MentionsTimeline |
|
| 49 | { |
|
| 50 | $this->parameters['contributor_details'] = 'true'; |
|
| 51 | ||
| 52 | return $this; |
|
| 53 | } |
|
| 54 | ||
| 55 | public function excludeEntities(): MentionsTimeline |
|
| 56 | { |
|
| 57 | $this->parameters['include_entities'] = 'false'; |
|
| 58 | ||
| 59 | return $this; |
|
| 60 | } |
|
| 61 | } |
|
| 62 | ||
| @@ 10-61 (lines=52) @@ | ||
| 7 | /** |
|
| 8 | * @link https://dev.twitter.com/rest/reference/get/statuses/retweets_of_me |
|
| 9 | */ |
|
| 10 | class RetweetsOfMe extends BaseRequest |
|
| 11 | { |
|
| 12 | const METHOD = 'GET'; |
|
| 13 | const ENDPOINT = '/statuses/retweets_of_me.json'; |
|
| 14 | ||
| 15 | public function __construct() |
|
| 16 | { |
|
| 17 | parent::__construct(self::METHOD, self::ENDPOINT); |
|
| 18 | } |
|
| 19 | ||
| 20 | public function amount(int $amount): RetweetsOfMe |
|
| 21 | { |
|
| 22 | $this->parameters['count'] = (string) $amount; |
|
| 23 | ||
| 24 | return $this; |
|
| 25 | } |
|
| 26 | ||
| 27 | public function minimumId(int $id): RetweetsOfMe |
|
| 28 | { |
|
| 29 | $this->parameters['since_id'] = (string) $id; |
|
| 30 | ||
| 31 | return $this; |
|
| 32 | } |
|
| 33 | ||
| 34 | public function maximumId(int $id): RetweetsOfMe |
|
| 35 | { |
|
| 36 | $this->parameters['max_id'] = (string) $id; |
|
| 37 | ||
| 38 | return $this; |
|
| 39 | } |
|
| 40 | ||
| 41 | public function trimUser(): RetweetsOfMe |
|
| 42 | { |
|
| 43 | $this->parameters['trim_user'] = 'true'; |
|
| 44 | ||
| 45 | return $this; |
|
| 46 | } |
|
| 47 | ||
| 48 | public function excludeEntities(): RetweetsOfMe |
|
| 49 | { |
|
| 50 | $this->parameters['include_entities'] = 'false'; |
|
| 51 | ||
| 52 | return $this; |
|
| 53 | } |
|
| 54 | ||
| 55 | public function excludeUserEntities(): RetweetsOfMe |
|
| 56 | { |
|
| 57 | $this->parameters['include_user_entities'] = 'false'; |
|
| 58 | ||
| 59 | return $this; |
|
| 60 | } |
|
| 61 | } |
|
| 62 | ||