public function list(int $offset = 0, int $limit = self::MAX_ITEMS_PER_REQUEST, array $fields = []): array
    {
        /** @var User[] $users */
        $users = [];
        $response = $this->client->get($this->prepareUrlForKey('get-users'), [
            '_skip' => $offset,
            '_limit' => $limit,
            '_fields' => $fields,
        ]);

        $responseData = $response->getDecodedBody();

        foreach ($responseData['data'] as $user) {
            $users[] = new User($user);
        }

        return $users;
    }
public function list(int $offset = 0, int $limit = self::MAX_ITEMS_PER_REQUEST, array $fields = []): array
    {
        /** @var User[] $users */
        $users = [];
        $response = $this->client->get($this->prepareUrlForKey('get-users'), [
            '_skip' => $offset,
            '_limit' => $limit,
            '_fields' => $fields,
        ]);

        $responseData = $response->getDecodedBody();

        foreach ($responseData['data'] as $user) {
            $users[] = new User($user);
        }

        return $users;
    }
public function list ( int $ offset = 0 , int $ limit = self :: MAX_ITEMS_PER_REQUEST , array $ fields = [ ] ) : array { /** @var User[] $users */ $ users = [ ] ; $ response = $ this -> client -> get ( $ this -> prepareUrlForKey ( 'get-users' ) , [ '_skip' => $ offset , '_limit' => $ limit , '_fields' => $ fields , ] ) ; $ responseData = $ response -> getDecodedBody ( ) ; foreach ( $ responseData [ 'data' ] as $ user ) { $ users [ ] = new User ( $ user ) ; } return $ users ; }
Gets all the users who are members of the same organizations as the user
currently making the request.

@param int      $offset The offset from which start getting the items
@param int      $limit  The maximum number of items to get
@param string[] $fields The subset of fields to get (defaults to all)

@return User[]
Gets all the users who are members of the same organizations as the user currently making the request .