Asana / python-asana

Official Python client library for the Asana API v1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to do pagination?

w- opened this issue · comments

commented

docs here say pagination is strongly preferred
https://developers.asana.com/docs/pagination

but looking at the code
https://github.com/Asana/python-asana/blob/master/asana/client.py#L78

the request function completely discards next_page from results.

How are users expected to make use of pagination? What am i missing?
my use case is retrieving tasks from a project

Thanks

commented

nm. i now see the extensive use of get_collection and how it automatically handles paging through results
https://github.com/Asana/python-asana/blob/v0.10.3/asana/client.py#L175
https://github.com/Asana/python-asana/blob/v0.10.3/asana/page_iterator.py