Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEmptyQuery is returned when a search query is empty. ErrEmptyQuery = errors.New("jerkcity: empty search query") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an HTTP Client responsible for pulling data from Jerkcity's API.
func (*Client) FetchEpisode ¶
FetchEpisode fetches an episode from Jerkcity's API.
type Episode ¶
type Episode struct { Day int `json:"day"` Month int `json:"month"` Year int `json:"year"` Title string `json:"title"` Episode int `json:"episode"` Image string `json:"image"` Players []string `json:"players"` // Only present when calling /quote/random Quote string `json:"quote,omitempty"` // Only present when calling /search Search *EpisodeSearch `json:"search"` }
Episode is an episode of Jerkcity.
type EpisodeSearch ¶
type EpisodeSearch struct { Query string `json:"query"` Runtime float64 `json:"runtime"` Sums *EpisodeSearchSums `json:"sums"` Version int `json:"version"` }
type EpisodeSearchSums ¶
type Option ¶
type Option func(*Client)
Option configures a Client.
func WithHTTPClient ¶
WithHTTPClient sets a Client's underlying HTTP client.
type Search ¶
type Search struct { Episodes []*Episode `json:"episodes"` Search *EpisodeSearch `json:"search"` }
Search represents a request to the /search endpoint.
Click to show internal directories.
Click to hide internal directories.