@@ 7-40 (lines=34) @@ | ||
4 | ||
5 | use PeeHaa\AsyncTwitter\Api\Request\BaseRequest; |
|
6 | ||
7 | class Entries extends BaseRequest |
|
8 | { |
|
9 | const METHOD = 'GET'; |
|
10 | ||
11 | const ENDPOINT = '/collections/entries.json'; |
|
12 | ||
13 | public function __construct(string $id) |
|
14 | { |
|
15 | parent::__construct(self::METHOD, self::ENDPOINT); |
|
16 | ||
17 | $this->parameters['id'] = $id; |
|
18 | } |
|
19 | ||
20 | public function amount(int $amount): Entries |
|
21 | { |
|
22 | $this->parameters['count'] = (string) $amount; |
|
23 | ||
24 | return $this; |
|
25 | } |
|
26 | ||
27 | public function minimumId(int $id): Entries |
|
28 | { |
|
29 | $this->parameters['min_position'] = (string) $id; |
|
30 | ||
31 | return $this; |
|
32 | } |
|
33 | ||
34 | public function maximumId(int $id): Entries |
|
35 | { |
|
36 | $this->parameters['max_position'] = (string) $id; |
|
37 | ||
38 | return $this; |
|
39 | } |
|
40 | } |
|
41 |
@@ 7-45 (lines=39) @@ | ||
4 | ||
5 | use PeeHaa\AsyncTwitter\Api\Request\BaseRequest; |
|
6 | ||
7 | class Show extends BaseRequest |
|
8 | { |
|
9 | const METHOD = 'GET'; |
|
10 | ||
11 | const ENDPOINT = '/friendships/show.json'; |
|
12 | ||
13 | public function __construct() |
|
14 | { |
|
15 | parent::__construct(self::METHOD, self::ENDPOINT); |
|
16 | } |
|
17 | ||
18 | public function sourceUserId(int $id): Show |
|
19 | { |
|
20 | $this->parameters['source_id'] = (string) $id; |
|
21 | ||
22 | return $this; |
|
23 | } |
|
24 | ||
25 | public function sourceScreenName(string $screenName): Show |
|
26 | { |
|
27 | $this->parameters['source_screen_name'] = $screenName; |
|
28 | ||
29 | return $this; |
|
30 | } |
|
31 | ||
32 | public function targetUserId(int $id): Show |
|
33 | { |
|
34 | $this->parameters['target_id'] = (string) $id; |
|
35 | ||
36 | return $this; |
|
37 | } |
|
38 | ||
39 | public function targetScreenName(string $screenName): Show |
|
40 | { |
|
41 | $this->parameters['target_screen_name'] = $screenName; |
|
42 | ||
43 | return $this; |
|
44 | } |
|
45 | } |
|
46 |