Documentation ¶
Index ¶
Constants ¶
View Source
const ( RangeLast2Weeks = "[NOW/HOUR-14DAYS TO NOW/HOUR+1HOUR]" RangeLastMonth = "[NOW/HOUR-1MONTH TO NOW/HOUR+1HOUR]" RangeLastWeek = "[NOW/HOUR-7DAYS TO NOW/HOUR+1HOUR]" RangeLast24Hours = "[NOW/MINUTE-24HOURS TO NOW/MINUTE+1MINUTE]" RangeLast48Hours = "[NOW/MINUTE-48HOURS TO NOW/MINUTE+1MINUTE]" RangeLast72Hours = "[NOW/MINUTE-72HOURS TO NOW/MINUTE+1MINUTE]" Seeders0to50 = "[0 TO 50]" Seeders200Plus = "[201 TO *]" Seeders50to200 = "[51 TO 200]" Size0to750MB = "[0 TO 786432000]" Size1_5GBto4_5GB = "[1610612736 TO 4831838208]" Size15GBPlus = "[16106127360 TO *]" Size4_5GBto15GB = "[4831838208 TO 16106127360]" Size750MBto1_5GB = "[786432000 TO 1610612736]" )
Facet values.
View Source
const ( CategoryMoviesCam = 8 CategoryMoviesTSTC = 9 CategoryMoviesDVDRipDVDScreener = 11 CategoryMoviesWebRip = 37 CategoryMoviesHDRip = 43 CategoryMoviesBluRayRip = 14 CategoryMoviesDVDR = 12 CategoryMoviesBluRay = 13 CategoryMovies4k = 47 CategoryMoviesBoxsets = 15 CategoryMoviesDocumentaries = 29 CategoryTVEpisodes = 26 CategoryTVEpisodesHD = 32 CategoryTVBoxsets = 27 CategoryGamesPC = 17 CategoryGamesMac = 42 CategoryGamesXbox = 18 CategoryGamesXbox360 = 19 CategoryGamesXboxOne = 40 CategoryGamesPS2 = 20 CategoryGamesPS3 = 21 CategoryGamesPS4 = 39 CategoryGamesPS5 = 49 CategoryGamesPSP = 22 CategoryGamesWii = 28 CategoryGamesNintendoDS = 30 CategoryGamesNintendoSwitch = 48 CategoryAppsPCISO = 23 CategoryAppsMac = 24 CategoryAppsMobile = 25 CategoryApps0Day = 33 CategoryEducation = 38 CategoryAnimationAnime = 34 CategoryAnimationCartoons = 35 CategoryBooksEbooks = 45 CategoryBooksComics = 46 CategoryMusicAudio = 31 CategoryMusicVideos = 16 CategoryForeignMovies = 36 CategoryForeignTVSeries = 44 )
Categories.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Jar http.CookieJar Transport http.RoundTripper // contains filtered or unexported fields }
type Option ¶
type Option func(cl *Client)
func WithTransport ¶
func WithTransport(transport http.RoundTripper) Option
type SearchRequest ¶
func Search ¶
func Search(query ...string) *SearchRequest
func (*SearchRequest) Do ¶
func (req *SearchRequest) Do(ctx context.Context, cl *Client) (*SearchResponse, error)
func (SearchRequest) WithCategories ¶
func (req SearchRequest) WithCategories(categories ...int) *SearchRequest
func (SearchRequest) WithFacets ¶
func (req SearchRequest) WithFacets(facets ...string) *SearchRequest
func (SearchRequest) WithPage ¶ added in v0.1.2
func (req SearchRequest) WithPage(page int) *SearchRequest
type SearchResponse ¶
type SearchResponse struct { Facets struct { Added Facet `json:"added,omitempty"` Name Facet `json:"name,omitempty"` Seeders Facet `json:"seeders,omitempty"` Size Facet `json:"size,omitempty"` Tags Tags `json:"tags,omitempty"` } `json:"facets,omitempty"` Facetswoc map[string]Tags `json:"facetswoc,omitempty"` LastBrowseTime Time `json:"lastBrowseTime,omitempty"` NumFound int `json:"numFound,omitempty"` OrderBy string `json:"orderBy,omitempty"` Order string `json:"order,omitempty"` Page int `json:"page,omitempty"` PerPage int `json:"perPage,omitempty"` TorrentList []Torrent `json:"torrentList,omitempty"` UserTimeZone string `json:"userTimeZone,omitempty"` }
type Time ¶
func (*Time) UnmarshalJSON ¶
type Torrent ¶
type Torrent struct { AddedTimestamp time.Time CategoryID int Completed int DownloadMultiplier int ID int Filename string Genres []string IgdbID string ImdbID string Leechers int Name string New bool NumComments int Rating float64 Seeders int Size int64 Tags []string TvmazeID string Uploader string }
func (*Torrent) UnmarshalJSON ¶ added in v0.1.3
Click to show internal directories.
Click to hide internal directories.