Releases: jpetrucciani/hubspot3
Improvements to the BlogClient and BlogCommentsClient
Thanks to @jsancho-gpl (#36), we now have many improvements on top of the BlogClient
and BlogCommentsClient
!
Fixing pip configuration issues
Updated BlogClient
This release updates the BlogClient
to use the latest version of the API (v2) and adds a BlogCommentsClient
(#34, both thanks to @jsancho-gpl )!
ProductsClient
This release adds a start to the new ProductsClient
(#33, thanks @zimmerel!)
FormsClient and TicketsClient
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.
Top level Hubspot3 client
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 clientHubspot3.me
functionality for pulling account details- improvements to the tests
- ContactsClient
get_recently_created
andget_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
Removing pycurl and tox, and setting up new testing suite
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.
Adding a way to get contacts at a company
Thanks to @myles (#28) we now have support for getting contacts at a company!
Adding a CRM AssociationsClient
Thanks to @tornikenats (#27), we now have a client for CRM Associations!
Retry API calls by default
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.