Get user subscribers by id.
This commit is contained in:
parent
055b967996
commit
76d75542fd
|
@ -59,6 +59,25 @@ class UserApi extends AbstractApi
|
|||
return $users;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user subscribers by user id
|
||||
*
|
||||
* @param int $id
|
||||
* @return User[]
|
||||
*/
|
||||
public function getUserSubscribersById($id)
|
||||
{
|
||||
if (!is_numeric($id)) {
|
||||
throw new \InvalidArgumentException('$id must be an integer');
|
||||
}
|
||||
|
||||
$usersList = $this->getGetRequestData('/api/user/id/' . (int) $id . '/subscribers', [], true);
|
||||
|
||||
$users = $this->getUsersFromList($usersList);
|
||||
|
||||
return $users;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return User[]
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue