1 | <?php |
||
13 | class Boards extends Provider |
||
14 | { |
||
15 | use SearchTrait, FollowTrait, FollowersTrait; |
||
16 | |||
17 | /** |
||
18 | * Get boards for user by username |
||
19 | * @param string $username |
||
20 | * @return array|bool |
||
21 | */ |
||
22 | public function forUser($username) |
||
28 | |||
29 | /** |
||
30 | * Get info about user's board |
||
31 | * @param string $username |
||
32 | * @param string $board |
||
33 | * @return array|bool |
||
34 | */ |
||
35 | public function info($username, $board) |
||
49 | |||
50 | /** |
||
51 | * Get pins form board by boardId |
||
52 | * @param int $boardId |
||
53 | * @param int $batchesLimit |
||
54 | * @return \Iterator |
||
55 | */ |
||
56 | public function pins($boardId, $batchesLimit = 0) |
||
65 | |||
66 | /** |
||
67 | * @param int $boardId |
||
68 | * @param array $bookmarks |
||
69 | * @return array|bool |
||
70 | */ |
||
71 | public function getPinsFromBoard($boardId, $bookmarks = []) |
||
79 | |||
80 | /** |
||
81 | * Run GET api request to boards resource |
||
82 | * @param array $query |
||
83 | * @param string $url |
||
84 | * @param bool $pagination |
||
85 | * @return array|bool |
||
86 | */ |
||
87 | protected function boardsGetCall($query, $url, $pagination = false) |
||
97 | |||
98 | /** |
||
99 | * Delete your board by ID |
||
100 | * |
||
101 | * @param int $boardId |
||
102 | * @return array|bool |
||
103 | */ |
||
104 | public function delete($boardId) |
||
108 | |||
109 | /** |
||
110 | * Create a new board |
||
111 | * |
||
112 | * @param string $name |
||
113 | * @param string $description |
||
114 | * @param string $privacy Can be 'public' or 'secret'. 'public by default. |
||
115 | * @return array|bool |
||
116 | */ |
||
117 | public function create($name, $description, $privacy = 'public') |
||
127 | |||
128 | /** |
||
129 | * Get board followers |
||
130 | * |
||
131 | * @param $boardId |
||
132 | * @param int $batchesLimit |
||
133 | * @return Iterator |
||
134 | */ |
||
135 | public function followers($boardId, $batchesLimit = 0) |
||
141 | |||
142 | /** |
||
143 | * Search scope |
||
144 | * |
||
145 | * @return string |
||
146 | */ |
||
147 | protected function getScope() |
||
151 | |||
152 | protected function getEntityIdName() |
||
156 | |||
157 | /** |
||
158 | * Follow resource |
||
159 | * |
||
160 | * @return string |
||
161 | */ |
||
162 | protected function getFollowUrl() |
||
166 | |||
167 | /** |
||
168 | * UnFollow resource |
||
169 | * @return string |
||
170 | */ |
||
171 | protected function getUnfFollowUrl() |
||
175 | } |