Open snappet-panksy opened 5 years ago
Indeed, there is no auto paging on the endpoints. It would be fairly easy to implement by using the informations fetched from the endpoints that are populated in https://github.com/DavidRouyer/pipedrive-dotnet/blob/master/src/Pipedrive.net/Models/Response/PaginationInfo.cs, but I don't I'll implement it due to the number of requests it could create (Pipedrive is kinda slow) and there is the rate limiting to take into account.
You can paginate through the pages manually.
I'm trying to use manual pagination with Deals but incrementing StartPage in DealsFilter I'm getting next page in the list.....how should I get the 'stop' condition? When I'll get the last one?
..my error is working on StartPage considering as number of page instead of number of item in the list.....probably it's better to change the name of the property.
It would be beneficial if there was an improved method of auto pagination. Especially since the return type for GetAll() is typically a read-only list. Also, as mentioned above the StartPage property is really the StartRecord.
I am also wondering how to know if there is a next page as no next page value on read only list.
I believe the paging is not working with any client but I specifically tested it on the Activity Client with an integration test. - The default page size is 100 there are more than 100 activities in the sandbox. This test fails. I can see that the API Pagination is expecting items in the header which are no longer there.
I put in a nasty hack in a branch I am using but I think there must be a better way to resolve this using your existing pattern.
ReadOnlyPagesCollection never has a next page:
nextPageUrl is always null.