Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // UserAgent lets the API know where the call is being made from. // It's overridden from the root command so that we can set the version. UserAgent = "github.com/exercism/cli" // TimeoutInSeconds is the timeout the default HTTP client will use. TimeoutInSeconds = 60 // HTTPClient is the client used to make HTTP calls in the cli package. HTTPClient = &http.Client{Timeout: time.Duration(TimeoutInSeconds) * time.Second} )
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is an http client that is configured for Exercism.
func (*Client) Do ¶
Do performs an http.Request and optionally parses the response body into the given interface.
func (*Client) IsPingable ¶
IsPingable calls the API /ping to determine whether the API can be reached.
func (*Client) NewRequest ¶
NewRequest returns an http.Request with information for the Exercism API.
func (*Client) TokenIsValid ¶
TokenIsValid calls the API to determine whether the token is valid.
Click to show internal directories.
Click to hide internal directories.