Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actor ¶ added in v0.5.3
type Actor struct { ID int `json:"id"` Name string `json:"name"` ProfileURL string `json:"profileUrl"` Overview string `json:"overview"` }
Actor represents a person
type MediaClient ¶
type MediaClient interface { GetMovie(id int) (*Movie, error) GetTVShow(id int) (*TVShow, error) GetTVEpisode(tvId, season, episodeNumber int) (*TVEpisode, error) GetTVSeasonEpisodes(id int, season int) ([]*TVEpisode, error) GetPopularMovies(page int) (*PaginatedMovieResults, error) GetPopularTVShows(page int) (*PaginatedTVShowResults, error) GetRecentMovies() ([]*Movie, error) GetRecentTVShows() ([]*TVShow, error) SearchMovies(query string, page int) (*PaginatedMovieResults, error) SearchTVShows(query string, page int) (*PaginatedTVShowResults, error) GetMoviesByGenre(genreID int, page int) (*PaginatedMovieResults, error) GetTVShowsByGenre(genreID int, page int) (*PaginatedTVShowResults, error) GetMoviesByActor(actorID int, page int) (*PaginatedMovieResults, error) GetMoviesByDirector(directorID int, page int) (*PaginatedMovieResults, error) GetMoviesByStudio(studioID int, page int) (*PaginatedMovieResults, error) GetTVShowsByActor(actorID int, page int) (*PaginatedTVShowResults, error) GetTVShowsByNetwork(studioID int, page int) (*PaginatedTVShowResults, error) GetTVShowsReleases(tvIds []int, startDate, endDate time.Time) ([]*TVEpisode, []*TVShow, error) GetMoviesReleases(movieIds []int, startDate, endDate time.Time) ([]*Movie, error) GetMovieRecommendations(movieId int) ([]*Movie, error) GetTVShowRecommendations(tvShowId int) ([]*TVShow, error) GetMovieShort(movieId int) (*Movie, error) GetTVShowShort(tvShowId int) (*TVShow, error) GetMovieGenre(genreID int) (*Genre, error) GetTVGenre(genreID int) (*Genre, error) GetMovieGenres() ([]*Genre, error) GetTVShowGenres() ([]*Genre, error) GetActor(actorID int) (*Actor, error) GetStudio(studioID int) (*Studio, error) GetNetwork(networkID int) (*Studio, error) }
MediaClient is an interface for a media client API.
func NewMediaClient ¶
func NewMediaClient(apiKey string) MediaClient
type Movie ¶
type Movie struct { ID int `json:"id"` Actors []Person `json:"actors"` BackdropURL string `json:"backdropUrl"` Crew []Person `json:"crew"` Genres []Genre `json:"genres"` Overview string `json:"overview"` PosterURL string `json:"posterUrl"` ReleaseDate string `json:"releaseDate"` Studios []Studio `json:"studios"` Title string `json:"title"` VoteAverage float32 `json:"voteAverage"` VoteCount int `json:"voteCount"` }
Movie represents a movie with its attributes such as ID, actors list (Person), backdrop URL, crew list (Person), genre list (Genre), overview, poster URL, release date, studio list (Studio), title, vote average, and vote count.
type PaginatedMovieResults ¶ added in v0.3.0
type PaginatedTVShowResults ¶ added in v0.3.0
type Person ¶
type Person struct { ID int `json:"id"` Character string `json:"character"` Name string `json:"name"` ProfileURL string `json:"profileUrl"` }
Person represents a person involved in a movie or TV show with their ID, character name, real name, and the URL to their profile picture.
type TVEpisode ¶
type TVEpisode struct { ID int `json:"id"` TVShowID int `json:"tvShowId"` PosterURL string `json:"posterUrl"` EpisodeNumber int `json:"episodeNumber"` SeasonNumber int `json:"seasonNumber"` Name string `json:"name"` Overview string `json:"overview"` AirDate string `json:"airDate"` }
TVEpisode represents a TV episode with its attributes such as ID, TV show ID, poster URL, season number, episode number, name, overview, and air date.
type TVShow ¶
type TVShow struct { ID int `json:"id"` Actors []Person `json:"actors"` BackdropURL string `json:"backdropUrl"` Crew []Person `json:"crew"` Genres []Genre `json:"genres"` Overview string `json:"overview"` PosterURL string `json:"posterUrl"` ReleaseDate string `json:"releaseDate"` Networks []Studio `json:"networks"` Status string `json:"status"` NextEpisode *TVEpisode `json:"nextEpisode"` Title string `json:"title"` SeasonsCount int `json:"seasonsCount"` EpisodesCount int `json:"episodesCount"` VoteAverage float32 `json:"voteAverage"` VoteCount int `json:"voteCount"` }
TVShow represents a TV show with its attributes such as ID, actors list (Person), backdrop URL, crew list (Person), genre list (Genre), overview, poster URL, release date, studio list (Studio), status, next episode (TVEpisode), title, seasons count, vote average, and vote count.