metube

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddRequest

type AddRequest struct {
	URL       string `json:"url"`
	AutoStart bool   `json:"auto_start"`
	Quality   string `json:"quality"`
	Format    string `json:"format"`
	Folder    string `json:"folder"`
	Name      string `json:"custom_name_prefix"`
}

type Client

type Client struct {
	URL    string `json:"url" xml:"url"`
	Debug  bool
	Client *req.Client
}

func New

func New(url string, debug bool) *Client

func (*Client) Add

func (m *Client) Add(name, url string, autoStart bool) error

func (*Client) Delete

func (m *Client) Delete(ids []string, where string) error

func (*Client) History

func (m *Client) History() (*HistoryResponse, error)

func (*Client) Start

func (m *Client) Start(ids []string) error

type DeleteRequest

type DeleteRequest struct {
	IDs   []string `json:"ids"`
	Where string   `json:"where"`
}

type Download

type Download struct {
	ID               string  `json:"id"`
	Title            string  `json:"title"`
	URL              string  `json:"url"`
	Quality          string  `json:"quality"`
	Format           string  `json:"format"`
	Folder           string  `json:"folder"`
	CustomNamePrefix string  `json:"custom_name_prefix"`
	Msg              string  `json:"msg"`
	Percent          float64 `json:"percent"`
	Speed            float64 `json:"speed"`
	Eta              float64 `json:"eta"`
	Status           string  `json:"status"`
	Size             int64   `json:"size"`
	Timestamp        int64   `json:"timestamp"`
	Error            string  `json:"error"`
	Filename         string  `json:"filename"`
}

type HistoryResponse

type HistoryResponse struct {
	Done  []*Download `json:"done"`
	Queue []*Download `json:"queue"`
}

type Response

type Response struct {
	Status  string `json:"status"`
	Message string `json:"msg"`
}

type StartRequest

type StartRequest struct {
	IDs []string `json:"ids"`
}

Jump to

Keyboard shortcuts

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