Documentation ¶
Index ¶
Constants ¶
View Source
const BaseUrl string = "https://yt1s.com/api"
View Source
const CheckTaskEndpoint string = "/ajaxConvert/checkTask"
View Source
const ConvertEndpoint string = "/ajaxConvert/convert"
View Source
const IndexEndpoint string = "/ajaxSearch/index"
View Source
const IndexEndpointParam string = "home"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Modality ¶
type Modality struct { Size string `json:"size"` Format string `json:"f"` Quality string `json:"q"` Key string `json:"k"` }
Modality is a video modality
type ResponseConvert ¶
type ResponseConvert struct { CStatus string `json:"c_status"` VideoId string `json:"vid"` Title string `json:"title"` Format string `json:"ftype"` Quality string `json:"quality"` Url string `json:"dlink"` Expiration int `json:"e_time,omitempty"` Bid string `json:"b_id,omitempty"` // contains filtered or unexported fields }
ResponseConvert is a json response struct of convert response
func NewResponseConvert ¶
func NewResponseConvert(idVideo, token string) (*ResponseConvert, error)
NewResponseConvert creates a ResponseConvert instance
type ResponseIndex ¶
type ResponseIndex struct { Process string `json:"p"` VideoId string `json:"vid"` Title string `json:"title"` Timing int `json:"t"` Channel string `json:"a"` Links map[string]map[string]Modality `json:"links"` // contains filtered or unexported fields }
ResponseIndex is a type of index api response
func NewResponseIndex ¶
func NewResponseIndex(videoLink string) (*ResponseIndex, error)
NewResponseIndex creates a new ResponseIndex instance
func (*ResponseIndex) ExtractToken ¶
func (ri *ResponseIndex) ExtractToken(opt Options) string
ExtractToken is a ResponseIndex method that extract token from ResponseIndex specifying the video options
func (*ResponseIndex) VideoOptions ¶
func (ri *ResponseIndex) VideoOptions() (opts []*Options)
Click to show internal directories.
Click to hide internal directories.