yts

package
v0.0.0-...-bd23c5e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

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 NewBuilder(log zerolog.Logger, httpClient *menou.Client, ys yoitsu.Client) *Builder

func (*Builder) Client

func (b *Builder) Client() services.Client

func (*Builder) DownloadMetadata

func (b *Builder) DownloadMetadata() payload.DownloadMetadata

func (*Builder) Logger

func (b *Builder) Logger() zerolog.Logger

func (*Builder) Normalize

func (b *Builder) Normalize(data *SearchResult) []payload.Info

func (*Builder) Provider

func (b *Builder) Provider() models.Provider

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 SearchData struct {
	MovieCount int     `json:"movie_count"`
	Limit      int     `json:"limit"`
	Page       int     `json:"page_number"`
	Movies     []Movie `json:"movies"`
}

type SearchOptions

type SearchOptions struct {
	Query  string
	SortBy string
	Page   int
}

type SearchResult

type SearchResult struct {
	Status         string     `json:"status"`
	Status_message string     `json:"status_message"`
	Data           SearchData `json:"data,omitempty"`
}

type Torrent

type Torrent struct {
	Url              string `json:"url"`
	Hash             string `json:"hash"`
	Quality          string `json:"quality"`
	Type             string `json:"type"`
	Seeds            int    `json:"seeds"`
	Peers            int    `json:"peers"`
	Size             string `json:"size"`
	DateUploaded     string `json:"date_uploaded"`
	DateUploadedUnix int    `json:"date_uploaded_unix"`
}

type Torrents

type Torrents struct {
	Torrents         []Torrent `json:"torrents"`
	DateUploaded     string    `json:"date_uploaded"`
	DateUploadedUnix int       `json:"date_uploaded_unix"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL