Improve how to deal with Pagination
browniebroke opened this issue · 3 comments
The way we deal with pagination is a bit divided between the get_...s
and iter_...s
methods, which caused some usage issues (see #126 and #127).
We should aim at unifying these 2 type of methods to reduce this confusion. We could either switch the get_...s
to iterate over all the pages by default but it might cause some unexpected API consumption to the users.
I recently came across another option while using PyGithub and I liked how they do it.
Their solution is to return a PaginatedResult
. It transparently iterate through the pages if you consume it in a for loop while also letting you get a specific page or the total count of elements in the result set.
This would be a breaking change, so we can update the get_...s
methods and remove the iter_...s
in one go.
Hello. Still no updates on the issue ?
Not as far as I know.
I am trying to use the workaround described in the issue #126 but I am struggling to understand the change in the code. There are a lost of new methods. Should I implement them or is there a quick workaround ?
I am trying to get all the tracks of an user but i cannot find a way to get more than 25 tracks.