| @@ 16-26 (lines=11) @@ | ||
| 13 | * @param int $interestId |
|
| 14 | * @return bool |
|
| 15 | */ |
|
| 16 | public function follow($interestId) |
|
| 17 | { |
|
| 18 | $this->request->checkLoggedIn(); |
|
| 19 | ||
| 20 | $response = $this->request->followMethodCall( |
|
| 21 | $interestId, |
|
| 22 | Request::INTEREST_ENTITY_ID, |
|
| 23 | UrlHelper::RESOURCE_FOLLOW_INTEREST |
|
| 24 | ); |
|
| 25 | return $this->response->checkResponse($response); |
|
| 26 | } |
|
| 27 | ||
| 28 | /** |
|
| 29 | * Unfollow interest by ID |
|
| @@ 34-44 (lines=11) @@ | ||
| 31 | * @param int $interestId |
|
| 32 | * @return bool |
|
| 33 | */ |
|
| 34 | public function unFollow($interestId) |
|
| 35 | { |
|
| 36 | $this->request->checkLoggedIn(); |
|
| 37 | ||
| 38 | $response = $this->request->followMethodCall( |
|
| 39 | $interestId, |
|
| 40 | Request::INTEREST_ENTITY_ID, |
|
| 41 | UrlHelper::RESOURCE_UNFOLLOW_INTEREST |
|
| 42 | ); |
|
| 43 | return $this->response->checkResponse($response); |
|
| 44 | } |
|
| 45 | } |
|
| 46 | ||
| @@ 34-40 (lines=7) @@ | ||
| 31 | * @param int $boardId |
|
| 32 | * @return bool |
|
| 33 | */ |
|
| 34 | public function follow($boardId) |
|
| 35 | { |
|
| 36 | $this->request->checkLoggedIn(); |
|
| 37 | ||
| 38 | $response = $this->request->followMethodCall($boardId, Request::BOARD_ENTITY_ID, UrlHelper::RESOURCE_FOLLOW_BOARD); |
|
| 39 | return $this->response->checkResponse($response); |
|
| 40 | } |
|
| 41 | ||
| 42 | /** |
|
| 43 | * Unfollow board by boardID |
|
| @@ 48-54 (lines=7) @@ | ||
| 45 | * @param int $boardId |
|
| 46 | * @return bool |
|
| 47 | */ |
|
| 48 | public function unFollow($boardId) |
|
| 49 | { |
|
| 50 | $this->request->checkLoggedIn(); |
|
| 51 | ||
| 52 | $response = $this->request->followMethodCall($boardId, Request::BOARD_ENTITY_ID, UrlHelper::RESOURCE_UNFOLLOW_BOARD); |
|
| 53 | return $this->response->checkResponse($response); |
|
| 54 | } |
|
| 55 | ||
| 56 | protected function getScope() |
|
| 57 | { |
|
| @@ 19-25 (lines=7) @@ | ||
| 16 | * @param integer $userId |
|
| 17 | * @return bool |
|
| 18 | */ |
|
| 19 | public function follow($userId) |
|
| 20 | { |
|
| 21 | $this->request->checkLoggedIn(); |
|
| 22 | ||
| 23 | $response = $this->request->followMethodCall($userId, Request::PINNER_ENTITY_ID, UrlHelper::RESOURCE_FOLLOW_USER); |
|
| 24 | return $this->response->checkErrorInResponse($response); |
|
| 25 | } |
|
| 26 | ||
| 27 | /** |
|
| 28 | * Unfollow user by user_id |
|
| @@ 33-39 (lines=7) @@ | ||
| 30 | * @param integer $userId |
|
| 31 | * @return bool |
|
| 32 | */ |
|
| 33 | public function unFollow($userId) |
|
| 34 | { |
|
| 35 | $this->request->checkLoggedIn(); |
|
| 36 | ||
| 37 | $response = $this->request->followMethodCall($userId, Request::PINNER_ENTITY_ID, UrlHelper::RESOURCE_UNFOLLOW_USER); |
|
| 38 | return $this->response->checkErrorInResponse($response); |
|
| 39 | } |
|
| 40 | ||
| 41 | /** |
|
| 42 | * Get different user data, for example, followers, following, pins. |
|