Documentation ¶
Overview ¶
Example ¶
// Read JACKETT_API_URL and JACKETT_API_KEY by default client := jackett.New(nil) results, err := client.Fetch(context.Background(), jackett.WithQuery("foo")) if err != nil { panic(err) } _ = results // use results
Output:
Example (DisableSSL) ¶
httpClient := &http.Client{Timeout: time.Minute} transport := &http.Transport{ TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, } httpClient.Transport = transport client := jackett.New(&jackett.Config{ APIUrl: "https://", APIKey: "foo", HTTPClient: httpClient, }) results, err := client.Fetch(context.Background(), jackett.WithQuery("foo")) if err != nil { panic(err) } _ = results // use results
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // Fetch make a query to Jackett and returns found results. // categoryID must match an existent category ID from Jackett. You can check them on your Jackett instance's indexers configuration. // You can specify multiples categories. // Custom indexer can be specified. Default will be "all". Fetch(ctx context.Context, options ...Option) (*Response, error) }
Client interface describes wrapped Jackett client.
type Indexer ¶
type Indexer struct { ID string `json:"ID"` Name string `json:"Name"` Status int `json:"Status"` Results int `json:"Results"` Error string `json:"Error"` }
Indexer configured on Jackett.
type Option ¶
Option describes a query option.
func WithCategory ¶
WithCategory specify category to filter results with.
func WithTracker ¶
WithTracker specify tracker to filter results with.
type Result ¶
type Result struct { FirstSeen string `json:"FirstSeen"` Tracker string `json:"Tracker"` TrackerID string `json:"TrackerId"` TrackerType string `json:"TrackerType"` CategoryDesc string `json:"CategoryDesc"` BlackholeLink string `json:"BlackholeLink"` Title string `json:"Title"` GUID string `json:"Guid"` Link string `json:"Link"` Details string `json:"Details"` PublishDate time.Time `json:"PublishDate"` Category []int `json:"Category"` Size int64 `json:"Size"` Files interface{} `json:"Files"` Grabs int `json:"Grabs"` Description string `json:"Description"` RageID interface{} `json:"RageID"` TVDBID interface{} `json:"TVDBId"` Imdb interface{} `json:"Imdb"` TMDb interface{} `json:"TMDb"` DoubanID interface{} `json:"DoubanId"` Author string `json:"Author"` BookTitle string `json:"BookTitle"` Seeders int `json:"Seeders"` Peers int `json:"Peers"` Poster interface{} `json:"Poster"` InfoHash interface{} `json:"InfoHash"` MagnetURI interface{} `json:"MagnetUri"` MinimumRatio interface{} `json:"MinimumRatio"` MinimumSeedTime interface{} `json:"MinimumSeedTime"` DownloadVolumeFactor float64 `json:"DownloadVolumeFactor"` UploadVolumeFactor float64 `json:"UploadVolumeFactor"` Gain float64 `json:"Gain"` }
Result is a search result.
Click to show internal directories.
Click to hide internal directories.