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

Add support for getting all contacts from a list #49

Closed sangaline closed 5 years ago

sangaline commented 5 years ago

This adds a list_id argument to the ContactsClient.get_all() method which allows restricting the contacts to a specific list. The default value is all which replicates the current behavior. Example usage:

list_id = str(client.contact_lists.get_contact_lists()['lists'][0]['listId'])
client.contacts.get_all(list_id=list_id)
jpetrucciani commented 5 years ago

Looks good to me! Thanks for the contribution! 😄

jpetrucciani commented 5 years ago

This is now live on pip as version 3.2.20!