utils

package
v0.0.0-...-89ff4fd Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrMsg

func ErrMsg(err error) string

func Fetch

func Fetch(path string, data []byte) (string, int, error)

func FetchBrowse

func FetchBrowse(browse BrowseData) (string, int)

Types

type BrowseData

type BrowseData struct {
	Context     *Context           `json:"context,omitempty"`
	MusicConfig *BrowseMusicConfig `json:"browseEndpointContextMusicConfig,omitempty"`
	BrowseId    string             `json:"browseId,omitempty"`
	Params      *string            `json:"params,omitempty"`
	Form        *Form              `json:"formData,omitempty"`
}

func TypeBrowse

func TypeBrowse(id, params string, ct []string) BrowseData

func TypeBrowseForm

func TypeBrowseForm(id, params, form string) BrowseData

func TypeBrowsePage

func TypeBrowsePage(id, t string) BrowseData

type BrowseMusicConfig

type BrowseMusicConfig struct {
	MusicConfig PageType `json:"browseEndpointContextMusicConfig,omitempty"`
}

type Click

type Click struct {
	Param string `json:"clickTrackingParams",omitempty`
}

type Client

type Client struct {
	Name    string `json:"clientName,omitempty"`
	Version string `json:"clientVersion,omitempty"`
	Hl      string `json:"hl",omitempty`
	Url     string `json:"originalUrl",omitempty`
	Visit   string `json:"visitorData",omitempty`
}

type Context

type Context struct {
	Client Client `json:"client",omitempty`
	Click  Click  `json:"clickTracking",omitempty`
}
var BaseContext Context = Context{
	Client: Client{
		Name:    "WEB_REMIX",
		Version: "1.20230320.01.00",
		Hl:      "en",
	},
}

type Form

type Form struct {
	Values []string `json:"selectedValues",omitempty`
}

type NextData

type NextData struct {
	Id          string           `json:"videoId,omitempty"`
	PlaylistId  string           `json:"playlistId",omitempty`
	Context     Context          `json:"context,omitempty"`
	Audio       bool             `json:"isAudioOnly,omitempty"`
	Tuner       string           `json:"tunerSettingValue,omitempty"`
	Panel       bool             `json:"enablePersistentPlaylistPanel,omitempty"`
	MusicConfig WatchMusicConfig `json:"watchEndpointMusicConfig,omitempty"`
}

func TypeNext

func TypeNext(id, pid string) NextData

type PageType

type PageType struct {
	PageType string `json:"pageType,omitempty"`
}

type WatchMusicConfig

type WatchMusicConfig struct {
	Panel bool   `json:"hasPersistentPlaylistPanel,omitempty"`
	Type  string `json:"musicVideoType,omitempty"`
}

Jump to

Keyboard shortcuts

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