A fully-featured OpenAPI generated HubSpot client for Go

This is a HubSpot Go client generated using openapi-generator. It includes packages for every OpenAPI spec listed in HubSpot's API directory.

Installing

go get github.com/clarkmcc/go-hubspot

Re-generating Clients

This package includes a client generator that runs the openapi-generator binary (must be located in your PATH) and re-generates the Go clients using the most up-to-date API specs. Any changes to the specs should be committed to this repository through a PR. I'll do my best to keep this up to date with the most recent changes. Assuming that you have openapi-generator installed, just run the following to re-generate the clients.

go generate

Using the clients

The clients are broken out into their own packages by name. Currently, openapi-generator produces mutilated method names like GetCrmV3ObjectsContactsContactIdGetById. This will need to be fixed in the openapi-generator project at some point.

client := contacts.NewAPIClient(contacts.NewConfiguration())

Authorization

Authorization is done by passing context values in with each request. In order to facilitate this, I've created a simple Authorizer interface and an API key implementation (more implementations to come).

ctx := context.Background()
authorizer := hubspot.NewAPIKeyAuthorizer("aa-bb-cc-dd")
client.DoRequest(authorizer.Apply(ctx), ...) // this request is now authorized
Similar Resources

Client for the cloud-iso-client

cloud-iso-client Client for the cloud-iso-client. Register an API token Before using this client library, you need to register an API token under your

Dec 6, 2021

Go-http-client: An enhanced http client for Golang

Go-http-client: An enhanced http client for Golang

go-http-client An enhanced http client for Golang Documentation on go.dev 🔗 This package provides you a http client package for your http requests. Y

Jan 7, 2023

Nutanix-client-go - Go client for the Nutanix Prism V3 API

nutanix-client-go This repository contains portions of the Nutanix API client code in nutanix/terraform-provider-nutanix. It has been extracted to red

Jan 6, 2022

Aoe4-client - Client library for aoe4 leaderboards etc

AOE4 Client Overview This is a go client used to query AOE4 data from either the

Jan 18, 2022

Balabola-go-client - GO client for Yandex balabola service

Balabola GO Client GO client for Yandex balabola service Yandex warning The neur

Jan 29, 2022

Client-server-golang-sqs - Client Server with SQS and golang

Client Server with SQS and golang Multi-threaded client-server demo with Go What

Feb 14, 2022

Go Client Library for Amazon Product Advertising API

go-amazon-product-advertising-api Go Client Library for Amazon Product Advertising API How to Use go get -u github.com/ngs/go-amazon-product-advertisi

Sep 27, 2022

A Go client library for the Twitter 1.1 API

Anaconda Anaconda is a simple, transparent Go package for accessing version 1.1 of the Twitter API. Successful API queries return native Go structs th

Jan 1, 2023

Go(lang) client library for Cachet (open source status page system).

cachet Go(lang) client library for Cachet (open source status page system). Features Full API support Components Incidents Metrics Subscribers Various

Sep 27, 2022
Comments
  • does auth with api key work?

    does auth with api key work?

    I'm getting 403 when using api key authentication.

    I'm using the owners api to list all owners. I activated the debug mode and I get:

    "Authentication credentials not found. This API supports both API Key and OAuth 2.0 authentication and you can find more details at https://developers.hubspot.com/docs/methods/auth/oauth-overview"
    

    and I don't see my api key anywhere in the debug log

  • Support for contacts.CreateOrUpdate

    Support for contacts.CreateOrUpdate

    Legacy API supports BatchCreateOrUpdate for contacts, it would be great to have support for this here too

    https://legacydocs.hubspot.com/docs/methods/contacts/batch_create_or_update

  • Blog Post API not supporting all the filters

    Blog Post API not supporting all the filters

    I'm trying to use the GetPage API in the BlogPostsAPI, but it only supports the date-related criteria, while in the HubSpot documentation here, The document mentions we can filter all of the fields. Like language__eq=en, that results in blogs with only language=en.

OpenAPI specification and related artifacts for HashiCorp Nomad

Overview This repository contains the HashiCorp Nomad OpenAPI specification and related artifacts. The OpenAPI specification defines a machine-readabl

Dec 14, 2022
Create a new OpenAPI based blink-plugin

OpenAPI plugin template Create a new OpenAPI based blink-plugin. READ FIRST Getting the Repo Option 1: From Github Press Use this template Naming conv

Oct 14, 2021
OpenAPI for Todolist RESTful API

Go API client for swagger OpenAPI for Todolist RESTful API Overview This API cli

Dec 18, 2021
An experimental OpenAPI -> Terraform Provider generator that does not yet function

tfpgen An experimental OpenAPI -> Terraform Provider generator that does not yet function. The goal is to allow developers to incrementally generate a

Feb 19, 2022
Fast and light-weight API proxy firewall for request and response validation by OpenAPI specs.
Fast and light-weight API proxy firewall for request and response validation by OpenAPI specs.

Open Source API Firewall API Firewall is a high-performance proxy with API request and response validation based on OpenAPI/Swagger schema. It is desi

Jan 8, 2023
Auto-generated Google APIs for Go.

Google APIs Client Library for Go Getting Started $ go get google.golang.org/api/tasks/v1 $ go get google.golang.org/api/moderator/v1 $ go get google.

Jan 8, 2023
User-Generated Content Articles 📝

?? Community Articles A library of technical articles on anything code. Written by the Codecademy community. What are Community Articles? Community ar

Oct 23, 2022
A Go client implementing a client-side distributed consumer group client for Amazon Kinesis.
A Go client implementing a client-side distributed consumer group client for Amazon Kinesis.

Kinesumer is a Go client implementing a client-side distributed consumer group client for Amazon Kinesis.

Jan 5, 2023
Clusterpedia-client - clusterpedia-client supports the use of native client-go mode to call the clusterpedia API

clusterpedia-client supports the use of native client-go mode to call the cluste

Jan 7, 2022
Client-go - Clusterpedia-client supports the use of native client-go mode to call the clusterpedia API

clusterpedia-client supports the use of native client-go mode to call the cluste

Dec 5, 2022