Documentation ¶
Overview ¶
themoviedb.org ("TMDb") REST API client
Index ¶
- Constants
- func ImagePath(path string, width ImageSize) string
- type Client
- func (c *Client) GetEpisodeExternalIds(ctx context.Context, tvId string, seasonNumber int, episodeNumber int) (*ExternalIds, error)
- func (c *Client) GetSeasonEpisodes(ctx context.Context, seasonNumber int, tvId string) ([]Episode, error)
- func (c *Client) MultiSearch(ctx context.Context, query string) ([]MultiSearchResult, error)
- func (c *Client) OpenMovie(ctx context.Context, id string) (*Movie, error)
- func (c *Client) OpenMovieByImdbId(ctx context.Context, imdbId string) (*Movie, error)
- func (c *Client) OpenTv(ctx context.Context, id string) (*Tv, error)
- func (c *Client) OpenTvByImdbId(ctx context.Context, imdbId string) (*Tv, error)
- type Episode
- type ExternalIds
- type ImageSize
- type Movie
- type MultiSearchResult
- type Tv
Constants ¶
View Source
const ( MediaTypeMovie = "movie" MediaTypeTv = "tv" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetEpisodeExternalIds ¶
func (*Client) GetSeasonEpisodes ¶
func (c *Client) GetSeasonEpisodes(ctx context.Context, seasonNumber int, tvId string) ([]Episode, error)
doesn't support returning external IDs, but the "get one episode" does.
func (*Client) MultiSearch ¶
func (*Client) OpenMovieByImdbId ¶
type ExternalIds ¶
type Movie ¶
type Movie struct { Id int64 `json:"id"` ExternalIds ExternalIds `json:"external_ids"` Title string `json:"title"` OriginalTitle string `json:"original_title"` Overview string `json:"overview"` RuntimeMinutes int `json:"runtime"` ReleaseDate string `json:"release_date"` // yyyy-mm-dd RevenueDollars int64 `json:"revenue"` BackdropPath string `json:"backdrop_path"` }
type MultiSearchResult ¶
type MultiSearchResult struct { Id int64 `json:"id"` MediaType string `json:"media_type"` Title string `json:"title"` // when movie Name string `json:"name"` // when TV ReleaseDate string `json:"release_date"` // when movie, yyyy-mm-dd FirstAirDate string `json:"first_air_date"` // when TV, yyyy-mm-dd }
Click to show internal directories.
Click to hide internal directories.