1 | <?php |
||
13 | class Boards extends Provider |
||
14 | { |
||
15 | use Searchable, Followable, HasFollowers; |
||
16 | |||
17 | protected $loginRequired = [ |
||
18 | 'delete', |
||
19 | 'create', |
||
20 | 'follow', |
||
21 | 'unFollow', |
||
22 | ]; |
||
23 | |||
24 | /** |
||
25 | * Get boards for user by username. |
||
26 | * |
||
27 | * @param string $username |
||
28 | * |
||
29 | * @return array|bool |
||
30 | */ |
||
31 | public function forUser($username) |
||
35 | |||
36 | /** |
||
37 | * Get info about user's board. |
||
38 | * |
||
39 | * @param string $username |
||
40 | * @param string $board |
||
41 | * |
||
42 | * @return array|bool |
||
43 | */ |
||
44 | public function info($username, $board) |
||
56 | |||
57 | /** |
||
58 | * Get pins from board by boardId. |
||
59 | * |
||
60 | * @param int $boardId |
||
61 | * @param int $batchesLimit |
||
62 | * |
||
63 | * @return Iterator |
||
64 | */ |
||
65 | public function pins($boardId, $batchesLimit = 0) |
||
73 | |||
74 | /** |
||
75 | * @param int $boardId |
||
76 | * @param array $bookmarks |
||
77 | * |
||
78 | * @return array|bool |
||
79 | */ |
||
80 | public function getPinsFromBoard($boardId, $bookmarks = []) |
||
86 | |||
87 | /** |
||
88 | * Delete your board by ID. |
||
89 | * |
||
90 | * @param int $boardId |
||
91 | * |
||
92 | * @return bool |
||
93 | */ |
||
94 | public function delete($boardId) |
||
98 | |||
99 | /** |
||
100 | * Create a new board. |
||
101 | * |
||
102 | * @param string $name |
||
103 | * @param string $description |
||
104 | * @param string $privacy Can be 'public' or 'secret'. 'public' by default. |
||
105 | * |
||
106 | * @return bool |
||
107 | */ |
||
108 | public function create($name, $description, $privacy = 'public') |
||
118 | |||
119 | /** |
||
120 | * Get board followers. |
||
121 | * |
||
122 | * @param $boardId |
||
123 | * @param int $batchesLimit |
||
124 | * |
||
125 | * @return Iterator |
||
126 | */ |
||
127 | public function followers($boardId, $batchesLimit = 0) |
||
133 | |||
134 | /** |
||
135 | * Search scope. |
||
136 | * |
||
137 | * @return string |
||
138 | */ |
||
139 | protected function getScope() |
||
143 | |||
144 | protected function getEntityIdName() |
||
148 | |||
149 | /** |
||
150 | * Follow resource. |
||
151 | * |
||
152 | * @return string |
||
153 | */ |
||
154 | protected function getFollowUrl() |
||
158 | |||
159 | /** |
||
160 | * UnFollow resource. |
||
161 | * |
||
162 | * @return string |
||
163 | */ |
||
164 | protected function getUnfFollowUrl() |
||
168 | } |
||
169 |