We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I am not getting response object when using the pages() method. In my response I get pagination details as below:
{ "response": [], "pagination":{ "current": 1, "previous": null, "next": 2, "per_page": 100, "pages": 2 } }
The request object contains below details:
{ "api_key": "****", "sort": "updated_at", "order": "asc", "page": 1, "per_page": 10 }
I had implemented the get_iterator_next_requests_kwargs function accordingly which works correctly-
def get_iterator_next_request_kwargs( self, iterator_request_kwargs, response_data, response ): paging = response_data.get('pagination') if not paging: return next_page = paging.get("next") if next_page: params = iterator_request_kwargs["params"] params["page"] = next_page iterator_request_kwargs["params"] = params return iterator_request_kwargs
When iterating over the resource like:
resp = api.resource().get(params=params) for r in resp().pages(max_pages=2): print(r().data)
I am getting below output as type class str, instead of the response object
response pagination response pagination
Am I doing something wrong here? Please do help. Thanks
The text was updated successfully, but these errors were encountered:
🤔 that looks pretty standard. I can't spot any issues in the things you sent.
Sorry, something went wrong.
No branches or pull requests
Hi,
I am not getting response object when using the pages() method.
In my response I get pagination details as below:
The request object contains below details:
I had implemented the get_iterator_next_requests_kwargs function accordingly which works correctly-
When iterating over the resource like:
I am getting below output as type class str, instead of the response object
Am I doing something wrong here? Please do help. Thanks
The text was updated successfully, but these errors were encountered: