Documentation
¶
Index ¶
- Constants
- Variables
- type APIError
- 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) PostJSONWithContext(ctx context.Context, path string, payload any) (json.RawMessage, error)
- func (c *Client) PostWithContext(ctx context.Context, path string, params url.Values) (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) SetDebugWriter(w io.Writer)
- type HintedError
- type JSONInt
Constants ¶
View Source
const HintRunAuthLogin = "Run: gumroad auth login — or set GUMROAD_ACCESS_TOKEN"
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientWithContext ¶
func (*Client) PostJSONWithContext ¶ added in v0.2.0
func (*Client) PostWithContext ¶ added in v0.2.0
func (c *Client) PostWithContext(ctx context.Context, path string, params url.Values) (json.RawMessage, error)
PostWithContext runs a POST under ctx instead of the client's baked-in context. Use this when a single call needs its own independent lifetime — e.g. best-effort cleanup that must still run after the original request context has been canceled.
func (*Client) SetDebugWriter ¶
type HintedError ¶
HintedError is implemented by errors that carry an actionable recovery suggestion.
type JSONInt ¶
type JSONInt int
JSONInt is a Gumroad API compatibility shim for integer fields that may arrive as 1, 1.0, null, or be omitted.
Keep this type at the JSON decode boundary only. It exists to shield the CLI from upstream schema inconsistencies and should be easy to delete if the API becomes consistently typed.
func (*JSONInt) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.