1 | <?php |
||
12 | class Pinners extends Provider |
||
13 | { |
||
14 | use Searchable, Followable; |
||
15 | |||
16 | protected $loginRequiredFor = [ |
||
17 | 'follow', |
||
18 | 'unFollow', |
||
19 | ]; |
||
20 | |||
21 | protected $searchScope = 'people'; |
||
22 | protected $entityIdName = 'user_id'; |
||
23 | protected $followersFor = 'username'; |
||
24 | |||
25 | protected $followUrl = UrlBuilder::RESOURCE_FOLLOW_USER; |
||
26 | protected $unFollowUrl = UrlBuilder::RESOURCE_UNFOLLOW_USER; |
||
27 | protected $followersUrl = UrlBuilder::RESOURCE_USER_FOLLOWERS; |
||
28 | |||
29 | /** |
||
30 | * Get user info. |
||
31 | * If username param is not specified, will |
||
32 | * return info for logged user. |
||
33 | * |
||
34 | * @param string $username |
||
35 | * |
||
36 | * @return array |
||
37 | */ |
||
38 | public function info($username) |
||
42 | |||
43 | /** |
||
44 | * Get following info for pinner. |
||
45 | * |
||
46 | * @param string $username |
||
47 | * @param string $type |
||
48 | * @param int $limit |
||
49 | * @return Iterator |
||
50 | * @throws WrongFollowingType |
||
51 | */ |
||
52 | public function following($username, $type = UrlBuilder::FOLLOWING_PEOPLE, $limit = 0) |
||
62 | |||
63 | /** |
||
64 | * @codeCoverageIgnore |
||
65 | * Get following people for pinner. |
||
66 | * |
||
67 | * @param string $username |
||
68 | * @param int $limit |
||
69 | * @return Iterator |
||
70 | */ |
||
71 | public function followingPeople($username, $limit = 0) |
||
75 | |||
76 | /** |
||
77 | * @codeCoverageIgnore |
||
78 | * Get following boards for pinner. |
||
79 | * |
||
80 | * @param string $username |
||
81 | * @param int $limit |
||
82 | * @return Iterator |
||
83 | */ |
||
84 | public function followingBoards($username, $limit = 0) |
||
88 | |||
89 | /** |
||
90 | * @codeCoverageIgnore |
||
91 | * Get following interests for pinner. |
||
92 | * |
||
93 | * @param string $username |
||
94 | * @param int $limit |
||
95 | * @return Iterator |
||
96 | * @throws WrongFollowingType |
||
97 | */ |
||
98 | public function followingInterests($username, $limit = 0) |
||
102 | |||
103 | /** |
||
104 | * Get pinner pins. |
||
105 | * |
||
106 | * @param string $username |
||
107 | * @param int $limit |
||
108 | * |
||
109 | * @return Iterator |
||
110 | */ |
||
111 | public function pins($username, $limit = 0) |
||
117 | |||
118 | /** |
||
119 | * Get pins that user likes. |
||
120 | * |
||
121 | * @param string $username |
||
122 | * @param int $limit |
||
123 | * @return Iterator |
||
124 | */ |
||
125 | public function likes($username, $limit = 0) |
||
131 | |||
132 | /** |
||
133 | * @param string $username |
||
134 | * @return bool|Response |
||
135 | */ |
||
136 | public function block($username) |
||
145 | |||
146 | /** |
||
147 | * @param int $userId |
||
148 | * @return bool|Response |
||
149 | */ |
||
150 | public function blockById($userId) |
||
156 | |||
157 | /** |
||
158 | * @param string $username |
||
159 | * @param string $url |
||
160 | * @param int $limit |
||
161 | * |
||
162 | * @return Iterator |
||
163 | */ |
||
164 | protected function paginate($username, $url, $limit) |
||
173 | } |
||
174 |