| 1 | <?php |
||
| 5 | trait Followable |
||
| 6 | { |
||
| 7 | use ProviderTrait; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * Follow user by user_id. |
||
| 11 | * |
||
| 12 | * @param $entityId |
||
| 13 | * |
||
| 14 | * @return bool |
||
| 15 | */ |
||
| 16 | public function follow($entityId) |
||
| 20 | |||
| 21 | /** |
||
| 22 | * UnFollow user by user_id. |
||
| 23 | * |
||
| 24 | * @param $entityId |
||
| 25 | * |
||
| 26 | * @return bool |
||
| 27 | */ |
||
| 28 | public function unFollow($entityId) |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Make api call for follow/unfollow a entity (user/board). |
||
| 35 | * |
||
| 36 | * @param int $entityId |
||
| 37 | * @param string $resourceUrl |
||
| 38 | * |
||
| 39 | * @return bool |
||
| 40 | */ |
||
| 41 | protected function followCall($entityId, $resourceUrl) |
||
| 47 | |||
| 48 | abstract protected function getEntityIdName(); |
||
| 49 | |||
| 50 | abstract protected function getFollowUrl(); |
||
| 51 | |||
| 52 | abstract protected function getUnfFollowUrl(); |
||
| 53 | } |
||
| 54 |