jpetrucciani / hubspot3

python3.6+ hubspot client based on hapipy, but modified to use the newer endpoints and non-legacy python
MIT License
147 stars 73 forks source link

How would you paginate the contacts? #84

Open tycooperaow opened 4 years ago

tycooperaow commented 4 years ago

I am getting the contracts all at once by using python

hb_client = Hubspot3(api_key=API_KEY)

contacts = hb_client.contacts.get_all()

but I want to be able to paginate this request instead of loading it all in at once. Perhaps 20 at a time. there's no documentation that goes over this.

jpetrucciani commented 4 years ago

Currently, there wouldn't be an easy way to paginate that with an existing call. Perhaps we could add an additional method for getting a range of contacts, taking a limit and an offset, so that you could emulate pagination

jpetrucciani commented 4 years ago

I haven't had time to look at this yet. I may be able to take a look this weekend or next, but for now, there isn't a way to do this. Feel free to open a PR if you need it sooner