| @@ 7-52 (lines=46) @@ | ||
| 4 | ||
| 5 | use PeeHaa\AsyncTwitter\Api\Request\BaseRequest; |
|
| 6 | ||
| 7 | class DirectMessages extends BaseRequest |
|
| 8 | { |
|
| 9 | const METHOD = 'GET'; |
|
| 10 | ||
| 11 | const ENDPOINT = '/direct_messages.json'; |
|
| 12 | ||
| 13 | public function __construct() |
|
| 14 | { |
|
| 15 | parent::__construct(self::METHOD, self::ENDPOINT); |
|
| 16 | } |
|
| 17 | ||
| 18 | public function minimumId(int $id): DirectMessages |
|
| 19 | { |
|
| 20 | $this->parameters['since_id'] = (string) $id; |
|
| 21 | ||
| 22 | return $this; |
|
| 23 | } |
|
| 24 | ||
| 25 | public function maximumId(int $id): DirectMessages |
|
| 26 | { |
|
| 27 | $this->parameters['max_id'] = (string) $id; |
|
| 28 | ||
| 29 | return $this; |
|
| 30 | } |
|
| 31 | ||
| 32 | public function amount(int $amount): DirectMessages |
|
| 33 | { |
|
| 34 | $this->parameters['count'] = (string) $amount; |
|
| 35 | ||
| 36 | return $this; |
|
| 37 | } |
|
| 38 | ||
| 39 | public function excludeEntities(): DirectMessages |
|
| 40 | { |
|
| 41 | $this->parameters['include_entities'] = 'false'; |
|
| 42 | ||
| 43 | return $this; |
|
| 44 | } |
|
| 45 | ||
| 46 | public function skipStatus(): DirectMessages |
|
| 47 | { |
|
| 48 | $this->parameters['skip_status'] = 'true'; |
|
| 49 | ||
| 50 | return $this; |
|
| 51 | } |
|
| 52 | } |
|
| 53 | ||
| @@ 7-52 (lines=46) @@ | ||
| 4 | ||
| 5 | use PeeHaa\AsyncTwitter\Api\Request\BaseRequest; |
|
| 6 | ||
| 7 | class Sent extends BaseRequest |
|
| 8 | { |
|
| 9 | const METHOD = 'GET'; |
|
| 10 | ||
| 11 | const ENDPOINT = '/direct_messages/sent.json'; |
|
| 12 | ||
| 13 | public function __construct() |
|
| 14 | { |
|
| 15 | parent::__construct(self::METHOD, self::ENDPOINT); |
|
| 16 | } |
|
| 17 | ||
| 18 | public function minimumId(int $id): Sent |
|
| 19 | { |
|
| 20 | $this->parameters['since_id'] = (string) $id; |
|
| 21 | ||
| 22 | return $this; |
|
| 23 | } |
|
| 24 | ||
| 25 | public function maximumId(int $id): Sent |
|
| 26 | { |
|
| 27 | $this->parameters['max_id'] = (string) $id; |
|
| 28 | ||
| 29 | return $this; |
|
| 30 | } |
|
| 31 | ||
| 32 | public function amount(int $amount): Sent |
|
| 33 | { |
|
| 34 | $this->parameters['count'] = (string) $amount; |
|
| 35 | ||
| 36 | return $this; |
|
| 37 | } |
|
| 38 | ||
| 39 | public function page(int $page): Sent |
|
| 40 | { |
|
| 41 | $this->parameters['page'] = (string) $page; |
|
| 42 | ||
| 43 | return $this; |
|
| 44 | } |
|
| 45 | ||
| 46 | public function excludeEntities(): Sent |
|
| 47 | { |
|
| 48 | $this->parameters['include_entities'] = 'false'; |
|
| 49 | ||
| 50 | return $this; |
|
| 51 | } |
|
| 52 | } |
|
| 53 | ||
| @@ 7-52 (lines=46) @@ | ||
| 4 | ||
| 5 | use PeeHaa\AsyncTwitter\Api\Request\BaseRequest; |
|
| 6 | ||
| 7 | class Ids extends BaseRequest |
|
| 8 | { |
|
| 9 | const METHOD = 'GET'; |
|
| 10 | ||
| 11 | const ENDPOINT = '/followers/ids.json'; |
|
| 12 | ||
| 13 | public function __construct() |
|
| 14 | { |
|
| 15 | parent::__construct(self::METHOD, self::ENDPOINT); |
|
| 16 | } |
|
| 17 | ||
| 18 | public function userId(int $id): Ids |
|
| 19 | { |
|
| 20 | $this->parameters['user_id'] = (string) $id; |
|
| 21 | ||
| 22 | return $this; |
|
| 23 | } |
|
| 24 | ||
| 25 | public function screenName(string $screenName): Ids |
|
| 26 | { |
|
| 27 | $this->parameters['screen_name'] = $screenName; |
|
| 28 | ||
| 29 | return $this; |
|
| 30 | } |
|
| 31 | ||
| 32 | public function fromCursor(int $cursor): Ids |
|
| 33 | { |
|
| 34 | $this->parameters['cursor'] = (string) $cursor; |
|
| 35 | ||
| 36 | return $this; |
|
| 37 | } |
|
| 38 | ||
| 39 | public function stringifyIds(): Ids |
|
| 40 | { |
|
| 41 | $this->parameters['stringify_ids'] = 'true'; |
|
| 42 | ||
| 43 | return $this; |
|
| 44 | } |
|
| 45 | ||
| 46 | public function amount(int $amount): Ids |
|
| 47 | { |
|
| 48 | $this->parameters['count'] = (string) $amount; |
|
| 49 | ||
| 50 | return $this; |
|
| 51 | } |
|
| 52 | } |
|
| 53 | ||
| @@ 7-52 (lines=46) @@ | ||
| 4 | ||
| 5 | use PeeHaa\AsyncTwitter\Api\Request\BaseRequest; |
|
| 6 | ||
| 7 | class Ids extends BaseRequest |
|
| 8 | { |
|
| 9 | const METHOD = 'GET'; |
|
| 10 | ||
| 11 | const ENDPOINT = '/friends/ids.json'; |
|
| 12 | ||
| 13 | public function __construct() |
|
| 14 | { |
|
| 15 | parent::__construct(self::METHOD, self::ENDPOINT); |
|
| 16 | } |
|
| 17 | ||
| 18 | public function userId(int $id): Ids |
|
| 19 | { |
|
| 20 | $this->parameters['user_id'] = (string) $id; |
|
| 21 | ||
| 22 | return $this; |
|
| 23 | } |
|
| 24 | ||
| 25 | public function screenName(string $screenName): Ids |
|
| 26 | { |
|
| 27 | $this->parameters['screen_name'] = $screenName; |
|
| 28 | ||
| 29 | return $this; |
|
| 30 | } |
|
| 31 | ||
| 32 | public function fromCursor(int $cursor): Ids |
|
| 33 | { |
|
| 34 | $this->parameters['cursor'] = (string) $cursor; |
|
| 35 | ||
| 36 | return $this; |
|
| 37 | } |
|
| 38 | ||
| 39 | public function stringifyIds(): Ids |
|
| 40 | { |
|
| 41 | $this->parameters['stringify_ids'] = 'true'; |
|
| 42 | ||
| 43 | return $this; |
|
| 44 | } |
|
| 45 | ||
| 46 | public function amount(int $amount): Ids |
|
| 47 | { |
|
| 48 | $this->parameters['count'] = (string) $amount; |
|
| 49 | ||
| 50 | return $this; |
|
| 51 | } |
|
| 52 | } |
|
| 53 | ||