btn

package
v1.44.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2024 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultURL = "https://api.broadcasthe.net/"

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiClient

type ApiClient interface {
	GetTorrentByID(ctx context.Context, torrentID string) (*domain.TorrentBasic, error)
	TestAPI(ctx context.Context) (bool, error)
}

func NewClient

func NewClient(apiKey string, opts ...OptFunc) ApiClient

type Client

type Client struct {
	APIKey string

	Log *log.Logger
	// contains filtered or unexported fields
}

func (*Client) GetTorrentByID

func (c *Client) GetTorrentByID(ctx context.Context, torrentID string) (*domain.TorrentBasic, error)

func (*Client) TestAPI

func (c *Client) TestAPI(ctx context.Context) (bool, error)

type OptFunc added in v1.35.0

type OptFunc func(*Client)

func WithUrl added in v1.35.0

func WithUrl(url string) OptFunc

type Torrent

type Torrent struct {
	GroupName      string `json:"GroupName"`
	GroupID        string `json:"GroupID"`
	TorrentID      string `json:"TorrentID"`
	SeriesID       string `json:"SeriesID"`
	Series         string `json:"Series"`
	SeriesBanner   string `json:"SeriesBanner"`
	SeriesPoster   string `json:"SeriesPoster"`
	YoutubeTrailer string `json:"YoutubeTrailer"`
	Category       string `json:"Category"`
	Snatched       string `json:"Snatched"`
	Seeders        string `json:"Seeders"`
	Leechers       string `json:"Leechers"`
	Source         string `json:"Source"`
	Container      string `json:"Container"`
	Codec          string `json:"Codec"`
	Resolution     string `json:"Resolution"`
	Origin         string `json:"Origin"`
	ReleaseName    string `json:"ReleaseName"`
	Size           string `json:"Size"`
	Time           string `json:"Time"`
	TvdbID         string `json:"TvdbID"`
	TvrageID       string `json:"TvrageID"`
	ImdbID         string `json:"ImdbID"`
	InfoHash       string `json:"InfoHash"`
	DownloadURL    string `json:"DownloadURL"`
}

type UserInfo

type UserInfo struct {
	UserID          string `json:"UserID"`
	Username        string `json:"Username"`
	Email           string `json:"Email"`
	Upload          string `json:"Upload"`
	Download        string `json:"Download"`
	Lumens          string `json:"Lumens"`
	Bonus           string `json:"Bonus"`
	JoinDate        string `json:"JoinDate"`
	Title           string `json:"Title"`
	Enabled         string `json:"Enabled"`
	Paranoia        string `json:"Paranoia"`
	Invites         string `json:"Invites"`
	Class           string `json:"Class"`
	ClassLevel      string `json:"ClassLevel"`
	HnR             string `json:"HnR"`
	UploadsSnatched string `json:"UploadsSnatched"`
	Snatches        string `json:"Snatches"`
}

Jump to

Keyboard shortcuts

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