Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaseURL ¶ added in v1.6.0
func BaseURL() string
BaseURL returns the configured api_url, or the API's default base URL.
func CommandError ¶ added in v1.4.0
CommandError gives an API error from a raw call the exit code and hints the generated commands give theirs; other errors pass through.
func CompletionRequest ¶ added in v1.3.0
func CompletionRequest() client.ClientWithResponsesInterface
CompletionRequest returns an API client for shell completion: it uses the static token or an already stored OAuth sign-in, and never starts an interactive login.
func Request ¶
func Request() client.ClientWithResponsesInterface
Request returns the API client for a command run. Without a static token it signs in through OAuth, opening the browser when needed.
Types ¶
type RawClient ¶ added in v1.4.0
type RawClient struct {
// contains filtered or unexported fields
}
RawClient calls API paths directly, configured like the typed client, so hand-written commands don't depend on generated method names.
func NewRawClient ¶ added in v1.4.0
func NewRawClient(server string, doer client.HttpRequestDoer) *RawClient
NewRawClient has no authentication (tests).
func Raw ¶ added in v1.4.0
func Raw() *RawClient
Raw ignores --dry-run: hand-written commands look up the website, account or order with it before the request --dry-run prints, so those lookups are sent. Under --dry-run they use a token or a stored sign-in but never start a login, so a dry run without credentials fails at once instead of waiting on a browser.