@@ 7-38 (lines=32) @@ | ||
4 | ||
5 | use PeeHaa\AsyncTwitter\Api\Request\BaseRequest; |
|
6 | ||
7 | class VerifyCredentials extends BaseRequest |
|
8 | { |
|
9 | const METHOD = 'GET'; |
|
10 | ||
11 | const ENDPOINT = '/account/verify_credentials.json'; |
|
12 | ||
13 | public function __construct() |
|
14 | { |
|
15 | parent::__construct(self::METHOD, self::ENDPOINT); |
|
16 | } |
|
17 | ||
18 | public function excludeEntities(): VerifyCredentials |
|
19 | { |
|
20 | $this->parameters['include_entities'] = 'false'; |
|
21 | ||
22 | return $this; |
|
23 | } |
|
24 | ||
25 | public function skipStatus(): VerifyCredentials |
|
26 | { |
|
27 | $this->parameters['skip_status'] = 'true'; |
|
28 | ||
29 | return $this; |
|
30 | } |
|
31 | ||
32 | public function includeEmail(): VerifyCredentials |
|
33 | { |
|
34 | $this->parameters['include_email'] = 'true'; |
|
35 | ||
36 | return $this; |
|
37 | } |
|
38 | } |
|
39 |
@@ 7-38 (lines=32) @@ | ||
4 | ||
5 | use PeeHaa\AsyncTwitter\Api\Request\BaseRequest; |
|
6 | ||
7 | class Collection extends BaseRequest |
|
8 | { |
|
9 | const METHOD = 'GET'; |
|
10 | ||
11 | const ENDPOINT = '/blocks/list.json'; |
|
12 | ||
13 | public function __construct() |
|
14 | { |
|
15 | parent::__construct(self::METHOD, self::ENDPOINT); |
|
16 | } |
|
17 | ||
18 | public function excludeEntities(): Collection |
|
19 | { |
|
20 | $this->parameters['include_entities'] = 'false'; |
|
21 | ||
22 | return $this; |
|
23 | } |
|
24 | ||
25 | public function skipStatus(): Collection |
|
26 | { |
|
27 | $this->parameters['skip_status'] = 'true'; |
|
28 | ||
29 | return $this; |
|
30 | } |
|
31 | ||
32 | public function fromCursor(int $cursor): Collection |
|
33 | { |
|
34 | $this->parameters['cursor'] = (string) $cursor; |
|
35 | ||
36 | return $this; |
|
37 | } |
|
38 | } |
|
39 |
@@ 7-39 (lines=33) @@ | ||
4 | ||
5 | use PeeHaa\AsyncTwitter\Api\Request\BaseRequest; |
|
6 | ||
7 | class Show extends BaseRequest |
|
8 | { |
|
9 | const METHOD = 'GET'; |
|
10 | const ENDPOINT = '/statuses/show.json'; |
|
11 | ||
12 | public function __construct(int $id) |
|
13 | { |
|
14 | parent::__construct(self::METHOD, self::ENDPOINT); |
|
15 | ||
16 | $this->parameters['id'] = (string) $id; |
|
17 | } |
|
18 | ||
19 | public function trimUser(): Show |
|
20 | { |
|
21 | $this->parameters['trim_user'] = 'true'; |
|
22 | ||
23 | return $this; |
|
24 | } |
|
25 | ||
26 | public function excludeEntities(): Show |
|
27 | { |
|
28 | $this->parameters['include_entities'] = 'false'; |
|
29 | ||
30 | return $this; |
|
31 | } |
|
32 | ||
33 | public function includeUserRetweetStatus(): Show |
|
34 | { |
|
35 | $this->parameters['include_my_retweet'] = 'true'; |
|
36 | ||
37 | return $this; |
|
38 | } |
|
39 | } |
|
40 |
@@ 7-38 (lines=32) @@ | ||
4 | ||
5 | use PeeHaa\AsyncTwitter\Api\Request\BaseRequest; |
|
6 | ||
7 | abstract class Lists extends BaseRequest |
|
8 | { |
|
9 | const METHOD = 'GET'; |
|
10 | ||
11 | const ENDPOINT = '/collections/list.json'; |
|
12 | ||
13 | public function __construct() |
|
14 | { |
|
15 | parent::__construct(self::METHOD, self::ENDPOINT); |
|
16 | } |
|
17 | ||
18 | public function amount(int $amount): Lists |
|
19 | { |
|
20 | $this->parameters['count'] = (string) $amount; |
|
21 | ||
22 | return $this; |
|
23 | } |
|
24 | ||
25 | public function tweetId(int $tweetId): Lists |
|
26 | { |
|
27 | $this->parameters['tweet_id'] = (string) $tweetId; |
|
28 | ||
29 | return $this; |
|
30 | } |
|
31 | ||
32 | public function fromCursor(string $cursor): Lists |
|
33 | { |
|
34 | $this->parameters['cursor'] = $cursor; |
|
35 | ||
36 | return $this; |
|
37 | } |
|
38 | } |
|
39 |