tmdb

package
v0.0.0-...-a6eb964 Latest Latest
Warning

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

Go to latest
Published: May 8, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TMDBResultsPerPage reflects TMDB number of results on the page. It's statically set to 20, so we should work with that
	TMDBResultsPerPage = 20
)

Variables

View Source
var (

	// WarmingUp ...
	WarmingUp = util.Event{}
)

Functions

func CheckAPIKey

func CheckAPIKey()

CheckAPIKey ...

func ImageURL

func ImageURL(uri string, size string) string

ImageURL ...

func LogError

func LogError(err error)

LogError ...

func MakeRequest

func MakeRequest(r APIRequest) (ret error)

MakeRequest used to proxy requests with proper RateLimiter usage and HTTP error processing

Types

type APIRequest

type APIRequest struct {
	URL         string
	Params      url.Values `msg:"-"`
	Result      interface{}
	ErrMsg      interface{}
	Description string
}

APIRequest ...

func (*APIRequest) MarshalMsg

func (z *APIRequest) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*APIRequest) Msgsize

func (z *APIRequest) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*APIRequest) UnmarshalMsg

func (z *APIRequest) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type AlternativeTitle

type AlternativeTitle struct {
	Iso3166_1 string `json:"iso_3166_1"`
	Title     string `json:"title"`
}

AlternativeTitle ...

func (AlternativeTitle) MarshalMsg

func (z AlternativeTitle) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (AlternativeTitle) Msgsize

func (z AlternativeTitle) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*AlternativeTitle) UnmarshalMsg

func (z *AlternativeTitle) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type ByPopularity

type ByPopularity Movies

ByPopularity ...

func (ByPopularity) Len

func (a ByPopularity) Len() int

func (ByPopularity) Less

func (a ByPopularity) Less(i, j int) bool

func (ByPopularity) Swap

func (a ByPopularity) Swap(i, j int)

type Cast

type Cast struct {
	IDName
	CastID      int    `json:"cast_id"`
	Character   string `json:"character"`
	CreditID    string `json:"credit_id"`
	Order       int    `json:"order"`
	ProfilePath string `json:"profile_path"`
}

Cast ...

func (*Cast) MarshalMsg

func (z *Cast) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Cast) Msgsize

func (z *Cast) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Cast) UnmarshalMsg

func (z *Cast) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Country

type Country struct {
	Iso31661    string `json:"iso_3166_1"`
	EnglishName string `json:"english_name"`
}

Country ...

func GetCountries

func GetCountries(language string) []*Country

GetCountries ...

func (Country) MarshalMsg

func (z Country) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (Country) Msgsize

func (z Country) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Country) UnmarshalMsg

func (z *Country) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type CountryList

type CountryList []*Country

CountryList ...

func (CountryList) MarshalMsg

func (z CountryList) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (CountryList) Msgsize

func (z CountryList) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*CountryList) UnmarshalMsg

func (z *CountryList) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Credits

type Credits struct {
	Cast []*Cast `json:"cast"`
	Crew []*Crew `json:"crew"`
}

Credits ...

func (*Credits) MarshalMsg

func (z *Credits) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Credits) Msgsize

func (z *Credits) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Credits) UnmarshalMsg

func (z *Credits) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Crew

type Crew struct {
	IDName
	CreditID    string `json:"credit_id"`
	Department  string `json:"department"`
	Job         string `json:"job"`
	ProfilePath string `json:"profile_path"`
}

Crew ...

func (*Crew) MarshalMsg

func (z *Crew) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Crew) Msgsize

func (z *Crew) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Crew) UnmarshalMsg

func (z *Crew) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type DiscoverFilters

type DiscoverFilters struct {
	Genre    string
	Country  string
	Language string
}

DiscoverFilters ...

func (DiscoverFilters) MarshalMsg

func (z DiscoverFilters) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (DiscoverFilters) Msgsize

func (z DiscoverFilters) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*DiscoverFilters) UnmarshalMsg

func (z *DiscoverFilters) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Entity

type Entity struct {
	IsAdult          bool      `json:"adult"`
	BackdropPath     string    `json:"backdrop_path"`
	ID               int       `json:"id"`
	Genres           []*IDName `json:"genres"`
	OriginalTitle    string    `json:"original_title,omitempty"`
	OriginalLanguage string    `json:"original_language,omitempty"`
	ReleaseDate      string    `json:"release_date"`
	FirstAirDate     string    `json:"first_air_date"`
	PosterPath       string    `json:"poster_path"`
	Title            string    `json:"title,omitempty"`
	VoteAverage      float32   `json:"vote_average"`
	VoteCount        int       `json:"vote_count"`
	OriginalName     string    `json:"original_name,omitempty"`
	Name             string    `json:"name,omitempty"`
}

Entity ...

func (*Entity) MarshalMsg

func (z *Entity) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Entity) Msgsize

func (z *Entity) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Entity) UnmarshalMsg

func (z *Entity) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type EntityList

type EntityList struct {
	Page         int       `json:"page"`
	Results      []*Entity `json:"results"`
	TotalPages   int       `json:"total_pages"`
	TotalResults int       `json:"total_results"`
}

EntityList ...

func (*EntityList) MarshalMsg

func (z *EntityList) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*EntityList) Msgsize

func (z *EntityList) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*EntityList) UnmarshalMsg

func (z *EntityList) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Episode

type Episode struct {
	ID            int          `json:"id"`
	Name          string       `json:"name"`
	Overview      string       `json:"overview"`
	AirDate       string       `json:"air_date"`
	SeasonNumber  int          `json:"season_number"`
	EpisodeNumber int          `json:"episode_number"`
	VoteAverage   float32      `json:"vote_average"`
	StillPath     string       `json:"still_path"`
	ExternalIDs   *ExternalIDs `json:"external_ids"`

	AlternativeTitles *struct {
		Titles []*AlternativeTitle `json:"titles"`
	} `json:"alternative_titles"`

	Translations *struct {
		Translations []*Translation `json:"translations"`
	} `json:"translations"`

	Trailers *struct {
		Youtube []*Trailer `json:"youtube"`
	} `json:"trailers"`

	Credits *Credits `json:"credits,omitempty"`
	Images  *Images  `json:"images,omitempty"`
}

Episode ...

func GetEpisode

func GetEpisode(showID int, seasonNumber int, episodeNumber int, language string) *Episode

GetEpisode ...

func (*Episode) MarshalMsg

func (z *Episode) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Episode) Msgsize

func (z *Episode) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Episode) ToListItem

func (episode *Episode) ToListItem(show *Show, season *Season) *xbmc.ListItem

ToListItem ...

func (*Episode) UnmarshalMsg

func (z *Episode) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type EpisodeList

type EpisodeList []*Episode

EpisodeList ...

func (EpisodeList) MarshalMsg

func (z EpisodeList) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (EpisodeList) Msgsize

func (z EpisodeList) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (EpisodeList) ToListItems

func (episodes EpisodeList) ToListItems(show *Show, season *Season) []*xbmc.ListItem

ToListItems ...

func (*EpisodeList) UnmarshalMsg

func (z *EpisodeList) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type ExternalIDs

type ExternalIDs struct {
	IMDBId      string      `json:"imdb_id"`
	FreeBaseID  string      `json:"freebase_id"`
	FreeBaseMID string      `json:"freebase_mid"`
	TVDBID      interface{} `json:"tvdb_id"`
}

ExternalIDs ...

func (*ExternalIDs) MarshalMsg

func (z *ExternalIDs) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*ExternalIDs) Msgsize

func (z *ExternalIDs) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*ExternalIDs) UnmarshalMsg

func (z *ExternalIDs) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type FindResult

type FindResult struct {
	MovieResults     []*Entity `json:"movie_results"`
	PersonResults    []*Entity `json:"person_results"`
	TVResults        []*Entity `json:"tv_results"`
	TVEpisodeResults []*Entity `json:"tv_episode_results"`
	TVSeasonResults  []*Entity `json:"tv_season_results"`
}

FindResult ...

func Find

func Find(externalID string, externalSource string) *FindResult

Find ...

func (*FindResult) MarshalMsg

func (z *FindResult) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*FindResult) Msgsize

func (z *FindResult) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*FindResult) UnmarshalMsg

func (z *FindResult) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Genre

type Genre IDName

Genre ...

func GetMovieGenres

func GetMovieGenres(language string) []*Genre

GetMovieGenres ...

func GetTVGenres

func GetTVGenres(language string) []*Genre

GetTVGenres ...

func (Genre) MarshalMsg

func (z Genre) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (Genre) Msgsize

func (z Genre) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Genre) UnmarshalMsg

func (z *Genre) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type GenreList

type GenreList struct {
	Genres []*Genre `json:"genres"`
}

GenreList ...

func (*GenreList) MarshalMsg

func (z *GenreList) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*GenreList) Msgsize

func (z *GenreList) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*GenreList) UnmarshalMsg

func (z *GenreList) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type IDName

type IDName struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

IDName ...

func (IDName) MarshalMsg

func (z IDName) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (IDName) Msgsize

func (z IDName) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*IDName) UnmarshalMsg

func (z *IDName) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Image

type Image struct {
	FilePath string `json:"file_path"`
	Height   int    `json:"height"`
	Iso639_1 string `json:"iso_639_1"`
	Width    int    `json:"width"`
}

Image ...

func (*Image) MarshalMsg

func (z *Image) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Image) Msgsize

func (z *Image) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Image) UnmarshalMsg

func (z *Image) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Images

type Images struct {
	Backdrops []*Image `json:"backdrops"`
	Posters   []*Image `json:"posters"`
	Stills    []*Image `json:"stills"`
}

Images ...

func GetEpisodeImages

func GetEpisodeImages(showID, season, episode int) *Images

GetEpisodeImages ...

func GetImages

func GetImages(movieID int) *Images

GetImages ...

func GetSeasonImages

func GetSeasonImages(showID int, season int) *Images

GetSeasonImages ...

func GetShowImages

func GetShowImages(showID int) *Images

GetShowImages ...

func (*Images) MarshalMsg

func (z *Images) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Images) Msgsize

func (z *Images) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Images) UnmarshalMsg

func (z *Images) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Language

type Language struct {
	Iso639_1    string `json:"iso_639_1"`
	Name        string `json:"name"`
	EnglishName string `json:"english_name,omitempty"`
}

Language ...

func GetLanguages

func GetLanguages(language string) []*Language

GetLanguages ...

func (Language) MarshalMsg

func (z Language) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (Language) Msgsize

func (z Language) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Language) UnmarshalMsg

func (z *Language) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type LanguageList

type LanguageList struct {
	Languages []*Language `json:"languages"`
}

LanguageList ...

func (*LanguageList) MarshalMsg

func (z *LanguageList) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*LanguageList) Msgsize

func (z *LanguageList) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*LanguageList) UnmarshalMsg

func (z *LanguageList) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type List

type List struct {
	CreatedBy     string    `json:"created_by"`
	Description   string    `json:"description"`
	FavoriteCount int       `json:"favorite_count"`
	ID            string    `json:"id"`
	ItemCount     int       `json:"item_count"`
	Iso639_1      string    `json:"iso_639_1"`
	Name          string    `json:"name"`
	PosterPath    string    `json:"poster_path"`
	Items         []*Entity `json:"items"`
}

List ...

func (*List) MarshalMsg

func (z *List) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*List) Msgsize

func (z *List) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*List) UnmarshalMsg

func (z *List) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Movie

type Movie struct {
	Entity

	IMDBId              string       `json:"imdb_id"`
	Overview            string       `json:"overview"`
	ProductionCompanies []*IDName    `json:"production_companies"`
	Runtime             int          `json:"runtime"`
	TagLine             string       `json:"tagline"`
	RawPopularity       interface{}  `json:"popularity"`
	Popularity          float64      `json:"-"`
	SpokenLanguages     []*Language  `json:"spoken_languages"`
	ExternalIDs         *ExternalIDs `json:"external_ids"`

	AlternativeTitles *struct {
		Titles []*AlternativeTitle `json:"titles"`
	} `json:"alternative_titles"`

	Translations *struct {
		Translations []*Translation `json:"translations"`
	} `json:"translations"`

	Trailers *struct {
		Youtube []*Trailer `json:"youtube"`
	} `json:"trailers"`

	Credits *Credits `json:"credits,omitempty"`
	Images  *Images  `json:"images,omitempty"`

	ReleaseDates *ReleaseDatesResults `json:"release_dates"`
}

Movie ...

func GetMovie

func GetMovie(tmdbID int, language string) *Movie

GetMovie ...

func GetMovieByID

func GetMovieByID(movieID string, language string) *Movie

GetMovieByID ...

func (*Movie) MarshalMsg

func (z *Movie) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Movie) Msgsize

func (z *Movie) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Movie) ToListItem

func (movie *Movie) ToListItem() *xbmc.ListItem

ToListItem ...

func (*Movie) UnmarshalMsg

func (z *Movie) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (*Movie) Year

func (movie *Movie) Year() int

Year returns year of the movie

type Movies

type Movies []*Movie

Movies ...

func GetIMDBList

func GetIMDBList(listID string, language string, page int) (movies Movies, totalResults int)

GetIMDBList ...

func GetMovies

func GetMovies(tmdbIds []int, language string) Movies

GetMovies ...

func MostVotedMovies

func MostVotedMovies(genre string, language string, page int) (Movies, int)

MostVotedMovies ...

func PopularMovies

func PopularMovies(params DiscoverFilters, language string, page int) (Movies, int)

PopularMovies ...

func RecentMovies

func RecentMovies(params DiscoverFilters, language string, page int) (Movies, int)

RecentMovies ...

func SearchMovies

func SearchMovies(query string, language string, page int) (Movies, int)

SearchMovies ...

func TopRatedMovies

func TopRatedMovies(genre string, language string, page int) (Movies, int)

TopRatedMovies ...

func (Movies) MarshalMsg

func (z Movies) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (Movies) Msgsize

func (z Movies) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Movies) UnmarshalMsg

func (z *Movies) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type ReleaseDate

type ReleaseDate struct {
	Certification string `json:"certification"`
	Iso639_1      string `json:"iso_639_1"`
	Note          string `json:"note"`
	ReleaseDate   string `json:"release_date"`
	Type          int    `json:"type"`
}

ReleaseDate ...

func (*ReleaseDate) MarshalMsg

func (z *ReleaseDate) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*ReleaseDate) Msgsize

func (z *ReleaseDate) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*ReleaseDate) UnmarshalMsg

func (z *ReleaseDate) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type ReleaseDates

type ReleaseDates struct {
	Iso3166_1    string         `json:"iso_3166_1"`
	ReleaseDates []*ReleaseDate `json:"release_dates"`
}

ReleaseDates ...

func (*ReleaseDates) MarshalMsg

func (z *ReleaseDates) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*ReleaseDates) Msgsize

func (z *ReleaseDates) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*ReleaseDates) UnmarshalMsg

func (z *ReleaseDates) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type ReleaseDatesResults

type ReleaseDatesResults struct {
	Results []*ReleaseDates `json:"results"`
}

ReleaseDatesResults ...

func (*ReleaseDatesResults) MarshalMsg

func (z *ReleaseDatesResults) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*ReleaseDatesResults) Msgsize

func (z *ReleaseDatesResults) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*ReleaseDatesResults) UnmarshalMsg

func (z *ReleaseDatesResults) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Season

type Season struct {
	ID           int          `json:"id"`
	Name         string       `json:"name,omitempty"`
	Season       int          `json:"season_number"`
	EpisodeCount int          `json:"episode_count,omitempty"`
	AirDate      string       `json:"air_date"`
	Poster       string       `json:"poster_path"`
	ExternalIDs  *ExternalIDs `json:"external_ids"`

	AlternativeTitles *struct {
		Titles []*AlternativeTitle `json:"titles"`
	} `json:"alternative_titles"`

	Translations *struct {
		Translations []*Translation `json:"translations"`
	} `json:"translations"`

	Trailers *struct {
		Youtube []*Trailer `json:"youtube"`
	} `json:"trailers"`

	Credits *Credits `json:"credits,omitempty"`
	Images  *Images  `json:"images,omitempty"`

	Episodes EpisodeList `json:"episodes"`
}

Season ...

func GetSeason

func GetSeason(showID int, seasonNumber int, language string) *Season

GetSeason ...

func (*Season) MarshalMsg

func (z *Season) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Season) Msgsize

func (z *Season) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Season) ToListItem

func (season *Season) ToListItem(show *Show) *xbmc.ListItem

ToListItem ...

func (*Season) UnmarshalMsg

func (z *Season) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type SeasonList

type SeasonList []*Season

SeasonList ...

func (SeasonList) Len

func (seasons SeasonList) Len() int

func (SeasonList) Less

func (seasons SeasonList) Less(i, j int) bool

func (SeasonList) MarshalMsg

func (z SeasonList) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (SeasonList) Msgsize

func (z SeasonList) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (SeasonList) Swap

func (seasons SeasonList) Swap(i, j int)

func (SeasonList) ToListItems

func (seasons SeasonList) ToListItems(show *Show) []*xbmc.ListItem

ToListItems ...

func (*SeasonList) UnmarshalMsg

func (z *SeasonList) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Show

type Show struct {
	Entity

	EpisodeRunTime      []int        `json:"episode_run_time"`
	Genres              []*Genre     `json:"genres"`
	Homepage            string       `json:"homepage"`
	InProduction        bool         `json:"in_production"`
	FirstAirDate        string       `json:"first_air_date"`
	LastAirDate         string       `json:"last_air_date"`
	Networks            []*IDName    `json:"networks"`
	NumberOfEpisodes    int          `json:"number_of_episodes"`
	NumberOfSeasons     int          `json:"number_of_seasons"`
	OriginalName        string       `json:"original_name"`
	OriginCountry       []string     `json:"origin_country"`
	Overview            string       `json:"overview"`
	RawPopularity       interface{}  `json:"popularity"`
	Popularity          float64      `json:"-"`
	ProductionCompanies []*IDName    `json:"production_companies"`
	Status              string       `json:"status"`
	ExternalIDs         *ExternalIDs `json:"external_ids"`

	Translations *struct {
		Translations []*Translation `json:"translations"`
	} `json:"translations"`
	AlternativeTitles *struct {
		Titles []*AlternativeTitle `json:"results"`
	} `json:"alternative_titles"`

	Credits *Credits `json:"credits,omitempty"`
	Images  *Images  `json:"images,omitempty"`

	Seasons SeasonList `json:"seasons"`
}

Show ...

func GetShow

func GetShow(showID int, language string) (show *Show)

GetShow ...

func GetShowByID

func GetShowByID(tmdbID string, language string) *Show

GetShowByID ...

func (*Show) IsAnime

func (show *Show) IsAnime() bool

IsAnime ...

func (*Show) MarshalMsg

func (z *Show) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Show) Msgsize

func (z *Show) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Show) ToListItem

func (show *Show) ToListItem() *xbmc.ListItem

ToListItem ...

func (*Show) UnmarshalMsg

func (z *Show) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Shows

type Shows []*Show

Shows ...

func GetShows

func GetShows(showIds []int, language string) Shows

GetShows ...

func MostVotedShows

func MostVotedShows(genre string, language string, page int) (Shows, int)

MostVotedShows ...

func PopularShows

func PopularShows(params DiscoverFilters, language string, page int) (Shows, int)

PopularShows ...

func RecentEpisodes

func RecentEpisodes(params DiscoverFilters, language string, page int) (Shows, int)

RecentEpisodes ...

func RecentShows

func RecentShows(params DiscoverFilters, language string, page int) (Shows, int)

RecentShows ...

func SearchShows

func SearchShows(query string, language string, page int) (Shows, int)

SearchShows ...

func TopRatedShows

func TopRatedShows(genre string, language string, page int) (Shows, int)

TopRatedShows ...

func (Shows) MarshalMsg

func (z Shows) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (Shows) Msgsize

func (z Shows) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Shows) UnmarshalMsg

func (z *Shows) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Trailer

type Trailer struct {
	Name   string `json:"name"`
	Size   string `json:"size"`
	Source string `json:"source"`
	Type   string `json:"type"`
}

Trailer ...

func (*Trailer) MarshalMsg

func (z *Trailer) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Trailer) Msgsize

func (z *Trailer) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Trailer) UnmarshalMsg

func (z *Trailer) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Translation

type Translation struct {
	Iso3166_1   string           `json:"iso_3166_1"`
	Iso639_1    string           `json:"iso_639_1"`
	Name        string           `json:"name"`
	EnglishName string           `json:"english_name"`
	Data        *TranslationData `json:"data"`
}

Translation ...

func (*Translation) MarshalMsg

func (z *Translation) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Translation) Msgsize

func (z *Translation) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Translation) UnmarshalMsg

func (z *Translation) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type TranslationData

type TranslationData struct {
	Name     string `json:"name"`
	Title    string `json:"title"`
	Overview string `json:"overview"`
	Homepage string `json:"homepage"`
}

TranslationData ...

func (*TranslationData) MarshalMsg

func (z *TranslationData) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*TranslationData) Msgsize

func (z *TranslationData) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*TranslationData) UnmarshalMsg

func (z *TranslationData) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Jump to

Keyboard shortcuts

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