Documentation
¶
Index ¶
- Constants
- type Builder
- func (b *Builder) Client() services.Client
- func (b *Builder) DownloadMetadata() payload.DownloadMetadata
- func (b *Builder) Logger() zerolog.Logger
- func (b *Builder) Normalize(data *SearchResult) []payload.Info
- func (b *Builder) Provider() models.Provider
- func (b *Builder) Search(options SearchOptions) (*SearchResult, error)
- func (b *Builder) Transform(s payload.SearchRequest) SearchOptions
- type Movie
- type SearchData
- type SearchOptions
- type SearchResult
- type Torrent
- type Torrents
Constants ¶
View Source
const URL string = "https://yts.mx/api/v2/list_movies.json?query_term=%s&page=%d&sort_by=%s"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func (*Builder) DownloadMetadata ¶
func (b *Builder) DownloadMetadata() payload.DownloadMetadata
func (*Builder) Search ¶
func (b *Builder) Search(options SearchOptions) (*SearchResult, error)
func (*Builder) Transform ¶
func (b *Builder) Transform(s payload.SearchRequest) SearchOptions
type Movie ¶
type Movie struct {
ID int `json:"id"`
Url string `json:"url"`
Imdb_code string `json:"imbd_code"`
Title string `json:"title"`
TitleEnglish string `json:"title_english"`
TitleLong string `json:"title_long"`
Slug string `json:"slug"`
Year int `json:"year"`
Rating float32 `json:"rating"`
Genres []string `json:"genres"`
Summary string `json:"summary"`
DescriptionFull string `json:"description_full"`
Lang string `json:"lang"`
BackGroundImage string `json:"background_image"`
SmallCoverImage string `json:"small_cover_image"`
MediumCoverImage string `json:"medium_cover_image"`
LargeCoverImage string `json:"large_cover_image"`
State string `json:"state"`
Torrents []Torrent `json:"torrents"`
}
type SearchData ¶
type SearchOptions ¶
type SearchResult ¶
type SearchResult struct {
Status string `json:"status"`
Status_message string `json:"status_message"`
Data SearchData `json:"data,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.