interfaces

package
v0.0.0-...-9c6b418 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClient

type HTTPClient interface {
	Get(string, interface{}) ([]byte, error)
	Post(string, interface{}) ([]byte, error)
	Put(string, interface{}) ([]byte, error)
	Patch(string, interface{}) ([]byte, error)
	Delete(string, interface{}) ([]byte, error)
}

type HTTPError

type HTTPError struct {
	StatusCode int
	Code       string `json:"code"`
	Message    string `json:"message"`
}

func NewUnknownHTTPError

func NewUnknownHTTPError(statusCode int) HTTPError

func (HTTPError) Error

func (e HTTPError) Error() string

func (HTTPError) GetCode

func (e HTTPError) GetCode() string

func (HTTPError) GetMessage

func (e HTTPError) GetMessage() string

func (HTTPError) GetStatusCode

func (e HTTPError) GetStatusCode() int

type HTTPErrorList

type HTTPErrorList struct {
	Type   string      `json:"type"`
	Errors []HTTPError `json:"errors"`
}

type IntercomError

type IntercomError interface {
	Error() string
	GetStatusCode() int
	GetCode() string
	GetMessage() string
}

type IntercomHTTPClient

type IntercomHTTPClient struct {
	*http.Client

	AppID  string
	APIKey string

	BaseURI       *string
	APIVersion    *string
	ClientVersion *string
	Debug         *bool
}

func NewIntercomHTTPClient

func NewIntercomHTTPClient(appID, apiKey string, baseURI, apiVersion, clientVersion *string, debug *bool) IntercomHTTPClient

func (IntercomHTTPClient) Delete

func (c IntercomHTTPClient) Delete(url string, queryParams interface{}) ([]byte, error)

func (IntercomHTTPClient) Get

func (c IntercomHTTPClient) Get(url string, queryParams interface{}) ([]byte, error)

func (IntercomHTTPClient) Patch

func (c IntercomHTTPClient) Patch(url string, body interface{}) ([]byte, error)

func (IntercomHTTPClient) Post

func (c IntercomHTTPClient) Post(url string, body interface{}) ([]byte, error)

func (IntercomHTTPClient) Put

func (c IntercomHTTPClient) Put(url string, body interface{}) ([]byte, error)

func (IntercomHTTPClient) UserAgentHeader

func (c IntercomHTTPClient) UserAgentHeader() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL