Documentation
¶
Index ¶
- type Client
- func (c *Client) GetEpisode(showID int, season int, number int, language string) (*Episode, error)
- func (c *Client) GetFilm(id int, language string) (*Film, error)
- func (c *Client) GetShow(id int, language string) (*Show, error)
- func (c *Client) SearchFilm(title string, year int, language string) (*Film, error)
- func (c *Client) SearchShow(title string, language string) (*Show, error)
- type Episode
- type Film
- type Show
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
ApiKey string
// contains filtered or unexported fields
}
Client represents a TMDB client.
func (*Client) GetEpisode ¶
GetEpisode returns an Episode with season and number for the provided TMDB show ID, and optional ISO3166-1 alpha2 language code.
func (*Client) GetFilm ¶
GetFilm returns a Film by provided TMDB id, and optional ISO3166-1 alpha2 language code.
func (*Client) GetShow ¶
GetShow returns a Show by provided TMDB id, and optional ISO3166-1 alpha2 language code.
func (*Client) SearchFilm ¶
SearchFilm returns a Film by provided title, year, and optional ISO3166-1 alpha2 language code.
type Episode ¶
type Episode struct {
ID int `json:"id"`
Premiered dates.Date `json:"air_date"`
Title string `json:"name"`
Overview string `json:"overview"`
Season int `json:"season_number"`
Number int `json:"episode_number"`
Image string `json:"still_path"`
Rating float64 `json:"vote_average"`
Votes int `json:"vote_count"`
}
type Film ¶
type Film struct {
ID int `json:"id"`
Title string `json:"title"`
Premiered dates.Date `json:"release_date"`
Overview string `json:"overview"`
OriginalTitle string `json:"original_title"`
OriginalLanguage string `json:"original_language"`
Rating float64 `json:"vote_average"`
Popularity float64 `json:"popularity"`
Votes int `json:"vote_count"`
Poster string `json:"poster_path"`
Backdrop string `json:"backdrop_path"`
Genres []string
}
Film represents a film.
type Show ¶
type Show struct {
ID int `json:"id"`
Title string `json:"name"`
Premiered dates.Date `json:"first_air_date"`
Overview string `json:"overview"`
OriginalTitle string `json:"original_name"`
OriginCountry []string `json:"origin_country"`
OriginalLanguage string `json:"original_language"`
Rating float64 `json:"vote_average"`
Popularity float64 `json:"popularity"`
Votes int `json:"vote_count"`
Poster string `json:"poster_path"`
Backdrop string `json:"backdrop_path"`
Genres []string
}
Show represents a tv show.
Click to show internal directories.
Click to hide internal directories.