jackett

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Capabilities

type Capabilities struct {
	Server struct {
		Title string `xml:"title,attr"`
	} `xml:"server"`
	Limits struct {
		Default string `xml:"default,attr"`
		Max     string `xml:"max,attr"`
	} `xml:"limits"`
	Searching struct {
		Search      SearchSettings `xml:"search"`
		TvSearch    SearchSettings `xml:"tv-search"`
		MovieSearch SearchSettings `xml:"movie-search"`
		MusicSearch SearchSettings `xml:"music-search"`
		AudioSearch SearchSettings `xml:"audio-search"`
		BookSearch  SearchSettings `xml:"book-search"`
	} `xml:"searching"`
	Categories Categories `xml:"categories"`
}

type Categories

type Categories struct {
	Category []Category `xml:"category"`
}

type Category

type Category struct {
	ID     string   `xml:"id,attr"`
	Name   string   `xml:"name,attr"`
	Subcat []Subcat `xml:"subcat"`
}

type FetchIndexer

type FetchIndexer struct {
	Error   string
	ID      string
	Name    string
	Results uint
	Status  uint
}

type FetchRequest

type FetchRequest struct {
	Query      string
	Trackers   []string
	Categories []uint
}

type FetchResponse

type FetchResponse struct {
	Results  []FetchResult
	Indexers []FetchIndexer
}

type FetchResult

type FetchResult struct {
	BannerUrl            string
	BlackholeLink        string
	Category             []uint
	CategoryDesc         string
	Comments             string
	Description          string
	DownloadVolumeFactor float32
	Files                uint
	FirstSeen            jackettTime
	Gain                 float32
	Grabs                uint
	Guid                 string
	Imdb                 uint
	InfoHash             string
	Link                 string
	MagnetUri            string
	MinimumRatio         float32
	MinimumSeedTime      uint
	Peers                uint
	PublishDate          jackettTime
	RageID               uint
	Seeders              uint
	Size                 uint
	TMDb                 uint
	TVDBId               uint
	Title                string
	Tracker              string
	TrackerId            string
	UploadVolumeFactor   float32
}

type Indexer

type Indexer struct {
	ID          string       `xml:"id,attr"`
	Configured  string       `xml:"configured,attr"`
	Title       string       `xml:"title"`
	Description string       `xml:"description"`
	Link        string       `xml:"link"`
	Language    string       `xml:"language"`
	Type        string       `xml:"type"`
	Caps        Capabilities `xml:"caps"`
}

type IndexersResponse

type IndexersResponse struct {
	XMLName  xml.Name   `xml:"indexers"`
	Indexers []*Indexer `xml:"indexer"`
}

type Jackett

type Jackett struct {
	// contains filtered or unexported fields
}

func NewJackett

func NewJackett(s *Settings) *Jackett

func (*Jackett) Fetch

func (j *Jackett) Fetch(ctx context.Context, fr *FetchRequest) (*FetchResponse, error)

func (*Jackett) Indexers

func (j *Jackett) Indexers(ctx context.Context, configuredOnly bool) (*IndexersResponse, error)

type SearchSettings

type SearchSettings struct {
	Available       string `xml:"available,attr"`
	SupportedParams string `xml:"supportedParams,attr"`
	SearchEngine    string `xml:"searchEngine,attr"`
}

type Settings

type Settings struct {
	ApiURL string
	ApiKey string
	Client *http.Client
}

type Subcat

type Subcat struct {
	ID   string `xml:"id,attr"`
	Name string `xml:"name,attr"`
}

Jump to

Keyboard shortcuts

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