interfaces

package
v0.0.0-...-f7dc2ed Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: Apache-2.0 Imports: 7 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)
	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
	BaseURI       *string
	AppID         string
	APIKey        string
	ClientVersion *string
	Debug         *bool
}

func NewIntercomHTTPClient

func NewIntercomHTTPClient(appID, apiKey string, baseURI, 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) UserAgentHeader

func (c IntercomHTTPClient) UserAgentHeader() string

Jump to

Keyboard shortcuts

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