public function getCurrent(array $fields = []): User
    {
        $response = $this->client->get($this->prepareUrlForKey('get-current-user'), ['_fields' => $fields]);

        return new User($response->getDecodedBody());
    }
public function getCurrent(array $fields = []): User
    {
        $response = $this->client->get($this->prepareUrlForKey('get-current-user'), ['_fields' => $fields]);

        return new User($response->getDecodedBody());
    }
public function getCurrent ( array $ fields = [ ] ) : User { $ response = $ this -> client -> get ( $ this -> prepareUrlForKey ( 'get-current-user' ) , [ '_fields' => $ fields ] ) ; return new User ( $ response -> getDecodedBody ( ) ) ; }
Gets the information about the current logged-in user.

@param string[] $fields The subset of fields to get (defaults to all)

@return User
Gets the information about the current logged - in user .