freeagent

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	BaseURL      string
	UserAgent    string
	ClientID     string
	ClientSecret string
	RedirectURI  string
	Profile      string
	Store        storage.TokenStore
	HTTP         *http.Client
	// contains filtered or unexported fields
}

func (*Client) AccessToken

func (c *Client) AccessToken(ctx context.Context) (*storage.Token, error)

func (*Client) ApproveURL

func (c *Client) ApproveURL(state string) (string, error)

func (*Client) Do

func (c *Client) Do(ctx context.Context, method, path string, body io.Reader, contentType string) ([]byte, int, http.Header, error)

func (*Client) DoJSON

func (c *Client) DoJSON(ctx context.Context, method, path string, payload any) ([]byte, int, http.Header, error)

func (*Client) ExchangeCode

func (c *Client) ExchangeCode(ctx context.Context, code string) (*storage.Token, error)

func (*Client) Refresh

func (c *Client) Refresh(ctx context.Context, refreshToken string) (*storage.Token, error)

func (*Client) ResolveURL

func (c *Client) ResolveURL(path string) (string, error)

Jump to

Keyboard shortcuts

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