Ori Bakalash
03/26/2024, 8:44 AMtap-rest-api-mdsk
, I couldn't work out why fetching the next page didn't work. Only when i changed the source code (streams.py) to:
def get_new_paginator(self):
"""Return the requested paginator required to retrieve all data from the API.
Returns:
Paginator Class.
"""
<http://self.logger.info|self.logger.info>(
f"the next_page_token_jsonpath = {self.next_page_token_jsonpath}."
)
if (
self.pagination_request_style == "jsonpath_paginator"
or self.pagination_request_style == "default"
):
return JSONPathPaginator(self.next_page_token_jsonpath)
elif (
self.pagination_request_style == "simple_header_paginator"
): # Example <http://Gitlab.com|Gitlab.com>
return SimpleHeaderPaginator(self.next_page_token_jsonpath)
Instead of
def get_new_paginator(self):
....
elif (
self.pagination_request_style == "simple_header_paginator"
): # Example <http://Gitlab.com|Gitlab.com>
return SimpleHeaderPaginator("X-Next-Page")
do you guys think i should post a pr? do you have a different solution that doesn't require pr/forking?Reuben (Matatika)
03/26/2024, 10:14 AMX-Next-Page
to paginate?Ori Bakalash
03/26/2024, 10:16 AMReuben (Matatika)
03/26/2024, 10:21 AM