Documentation
¶
Index ¶
- Constants
- type AnticipatedMovie
- type AnticipatedShow
- type BoxOfficeMovie
- type CollectedMovie
- type CollectedShow
- type Country
- type FavoritedMovie
- type FavoritedShow
- type Genre
- type IDs
- type Jellyseerr
- func (j *Jellyseerr) GetMovieInfo(tmdbID int) (*MediaInfo, error)
- func (j *Jellyseerr) GetShowInfo(tmdbID int) (*MediaInfo, error)
- func (j *Jellyseerr) GetStatus() (*StatusResponse, error)
- func (j *Jellyseerr) RequestMovie(tmdbID int) (*RequestResponse, error)
- func (j *Jellyseerr) RequestShow(tmdbID int) (*RequestResponse, error)
- type JellyseerrConfig
- type Language
- type LoginRequest
- type LoginResponse
- type MediaInfo
- type Movie
- type MovieRequest
- type Network
- type PlayedMovie
- type PlayedShow
- type QualityProfile
- type Radarr
- func (r *Radarr) AddMovie(ctx context.Context, movie RadarrMovie) (*RadarrMovie, error)
- func (r *Radarr) GetMovies(ctx context.Context) ([]RadarrMovie, error)
- func (r *Radarr) GetQualityProfiles(ctx context.Context) ([]QualityProfile, error)
- func (r *Radarr) GetRootFolders(ctx context.Context) ([]RootFolder, error)
- func (r *Radarr) GetSystemStatus(ctx context.Context) (*SystemStatus, error)
- func (r *Radarr) LookupMovie(ctx context.Context, term string) ([]RadarrMovie, error)
- type RadarrAddOptions
- type RadarrConfig
- type RadarrMovie
- type RequestResponse
- type RootFolder
- type SearchResult
- type Show
- type ShowRequest
- type Sonarr
- func (s *Sonarr) AddSeries(ctx context.Context, series SonarrSeries) (*SonarrSeries, error)
- func (s *Sonarr) GetQualityProfiles(ctx context.Context) ([]SonarrQualityProfile, error)
- func (s *Sonarr) GetRootFolders(ctx context.Context) ([]SonarrRootFolder, error)
- func (s *Sonarr) GetSeries(ctx context.Context) ([]SonarrSeries, error)
- func (s *Sonarr) GetSystemStatus(ctx context.Context) (*SonarrSystemStatus, error)
- func (s *Sonarr) LookupSeries(ctx context.Context, term string) ([]SonarrSeries, error)
- type SonarrAddOptions
- type SonarrConfig
- type SonarrQualityProfile
- type SonarrRootFolder
- type SonarrSeries
- type SonarrSystemStatus
- type StatusResponse
- type SystemStatus
- type TMDB
- type TMDBConfig
- type TMDBMovie
- type TMDBShow
- type Trakt
- func (t *Trakt) GetAnticipatedMovies(ctx context.Context, limit int) ([]AnticipatedMovie, error)
- func (t *Trakt) GetAnticipatedShows(ctx context.Context, limit int) ([]AnticipatedShow, error)
- func (t *Trakt) GetBoxOfficeMovies(ctx context.Context, limit int) ([]BoxOfficeMovie, error)
- func (t *Trakt) GetCollectedMovies(ctx context.Context, period string, limit int) ([]CollectedMovie, error)
- func (t *Trakt) GetCollectedShows(ctx context.Context, period string, limit int) ([]CollectedShow, error)
- func (t *Trakt) GetCountries(ctx context.Context, mediaType string) ([]Country, error)
- func (t *Trakt) GetFavoritedMovies(ctx context.Context, period string, limit int) ([]FavoritedMovie, error)
- func (t *Trakt) GetFavoritedShows(ctx context.Context, period string, limit int) ([]FavoritedShow, error)
- func (t *Trakt) GetGenres(ctx context.Context, mediaType string) ([]Genre, error)
- func (t *Trakt) GetLanguages(ctx context.Context, mediaType string) ([]Language, error)
- func (t *Trakt) GetNetworks(ctx context.Context) ([]Network, error)
- func (t *Trakt) GetPlayedMovies(ctx context.Context, period string, limit int) ([]PlayedMovie, error)
- func (t *Trakt) GetPlayedShows(ctx context.Context, period string, limit int) ([]PlayedShow, error)
- func (t *Trakt) GetPopularMovies(ctx context.Context, limit int) ([]Movie, error)
- func (t *Trakt) GetPopularShows(ctx context.Context, limit int) ([]Show, error)
- func (t *Trakt) GetTrendingMovies(ctx context.Context, limit int) ([]TrendingMovie, error)
- func (t *Trakt) GetTrendingShows(ctx context.Context, limit int) ([]TrendingShow, error)
- func (t *Trakt) GetWatchedMovies(ctx context.Context, period string, limit int) ([]WatchedMovie, error)
- func (t *Trakt) GetWatchedShows(ctx context.Context, period string, limit int) ([]WatchedShow, error)
- func (t *Trakt) Search(ctx context.Context, query string, searchType string, limit int) ([]SearchResult, error)
- func (t *Trakt) Validate(ctx context.Context) error
- type TraktConfig
- type TrendingMovie
- type TrendingShow
- type WatchedMovie
- type WatchedShow
Constants ¶
const ( TMDBAPIBaseURL = "https://api.themoviedb.org/3" TMDBImageBaseURL = "https://image.tmdb.org/t/p/w500" )
const ( TraktAPIBaseURL = "https://api.trakt.tv" TraktAPIVersion = "2" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnticipatedMovie ¶
AnticipatedMovie represents an anticipated movie from Trakt
type AnticipatedShow ¶
AnticipatedShow represents an anticipated TV show from Trakt
type BoxOfficeMovie ¶
BoxOfficeMovie represents a box office movie from Trakt
type CollectedMovie ¶
type CollectedMovie struct {
WatcherCount int `json:"watcher_count"`
PlayCount int `json:"play_count"`
CollectedCount int `json:"collected_count"`
Movie Movie `json:"movie"`
}
CollectedMovie represents a collected movie from Trakt
type CollectedShow ¶
type CollectedShow struct {
WatcherCount int `json:"watcher_count"`
PlayCount int `json:"play_count"`
CollectedCount int `json:"collected_count"`
CollectorCount int `json:"collector_count"`
Show Show `json:"show"`
}
CollectedShow represents a collected TV show from Trakt
type FavoritedMovie ¶
FavoritedMovie represents a favorited movie from Trakt
type FavoritedShow ¶
FavoritedShow represents a favorited TV show from Trakt
type IDs ¶
type IDs struct {
Trakt int `json:"trakt"`
Slug string `json:"slug"`
IMDB string `json:"imdb"`
TMDB int `json:"tmdb"`
TVDB int `json:"tvdb"`
}
IDs contains various IDs for a media item
type Jellyseerr ¶ added in v0.2.0
type Jellyseerr struct {
// contains filtered or unexported fields
}
func NewJellyseerr ¶ added in v0.2.0
func NewJellyseerr(config JellyseerrConfig) *Jellyseerr
func (*Jellyseerr) GetMovieInfo ¶ added in v0.5.2
func (j *Jellyseerr) GetMovieInfo(tmdbID int) (*MediaInfo, error)
GetMovieInfo gets information about a movie from Jellyseerr
func (*Jellyseerr) GetShowInfo ¶ added in v0.5.2
func (j *Jellyseerr) GetShowInfo(tmdbID int) (*MediaInfo, error)
GetShowInfo gets information about a TV show from Jellyseerr
func (*Jellyseerr) GetStatus ¶ added in v0.2.0
func (j *Jellyseerr) GetStatus() (*StatusResponse, error)
GetStatus checks if Jellyseerr is accessible
func (*Jellyseerr) RequestMovie ¶ added in v0.2.0
func (j *Jellyseerr) RequestMovie(tmdbID int) (*RequestResponse, error)
RequestMovie requests a movie by TMDB ID
func (*Jellyseerr) RequestShow ¶ added in v0.2.0
func (j *Jellyseerr) RequestShow(tmdbID int) (*RequestResponse, error)
RequestShow requests a TV show by TMDB ID
type JellyseerrConfig ¶ added in v0.2.0
type LoginRequest ¶ added in v0.5.2
LoginRequest represents the login payload
type LoginResponse ¶ added in v0.5.2
type LoginResponse struct {
ID int `json:"id"`
Email string `json:"email"`
DisplayName string `json:"displayName"`
}
LoginResponse represents the login response
type MediaInfo ¶ added in v0.5.2
type MediaInfo struct {
MediaInfo struct {
Status int `json:"status"`
} `json:"mediaInfo"`
}
MediaInfo represents media information from Jellyseerr
func (*MediaInfo) HasMediaInfo ¶ added in v0.5.2
HasMediaInfo checks if the media has an associated media info (requested/available)
type Movie ¶
type Movie struct {
Title string `json:"title"`
Year int `json:"year"`
IDs IDs `json:"ids"`
Genres []string `json:"genres"`
Language string `json:"language"`
Country string `json:"country"`
Runtime int `json:"runtime"` // in minutes
Overview string `json:"overview"`
Rating float64 `json:"rating"`
Votes int `json:"votes"`
}
Movie represents a Trakt movie
type MovieRequest ¶ added in v0.2.0
type MovieRequest struct {
MediaType string `json:"mediaType"`
MediaID int `json:"mediaId"` // TMDB ID
UserID *int `json:"userId,omitempty"`
}
MovieRequest represents a movie request payload
type PlayedMovie ¶
type PlayedMovie struct {
WatcherCount int `json:"watcher_count"`
PlayCount int `json:"play_count"`
CollectedCount int `json:"collected_count"`
Movie Movie `json:"movie"`
}
PlayedMovie represents a played movie from Trakt
type PlayedShow ¶
type PlayedShow struct {
WatcherCount int `json:"watcher_count"`
PlayCount int `json:"play_count"`
CollectedCount int `json:"collected_count"`
CollectorCount int `json:"collector_count"`
Show Show `json:"show"`
}
PlayedShow represents a played TV show from Trakt
type QualityProfile ¶
QualityProfile represents a Radarr quality profile
type Radarr ¶
type Radarr struct {
// contains filtered or unexported fields
}
Radarr client for movie management
func NewRadarr ¶
func NewRadarr(config RadarrConfig) *Radarr
NewRadarr creates a new Radarr API client
func (*Radarr) AddMovie ¶
func (r *Radarr) AddMovie(ctx context.Context, movie RadarrMovie) (*RadarrMovie, error)
AddMovie adds a movie to Radarr
func (*Radarr) GetMovies ¶
func (r *Radarr) GetMovies(ctx context.Context) ([]RadarrMovie, error)
GetMovies returns all movies in Radarr
func (*Radarr) GetQualityProfiles ¶
func (r *Radarr) GetQualityProfiles(ctx context.Context) ([]QualityProfile, error)
GetQualityProfiles returns available quality profiles
func (*Radarr) GetRootFolders ¶
func (r *Radarr) GetRootFolders(ctx context.Context) ([]RootFolder, error)
GetRootFolders returns available root folders
func (*Radarr) GetSystemStatus ¶
func (r *Radarr) GetSystemStatus(ctx context.Context) (*SystemStatus, error)
GetSystemStatus returns Radarr system status
func (*Radarr) LookupMovie ¶
LookupMovie searches for a movie by TMDB ID or title
type RadarrAddOptions ¶
type RadarrAddOptions struct {
SearchForMovie bool `json:"searchForMovie"`
Monitor string `json:"monitor,omitempty"` // "movieOnly", "movieAndCollection", or "none"
}
RadarrAddOptions specifies options when adding a movie
type RadarrConfig ¶
RadarrConfig holds configuration for Radarr client
type RadarrMovie ¶
type RadarrMovie struct {
ID int `json:"id,omitempty"`
Title string `json:"title"`
Year int `json:"year"`
TmdbID int `json:"tmdbId"`
ImdbID string `json:"imdbId,omitempty"`
TitleSlug string `json:"titleSlug,omitempty"`
Path string `json:"path,omitempty"`
QualityProfileID int `json:"qualityProfileId"`
Monitored bool `json:"monitored"`
MinimumAvailability string `json:"minimumAvailability"`
RootFolderPath string `json:"rootFolderPath"`
Tags []int `json:"tags,omitempty"`
AddOptions *RadarrAddOptions `json:"addOptions,omitempty"`
}
Movie represents a Radarr movie
type RequestResponse ¶ added in v0.2.0
type RequestResponse struct {
ID int `json:"id"`
Status int `json:"status"`
MediaID int `json:"mediaId"`
MediaType string `json:"mediaType"`
Message string `json:"message,omitempty"`
HTTPStatus int `json:"-"` // HTTP status code (201 = new, 200 = existing)
}
RequestResponse represents the API response
func (*RequestResponse) IsAlreadyRequested ¶ added in v0.2.0
func (result *RequestResponse) IsAlreadyRequested() bool
IsAlreadyRequested checks if content was already requested (not newly created)
type RootFolder ¶
type RootFolder struct {
ID int `json:"id"`
Path string `json:"path"`
FreeSpace int64 `json:"freeSpace"`
TotalSpace int64 `json:"totalSpace"`
Accessible bool `json:"accessible"`
}
RootFolder represents a Radarr root folder
type SearchResult ¶
type SearchResult struct {
Type string `json:"type"`
Score float64 `json:"score"`
Movie *Movie `json:"movie,omitempty"`
Show *Show `json:"show,omitempty"`
}
SearchResult represents a search result from Trakt
type Show ¶
type Show struct {
Title string `json:"title"`
Year int `json:"year"`
IDs IDs `json:"ids"`
Genres []string `json:"genres"`
Language string `json:"language"`
Country string `json:"country"`
Runtime int `json:"runtime"` // in minutes
Network string `json:"network"`
Overview string `json:"overview"`
Rating float64 `json:"rating"`
Votes int `json:"votes"`
}
Show represents a Trakt TV show
type ShowRequest ¶ added in v0.2.0
type ShowRequest struct {
MediaType string `json:"mediaType"`
MediaID int `json:"mediaId"` // TMDB ID (Jellyseerr uses TMDB for TV shows, not TVDB)
Seasons string `json:"seasons"` // "all" or specific seasons
UserID *int `json:"userId,omitempty"`
}
ShowRequest represents a TV show request payload
type Sonarr ¶
type Sonarr struct {
// contains filtered or unexported fields
}
Sonarr client for TV show management
func NewSonarr ¶
func NewSonarr(config SonarrConfig) *Sonarr
NewSonarr creates a new Sonarr API client
func (*Sonarr) AddSeries ¶
func (s *Sonarr) AddSeries(ctx context.Context, series SonarrSeries) (*SonarrSeries, error)
AddSeries adds a TV series to Sonarr
func (*Sonarr) GetQualityProfiles ¶
func (s *Sonarr) GetQualityProfiles(ctx context.Context) ([]SonarrQualityProfile, error)
GetQualityProfiles returns available quality profiles
func (*Sonarr) GetRootFolders ¶
func (s *Sonarr) GetRootFolders(ctx context.Context) ([]SonarrRootFolder, error)
GetRootFolders returns available root folders
func (*Sonarr) GetSeries ¶
func (s *Sonarr) GetSeries(ctx context.Context) ([]SonarrSeries, error)
GetSeries returns all series in Sonarr
func (*Sonarr) GetSystemStatus ¶
func (s *Sonarr) GetSystemStatus(ctx context.Context) (*SonarrSystemStatus, error)
GetSystemStatus returns Sonarr system status
func (*Sonarr) LookupSeries ¶
LookupSeries searches for a TV series by TVDB ID or title
type SonarrAddOptions ¶
type SonarrAddOptions struct {
SearchForMissingEpisodes bool `json:"searchForMissingEpisodes"`
}
SonarrAddOptions specifies options when adding a series
type SonarrConfig ¶
SonarrConfig holds configuration for Sonarr client
type SonarrQualityProfile ¶
QualityProfile represents a Sonarr quality profile
type SonarrRootFolder ¶
type SonarrRootFolder struct {
ID int `json:"id"`
Path string `json:"path"`
FreeSpace int64 `json:"freeSpace"`
TotalSpace int64 `json:"totalSpace"`
Accessible bool `json:"accessible"`
}
RootFolder represents a Sonarr root folder
type SonarrSeries ¶
type SonarrSeries struct {
ID int `json:"id,omitempty"`
Title string `json:"title"`
Year int `json:"year,omitempty"`
TvdbID int `json:"tvdbId"`
TmdbID int `json:"tmdbId,omitempty"`
ImdbID string `json:"imdbId,omitempty"`
TitleSlug string `json:"titleSlug,omitempty"`
Path string `json:"path,omitempty"`
QualityProfileID int `json:"qualityProfileId"`
LanguageProfileID int `json:"languageProfileId,omitempty"`
Monitored bool `json:"monitored"`
SeriesType string `json:"seriesType,omitempty"`
SeasonFolder bool `json:"seasonFolder"`
RootFolderPath string `json:"rootFolderPath"`
Tags []int `json:"tags,omitempty"`
AddOptions *SonarrAddOptions `json:"addOptions,omitempty"`
}
Series represents a Sonarr TV series
type SonarrSystemStatus ¶
SystemStatus represents Sonarr system status
type StatusResponse ¶ added in v0.2.0
StatusResponse for checking Jellyseerr status
type SystemStatus ¶
SystemStatus represents Radarr system status
type TMDB ¶ added in v1.0.0
type TMDB struct {
// contains filtered or unexported fields
}
TMDB is the client for interacting with TMDB API
func NewTMDB ¶ added in v1.0.0
func NewTMDB(config TMDBConfig) *TMDB
NewTMDB creates a new TMDB API client
func (*TMDB) GetMoviePosterURL ¶ added in v1.0.0
GetMoviePosterURL fetches the poster URL for a movie by TMDB ID
type TMDBConfig ¶ added in v1.0.0
type TMDBConfig struct {
APIKey string
}
TMDBConfig holds configuration for TMDB client
type TMDBMovie ¶ added in v1.0.0
type TMDBMovie struct {
ID int `json:"id"`
Title string `json:"title"`
PosterPath string `json:"poster_path"`
BackdropPath string `json:"backdrop_path"`
}
TMDBMovie represents a movie from TMDB
type TMDBShow ¶ added in v1.0.0
type TMDBShow struct {
ID int `json:"id"`
Name string `json:"name"`
PosterPath string `json:"poster_path"`
BackdropPath string `json:"backdrop_path"`
}
TMDBShow represents a TV show from TMDB
type Trakt ¶
type Trakt struct {
// contains filtered or unexported fields
}
Trakt is the client for interacting with Trakt API
func (*Trakt) GetAnticipatedMovies ¶
GetAnticipatedMovies returns the most anticipated movies
func (*Trakt) GetAnticipatedShows ¶
GetAnticipatedShows returns the most anticipated TV shows
func (*Trakt) GetBoxOfficeMovies ¶
GetBoxOfficeMovies returns current box office movies
func (*Trakt) GetCollectedMovies ¶
func (t *Trakt) GetCollectedMovies(ctx context.Context, period string, limit int) ([]CollectedMovie, error)
GetCollectedMovies returns the most collected movies
func (*Trakt) GetCollectedShows ¶
func (t *Trakt) GetCollectedShows(ctx context.Context, period string, limit int) ([]CollectedShow, error)
GetCollectedShows returns the most collected TV shows
func (*Trakt) GetCountries ¶ added in v0.4.0
GetCountries returns available countries for movies or shows
func (*Trakt) GetFavoritedMovies ¶
func (t *Trakt) GetFavoritedMovies(ctx context.Context, period string, limit int) ([]FavoritedMovie, error)
GetFavoritedMovies returns the most favorited movies
func (*Trakt) GetFavoritedShows ¶
func (t *Trakt) GetFavoritedShows(ctx context.Context, period string, limit int) ([]FavoritedShow, error)
GetFavoritedShows returns the most favorited TV shows
func (*Trakt) GetLanguages ¶ added in v0.4.0
GetLanguages returns available languages for movies or shows
func (*Trakt) GetNetworks ¶ added in v0.4.0
GetNetworks returns available TV networks
func (*Trakt) GetPlayedMovies ¶
func (t *Trakt) GetPlayedMovies(ctx context.Context, period string, limit int) ([]PlayedMovie, error)
GetPlayedMovies returns the most played movies
func (*Trakt) GetPlayedShows ¶
GetPlayedShows returns the most played TV shows
func (*Trakt) GetPopularMovies ¶
GetPopularMovies returns popular movies
func (*Trakt) GetPopularShows ¶
GetPopularShows returns popular TV shows
func (*Trakt) GetTrendingMovies ¶
GetTrendingMovies returns trending movies
func (*Trakt) GetTrendingShows ¶
GetTrendingShows returns trending TV shows
func (*Trakt) GetWatchedMovies ¶
func (t *Trakt) GetWatchedMovies(ctx context.Context, period string, limit int) ([]WatchedMovie, error)
GetWatchedMovies returns the most watched movies
func (*Trakt) GetWatchedShows ¶
func (t *Trakt) GetWatchedShows(ctx context.Context, period string, limit int) ([]WatchedShow, error)
GetWatchedShows returns the most watched TV shows
type TraktConfig ¶
TraktConfig holds configuration for Trakt client
type TrendingMovie ¶
TrendingMovie represents a trending movie from Trakt
type TrendingShow ¶
TrendingShow represents a trending TV show from Trakt