Comments (10)
Er- so how about an example that shows how to use BaseClient with stuff you didn't write yet?
It would help completeness.
from hubspot3.
Yeah I could add a snippet about that in just a bit
from hubspot3.
from hubspot3.
Even something like this in the readme start (I can PR):
from hubspot3.companies import CompaniesClient
API = "your-api"
a = CompaniesClient(api_key=API)
Better if it has a bit more examples to other parts. For example I can't find where to get company properties API.
from hubspot3.
Feel free to PR! I can merge that in and expand on it if you'd like!
Currently I don't have a client put together for the Company Properties API. I'm missing a few different APIs, some of which were added/changed after the last time I worked on this repo.
I should be able to revisit and add some of these APIs soon, but in the meantime, could you list out the APIs I'm missing that you would like to have?
from hubspot3.
Found you can get the company properties if you get each company individually. But Started running in to rate limits, That would also be helpful to document )
from hubspot3.
Ahh yeah, you'll be able to get all of the properties for a given company on the get company method, but there's no CompanyPropertiesClient to interact with the fine-grained properties API that hubspot has.
As for rate limits, it'll just be however Hubspot rate limits their API:
https://developers.hubspot.com/apps/api_guidelines
from hubspot3.
I wrote one myself since I actually need this.
import json
from hubspot3.base import BaseClient
PIPELINES_API_VERSION = '1'
class PipelineClient(BaseClient):
"""
Lets you extend to non-existing clients, this example extends pipelines
"""
def __init__(self, *args, **kwargs):
super(PipelineClient, self).__init__(*args, **kwargs)
def get_pipelines(self, **options):
params = {}
return self._call('pipelines', method='GET', params=params)
def _get_path(self, subpath):
return 'deals/v{}/{}'.format(
self.options.get('version') or PIPELINES_API_VERSION,
subpath
)
if __name__ == "__main__":
import json
API = "your_api"
a = PipelineClient(api_key=API)
print(json.dumps(a.get_pipelines()))
from hubspot3.
Also, no docs on how to use params, for example:
import json
from hubspot3.deals import DealsClient
deal_id = "12345"
API = "your_api"
params = {"includePropertyVersions": "true"} # Note values are not pythonized
deals_client = DealsClient(api_key=API)
deal_data = deals_client.get(deal_id, params=params)
print(json.dumps(deal_data))
from hubspot3.
Added these examples to the readme! I probably should split that off into a wiki or some more involved documentation at some point
from hubspot3.
Related Issues (20)
- Trouble using the command line "AttributeError: 'int' object has no attribute 'value'" HOT 16
- Not found response on create or update pipeline HOT 2
- How would you paginate the contacts? HOT 2
- Question: Transactional Email API HOT 1
- Result window too large when querying recently modified companies HOT 3
- How to paginate contacts? HOT 1
- Engagement API, function get_associated contains two print statements HOT 2
- No verbose output to log in case of retries
- get_all() fails HOT 4
- Async implementation is in the roadmap? HOT 1
- Updating a Hubspot Company is not doing anything
- Get data from HubspotConflict
- Review API and use version 3 instead of 1?
- Unable to pass params to contacts.get_all() HOT 1
- Help needed - Is there any way to load all the events using Web Analytics API
- Error on calling client.usage_limits
- Feature request: support for /email/public/v1/events endpoint
- ACCESS TOKEN example HOT 1
- Disabling auto-retry spams out warnings HOT 2
- Emit metrics about API calls
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hubspot3.