alldebrid

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultClientOpts = ClientOptions{
	BaseURL:  "https://api.alldebrid.com",
	Timeout:  5 * time.Second,
	CacheAge: 24 * time.Hour,
}

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(opts ClientOptions, apiKeyCache, availabilityCache debrid.Cache, logger *zap.Logger) (*Client, error)

func (*Client) CheckInstantAvailability

func (c *Client) CheckInstantAvailability(ctx context.Context, apiKey string, infoHashes ...string) []string

func (*Client) GetStreamURL

func (c *Client) GetStreamURL(ctx context.Context, magnetURL, apiKey string) (string, error)

func (*Client) TestAPIkey

func (c *Client) TestAPIkey(ctx context.Context, apiKey string) error

type ClientOptions

type ClientOptions struct {
	BaseURL      string
	Timeout      time.Duration
	CacheAge     time.Duration
	ExtraHeaders []string
}

func NewClientOpts

func NewClientOpts(baseURL string, timeout, cacheAge time.Duration, extraHeaders []string) ClientOptions

Jump to

Keyboard shortcuts

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