client

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2025 License: Unlicense Imports: 3 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 struct {
	// contains filtered or unexported fields
}

HTTPClient Simple abstraction of an HTTP Client that can be passed in between the namespaces of each API

func New added in v1.2.0

func New() *HTTPClient

New Constructor function for building a new HTTP Client. This should get called once and then passed between each namespace of the API

func (*HTTPClient) BuildRequest

func (client *HTTPClient) BuildRequest(result interface{}) *resty.Request

BuildRequest Builds a new resty request automatically, filling in the headers and the authentication token

func (*HTTPClient) Client

func (client *HTTPClient) Client() *resty.Client

Client - Returns a pointer to the resty.Client structure that is shared across API namespaces

func (*HTTPClient) SetBearerToken added in v1.2.0

func (client *HTTPClient) SetBearerToken(token *oauth.TokenSet)

SetBearerToken - Sets the authentication token for the current session

Jump to

Keyboard shortcuts

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