Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient struct {
// BaseURL for API requests. Defaults to the public Intercom V3 API.
BaseURL *url.URL
// UserAgent used when communicating with the Intercom API.
UserAgent string
// Log is used to log debugging messages, if set.
Log *log.Logger
// contains filtered or unexported fields
}
A APIClient manages communication with the Intercom API.
func NewAPIClient ¶
NewAPIClient returns a new Intercom API client. If a nil httpClient is provided, http.DefaultClient will be used. To use API methods which require authentication, provide an http.Client that will perform the authentication for you (such as that provided by the goauth2 library).
func (*APIClient) Do ¶
Do sends an API request and returns the API response. The API response is decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred.
func (*APIClient) ListTags ¶
ListTags returns all of the tags that belong to a client.
See https://doc.intercom.io/api/#tags for more information.
func (*APIClient) NewRequest ¶
NewRequest creates an API request. A relative URL can be provided in urlStr, in which case it is resolved relative to the BaseURL of the APIClient. Relative URLs should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included as the request body.
type APIKeyAuthTransport ¶
type APIKeyAuthTransport struct {
Transport http.RoundTripper
AppID string
APIKey string
}
type IntercomError ¶
func (*IntercomError) Error ¶
func (e *IntercomError) Error() string