mvweb

package
v0.0.0-...-f83a9ca Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Query

type Query struct {
	Fields []string `json:"fields"`
	Query  string   `json:"query"`
}

func NewQuery

func NewQuery(field, query string) Query

type QueryInfo

type QueryInfo struct {
	FilmlisteTimestamp uint   `json:"filmlisteTimestamp"`
	ResultCount        uint   `json:"resultCount"`
	SearchEngineTime   string `json:"searchEngineTime"`
	TotalResults       uint   `json:"totalResults"`
}

type Request

type Request struct {
	Queries   []Query `json:"queries"`
	SortBy    string  `json:"sortBy"`
	SortOrder string  `json:"sortOrder"`
	Future    bool    `json:"future"`
	Offset    uint    `json:"offset"`
	Size      uint    `json:"size"`
}

func NewRequest

func NewRequest(maxResults uint, queries ...Query) Request

func (*Request) Run

func (m *Request) Run() (Response, error)

type Response

type Response struct {
	Result struct {
		QueryInfo QueryInfo `json:"queryInfo"`
		Results   []Result  `json:"results"`
	} `json:"result"`
}

type Result

type Result struct {
	Channel    string `json:"channel"`
	Topic      string `json:"topic"`
	Title      string `json:"title"`
	Duration   uint   `json:"duration"`
	ID         string `json:"id"`
	Size       uint   `json:"size"`
	Timestamp  uint   `json:"timestamp"`
	UrlVideo   string `json:"url_video"`
	UrlVideoHD string `json:"url_video_hd"`
	UrlVideoSD string `json:"url_video_low"`
}

func (*Result) DownloadTo

func (r *Result) DownloadTo(path string) (int64, time.Duration, error)

func (*Result) Filename

func (r *Result) Filename() string

Jump to

Keyboard shortcuts

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