schema

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2026 License: Apache-2.0 Imports: 3 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 MovieSearchResponse struct {
	Page         uint64 `json:"page"`
	Results      []Movie
	TotalPages   uint64 `json:"total_pages"`
	TotalResults uint64 `json:"total_results"`
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL