Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExternalIDs ¶
type ExternalIDs struct {
IMDbID string `json:"imdb_id,omitempty"`
TVDBID uint64 `json:"tvdb_id,omitempty"`
WikiData string `json:"wikidata_id,omitempty"`
}
ExternalIDs are the identifiers of a TV show or episode in other databases, such as IMDb, each of which is empty when it isn't known
type Movie ¶
type Movie struct {
ID uint64 `json:"id"`
Title string `json:"title"`
OriginalLanguage string `json:"original_language"`
OriginalTitle string `json:"original_title"`
ReleaseDate string `json:"release_date"`
Overview string `json:"overview"`
Genres []uint64 `json:"genre_ids"`
Video bool `json:"video,omitempty"`
BackdropPath string `json:"backdrop_path"`
PosterPath string `json:"poster_path"`
Popularity float32 `json:"popularity,omitempty"`
VoteAverage float32 `json:"vote_average,omitempty"`
VoteCount uint64 `json:"vote_count,omitempty"`
Adult bool `json:"adult,omitempty"`
SoftCore bool `json:"softcore,omitempty"`
}
type MovieDetails ¶
type MovieDetails struct {
Movie
// The runtime in minutes, which is zero when it isn't known
Runtime uint64 `json:"runtime"`
// The movie's IMDb identifier, such as tt0078748, when it's known
IMDbID string `json:"imdb_id,omitempty"`
}
MovieDetails is a movie, with the details which a search doesn't return, such as its runtime
type MovieSearchRequest ¶
type MovieSearchRequest struct {
Term string `json:"query" arg:"" name:"query" help:"Search term."`
IncludeAdult *bool `json:"include_adult,omitempty" negatable:"" help:"Include adult content in search results."`
Language *string `json:"language,omitempty" help:"Language for the search results."`
PrimaryReleaseYear *string `json:"primary_release_year,omitempty" help:"Filter results by primary release year."`
Page *uint `json:"page,omitempty" help:"Page number of the results."`
Region *string `json:"region,omitempty" help:"Filter results by region."`
Year *string `json:"year,omitempty" help:"Filter results by year."`
}
func (*MovieSearchRequest) Query ¶
func (r *MovieSearchRequest) Query() url.Values
type MovieSearchResponse ¶
type TVEpisode ¶
type TVEpisode struct {
ID uint64 `json:"id"`
Name string `json:"name"`
Overview string `json:"overview"`
AirDate string `json:"air_date"`
SeasonNumber uint64 `json:"season_number"`
EpisodeNumber uint64 `json:"episode_number"`
ProductionCode string `json:"production_code,omitempty"`
// The runtime in minutes, which is zero when it isn't known
Runtime uint64 `json:"runtime"`
StillPath string `json:"still_path"`
VoteAverage float32 `json:"vote_average,omitempty"`
VoteCount uint64 `json:"vote_count,omitempty"`
// The episode's identifiers in other databases, such as IMDb, when
// they're requested with its details
ExternalIDs *ExternalIDs `json:"external_ids,omitempty"`
}
TVEpisode is an episode of a TV show
type TVSearchRequest ¶
type TVSearchRequest struct {
Term string `json:"query" arg:"" name:"query" help:"Search term."`
FirstAirDateYear *string `json:"first_air_date_year,omitempty" help:"Filter results by the year the show was first aired."`
IncludeAdult *bool `json:"include_adult,omitempty" negatable:"" help:"Include adult content in search results."`
Language *string `json:"language,omitempty" help:"Language for the search results."`
Page *uint `json:"page,omitempty" help:"Page number of the results."`
Year *string `json:"year,omitempty" help:"Filter results by the year of any of the show's episodes."`
}
TVSearchRequest searches for TV shows by their name
func (*TVSearchRequest) Query ¶
func (r *TVSearchRequest) Query() url.Values
type TVSearchResponse ¶
type TVSearchResponse struct {
Page uint64 `json:"page"`
Results []TVShow `json:"results"`
TotalPages uint64 `json:"total_pages"`
TotalResults uint64 `json:"total_results"`
}
TVSearchResponse is a page of the TV shows which match a search, with the most relevant first
type TVShow ¶
type TVShow struct {
ID uint64 `json:"id"`
Name string `json:"name"`
OriginalLanguage string `json:"original_language"`
OriginalName string `json:"original_name"`
FirstAirDate string `json:"first_air_date"`
Overview string `json:"overview"`
Genres []uint64 `json:"genre_ids"`
OriginCountry []string `json:"origin_country,omitempty"`
BackdropPath string `json:"backdrop_path"`
PosterPath string `json:"poster_path"`
Popularity float32 `json:"popularity,omitempty"`
VoteAverage float32 `json:"vote_average,omitempty"`
VoteCount uint64 `json:"vote_count,omitempty"`
Adult bool `json:"adult,omitempty"`
}
TVShow is a TV show, as a search returns it
type TVShowDetails ¶
type TVShowDetails struct {
TVShow
// The typical runtimes of the show's episodes in minutes, which is empty
// when they aren't known
EpisodeRunTime []uint64 `json:"episode_run_time,omitempty"`
NumberOfSeasons uint64 `json:"number_of_seasons"`
NumberOfEpisodes uint64 `json:"number_of_episodes"`
LastAirDate string `json:"last_air_date,omitempty"`
Status string `json:"status,omitempty"`
// The show's identifiers in other databases, such as IMDb, when they're
// requested with its details
ExternalIDs *ExternalIDs `json:"external_ids,omitempty"`
}
TVShowDetails is a TV show, with the details which a search doesn't return, such as the runtimes of its episodes