Versions in this module Expand all Collapse all v0 v0.9.0 Jun 8, 2024 v0.8.0 Apr 30, 2024 Changes in this version + func ExternalSource(ref model.ContentRef) (externalSource string, externalId string, err error) + func MovieDetailsToMovieModel(details MovieDetailsResponse) (movie model.Content, err error) + func TvShowDetailsToTvShowModel(details TvDetailsResponse) (movie model.Content, err error) type Config + BaseUrl string + Enabled bool + type Requester interface + Request func(ctx context.Context, path string, queryParams map[string]string, ...) (*resty.Response, error) + type SearchMovieResult struct + Adult bool + BackdropPath string + GenreIDs []int64 + ID int64 + OriginalLanguage string + OriginalTitle string + Overview string + Popularity float32 + PosterPath string + ReleaseDate string + Title string + Video bool + VoteAverage float32 + VoteCount int64 v0.7.14 Mar 11, 2024 v0.7.12 Mar 10, 2024 v0.7.10 Mar 9, 2024 v0.7.9 Mar 8, 2024 v0.7.8 Mar 7, 2024 v0.7.7 Feb 25, 2024 v0.7.5 Feb 23, 2024 Changes in this version + var ErrNotFound = newError("404 Not Found") + var ErrUnauthorized = newError("401 Unauthorized") + type Client interface + FindByID func(context.Context, FindByIDRequest) (FindByIDResponse, error) + MovieDetails func(context.Context, MovieDetailsRequest) (MovieDetailsResponse, error) + SearchMovie func(context.Context, SearchMovieRequest) (SearchMovieResponse, error) + SearchTv func(context.Context, SearchTvRequest) (SearchTvResponse, error) + TvDetails func(context.Context, TvDetailsRequest) (TvDetailsResponse, error) + ValidateApiKey func(context.Context) error + type Config struct + ApiKey string + RateLimit time.Duration + RateLimitBurst int + func NewDefaultConfig() Config + type FindByIDRequest struct + ExternalID string + ExternalSource string + Language model.NullString + type FindByIDResponse struct + MovieResults []struct{ ... } + TvResults []struct{ ... } + type MovieDetailsRequest struct + AppendToResponse []string + ID int64 + Language model.NullString + type MovieDetailsResponse struct + Adult bool + BackdropPath string + BelongsToCollection struct{ ... } + Budget int64 + Genres []struct{ ... } + Homepage string + ID int64 + IMDbID string + OriginalLanguage string + OriginalTitle string + Overview string + Popularity float32 + PosterPath string + ProductionCompanies []struct{ ... } + ProductionCountries []struct{ ... } + ReleaseDate string + Revenue int64 + Runtime int + SpokenLanguages []struct{ ... } + Status string + Tagline string + Title string + Video bool + VoteAverage float32 + VoteCount int64 + type Params struct + Config Config + Logger *zap.SugaredLogger + type Result struct + Client lazy.Lazy[Client] + func New(p Params) Result + type SearchMovieRequest struct + IncludeAdult bool + Language model.NullString + PrimaryReleaseYear model.Year + Query string + Region model.NullString + Year model.Year + type SearchMovieResponse struct + Page int64 + Results []struct{ ... } + TotalPages int64 + TotalResults int64 + type SearchTvRequest struct + FirstAirDateYear model.Year + IncludeAdult bool + Language model.NullString + Query string + Year model.Year + type SearchTvResponse struct + Page int64 + Results []struct{ ... } + TotalPages int64 + TotalResults int64 + type TvDetailsRequest struct + AppendToResponse []string + Language model.NullString + SeriesID int64 + type TvDetailsResponse struct + BackdropPath string + CreatedBy []struct{ ... } + EpisodeRunTime []int + ExternalIDs struct{ ... } + FirstAirDate string + Genres []struct{ ... } + Homepage string + ID int64 + InProduction bool + Languages []string + LastAirDate string + LastEpisodeToAir struct{ ... } + Name string + Networks []struct{ ... } + NextEpisodeToAir struct{ ... } + NumberOfEpisodes int + NumberOfSeasons int + OriginCountry []string + OriginalLanguage string + OriginalName string + Overview string + Popularity float32 + PosterPath string + ProductionCompanies []struct{ ... } + ProductionCountries []struct{ ... } + Seasons []struct{ ... } + Status string + Tagline string + Type string + VoteAverage float32 + VoteCount int64