Paging
Closed this issue · 5 comments
In looking at the Client.py code it doesn't appear this wrapper handles paging, right?
For example, if I use get_persons and PD sends back 1000 records I will only get the first 500.
I don't see any code that makes me think it would handle paging, but want to be 100% sure as I'm fairly new to Python. If I'm understanding correctly, I'll work to add paging as I'll need it for the script I'm putting together.
Thanks,
Aaron
Hello aaroneden
Take a look of this to know about pipedrive API pagination:
https://pipedrive.readme.io/docs/core-api-concepts-responses
https://pipedrive.readme.io/docs/core-api-concepts-pagination
Currently the wrapper does not handle pagination automatically, but many responses from de PD API contain the attr additional_data
wich contains pagination information.
It looks like this:
persons = client.get_persons(start=0, limit=4, more_items_in_collection=True)
This will get a response from PD that will contain the additional_data that looks like this:
{'pagination': {'start': 0, 'limit': 4, 'more_items_in_collection': True, 'next_start': 4}}
This is a good staring point to add pagination support to the wrapper.
Did you get pagination to work?