tmdb

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2020 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGenres added in v0.3.0

func GetGenres(language string, itemType datastructure.ItemType) (map[int]string, error)

func GetItemTypeFromShow added in v0.3.0

func GetItemTypeFromShow(show Show) datastructure.ItemType

func GetRandomComedy

func GetRandomComedy(language string) (string, error)

Types

type Collection

type Collection struct {
	Id    int
	Name  string
	Parts []struct {
		Id               int
		Release_date_str string `json:"release_date"`
		Release_date     time.Time
		Poster_path      string `json:"poster_path"`
		Title            string
		IsWatched        bool
	}
}

func GetCollection

func GetCollection(id, language string) (*Collection, error)

type Credits

type Credits struct {
	Cast []struct {
		Id                 int
		Media_type         string `json:"media_type"`
		Poster_path        string `json:"poster_path"`
		Backdrop_path      string `json:"backdrop_path"`
		Popularity         float64
		Character          string
		Title              string
		Name               string
		First_air_date_str string `json:"first_air_date"`
		Release_date_str   string `json:"release_date"`
		Release_date       time.Time
	}
	Crew []struct {
		Id                 int
		Media_type         string `json:"media_type"`
		Poster_path        string `json:"poster_path"`
		Job                string
		Title              string
		Name               string
		First_air_date_str string `json:"first_air_date"`
		Release_date_str   string `json:"release_date"`
		Release_date       time.Time
	}
}

type Episode

type Episode struct {
	Air_date_str     string `json:"air_date"`
	Air_date         time.Time
	Episode_number   int `json:"episode_number"`
	Name             string
	Overview         string
	Season_number    int     `json:"season_number"`
	Still_path       string  `json:"still_path"`
	Vote_count       int     `json:"vote_count"`
	Vote_average     float32 `json:"vote_average"`
	Episode_code     string
	Experiences      []time.Time
	ContainsSpoilers bool
}

func (Episode) GetLastExperience added in v0.3.0

func (e Episode) GetLastExperience(strings i18n.Translation, timezone string) string

func (Episode) IsWatched added in v0.3.0

func (e Episode) IsWatched() bool

type Film

type Film struct {
	Id            int
	Etag          string
	Backdrop_path string     `json:"backdrop_path"`
	Collection    Collection `json:"belongs_to_collection"`
	Genres        []struct {
		Id   int
		Name string
	}
	Original_title   string `json:"original_title"`
	Overview         string
	Poster_path      string `json:"poster_path"`
	Release_date_str string `json:"release_date"`
	Release_date     time.Time
	Runtime          int
	Status           string
	Tagline          string
	Title            string
	Vote_count       int     `json:"vote_count"`
	Vote_average     float32 `json:"vote_average"`
	Source           string
	Credits          ShowCredits
	BasedOn          datastructure.Book
	Experiences      []time.Time
	IsOnWantList     bool
}

func GetFilm

func GetFilm(id, language string) (*Film, error)

func (*Film) AddBasedOn added in v0.2.0

func (f *Film) AddBasedOn(book datastructure.Book)

func (*Film) GetItemInfo added in v0.3.0

func (f *Film) GetItemInfo() datastructure.ItemInfo

func (*Film) GetItemType added in v0.3.0

func (f *Film) GetItemType() datastructure.ItemType

func (Film) GetLastExperience added in v0.3.0

func (f Film) GetLastExperience(strings i18n.Translation, timezone string) string

func (Film) GetLastExperienceFull added in v0.3.0

func (f Film) GetLastExperienceFull(strings i18n.Translation) string

func (*Film) SetOnWantList added in v0.3.0

func (f *Film) SetOnWantList(isOnList bool)

type Genres added in v0.3.0

type Genres struct {
	Genres []struct {
		Id   int
		Name string
	}
}

type Person

type Person struct {
	Etag           string
	Birthday_str   string    `json:"birthday"`
	Birthday       time.Time `json:"-"`
	Deathday_str   string    `json:"deathday"`
	Deathday       time.Time `json:"-"`
	Name           string
	Biography      string
	Place_of_birth string `json:"place_of_birth"`
	Profile_path   string `json:"profile_path"`
	Backdrop_path  string
	Source         string
	Credits        Credits `json:"combined_credits"`
}

func GetPerson

func GetPerson(id, language, etag string) (*Person, error)

type Query added in v0.2.0

type Query struct {
	// contains filtered or unexported fields
}

type RandomFilms added in v0.2.0

type RandomFilms struct {
	Results []struct {
		Title string
	}
}

type SearchResults

type SearchResults struct {
	Query       string
	Page        int
	Total_pages int `json:"total_pages"`
	Results     []struct {
		Id                 int
		Media_type         string `json:"media_type"`
		Name               string
		Title              string
		First_air_date_str string `json:"first_air_date"`
		Release_date_str   string `json:"release_date"`
		Poster_path        string `json:"poster_path"`
		Profile_path       string `json:"profile_path"`
		Release_date       time.Time
	}
}
func Search(query, language, page string) (*SearchResults, error)

func (SearchResults) NextPage

func (r SearchResults) NextPage() int

func (SearchResults) PrevPage

func (r SearchResults) PrevPage() int

type Season

type Season struct {
	Season_number        int `json:"season_number"`
	Season_number_string string
	Episodes             []Episode
	Credits              ShowCredits
}

func GetSeason added in v0.4.0

func GetSeason(serie *TvSerie, language string, seasonNumber int) (Season, error)

func GetSeasons

func GetSeasons(serie *TvSerie, language string) ([]Season, error)

type Show added in v0.2.0

type Show interface {
	AddBasedOn(book datastructure.Book)
}

type ShowCastEntry added in v0.2.0

type ShowCastEntry struct {
	Character    string
	Id           int
	Name         string
	Profile_path string `json:"profile_path"`
}

type ShowCredits added in v0.2.0

type ShowCredits struct {
	Cast []ShowCastEntry
	Crew []ShowCrewEntry
}

type ShowCrewEntry added in v0.2.0

type ShowCrewEntry struct {
	Job          string
	Id           int
	Name         string
	Profile_path string `json:"profile_path"`
}

type TvSerie added in v0.2.0

type TvSerie struct {
	Id                 string `json:"-"`
	Etag               string
	Backdrop_path      string `json:"backdrop_path"`
	Episode_run_time   []int  `json:"episode_run_time"`
	First_air_date_str string `json:"first_air_date"`
	First_air_date     time.Time
	Genres             []struct {
		Id   int
		Name string
	}
	Last_air_date_str     string `json:"last_air_date"`
	Last_air_date         time.Time
	Last_episode_to_air   Episode `json:"last_episode_to_air"`
	Name                  string
	Number_of_episodes    int    `json:"number_of_episodes"`
	Original_name         string `json:"original_name"`
	Overview              string
	Poster_path           string `json:"poster_path"`
	Seasons               []Season
	Status                string
	Source                string
	Type                  string
	Vote_count            int     `json:"vote_count"`
	Vote_average          float32 `json:"vote_average"`
	Credits               ShowCredits
	BasedOn               datastructure.Book
	IsOnWantList          bool
	Next_episode_to_watch Episode
	Progress              int
	WatchedEpisodes       int
	AllEpisodes           int
	SkippedEpisodes       int
}

func GetSerie

func GetSerie(id, language string) (*TvSerie, error)

func (*TvSerie) AddBasedOn added in v0.2.0

func (s *TvSerie) AddBasedOn(book datastructure.Book)

func (*TvSerie) GetItemInfo added in v0.3.0

func (s *TvSerie) GetItemInfo() datastructure.ItemInfo

func (*TvSerie) GetItemType added in v0.3.0

func (s *TvSerie) GetItemType() datastructure.ItemType

func (TvSerie) GetYears added in v0.2.0

func (s TvSerie) GetYears() string

func (*TvSerie) SetOnWantList added in v0.3.0

func (s *TvSerie) SetOnWantList(isOnList bool)

Jump to

Keyboard shortcuts

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