hubspot3

python3.6+ hubspot client based on hapipy, but modified to use the newer endpoints and non-legacy python

MIT License

Downloads
33.9K
Stars
147
Committers
40

Bot releases are hidden (Show)

hubspot3 - Improvements to the BlogClient and BlogCommentsClient

Published by jpetrucciani over 5 years ago

Thanks to @jsancho-gpl (#36), we now have many improvements on top of the BlogClient and BlogCommentsClient!

hubspot3 - Fixing pip configuration issues

Published by jpetrucciani over 5 years ago

This release fixes the declared dependencies in the setup.py file, so that hubspot3 can be installed correctly in environments where requests isn't already installed (#35, thanks @hcNick for reporting this!).

hubspot3 - Updated BlogClient

Published by jpetrucciani over 5 years ago

This release updates the BlogClient to use the latest version of the API (v2) and adds a BlogCommentsClient (#34, both thanks to @jsancho-gpl )!

hubspot3 - ProductsClient

Published by jpetrucciani over 5 years ago

This release adds a start to the new ProductsClient (#33, thanks @zimmerel!)

hubspot3 - FormsClient and TicketsClient

Published by jpetrucciani over 5 years ago

This release adds the start of the new TicketsClient (thanks @vivithemage!), as well as some enhancements to the FormSubmissionClient that should fix #30 and #31 (thanks @advance512 for reporting these!), and a real start to the actual FormsClient.

This also adds some tests for the above clients, as well as adding the new clients underneath the top level Hubspot3 client.

hubspot3 - Top level Hubspot3 client

Published by jpetrucciani over 5 years ago

This release adds a new method of instantiating all of the clients from a single top level client called Hubspot3. You can now simply create a new Hubspot3 object, and then you will have access to all of the clients (inheriting the top client's settings) as attributes of the top client. Example:

from hubspot3 import Hubspot3

hubspot = Hubspot3(api_key='$API_KEY')

hubspot.contacts  # ContactsClient

This also adds:

  • new informative exceptions on configuration errors (HubspotBadConfig, HubspotNoConfig)
  • HubspotRateLimited exception on status_code == 429 for all API calls
  • Hubspot3.usage_limit functionality on the top level client
  • Hubspot3.me functionality for pulling account details
  • improvements to the tests
  • ContactsClient get_recently_created and get_recently_modified

The Hubspot3.usage_limit object on your Hubspot3 instance will respect the HubSpot API caching, and will only pull when it knows it will retrieve a new value. It contains the following attributes:

collected_at           # datetime at which this data was collected by the HubSpot API
current_usage          # how many calls you've used today
resets_at              # datetime at which this limit resets
usage_limit            # how many calls you're limited to today
until_reset            # seconds until limit reset
until_cache_expire     # seconds until the cache expires
calls_remaining        # how many calls you have 
calls_used             # percentage of calls used today, as a float
hubspot3 - Removing pycurl and tox, and setting up new testing suite

Published by jpetrucciani over 5 years ago

This release removes the pycurl dependency and the associated code, as well as tox and the old tests. I've started a new test setup and will be building out those tests soon, but for right now, these tests exist in a very early state.

After installing requirements-dev.txt, you can run the tests with make!

Also included are some more type annotations, and some expanded docstrings in certain functions/methods.

hubspot3 - Adding a way to get contacts at a company

Published by jpetrucciani over 5 years ago

Thanks to @myles (#28) we now have support for getting contacts at a company!

hubspot3 - Adding a CRM AssociationsClient

Published by jpetrucciani over 5 years ago

Thanks to @tornikenats (#27), we now have a client for CRM Associations!

hubspot3 - Retry API calls by default

Published by jpetrucciani over 5 years ago

In relation to #25, we're changing hubspot3 to default to retrying API calls up to 2 times. It is configurable via the Client constructor, or on individual API calls made from the Clients.

hubspot3 - Adding a CRM PipelinesClient

Published by jpetrucciani over 5 years ago

Thanks to @danilolessa (#24), we now have a client for CRM Pipelines!

hubspot3 - Fixing OAuth token support

Published by jpetrucciani over 5 years ago

Thanks to @nusnus, we've found out that the OAuth authentication scheme was incorrect on this library. This release contains the fix to #22!

hubspot3 - Adding a way to delete companies

Published by jpetrucciani over 5 years ago

Thanks to @SioKCronin, we now have a way to delete companies from the CompaniesClient!

hubspot3 - Adding Recently Created/Modified Companies

Published by jpetrucciani over 5 years ago

Thanks to @kevin2357, we now have endpoints for getting recently created/modified companies!

hubspot3 - Adding search by domain to CompaniesClient

Published by jpetrucciani over 5 years ago

Added basic support for this API call, which allows you to search for companies associated with a certain domain.

hubspot3 - Fetching extra properties for get_all on companies

Published by jpetrucciani over 5 years ago

This adds the same functionality for companies, and refines the extra_properties kwarg to accept either a list or a bare string (this is also applied to deals and contacts).

The readme has also been switched to RST so it will render on pypi

hubspot3 - Fetching extra properties for get_all and get_batch Contacts

Published by jpetrucciani almost 6 years ago

Thanks @NickBrecht for bringing up this issue! #16

You should now be able to pass a list to the ContactsClient.get_all and ContactsClient.get_batch functions called extra_properties, which should contain a list of extra properties (visible on this page of the HubSpot docs) you'd like to query for. This will then extend the default list, including those properties in your response

hubspot3 - Fetching extra properties for get_all Deals

Published by jpetrucciani almost 6 years ago

Thanks @zimmerel for bringing up this issue! https://github.com/jpetrucciani/hubspot3/issues/14

You should now be able to pass a list to the DealsClient.get_all function called extra_properties, which should contain a list of extra properties (visible on this page of the HubSpot docs) you'd like to query for. This will then extend the default list, including those properties in your response

hubspot3 - Bug fix for HubspotError

Published by jpetrucciani almost 6 years ago

Thanks @ArtemGordinsky for catching this issue and fixing it!

hubspot3 - Tweaking the HubspotError to be more tracker friendly

Published by jpetrucciani almost 6 years ago

Thanks @ArtemGordinsky for bringing this issue to attention, and creating a PR for it!

The first line of a HubspotError's string representation will now have the actual error message instead of the ---- request ---- line.