private function getTokenFromResponse(array $data): string
    {
        $url = $data['nextSyncUrl'] ?? $data['nextPageUrl'];

        $queryValues = [];
        \parse_str(\parse_url($url, \PHP_URL_QUERY), $queryValues);

        return $queryValues['sync_token'];
    }
private function getTokenFromResponse(array $data): string
    {
        $url = $data['nextSyncUrl'] ?? $data['nextPageUrl'];

        $queryValues = [];
        \parse_str(\parse_url($url, \PHP_URL_QUERY), $queryValues);

        return $queryValues['sync_token'];
    }
private function getTokenFromResponse ( array $ data ) : string { $ url = $ data [ 'nextSyncUrl' ] ?? $ data [ 'nextPageUrl' ] ; $ queryValues = [ ] ; \ parse_str ( \ parse_url ( $ url , \ PHP_URL_QUERY ) , $ queryValues ) ; return $ queryValues [ 'sync_token' ] ; }
Parses the sync_token out of an URL supplied by the API.

@param array $data The API response

@return string
Parses the sync_token out of an URL supplied by the API .