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

Unable to pass params to contacts.get_all() #111

Open kvdb opened 3 years ago

kvdb commented 3 years ago

As documented in the project README (https://github.com/jpetrucciani/hubspot3#passing-params), I should pass params to send extra properties to hubspot. Seems this doesn't work for contacts:

contacts = client.contacts.get_all(params={"showListMemberships": "true"}, extra_properties=["hs_language"])

I got:

    contacts = client.contacts.get_all(params={"showListMemberships": "true"}, extra_properties=["hs_language"])
  File "/home/kvdb/.local/share/virtualenvs/send-cMuOhGEa/lib/python3.8/site-packages/hubspot3/contacts.py", line 163, in get_all
    batch = self._call(
TypeError: _call() got multiple values for keyword argument 'params'
freekklein commented 3 years ago

Hi kvdb, No you can only get contacts with extra properties, like: contacts = client.contacts.get_all(extra_properties=["hs_language"])

And get extra information on Memberships by diving into: client.contacts.get_contact_by_id(contact_id="ID")

In here you have you ListMemberships information