Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
github.com/pyscht/hubspot-go-api/apis/crm/contacts
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import contacts "github.com/pyscht/hubspot-go-api/apis/crm/contacts"
To use a proxy, set the environment variable HTTP_PROXY
:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
Default configuration comes with Servers
field that contains server objects as defined in the OpenAPI specification.
For using other server than the one defined on index 0 set context value sw.ContextServerIndex
of type int
.
ctx := context.WithValue(context.Background(), contacts.ContextServerIndex, 1)
Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables
of type map[string]string
.
ctx := context.WithValue(context.Background(), contacts.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Note, enum values are always validated and all unused variables are silently ignored.
Each operation can use different server URL defined using OperationServers
map in the Configuration
.
An operation is uniquely identified by "{classname}Service.{nickname}"
string.
Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices
and sw.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), contacts.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), contacts.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
All URIs are relative to https://api.hubapi.com
Class | Method | HTTP request | Description |
---|---|---|---|
BasicApi | DeleteCrmV3ObjectsContactsContactIdArchive | Delete /crm/v3/objects/contacts/{contactId} | Archive |
BasicApi | GetCrmV3ObjectsContactsContactIdGetById | Get /crm/v3/objects/contacts/{contactId} | Read |
BasicApi | GetCrmV3ObjectsContactsGetPage | Get /crm/v3/objects/contacts | List |
BasicApi | PatchCrmV3ObjectsContactsContactIdUpdate | Patch /crm/v3/objects/contacts/{contactId} | Update |
BasicApi | PostCrmV3ObjectsContactsCreate | Post /crm/v3/objects/contacts | Create |
BatchApi | PostCrmV3ObjectsContactsBatchArchiveArchive | Post /crm/v3/objects/contacts/batch/archive | Archive a batch of contacts by ID |
BatchApi | PostCrmV3ObjectsContactsBatchCreateCreate | Post /crm/v3/objects/contacts/batch/create | Create a batch of contacts |
BatchApi | PostCrmV3ObjectsContactsBatchReadRead | Post /crm/v3/objects/contacts/batch/read | Read a batch of contacts by internal ID, or unique property values |
BatchApi | PostCrmV3ObjectsContactsBatchUpdateUpdate | Post /crm/v3/objects/contacts/batch/update | Update a batch of contacts |
GDPRApi | PostCrmV3ObjectsContactsGdprDeletePurge | Post /crm/v3/objects/contacts/gdpr-delete | GDPR DELETE |
PublicObjectApi | PostCrmV3ObjectsContactsMergeMerge | Post /crm/v3/objects/contacts/merge | Merge two contacts with same type |
SearchApi | PostCrmV3ObjectsContactsSearchDoSearch | Post /crm/v3/objects/contacts/search |
Authentication schemes defined for the API:
Example
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)
Or via OAuth2 module to automatically refresh tokens and perform user authentication.
import "golang.org/x/oauth2"
/* Perform OAuth2 round trip request and obtain a token */
tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)
Note, each API key must be added to a map of map[string]APIKey
where the key is: private-app-legacy and passed in as the auth context for each request.
Note, each API key must be added to a map of map[string]APIKey
where the key is: private-app and passed in as the auth context for each request.
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBool
PtrInt
PtrInt32
PtrInt64
PtrFloat
PtrFloat32
PtrFloat64
PtrString
PtrTime
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.