Documentation ¶
Index ¶
- Variables
- func Error(c *gin.Context, description string, err err)
- type Capabilities
- func (c Capabilities) HasCategories(cats []categories.Category) bool
- func (c Capabilities) HasCategory(cat categories.Category) bool
- func (c Capabilities) HasMovies() bool
- func (c Capabilities) HasSearchMode(key string) (bool, []string)
- func (c Capabilities) HasTVShows() bool
- func (c Capabilities) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (c Capabilities) ServeHTTP(w http.ResponseWriter, r *http.Request)
- type Info
- type Query
- type ResultFeed
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrIncorrectUserCreds = err{100, "Incorrect user credentials"} ErrAccountSuspended = err{101, "Account suspended"} ErrInsufficientPrivs = err{102, "Insufficient privileges/not authorized"} ErrRegistrationDenied = err{103, "Registration denied"} ErrRegistrationsAreClosed = err{104, "Registrations are closed"} ErrEmailAddressTaken = err{105, "Invalid registration (Email Address Taken)"} ErrEmailAddressBadFormat = err{106, "Invalid registration (Email Address Bad Format)"} ErrRegistrationFailed = err{107, "Registration Failed (Data error)"} ErrMissingParameter = err{200, "Missing parameter"} ErrIncorrectParameter = err{201, "Incorrect parameter"} ErrNoSuchFunction = err{202, "No such function. (Function not defined in this specification)."} ErrFunctionNotAvailable = err{203, "Function not available. (Optional function is not implemented)."} ErrNoSuchItem = err{300, "No such item."} ErrItemAlreadyExists = err{300, "Item already exists."} ErrUnknownError = err{900, "Unknown error"} ErrAPIDisabled = err{910, "API Disabled"} )
Functions ¶
Types ¶
type Capabilities ¶
type Capabilities struct { SearchModes []search.SearchMode Categories categories.Categories }
func (Capabilities) HasCategories ¶
func (c Capabilities) HasCategories(cats []categories.Category) bool
func (Capabilities) HasCategory ¶
func (c Capabilities) HasCategory(cat categories.Category) bool
func (Capabilities) HasMovies ¶
func (c Capabilities) HasMovies() bool
func (Capabilities) HasSearchMode ¶
func (c Capabilities) HasSearchMode(key string) (bool, []string)
func (Capabilities) HasTVShows ¶
func (c Capabilities) HasTVShows() bool
func (Capabilities) MarshalXML ¶
func (c Capabilities) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (Capabilities) ServeHTTP ¶
func (c Capabilities) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Query ¶
type Query struct { *search.PaginationSearch Type string Q, Series, Ep, Season, Movie, Year string Limit, Offset int Extended bool Categories []int APIKey string // identifier types TVDBID string TVRageID string IMDBID string TVMazeID string TraktID string Page uint }
Query represents a torznab query
func ParseQuery ¶
ParseQuery takes the query string parameters for a torznab query and parses them
func ParseQueryString ¶
func (*Query) AddCategory ¶
func (query *Query) AddCategory(cat categories.Category)
AddCategory adds a category to the query
func (Query) Episode ¶
Episode returns either the season + episode in the format S00E00 or just the season as S00 if no episode has been specified.
type ResultFeed ¶
type ResultFeed struct { Info Info Items []search.ExternalResultItem }
func (ResultFeed) MarshalXML ¶
func (rf ResultFeed) MarshalXML(e *xml.Encoder, start xml.StartElement) error
Click to show internal directories.
Click to hide internal directories.