apiexternal

package
v0.0.0-...-50f11f9 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadResponse = errors.New("received bad response")

ErrBadResponse means that qbittorrent sent back an unexpected response

View Source
var NewznabClients []Clients
View Source
var OmdbApi *omdbClient
View Source
var PushoverApi *pushOverClient
View Source
var TmdbApi *tmdbClient
View Source
var TraktApi *traktClient
View Source
var TvdbApi *tvdbClient
View Source
var V4apiPin string

Functions

func NewOmdbClient

func NewOmdbClient(apikey string, seconds int, calls int, disabletls bool)

func NewPushOverClient

func NewPushOverClient(apikey string)

func NewQBittorrentClient

func NewQBittorrentClient(url string) *qbtClient

NewClient creates a new client connection to qbittorrent

func NewTmdbClient

func NewTmdbClient(apikey string, seconds int, calls int, disabletls bool)

func NewTraktClient

func NewTraktClient(clientid string, clientsecret string, token oauth2.Token, seconds int, calls int, disabletls bool)

func NewTvdbClient

func NewTvdbClient(seconds int, calls int, disabletls bool)

func QueryNewznabMovieImdb

func QueryNewznabMovieImdb(row NzbIndexer, imdbid string, categories []int) (*[]newznab.NZB, []string, error)

QueryNewznabMovieImdb searches Indexers for imbid - strip tt at beginning!

func QueryNewznabQuery

func QueryNewznabQuery(row NzbIndexer, query string, categories []int, searchtype string) (*[]newznab.NZB, []string, error)

QueryNewznabQuery searches Indexers for string

func QueryNewznabRSS

func QueryNewznabRSS(row NzbIndexer, maxitems int, categories []int) (*[]newznab.NZB, []string, error)

QueryNewznabRSS returns x entries of given category

func QueryNewznabRSSLast

func QueryNewznabRSSLast(row NzbIndexer, maxitems int, categories []int, maxrequests int) (*[]newznab.NZB, []string, string, error)

QueryNewznabRSS returns entries of given category up to id

func QueryNewznabTvTvdb

func QueryNewznabTvTvdb(row NzbIndexer, tvdbid int, categories []int, season int, episode int, useseason bool, useepisode bool) (*[]newznab.NZB, []string, error)

QueryNewznabTvTvdb searches Indexers for tvdbid using season and episodes

func SendToDeluge

func SendToDeluge(host string, port int, username string, password string, url string, dlpath string, moveafter bool, moveafterpath string, addpaused bool) error

func SendToQBittorrent

func SendToQBittorrent(host string, port string, username string, password string, url string, dlpath string, addpaused string) error

func SendToRtorrent

func SendToRtorrent(hostname string, insecure bool, url string, dlpath string, name string) error

func SendToSabnzbd

func SendToSabnzbd(server string, apikey string, url string, category string, nzbname string, priority int) error

func SendToTransmission

func SendToTransmission(server string, username string, password string, url string, dlpath string, addpaused bool) error

Types

type Clients

type Clients struct {
	Name   string
	Client newznab.Client
}

type NzbIndexer

type NzbIndexer struct {
	Name                    string
	URL                     string
	Apikey                  string
	UserID                  int
	SkipSslCheck            bool
	Addquotesfortitlequery  bool
	Additional_query_params string
	LastRssId               string
	Customapi               string
	Customurl               string
	Customrssurl            string
	Customrsscategory       string
	RssDownloadAll          bool
	OutputAsJson            bool
	Limitercalls            int
	Limiterseconds          int
	MaxAge                  int
}

NzbIndexer defines the Indexers to query

type RLHTTPClient

type RLHTTPClient struct {
	Ratelimiter   *rate.Limiter
	LimiterWindow *slidingwindow.Limiter
	// contains filtered or unexported fields
}

RLHTTPClient Rate Limited HTTP Client

func NewClient

func NewClient(skiptlsverify bool, rl *rate.Limiter, rl2 *slidingwindow.Limiter) *RLHTTPClient

NewClient return http client with a ratelimiter

func (*RLHTTPClient) DoJson

func (c *RLHTTPClient) DoJson(req *http.Request, jsonobj interface{}) error

Do dispatches the HTTP request to the network

Jump to

Keyboard shortcuts

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