Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abhiyerra/hubspot
HubSpot API in Golang
https://github.com/abhiyerra/hubspot
Last synced: 13 days ago
JSON representation
HubSpot API in Golang
- Host: GitHub
- URL: https://github.com/abhiyerra/hubspot
- Owner: abhiyerra
- License: mit
- Created: 2016-06-21T22:58:55.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-06-21T23:09:16.000Z (over 8 years ago)
- Last Synced: 2024-10-21T16:53:59.024Z (30 days ago)
- Language: Go
- Size: 3.91 KB
- Stars: 3
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
#+TITLE: HubSpot
HubSpot API in Go.
#+begin_src go
apiKey := os.Getenv("HUBSPOT_API_KEY")a := NewContact(apiKey, "[email protected]")
a.Add("firstname", "Abhi")
a.Add("lastname", "Yerra")
a.Add("company", "Acksin")
a.Add("lifecyclestage", "opportunity")
a.Add("acksinsoftware", "opsZero")
resp := a.Publish()
if resp.Vid != 901 {
t.Errorf("Failed to update contact")
}d := NewDeal(apiKey)
d.Associations.AssociatedVids = []int{resp.Vid}
d.Add("dealname", "Tim's Newer Deal")
d.Add("dealstage", "closedwon")
d.Add("closedate", Timestamp())
d.Add("amount", "60000")
d.Add("dealtype", "newbusiness")
d.Publish()
#+end_src