Documentation ¶
Overview ¶
Package server Takeout API
This is the service API for the Takeout media server.
Terms Of Service:
TOS is TBD ¶
Schemes: https Host: yourhost.com BasePath: /api Version: 0.0.1 License: AGPLv3 https://www.gnu.org/licenses/agpl-3.0.en.html Contact: defsub@defsub.com SecurityDefinitions:
Cookie: type: apiKey name: Cookie description: send Cookie Takeout={token} in: header Bearer: type: apiKey name: Authorization description: send Authorization Bearer {token} scheme: bearer in: header
Security:
- Bearer:
- Cookie:
Consumes: - application/json Produces: - application/json
swagger:meta
Index ¶
- Constants
- Variables
- func ActivityMoviesView(ctx Context, start, end time.Time) *ActivityMovies
- func ActivityPopularTracksView(ctx Context, start, end time.Time) *ActivityTracks
- func ActivityReleasesView(ctx Context, start, end time.Time) *ActivityReleases
- func ActivityTracksView(ctx Context, start, end time.Time) *ActivityTracks
- func ActivityView(ctx Context) *Activity
- func ArtistView(ctx Context, artist model.Artist) *Artist
- func ArtistsView(ctx Context) *Artists
- func EpisodeView(ctx Context, e model.Episode) *Episode
- func GenreView(ctx Context, name string) *Genre
- func HomeView(ctx Context) *Home
- func IndexView(ctx Context) *Index
- func Job(config *config.Config, name string) error
- func KeywordView(ctx Context, name string) *Keyword
- func MovieView(ctx Context, m model.Movie) *Movie
- func MoviesView(ctx Context) *Movies
- func OffsetView(ctx Context, offset model.Offset) *Offset
- func PodcastsView(ctx Context) *Podcasts
- func PopularView(ctx Context, artist model.Artist) *Popular
- func ProfileView(ctx Context, p model.Person) *Profile
- func ProgressView(ctx Context) *Progress
- func RadioView(ctx Context) *Radio
- func RefreshStation(ctx Context, s *model.Station) *spiff.Playlist
- func ReleaseView(ctx Context, release model.Release) *Release
- func Resolve(ctx Context, plist *spiff.Playlist) (err error)
- func ResolveActivityTracksPlaylist(ctx Context, v *view.ActivityTracks, res, path string) *spiff.Playlist
- func ResolveArtistPlaylist(ctx Context, v *view.Artist, path, nref string) *spiff.Playlist
- func ResolveMoviePlaylist(ctx Context, v *view.Movie, path string) *spiff.Playlist
- func ResolveReleasePlaylist(ctx Context, v *view.Release, path string) *spiff.Playlist
- func ResolveSeriesEpisodePlaylist(ctx Context, series *view.Series, v *view.Episode, path string) *spiff.Playlist
- func ResolveSeriesPlaylist(ctx Context, v *view.Series, path string) *spiff.Playlist
- func SearchView(ctx Context, query string) *Search
- func SeriesView(ctx Context, s model.Series) *Series
- func Serve(config *config.Config) error
- func SinglesView(ctx Context, artist model.Artist) *Singles
- func WantListView(ctx Context, artist model.Artist) *WantList
- func WatchView(ctx Context, m model.Movie) *Watch
- type ArtistResponse
- type ArtistsResponse
- type Context
- type EpisodeResponse
- type GenreResponse
- type HomeResponse
- type IndexResponse
- type KeywordResponse
- type LoginParam
- type Media
- type MovieResponse
- type MoviesResponse
- type OffsetResponse
- type PlaylistResponse
- type PodcastsResponse
- type PopularResponse
- type ProfileResponse
- type ProgressResponse
- type RadioResponse
- type ReleaseResponse
- type RequestContext
- func (ctx RequestContext) Activity() *activity.Activity
- func (ctx RequestContext) ArtistBackground(a model.Artist) string
- func (ctx RequestContext) ArtistImage(a model.Artist) string
- func (ctx RequestContext) Auth() *auth.Auth
- func (ctx RequestContext) Config() *config.Config
- func (ctx RequestContext) EpisodeImage(e model.Episode) string
- func (ctx RequestContext) FindArtist(id string) (model.Artist, error)
- func (ctx RequestContext) FindEpisode(id string) (model.Episode, error)
- func (ctx RequestContext) FindMovie(id string) (model.Movie, error)
- func (ctx RequestContext) FindRelease(id string) (model.Release, error)
- func (ctx RequestContext) FindSeries(id string) (model.Series, error)
- func (ctx RequestContext) FindStation(id string) (model.Station, error)
- func (ctx RequestContext) FindTrack(id string) (model.Track, error)
- func (ctx RequestContext) ImageClient() client.Getter
- func (RequestContext) LocateEpisode(e model.Episode) string
- func (RequestContext) LocateMovie(v model.Movie) string
- func (RequestContext) LocateTrack(t model.Track) string
- func (ctx RequestContext) MovieImage(m model.Movie) string
- func (ctx RequestContext) Music() *music.Music
- func (ctx RequestContext) Podcast() *podcast.Podcast
- func (ctx RequestContext) Progress() *progress.Progress
- func (ctx RequestContext) Session() *auth.Session
- func (ctx RequestContext) Template() *template.Template
- func (ctx RequestContext) TrackImage(t model.Track) string
- func (ctx RequestContext) User() *auth.User
- func (ctx RequestContext) Video() *video.Video
- type SearchResponse
- type SeriesResponse
- type SinglesResponse
- type StatusResponse
Constants ¶
const ( ApplicationJson = "application/json" ParamID = ":id" ParamRes = ":res" ParamName = ":name" ParamEID = ":eid" ParamUUID = ":uuid" )
const ( AllowCookie bits = 1 << iota AllowAccessToken AllowMediaToken BearerAuthorization = "Bearer" )
const ( IntentAuth = "TAKEOUT_AUTH" IntentPlay = "TAKEOUT_PLAY" IntentNew = "TAKEOUT_NEW" UserParamCookie = "cookie" )
const ( CoverArtArchivePrefix = "http://coverartarchive.org" TMDBPrefix = "https://image.tmdb.org" FanArtPrefix = "https://assets.fanart.tv/fanart" )
const ( SuccessRedirect = "/" LinkRedirect = "/static/link.html" LoginRedirect = "/static/login.html" )
Variables ¶
var ( ErrNoMedia = errors.New("media not available") ErrInvalidMethod = errors.New("invalid request method") ErrInvalidCode = errors.New("invalid code") ErrNotFound = errors.New("not found") ErrInvalidOffset = errors.New("invalid offset") ErrAccessDenied = errors.New("access denied") ErrMissingToken = errors.New("missing token") ErrMissingAccessToken = errors.New("missing access token") ErrMissingMediaToken = errors.New("missing media token") ErrInvalidSession = errors.New("invalid session") )
Functions ¶
func ActivityMoviesView ¶
func ActivityReleasesView ¶
func ActivityTracksView ¶
func ActivityView ¶
func ActivityView(ctx Context) *Activity
func ArtistView ¶
func ArtistsView ¶
func ArtistsView(ctx Context) *Artists
func EpisodeView ¶
func KeywordView ¶
func MoviesView ¶
func MoviesView(ctx Context) *Movies
func OffsetView ¶
func PodcastsView ¶
func PodcastsView(ctx Context) *Podcasts
func PopularView ¶
func ProfileView ¶
func ProgressView ¶
func ProgressView(ctx Context) *Progress
func ReleaseView ¶
func ResolveArtistPlaylist ¶
func ResolveMoviePlaylist ¶
func ResolveReleasePlaylist ¶
func ResolveSeriesPlaylist ¶
func SearchView ¶
func SeriesView ¶
func SinglesView ¶
func WantListView ¶
Types ¶
type ArtistResponse ¶
swagger:response
type ArtistsResponse ¶
swagger:response
type Context ¶
type Context interface { Activity() *activity.Activity Auth() *auth.Auth Config() *config.Config Music() *music.Music Podcast() *podcast.Podcast Progress() *progress.Progress Template() *template.Template User() *auth.User Session() *auth.Session Video() *video.Video ImageClient() client.Getter LocateTrack(model.Track) string LocateMovie(model.Movie) string LocateEpisode(model.Episode) string FindArtist(string) (model.Artist, error) FindRelease(string) (model.Release, error) FindTrack(string) (model.Track, error) FindStation(string) (model.Station, error) FindMovie(string) (model.Movie, error) FindSeries(string) (model.Series, error) FindEpisode(string) (model.Episode, error) TrackImage(model.Track) string ArtistImage(model.Artist) string ArtistBackground(model.Artist) string MovieImage(model.Movie) string EpisodeImage(model.Episode) string }
type EpisodeResponse ¶
swagger:response
type GenreResponse ¶
swagger:response
type HomeResponse ¶
swagger:response
type IndexResponse ¶
swagger:response
type KeywordResponse ¶
swagger:response
type LoginParam ¶
type LoginParam struct { // in: body Body struct { // contains filtered or unexported fields } }
swagger:parameters Login
type MovieResponse ¶
swagger:response
type MoviesResponse ¶
swagger:response
type OffsetResponse ¶
swagger:response
type PlaylistResponse ¶
swagger:response
type PodcastsResponse ¶
swagger:response
type PopularResponse ¶
swagger:response
type ProfileResponse ¶
swagger:response
type ProgressResponse ¶
swagger:response
type RadioResponse ¶
swagger:response
type ReleaseResponse ¶
swagger:response
type RequestContext ¶
type RequestContext struct {
// contains filtered or unexported fields
}
func (RequestContext) Activity ¶
func (ctx RequestContext) Activity() *activity.Activity
func (RequestContext) ArtistBackground ¶
func (ctx RequestContext) ArtistBackground(a model.Artist) string
func (RequestContext) ArtistImage ¶
func (ctx RequestContext) ArtistImage(a model.Artist) string
func (RequestContext) Auth ¶
func (ctx RequestContext) Auth() *auth.Auth
func (RequestContext) Config ¶
func (ctx RequestContext) Config() *config.Config
func (RequestContext) EpisodeImage ¶
func (ctx RequestContext) EpisodeImage(e model.Episode) string
func (RequestContext) FindArtist ¶
func (ctx RequestContext) FindArtist(id string) (model.Artist, error)
func (RequestContext) FindEpisode ¶
func (ctx RequestContext) FindEpisode(id string) (model.Episode, error)
func (RequestContext) FindMovie ¶
func (ctx RequestContext) FindMovie(id string) (model.Movie, error)
func (RequestContext) FindRelease ¶
func (ctx RequestContext) FindRelease(id string) (model.Release, error)
func (RequestContext) FindSeries ¶
func (ctx RequestContext) FindSeries(id string) (model.Series, error)
func (RequestContext) FindStation ¶
func (ctx RequestContext) FindStation(id string) (model.Station, error)
func (RequestContext) FindTrack ¶
func (ctx RequestContext) FindTrack(id string) (model.Track, error)
func (RequestContext) ImageClient ¶
func (ctx RequestContext) ImageClient() client.Getter
func (RequestContext) LocateEpisode ¶
func (RequestContext) LocateEpisode(e model.Episode) string
func (RequestContext) LocateMovie ¶
func (RequestContext) LocateMovie(v model.Movie) string
func (RequestContext) LocateTrack ¶
func (RequestContext) LocateTrack(t model.Track) string
func (RequestContext) MovieImage ¶
func (ctx RequestContext) MovieImage(m model.Movie) string
func (RequestContext) Music ¶
func (ctx RequestContext) Music() *music.Music
func (RequestContext) Podcast ¶
func (ctx RequestContext) Podcast() *podcast.Podcast
func (RequestContext) Progress ¶
func (ctx RequestContext) Progress() *progress.Progress
func (RequestContext) Session ¶
func (ctx RequestContext) Session() *auth.Session
func (RequestContext) Template ¶
func (ctx RequestContext) Template() *template.Template
func (RequestContext) TrackImage ¶
func (ctx RequestContext) TrackImage(t model.Track) string
func (RequestContext) User ¶
func (ctx RequestContext) User() *auth.User
func (RequestContext) Video ¶
func (ctx RequestContext) Video() *video.Video
type SearchResponse ¶
swagger:response
type SeriesResponse ¶
swagger:response
type SinglesResponse ¶
swagger:response
type StatusResponse ¶
type StatusResponse struct { // in: body Body struct { // contains filtered or unexported fields } }
swagger:response