search

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category int
const (
	MovieSdHu Category = iota
	MovieSdEn
	MovieDvdHu
	MovieDvdEn
	MovieDvd9Hu
	MovieDvd9En
	MovieHdHu
	MovieHdEn
	SeriesSdHu
	SeriesSdEn
	SeriesDvdHu
	SeriesDvdEn
	SeriesHdHu
	SeriesHdEn
	Mp3Hu
	Mp3En
	LosslessHu
	LosslessEn
	Clip
	GameIso
	GameRip
	Console
	EbookHu
	EbookEn
	Iso
	Misc
	Mobile
	XImg
	XSd
	XDvd
	XHd
	AllOwn
)

func (Category) String

func (s Category) String() string

type Field

type Field int
const (
	Name Field = iota
	Description
	Imdb
	Label
)

func (Field) String

func (s Field) String() string

type PageInfo

type PageInfo struct {
	Current int `json:"current"`
	Prev    int `json:"prev"`
	Next    int `json:"next"`
}

func (*PageInfo) HasMore

func (p *PageInfo) HasMore() bool

type Params

type Params struct {
	SearchPhrase string    `json:"searchPhrase"`
	Field        Field     `json:"field"`
	Category     Category  `json:"category"`
	SortField    SortField `json:"sortField"`
	SortMode     SortMode  `json:"sortMode"`
	Page         int       `json:"page"`
}

type Result

type Result struct {
	Torrents []*Torrent `json:"torrents"`
	Page     *PageInfo  `json:"page"`
}

func ParseResponse

func ParseResponse(doc *html.Node) *Result

type SortField

type SortField int
const (
	ByName SortField = iota
	ByUpload
	BySize
	ByDownloaded
	BySeeders
	ByLeechers
)

func (SortField) String

func (s SortField) String() string

type SortMode

type SortMode int
const (
	Ascending SortMode = iota
	Descending
)

func (SortMode) String

func (s SortMode) String() string

type Torrent

type Torrent struct {
	Id       string `json:"id"`
	Title    string `json:"title"`
	AltTitle string `json:"altTitle"`
	Uploaded string `json:"uploaded"`
	Uploader string `json:"uploader"`
	Size     string `json:"size"`
	Health   string `json:"health"`
	Seeds    string `json:"seeds"`
	Peers    string `json:"peers"`
}

Jump to

Keyboard shortcuts

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