Documentation
¶
Index ¶
- Constants
- func AdminPath(path string) string
- func AdminTokensURL() string
- type AdminToken
- type Client
- func (c *Client) Delete(path string, params url.Values) (json.RawMessage, error)
- func (c *Client) Get(path string, params url.Values) (json.RawMessage, error)
- func (c *Client) Post(path string, params url.Values) (json.RawMessage, error)
- func (c *Client) PostJSON(path string, payload any) (json.RawMessage, error)
- func (c *Client) Put(path string, params url.Values) (json.RawMessage, error)
- func (c *Client) PutJSON(path string, payload any) (json.RawMessage, error)
- func (c *Client) RevokeSelf() error
- func (c *Client) SetDebugWriter(w io.Writer)
- func (c *Client) Whoami() (WhoamiResponse, error)
- type TokenMetadata
- type WhoamiResponse
Constants ¶
View Source
const (
EnvAPIBaseURL = "GUMROAD_ADMIN_API_BASE_URL"
)
Variables ¶
This section is empty.
Functions ¶
func AdminTokensURL ¶ added in v0.4.0
func AdminTokensURL() string
Types ¶
type AdminToken ¶ added in v0.4.0
type AdminToken struct {
Token string `json:"token"`
TokenExternalID string `json:"token_external_id"`
Actor adminconfig.Actor `json:"actor"`
ExpiresAt string `json:"expires_at"`
}
func ExchangeAuthorizationCode ¶ added in v0.4.0
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientWithBaseURL ¶
func NewClientWithContext ¶
func (*Client) RevokeSelf ¶ added in v0.4.0
func (*Client) SetDebugWriter ¶
func (*Client) Whoami ¶ added in v0.4.0
func (c *Client) Whoami() (WhoamiResponse, error)
type TokenMetadata ¶ added in v0.4.0
type WhoamiResponse ¶ added in v0.4.0
type WhoamiResponse struct {
Actor adminconfig.Actor `json:"actor"`
Token TokenMetadata `json:"token"`
Scopes []string `json:"scopes"`
}
Click to show internal directories.
Click to hide internal directories.