seedr

package
v0.0.0-...-720374e Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadResponse

type DownloadResponse struct {
	Result        bool   `json:"result"`
	Code          int    `json:"code,omitempty"`
	UserTorrentID int    `json:"user_torrent_id,omitempty"`
	Title         string `json:"title,omitempty"`
	TorrentHash   string `json:"torrent_hash,omitempty"`
	Error         string `json:"error,omitempty"`
}

type FolderResponse

type FolderResponse struct {
	SpaceMax  int64         `json:"space_max"`
	SpaceUsed int64         `json:"space_used"`
	Code      int           `json:"code"`
	Timestamp string        `json:"timestamp"`
	ID        int           `json:"id"`
	Name      string        `json:"name"`
	ParentID  int           `json:"parent_id"`
	Torrents  []interface{} `json:"torrents"`
	Folders   []interface{} `json:"folders"`
	Files     []struct {
		ID             int    `json:"id"`
		Name           string `json:"name"`
		Size           int    `json:"size"`
		Hash           string `json:"hash"`
		LastUpdate     string `json:"last_update"`
		StreamAudio    bool   `json:"stream_audio"`
		StreamVideo    bool   `json:"stream_video"`
		VideoConverted string `json:"video_converted,omitempty"`
	} `json:"files"`
	Result bool `json:"result"`
}

type FoldersResponse

type FoldersResponse struct {
	SpaceMax  int64         `json:"space_max"`
	SpaceUsed int64         `json:"space_used"`
	Code      int           `json:"code"`
	Timestamp string        `json:"timestamp"`
	ID        int           `json:"id"`
	Name      string        `json:"name"`
	ParentID  int           `json:"parent_id"`
	Torrents  []interface{} `json:"torrents"`
	Folders   []struct {
		ID         int    `json:"id"`
		Name       string `json:"name"`
		Size       int64  `json:"size"`
		LastUpdate string `json:"last_update"`
	} `json:"folders"`
	Files  []interface{} `json:"files"`
	Result bool          `json:"result"`
}

type Seedr

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

func New

func New(username, password string) *Seedr

func (*Seedr) Download

func (s *Seedr) Download(u string) (*DownloadResponse, error)

func (*Seedr) FinalURL

func (s *Seedr) FinalURL(endpoint string) (string, error)

func (*Seedr) Folder

func (s *Seedr) Folder(id int) (*FolderResponse, error)

func (*Seedr) Folders

func (s *Seedr) Folders() (*FoldersResponse, error)

func (*Seedr) Get

func (s *Seedr) Get(endpoint string, v interface{}) error

func (*Seedr) HLS

func (s *Seedr) HLS(id int) (string, error)

func (*Seedr) Post

func (s *Seedr) Post(endpoint string, values *url.Values, v interface{}) error

func (*Seedr) SetHTTPClient

func (s *Seedr) SetHTTPClient(httpClient *http.Client)

Jump to

Keyboard shortcuts

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