@@ 13-88 (lines=76) @@ | ||
10 | ||
11 | namespace Teebot\Api\Method; |
|
12 | ||
13 | class GetUpdates extends AbstractMethod |
|
14 | { |
|
15 | const NAME = 'getUpdates'; |
|
16 | ||
17 | protected $offset; |
|
18 | ||
19 | protected $limit = 1; |
|
20 | ||
21 | protected $timeout = 3; |
|
22 | ||
23 | protected $supportedProperties = [ |
|
24 | 'offset' => false, |
|
25 | 'limit' => false, |
|
26 | 'timeout' => false |
|
27 | ]; |
|
28 | ||
29 | /** |
|
30 | * @return mixed |
|
31 | */ |
|
32 | public function getOffset() |
|
33 | { |
|
34 | return $this->offset; |
|
35 | } |
|
36 | ||
37 | /** |
|
38 | * @param mixed $offset |
|
39 | * |
|
40 | * @return $this |
|
41 | */ |
|
42 | public function setOffset($offset) |
|
43 | { |
|
44 | $this->offset = $offset; |
|
45 | ||
46 | return $this; |
|
47 | } |
|
48 | ||
49 | /** |
|
50 | * @return int |
|
51 | */ |
|
52 | public function getLimit() |
|
53 | { |
|
54 | return $this->limit; |
|
55 | } |
|
56 | ||
57 | /** |
|
58 | * @param int $limit |
|
59 | * |
|
60 | * @return $this |
|
61 | */ |
|
62 | public function setLimit($limit) |
|
63 | { |
|
64 | $this->limit = $limit; |
|
65 | ||
66 | return $this; |
|
67 | } |
|
68 | ||
69 | /** |
|
70 | * @return int |
|
71 | */ |
|
72 | public function getTimeout() |
|
73 | { |
|
74 | return $this->timeout; |
|
75 | } |
|
76 | ||
77 | /** |
|
78 | * @param int $timeout |
|
79 | * |
|
80 | * @return $this |
|
81 | */ |
|
82 | public function setTimeout($timeout) |
|
83 | { |
|
84 | $this->timeout = $timeout; |
|
85 | ||
86 | return $this; |
|
87 | } |
|
88 | } |
|
89 |
@@ 15-92 (lines=78) @@ | ||
12 | ||
13 | use Teebot\Api\Entity\UserProfilePhotos; |
|
14 | ||
15 | class GetUserProfilePhotos extends AbstractMethod |
|
16 | { |
|
17 | const NAME = 'getUserProfilePhotos'; |
|
18 | ||
19 | const RETURN_ENTITY = UserProfilePhotos::class; |
|
20 | ||
21 | protected $user_id; |
|
22 | ||
23 | protected $offset; |
|
24 | ||
25 | protected $limit; |
|
26 | ||
27 | protected $supportedProperties = [ |
|
28 | 'user_id' => true, |
|
29 | 'offset' => false, |
|
30 | 'limit' => false |
|
31 | ]; |
|
32 | ||
33 | /** |
|
34 | * @return mixed |
|
35 | */ |
|
36 | public function getUserId() |
|
37 | { |
|
38 | return $this->user_id; |
|
39 | } |
|
40 | ||
41 | /** |
|
42 | * @param mixed $user_id |
|
43 | * |
|
44 | * @return $this |
|
45 | */ |
|
46 | public function setUserId($user_id) |
|
47 | { |
|
48 | $this->user_id = $user_id; |
|
49 | ||
50 | return $this; |
|
51 | } |
|
52 | ||
53 | /** |
|
54 | * @return mixed |
|
55 | */ |
|
56 | public function getOffset() |
|
57 | { |
|
58 | return $this->offset; |
|
59 | } |
|
60 | ||
61 | /** |
|
62 | * @param mixed $offset |
|
63 | * |
|
64 | * @return $this |
|
65 | */ |
|
66 | public function setOffset($offset) |
|
67 | { |
|
68 | $this->offset = $offset; |
|
69 | ||
70 | return $this; |
|
71 | } |
|
72 | ||
73 | /** |
|
74 | * @return mixed |
|
75 | */ |
|
76 | public function getLimit() |
|
77 | { |
|
78 | return $this->limit; |
|
79 | } |
|
80 | ||
81 | /** |
|
82 | * @param mixed $limit |
|
83 | * |
|
84 | * @return $this |
|
85 | */ |
|
86 | public function setLimit($limit) |
|
87 | { |
|
88 | $this->limit = $limit; |
|
89 | ||
90 | return $this; |
|
91 | } |
|
92 | } |
|
93 |