belong-inc / go-hubspot Goto Github PK
View Code? Open in Web Editor NEWHubSpot API Go client
License: Apache License 2.0
HubSpot API Go client
License: Apache License 2.0
Add a document of how to add new domain in the client
When adding a new domain in client like below, gohubspot_test.go needs to be updated in unique way otherwise the tests will fail.
type Client struct {
...
CRM *CRM
Marketing *Marketing // <- this
}
Make how to add a domain clear.
Is your feature request related to a problem? Please describe.
At the moment if I want to update a contact I would need to know the contact hubspot ID where I would just like to use the contact email.
Describe the solution you'd like
Either improve on the current function to facilitate either option or an additional function to allow for this.
Version
Describe the bug
If the HubSpot field does not have a value, the struct will be marshalled with nil.
But, the HsStr.String is a method of value type, a call with nil will fail and a panic will be occurred.
We need to make the receiver a pointer and do a nil check.
Is your feature request related to a problem? Please describe.
HubSpot added private apps (scoped api key) auth.
go-hubspot needs to support this as well.
https://developers.hubspot.com/docs/api/private-apps
Sample of the api call using private apps from HubSpot.
axios.get('https://api.hubapi.com/crm/v3/objects/contacts',
{
headers: {
'Authorization': `Bearer ${YOUR_TOKEN}`,
'Content-Type': 'application/json'
}
},
(err, data) => {
// Handle the API response
}
);
Describe the solution you'd like
As with API key and OAuth, we should be able to pass private apps token to the client in the form of an Option.
Describe alternatives you've considered
Additional context
On another note, APIKey will be discontinued on November 30 2022.
https://developers.hubspot.com/changelog/upcoming-api-key-sunset
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.