youtube_music

package
v0.0.0-...-64fc01f Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2023 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	YTM_DOMAIN     = "https://music.youtube.com"
	YTM_BASE_API   = YTM_DOMAIN + "/youtubei/v1/"
	YTM_PARAMS     = "?alt=json"
	YTM_PARAMS_KEY = "&key=AIzaSyC9XL3ZjWddXya6X74dJoCTL-WEYFDNX30"
	USER_AGENT     = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0"
)

Functions

func GetHeaders

func GetHeaders()

Types

type Accessibility

type Accessibility struct {
	AccessibilityData AccessibilityData `json:"accessibilityData"`
}

type AccessibilityData

type AccessibilityData struct {
	Label string `json:"label"`
}

type AddToPlaylistEndpoint

type AddToPlaylistEndpoint struct {
	VideoID    *string `json:"videoId,omitempty"`
	PlaylistID *string `json:"playlistId,omitempty"`
}

type AddToToastAction

type AddToToastAction struct {
	Item AddToToastActionItem `json:"item"`
}

type AddToToastActionItem

type AddToToastActionItem struct {
	NotificationTextRenderer NotificationTextRenderer `json:"notificationTextRenderer"`
}

type AspectRatio

type AspectRatio string
const (
	MusicTwoRowItemThumbnailAspectRatioSquare AspectRatio = "MUSIC_TWO_ROW_ITEM_THUMBNAIL_ASPECT_RATIO_SQUARE"
)

type BackgroundMusicThumbnailRenderer

type BackgroundMusicThumbnailRenderer struct {
	Thumbnail      MusicThumbnailRendererThumbnail `json:"thumbnail"`
	ThumbnailCrop  ThumbnailCrop                   `json:"thumbnailCrop"`
	ThumbnailScale ThumbnailScale                  `json:"thumbnailScale"`
	TrackingParams string                          `json:"trackingParams"`
}

type Badge

type Badge struct {
	MusicInlineBadgeRenderer MusicInlineBadgeRenderer `json:"musicInlineBadgeRenderer"`
}

type BrowseEndpointContextMusicConfig

type BrowseEndpointContextMusicConfig struct {
	PageType PageType `json:"pageType"`
}

type BrowseEndpointContextSupportedConfigs

type BrowseEndpointContextSupportedConfigs struct {
	BrowseEndpointContextMusicConfig BrowseEndpointContextMusicConfig `json:"browseEndpointContextMusicConfig"`
}

type Button

type Button struct {
	ButtonRenderer CancelButtonButtonRenderer `json:"buttonRenderer"`
}

type ButtonRendererCommand

type ButtonRendererCommand struct {
	ClickTrackingParams    string                 `json:"clickTrackingParams"`
	CommandExecutorCommand CommandExecutorCommand `json:"commandExecutorCommand"`
}

type ButtonRendererNavigationEndpoint

type ButtonRendererNavigationEndpoint struct {
	ClickTrackingParams   string                  `json:"clickTrackingParams"`
	BrowseEndpoint        *EndpointBrowseEndpoint `json:"browseEndpoint,omitempty"`
	WatchPlaylistEndpoint *WatchPlaylistEndpoint  `json:"watchPlaylistEndpoint,omitempty"`
}

type CancelButtonButtonRenderer

type CancelButtonButtonRenderer struct {
	Style          string                 `json:"style"`
	IsDisabled     bool                   `json:"isDisabled"`
	Text           Strapline              `json:"text"`
	TrackingParams string                 `json:"trackingParams"`
	Command        *ButtonRendererCommand `json:"command,omitempty"`
}

type Chip

type Chip struct {
	ChipCloudChipRenderer ChipCloudChipRenderer `json:"chipCloudChipRenderer"`
}

type ChipCloudChipRenderer

type ChipCloudChipRenderer struct {
	Style               Style              `json:"style"`
	Text                Strapline          `json:"text"`
	NavigationEndpoint  NavigationEndpoint `json:"navigationEndpoint"`
	TrackingParams      string             `json:"trackingParams"`
	IsSelected          bool               `json:"isSelected"`
	OnDeselectedCommand NavigationEndpoint `json:"onDeselectedCommand"`
	TargetID            *string            `json:"targetId,omitempty"`
}

type ChipCloudRenderer

type ChipCloudRenderer struct {
	Chips                []Chip `json:"chips"`
	TrackingParams       string `json:"trackingParams"`
	HorizontalScrollable bool   `json:"horizontalScrollable"`
}

type CommandExecutorCommand

type CommandExecutorCommand struct {
	Commands []CommandExecutorCommandCommand `json:"commands"`
}

type CommandExecutorCommandCommand

type CommandExecutorCommandCommand struct {
	ClickTrackingParams  string                `json:"clickTrackingParams"`
	PlaylistEditEndpoint *PlaylistEditEndpoint `json:"playlistEditEndpoint,omitempty"`
	LikeEndpoint         *CommandLikeEndpoint  `json:"likeEndpoint,omitempty"`
}

type CommandLikeEndpoint

type CommandLikeEndpoint struct {
	Status Status `json:"status"`
	Target Target `json:"target"`
}

type ConfirmDialogEndpoint

type ConfirmDialogEndpoint struct {
	Content ConfirmDialogEndpointContent `json:"content"`
}

type ConfirmDialogEndpointContent

type ConfirmDialogEndpointContent struct {
	ConfirmDialogRenderer ConfirmDialogRenderer `json:"confirmDialogRenderer"`
}

type ConfirmDialogRenderer

type ConfirmDialogRenderer struct {
	Title          Strapline   `json:"title"`
	TrackingParams string      `json:"trackingParams"`
	DialogMessages []Strapline `json:"dialogMessages"`
	ConfirmButton  Button      `json:"confirmButton"`
	CancelButton   Button      `json:"cancelButton"`
}

type ContentPosition

type ContentPosition string
const (
	MusicItemThumbnailOverlayContentPositionBottomRight ContentPosition = "MUSIC_ITEM_THUMBNAIL_OVERLAY_CONTENT_POSITION_BOTTOM_RIGHT"
	MusicItemThumbnailOverlayContentPositionCentered    ContentPosition = "MUSIC_ITEM_THUMBNAIL_OVERLAY_CONTENT_POSITION_CENTERED"
)

type Contents

type Contents struct {
	SingleColumnBrowseResultsRenderer SingleColumnBrowseResultsRenderer `json:"singleColumnBrowseResultsRenderer"`
}

type Continuation

type Continuation struct {
	NextContinuationData NextContinuationData `json:"nextContinuationData"`
}

type DefaultServiceEndpointLikeEndpoint

type DefaultServiceEndpointLikeEndpoint struct {
	Status  Status                `json:"status"`
	Target  AddToPlaylistEndpoint `json:"target"`
	Actions []LikeEndpointAction  `json:"actions,omitempty"`
}

type DisplayPriority

type DisplayPriority string
const (
	MusicResponsiveListItemColumnDisplayPriorityHigh   DisplayPriority = "MUSIC_RESPONSIVE_LIST_ITEM_COLUMN_DISPLAY_PRIORITY_HIGH"
	MusicResponsiveListItemColumnDisplayPriorityMedium DisplayPriority = "MUSIC_RESPONSIVE_LIST_ITEM_COLUMN_DISPLAY_PRIORITY_MEDIUM"
)

type DisplayStyle

type DisplayStyle string
const (
	MusicItemThumbnailOverlayDisplayStyleHover      DisplayStyle = "MUSIC_ITEM_THUMBNAIL_OVERLAY_DISPLAY_STYLE_HOVER"
	MusicItemThumbnailOverlayDisplayStylePersistent DisplayStyle = "MUSIC_ITEM_THUMBNAIL_OVERLAY_DISPLAY_STYLE_PERSISTENT"
)

type Endpoint

type Endpoint struct {
	ClickTrackingParams string                 `json:"clickTrackingParams"`
	BrowseEndpoint      EndpointBrowseEndpoint `json:"browseEndpoint"`
}

type EndpointBrowseEndpoint

type EndpointBrowseEndpoint struct {
	BrowseID string `json:"browseId"`
}

type FeedbackEndpoint

type FeedbackEndpoint struct {
	FeedbackToken string `json:"feedbackToken"`
}

type FlexColumn

type FlexColumn struct {
	MusicResponsiveListItemFlexColumnRenderer MusicResponsiveListItemFlexColumnRenderer `json:"musicResponsiveListItemFlexColumnRenderer"`
}

type FluffyButtonSize

type FluffyButtonSize string
const (
	MusicPlayButtonSizeHuge   FluffyButtonSize = "MUSIC_PLAY_BUTTON_SIZE_HUGE"
	MusicPlayButtonSizeMedium FluffyButtonSize = "MUSIC_PLAY_BUTTON_SIZE_MEDIUM"
)

type FluffyContent

type FluffyContent struct {
	MusicPlayButtonRenderer FluffyMusicPlayButtonRenderer `json:"musicPlayButtonRenderer"`
}

type FluffyItem

type FluffyItem struct {
	MenuNavigationItemRenderer    *MenuItemRenderer                    `json:"menuNavigationItemRenderer,omitempty"`
	MenuServiceItemRenderer       *MenuItemRenderer                    `json:"menuServiceItemRenderer,omitempty"`
	ToggleMenuServiceItemRenderer *FluffyToggleMenuServiceItemRenderer `json:"toggleMenuServiceItemRenderer,omitempty"`
}

type FluffyMenuRenderer

type FluffyMenuRenderer struct {
	Items          []FluffyItem  `json:"items"`
	TrackingParams string        `json:"trackingParams"`
	Accessibility  Accessibility `json:"accessibility"`
}

type FluffyMusicPlayButtonRenderer

type FluffyMusicPlayButtonRenderer struct {
	PlayNavigationEndpoint FluffyPlayNavigationEndpoint `json:"playNavigationEndpoint"`
	TrackingParams         string                       `json:"trackingParams"`
	PlayIcon               Icon                         `json:"playIcon"`
	PauseIcon              Icon                         `json:"pauseIcon"`
	IconColor              int64                        `json:"iconColor"`
	BackgroundColor        int64                        `json:"backgroundColor"`
	ActiveBackgroundColor  int64                        `json:"activeBackgroundColor"`
	LoadingIndicatorColor  int64                        `json:"loadingIndicatorColor"`
	PlayingIcon            Icon                         `json:"playingIcon"`
	IconLoadingColor       int64                        `json:"iconLoadingColor"`
	ActiveScaleFactor      float64                      `json:"activeScaleFactor"`
	ButtonSize             FluffyButtonSize             `json:"buttonSize"`
	RippleTarget           RippleTarget                 `json:"rippleTarget"`
	AccessibilityPlayData  Accessibility                `json:"accessibilityPlayData"`
	AccessibilityPauseData Accessibility                `json:"accessibilityPauseData"`
}

type FluffyNavigationEndpoint

type FluffyNavigationEndpoint struct {
	ClickTrackingParams string               `json:"clickTrackingParams"`
	BrowseEndpoint      PurpleBrowseEndpoint `json:"browseEndpoint"`
}

type FluffyPlayNavigationEndpoint

type FluffyPlayNavigationEndpoint struct {
	ClickTrackingParams   string                 `json:"clickTrackingParams"`
	WatchEndpoint         *WatchEndpoint         `json:"watchEndpoint,omitempty"`
	WatchPlaylistEndpoint *WatchPlaylistEndpoint `json:"watchPlaylistEndpoint,omitempty"`
}

type FluffyRun

type FluffyRun struct {
	Text               string                    `json:"text"`
	NavigationEndpoint *FluffyNavigationEndpoint `json:"navigationEndpoint,omitempty"`
}

type FluffyServiceEndpoint

type FluffyServiceEndpoint struct {
	ClickTrackingParams string                              `json:"clickTrackingParams"`
	FeedbackEndpoint    *FeedbackEndpoint                   `json:"feedbackEndpoint,omitempty"`
	LikeEndpoint        *DefaultServiceEndpointLikeEndpoint `json:"likeEndpoint,omitempty"`
}

type FluffyToggleMenuServiceItemRenderer

type FluffyToggleMenuServiceItemRenderer struct {
	DefaultText            Strapline             `json:"defaultText"`
	DefaultIcon            Icon                  `json:"defaultIcon"`
	DefaultServiceEndpoint FluffyServiceEndpoint `json:"defaultServiceEndpoint"`
	ToggledText            Strapline             `json:"toggledText"`
	ToggledIcon            Icon                  `json:"toggledIcon"`
	ToggledServiceEndpoint FluffyServiceEndpoint `json:"toggledServiceEndpoint"`
	TrackingParams         string                `json:"trackingParams"`
}

type Icon

type Icon struct {
	IconType IconType `json:"iconType"`
}

type IconType

type IconType string
const (
	AddToPlaylist      IconType = "ADD_TO_PLAYLIST"
	AddToRemoteQueue   IconType = "ADD_TO_REMOTE_QUEUE"
	Album              IconType = "ALBUM"
	Artist             IconType = "ARTIST"
	Favorite           IconType = "FAVORITE"
	LibraryAdd         IconType = "LIBRARY_ADD"
	LibrarySaved       IconType = "LIBRARY_SAVED"
	Mix                IconType = "MIX"
	MusicExplicitBadge IconType = "MUSIC_EXPLICIT_BADGE"
	MusicShuffle       IconType = "MUSIC_SHUFFLE"
	Pause              IconType = "PAUSE"
	PlayArrow          IconType = "PLAY_ARROW"
	QueuePlayNext      IconType = "QUEUE_PLAY_NEXT"
	Share              IconType = "SHARE"
	TabHome            IconType = "TAB_HOME"
	Unfavorite         IconType = "UNFAVORITE"
	VolumeUp           IconType = "VOLUME_UP"
)

type ItemHeight

type ItemHeight string
const (
	MusicResponsiveListItemHeightMediumCompact ItemHeight = "MUSIC_RESPONSIVE_LIST_ITEM_HEIGHT_MEDIUM_COMPACT"
)

type LibraryStatus

type LibraryStatus string
const (
	MusicLibraryStatusInLibrary LibraryStatus = "MUSIC_LIBRARY_STATUS_IN_LIBRARY"
)

type LikeButtonRenderer

type LikeButtonRenderer struct {
	Target           PlaylistItemData         `json:"target"`
	LikeStatus       Status                   `json:"likeStatus"`
	TrackingParams   string                   `json:"trackingParams"`
	LikesAllowed     bool                     `json:"likesAllowed"`
	ServiceEndpoints []ServiceEndpointElement `json:"serviceEndpoints"`
}

type LikeEndpointAction

type LikeEndpointAction struct {
	ClickTrackingParams             string                          `json:"clickTrackingParams"`
	MusicLibraryStatusUpdateCommand MusicLibraryStatusUpdateCommand `json:"musicLibraryStatusUpdateCommand"`
}

type LoggingContext

type LoggingContext struct {
	VssLoggingContext VssLoggingContext `json:"vssLoggingContext"`
}
type MenuItemRenderer struct {
	Text               Strapline                                     `json:"text"`
	Icon               Icon                                          `json:"icon"`
	NavigationEndpoint *MenuNavigationItemRendererNavigationEndpoint `json:"navigationEndpoint,omitempty"`
	TrackingParams     string                                        `json:"trackingParams"`
	ServiceEndpoint    *MenuNavigationItemRendererServiceEndpoint    `json:"serviceEndpoint,omitempty"`
}
type MenuNavigationItemRendererNavigationEndpoint struct {
	ClickTrackingParams   string                 `json:"clickTrackingParams"`
	WatchEndpoint         *WatchEndpoint         `json:"watchEndpoint,omitempty"`
	AddToPlaylistEndpoint *AddToPlaylistEndpoint `json:"addToPlaylistEndpoint,omitempty"`
	BrowseEndpoint        *OnTapBrowseEndpoint   `json:"browseEndpoint,omitempty"`
	ShareEntityEndpoint   *ShareEntityEndpoint   `json:"shareEntityEndpoint,omitempty"`
	WatchPlaylistEndpoint *WatchPlaylistEndpoint `json:"watchPlaylistEndpoint,omitempty"`
	ConfirmDialogEndpoint *ConfirmDialogEndpoint `json:"confirmDialogEndpoint,omitempty"`
}
type MenuNavigationItemRendererServiceEndpoint struct {
	ClickTrackingParams string           `json:"clickTrackingParams"`
	QueueAddEndpoint    QueueAddEndpoint `json:"queueAddEndpoint"`
}

type MoreContentButton

type MoreContentButton struct {
	ButtonRenderer MoreContentButtonButtonRenderer `json:"buttonRenderer"`
}

type MoreContentButtonButtonRenderer

type MoreContentButtonButtonRenderer struct {
	Style              string                           `json:"style"`
	Text               Strapline                        `json:"text"`
	NavigationEndpoint ButtonRendererNavigationEndpoint `json:"navigationEndpoint"`
	TrackingParams     string                           `json:"trackingParams"`
	AccessibilityData  Accessibility                    `json:"accessibilityData"`
}

type MusicCarouselShelfBasicHeaderRenderer

type MusicCarouselShelfBasicHeaderRenderer struct {
	Title             MusicCarouselShelfBasicHeaderRendererTitle      `json:"title"`
	Strapline         *Strapline                                      `json:"strapline,omitempty"`
	AccessibilityData Accessibility                                   `json:"accessibilityData"`
	HeaderStyle       string                                          `json:"headerStyle"`
	MoreContentButton *MoreContentButton                              `json:"moreContentButton,omitempty"`
	Thumbnail         *MusicCarouselShelfBasicHeaderRendererThumbnail `json:"thumbnail,omitempty"`
	TrackingParams    string                                          `json:"trackingParams"`
}

type MusicCarouselShelfBasicHeaderRendererThumbnail

type MusicCarouselShelfBasicHeaderRendererThumbnail struct {
	MusicThumbnailRenderer PurpleMusicThumbnailRenderer `json:"musicThumbnailRenderer"`
}

type MusicCarouselShelfBasicHeaderRendererTitle

type MusicCarouselShelfBasicHeaderRendererTitle struct {
	Runs []TentacledRun `json:"runs"`
}

type MusicCarouselShelfRenderer

type MusicCarouselShelfRenderer struct {
	Header            MusicCarouselShelfRendererHeader    `json:"header"`
	Contents          []MusicCarouselShelfRendererContent `json:"contents"`
	TrackingParams    string                              `json:"trackingParams"`
	ItemSize          string                              `json:"itemSize"`
	NumItemsPerColumn *string                             `json:"numItemsPerColumn,omitempty"`
}

type MusicCarouselShelfRendererContent

type MusicCarouselShelfRendererContent struct {
	MusicTwoRowItemRenderer         *MusicTwoRowItemRenderer         `json:"musicTwoRowItemRenderer,omitempty"`
	MusicResponsiveListItemRenderer *MusicResponsiveListItemRenderer `json:"musicResponsiveListItemRenderer,omitempty"`
}

type MusicCarouselShelfRendererHeader

type MusicCarouselShelfRendererHeader struct {
	MusicCarouselShelfBasicHeaderRenderer MusicCarouselShelfBasicHeaderRenderer `json:"musicCarouselShelfBasicHeaderRenderer"`
}

type MusicDescriptionShelfRenderer

type MusicDescriptionShelfRenderer struct {
	Header      MusicDescriptionShelfRendererHeaderOrDescription `json:"header,omitempty"`
	Description MusicDescriptionShelfRendererHeaderOrDescription `json:"description,omitempty"`
}

type MusicDescriptionShelfRendererHeaderOrDescription

type MusicDescriptionShelfRendererHeaderOrDescription struct {
	Runs []MusicDescriptionShelfRendererHeaderRuns `json:"runs,omitempty"`
}

type MusicDescriptionShelfRendererHeaderRuns

type MusicDescriptionShelfRendererHeaderRuns struct {
	Text string `json:"text,omitempty"`
}

type MusicInlineBadgeRenderer

type MusicInlineBadgeRenderer struct {
	TrackingParams    string        `json:"trackingParams"`
	Icon              Icon          `json:"icon"`
	AccessibilityData Accessibility `json:"accessibilityData"`
}

type MusicItemThumbnailOverlayRendererBackground

type MusicItemThumbnailOverlayRendererBackground struct {
	VerticalGradient VerticalGradient `json:"verticalGradient"`
}

type MusicLibraryStatusUpdateCommand

type MusicLibraryStatusUpdateCommand struct {
	LibraryStatus             LibraryStatus `json:"libraryStatus"`
	AddToLibraryFeedbackToken string        `json:"addToLibraryFeedbackToken"`
}

type MusicResponsiveListItemFlexColumnRenderer

type MusicResponsiveListItemFlexColumnRenderer struct {
	Text            Text            `json:"text"`
	DisplayPriority DisplayPriority `json:"displayPriority"`
}

type MusicResponsiveListItemRenderer

type MusicResponsiveListItemRenderer struct {
	TrackingParams         string                              `json:"trackingParams"`
	Thumbnail              ThumbnailClass                      `json:"thumbnail"`
	Overlay                Overlay                             `json:"overlay"`
	FlexColumns            []FlexColumn                        `json:"flexColumns"`
	Menu                   MusicResponsiveListItemRendererMenu `json:"menu"`
	PlaylistItemData       PlaylistItemData                    `json:"playlistItemData"`
	FlexColumnDisplayStyle string                              `json:"flexColumnDisplayStyle"`
	ItemHeight             ItemHeight                          `json:"itemHeight"`
	Badges                 []Badge                             `json:"badges,omitempty"`
}

type MusicResponsiveListItemRendererMenu

type MusicResponsiveListItemRendererMenu struct {
	MenuRenderer PurpleMenuRenderer `json:"menuRenderer"`
}

type MusicThumbnailRendererThumbnail

type MusicThumbnailRendererThumbnail struct {
	Thumbnails []ThumbnailElement `json:"thumbnails"`
}

type MusicTwoRowItemRenderer

type MusicTwoRowItemRenderer struct {
	ThumbnailRenderer  ThumbnailClass                            `json:"thumbnailRenderer"`
	AspectRatio        AspectRatio                               `json:"aspectRatio"`
	Title              MusicTwoRowItemRendererTitle              `json:"title"`
	Subtitle           Subtitle                                  `json:"subtitle"`
	NavigationEndpoint MusicTwoRowItemRendererNavigationEndpoint `json:"navigationEndpoint"`
	TrackingParams     string                                    `json:"trackingParams"`
	Menu               MusicTwoRowItemRendererMenu               `json:"menu"`
	ThumbnailOverlay   ThumbnailOverlay                          `json:"thumbnailOverlay"`
	SubtitleBadges     []Badge                                   `json:"subtitleBadges,omitempty"`
}

type MusicTwoRowItemRendererMenu

type MusicTwoRowItemRendererMenu struct {
	MenuRenderer FluffyMenuRenderer `json:"menuRenderer"`
}

type MusicTwoRowItemRendererNavigationEndpoint

type MusicTwoRowItemRendererNavigationEndpoint struct {
	ClickTrackingParams   string                 `json:"clickTrackingParams"`
	WatchEndpoint         *WatchEndpoint         `json:"watchEndpoint,omitempty"`
	WatchPlaylistEndpoint *WatchPlaylistEndpoint `json:"watchPlaylistEndpoint,omitempty"`
	BrowseEndpoint        *PurpleBrowseEndpoint  `json:"browseEndpoint,omitempty"`
}

type MusicTwoRowItemRendererTitle

type MusicTwoRowItemRendererTitle struct {
	Runs []FluffyRun `json:"runs"`
}

type MusicVideoType

type MusicVideoType string
const (
	MusicVideoTypeAtv MusicVideoType = "MUSIC_VIDEO_TYPE_ATV"
)
type NavigationEndpoint struct {
	ClickTrackingParams string                            `json:"clickTrackingParams"`
	BrowseEndpoint      OnDeselectedCommandBrowseEndpoint `json:"browseEndpoint"`
}

type NextContinuationData

type NextContinuationData struct {
	Continuation        string `json:"continuation"`
	ClickTrackingParams string `json:"clickTrackingParams"`
}

type NotificationTextRenderer

type NotificationTextRenderer struct {
	SuccessResponseText Strapline `json:"successResponseText"`
	TrackingParams      string    `json:"trackingParams"`
}

type OnDeselectedCommandBrowseEndpoint

type OnDeselectedCommandBrowseEndpoint struct {
	BrowseID TabIdentifier `json:"browseId"`
	Params   string        `json:"params"`
}

type OnEmptyQueue

type OnEmptyQueue struct {
	ClickTrackingParams string                `json:"clickTrackingParams"`
	WatchEndpoint       AddToPlaylistEndpoint `json:"watchEndpoint"`
}

type OnTap

type OnTap struct {
	ClickTrackingParams string              `json:"clickTrackingParams"`
	BrowseEndpoint      OnTapBrowseEndpoint `json:"browseEndpoint"`
}

type OnTapBrowseEndpoint

type OnTapBrowseEndpoint struct {
	BrowseID                              string                                `json:"browseId"`
	BrowseEndpointContextSupportedConfigs BrowseEndpointContextSupportedConfigs `json:"browseEndpointContextSupportedConfigs"`
}

type Overlay

type Overlay struct {
	MusicItemThumbnailOverlayRenderer OverlayMusicItemThumbnailOverlayRenderer `json:"musicItemThumbnailOverlayRenderer"`
}

type OverlayMusicItemThumbnailOverlayRenderer

type OverlayMusicItemThumbnailOverlayRenderer struct {
	Background      MusicItemThumbnailOverlayRendererBackground `json:"background"`
	Content         PurpleContent                               `json:"content"`
	ContentPosition ContentPosition                             `json:"contentPosition"`
	DisplayStyle    DisplayStyle                                `json:"displayStyle"`
}

type PageType

type PageType string
const (
	MusicPageTypeAlbum       PageType = "MUSIC_PAGE_TYPE_ALBUM"
	MusicPageTypeArtist      PageType = "MUSIC_PAGE_TYPE_ARTIST"
	MusicPageTypePlaylist    PageType = "MUSIC_PAGE_TYPE_PLAYLIST"
	MusicPageTypeUserChannel PageType = "MUSIC_PAGE_TYPE_USER_CHANNEL"
)

type Param

type Param struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Params

type Params string
const (
	WAEB Params = "wAEB"
)

type PlaylistEditEndpoint

type PlaylistEditEndpoint struct {
	PlaylistID string                       `json:"playlistId"`
	Actions    []PlaylistEditEndpointAction `json:"actions"`
	Params     string                       `json:"params"`
}

type PlaylistEditEndpointAction

type PlaylistEditEndpointAction struct {
	Action          string  `json:"action"`
	PlaylistPrivacy *string `json:"playlistPrivacy,omitempty"`
}

type PlaylistItemData

type PlaylistItemData struct {
	VideoID string `json:"videoId"`
}

type PurpleBrowseEndpoint

type PurpleBrowseEndpoint struct {
	BrowseID                              string                                `json:"browseId"`
	BrowseEndpointContextSupportedConfigs BrowseEndpointContextSupportedConfigs `json:"browseEndpointContextSupportedConfigs"`
	Params                                *string                               `json:"params,omitempty"`
}

type PurpleButtonSize

type PurpleButtonSize string
const (
	MusicPlayButtonSizeSmall PurpleButtonSize = "MUSIC_PLAY_BUTTON_SIZE_SMALL"
)

type PurpleContent

type PurpleContent struct {
	MusicPlayButtonRenderer PurpleMusicPlayButtonRenderer `json:"musicPlayButtonRenderer"`
}

type PurpleItem

type PurpleItem struct {
	MenuNavigationItemRenderer    *MenuItemRenderer                    `json:"menuNavigationItemRenderer,omitempty"`
	MenuServiceItemRenderer       *MenuItemRenderer                    `json:"menuServiceItemRenderer,omitempty"`
	ToggleMenuServiceItemRenderer *PurpleToggleMenuServiceItemRenderer `json:"toggleMenuServiceItemRenderer,omitempty"`
}

type PurpleMenuRenderer

type PurpleMenuRenderer struct {
	Items           []PurpleItem     `json:"items"`
	TrackingParams  string           `json:"trackingParams"`
	TopLevelButtons []TopLevelButton `json:"topLevelButtons"`
	Accessibility   Accessibility    `json:"accessibility"`
}

type PurpleMusicPlayButtonRenderer

type PurpleMusicPlayButtonRenderer struct {
	PlayNavigationEndpoint PurplePlayNavigationEndpoint `json:"playNavigationEndpoint"`
	TrackingParams         string                       `json:"trackingParams"`
	PlayIcon               Icon                         `json:"playIcon"`
	PauseIcon              Icon                         `json:"pauseIcon"`
	IconColor              int64                        `json:"iconColor"`
	BackgroundColor        int64                        `json:"backgroundColor"`
	ActiveBackgroundColor  int64                        `json:"activeBackgroundColor"`
	LoadingIndicatorColor  int64                        `json:"loadingIndicatorColor"`
	PlayingIcon            Icon                         `json:"playingIcon"`
	IconLoadingColor       int64                        `json:"iconLoadingColor"`
	ActiveScaleFactor      int64                        `json:"activeScaleFactor"`
	ButtonSize             PurpleButtonSize             `json:"buttonSize"`
	RippleTarget           RippleTarget                 `json:"rippleTarget"`
	AccessibilityPlayData  Accessibility                `json:"accessibilityPlayData"`
	AccessibilityPauseData Accessibility                `json:"accessibilityPauseData"`
}

type PurpleMusicThumbnailRenderer

type PurpleMusicThumbnailRenderer struct {
	Thumbnail         MusicThumbnailRendererThumbnail `json:"thumbnail"`
	ThumbnailCrop     string                          `json:"thumbnailCrop"`
	ThumbnailScale    ThumbnailScale                  `json:"thumbnailScale"`
	TrackingParams    string                          `json:"trackingParams"`
	AccessibilityData Accessibility                   `json:"accessibilityData"`
	OnTap             OnTap                           `json:"onTap"`
	TargetID          string                          `json:"targetId"`
}

type PurpleNavigationEndpoint

type PurpleNavigationEndpoint struct {
	ClickTrackingParams string               `json:"clickTrackingParams"`
	WatchEndpoint       *WatchEndpoint       `json:"watchEndpoint,omitempty"`
	BrowseEndpoint      *OnTapBrowseEndpoint `json:"browseEndpoint,omitempty"`
}

type PurplePlayNavigationEndpoint

type PurplePlayNavigationEndpoint struct {
	ClickTrackingParams string        `json:"clickTrackingParams"`
	WatchEndpoint       WatchEndpoint `json:"watchEndpoint"`
}

type PurpleRun

type PurpleRun struct {
	Text               string                    `json:"text"`
	NavigationEndpoint *PurpleNavigationEndpoint `json:"navigationEndpoint,omitempty"`
}

type PurpleServiceEndpoint

type PurpleServiceEndpoint struct {
	ClickTrackingParams string           `json:"clickTrackingParams"`
	FeedbackEndpoint    FeedbackEndpoint `json:"feedbackEndpoint"`
}

type PurpleToggleMenuServiceItemRenderer

type PurpleToggleMenuServiceItemRenderer struct {
	DefaultText            Strapline             `json:"defaultText"`
	DefaultIcon            Icon                  `json:"defaultIcon"`
	DefaultServiceEndpoint PurpleServiceEndpoint `json:"defaultServiceEndpoint"`
	ToggledText            Strapline             `json:"toggledText"`
	ToggledIcon            Icon                  `json:"toggledIcon"`
	ToggledServiceEndpoint PurpleServiceEndpoint `json:"toggledServiceEndpoint"`
	TrackingParams         string                `json:"trackingParams"`
}

type QueueAddEndpoint

type QueueAddEndpoint struct {
	QueueTarget         QueueTarget               `json:"queueTarget"`
	QueueInsertPosition QueueInsertPosition       `json:"queueInsertPosition"`
	Commands            []QueueAddEndpointCommand `json:"commands"`
}

type QueueAddEndpointCommand

type QueueAddEndpointCommand struct {
	ClickTrackingParams string           `json:"clickTrackingParams"`
	AddToToastAction    AddToToastAction `json:"addToToastAction"`
}

type QueueInsertPosition

type QueueInsertPosition string
const (
	InsertAfterCurrentVideo QueueInsertPosition = "INSERT_AFTER_CURRENT_VIDEO"
	InsertAtEnd             QueueInsertPosition = "INSERT_AT_END"
)

type QueueTarget

type QueueTarget struct {
	VideoID      *string      `json:"videoId,omitempty"`
	OnEmptyQueue OnEmptyQueue `json:"onEmptyQueue"`
	PlaylistID   *string      `json:"playlistId,omitempty"`
}

type ResponseContext

type ResponseContext struct {
	ServiceTrackingParams []ServiceTrackingParam `json:"serviceTrackingParams"`
	MaxAgeSeconds         int64                  `json:"maxAgeSeconds"`
}

type RippleTarget

type RippleTarget string
const (
	MusicPlayButtonRippleTargetAncestor RippleTarget = "MUSIC_PLAY_BUTTON_RIPPLE_TARGET_ANCESTOR"
	MusicPlayButtonRippleTargetSelf     RippleTarget = "MUSIC_PLAY_BUTTON_RIPPLE_TARGET_SELF"
)

type SchemaGetHomePage

type SchemaGetHomePage struct {
	ResponseContext    ResponseContext `json:"responseContext"`
	Contents           Contents        `json:"contents"`
	TrackingParams     string          `json:"trackingParams"`
	MaxAgeStoreSeconds int64           `json:"maxAgeStoreSeconds"`
	Background         ThumbnailClass  `json:"background"`
}

type SectionListRenderer

type SectionListRenderer struct {
	Contents       []SectionListRendererContent `json:"contents"`
	Continuations  []Continuation               `json:"continuations"`
	TrackingParams string                       `json:"trackingParams"`
	Header         SectionListRendererHeader    `json:"header"`
}

type SectionListRendererContent

type SectionListRendererContent struct {
	MusicCarouselShelfRenderer    MusicCarouselShelfRenderer    `json:"musicCarouselShelfRenderer"`
	MusicDescriptionShelfRenderer MusicDescriptionShelfRenderer `json:"musicDescriptionShelfRenderer"`
}

type SectionListRendererHeader

type SectionListRendererHeader struct {
	ChipCloudRenderer ChipCloudRenderer `json:"chipCloudRenderer"`
}

type ServiceEndpointElement

type ServiceEndpointElement struct {
	ClickTrackingParams string                      `json:"clickTrackingParams"`
	LikeEndpoint        ServiceEndpointLikeEndpoint `json:"likeEndpoint"`
}

type ServiceEndpointLikeEndpoint

type ServiceEndpointLikeEndpoint struct {
	Status  Status               `json:"status"`
	Target  PlaylistItemData     `json:"target"`
	Actions []LikeEndpointAction `json:"actions,omitempty"`
}

type ServiceTrackingParam

type ServiceTrackingParam struct {
	Service string  `json:"service"`
	Params  []Param `json:"params"`
}

type ShareEntityEndpoint

type ShareEntityEndpoint struct {
	SerializedShareEntity string         `json:"serializedShareEntity"`
	SharePanelType        SharePanelType `json:"sharePanelType"`
}

type SharePanelType

type SharePanelType string
const (
	SharePanelTypeUnifiedSharePanel SharePanelType = "SHARE_PANEL_TYPE_UNIFIED_SHARE_PANEL"
)

type SingleColumnBrowseResultsRenderer

type SingleColumnBrowseResultsRenderer struct {
	Tabs []Tab `json:"tabs"`
}

type Status

type Status string
const (
	Dislike     Status = "DISLIKE"
	Indifferent Status = "INDIFFERENT"
	Like        Status = "LIKE"
)

type Strapline

type Strapline struct {
	Runs []StraplineRun `json:"runs"`
}

type StraplineRun

type StraplineRun struct {
	Text string `json:"text"`
}

type Style

type Style struct {
	StyleType StyleType `json:"styleType"`
}

type StyleType

type StyleType string
const (
	StyleLargeTranslucentAndSelectedWhite StyleType = "STYLE_LARGE_TRANSLUCENT_AND_SELECTED_WHITE"
)

type Subtitle

type Subtitle struct {
	Runs []SubtitleRun `json:"runs"`
}

type SubtitleRun

type SubtitleRun struct {
	Text               string `json:"text"`
	NavigationEndpoint *OnTap `json:"navigationEndpoint,omitempty"`
}

type Tab

type Tab struct {
	TabRenderer TabRenderer `json:"tabRenderer"`
}

type TabIdentifier

type TabIdentifier string
const (
	FEmusicHome TabIdentifier = "FEmusic_home"
)

type TabRenderer

type TabRenderer struct {
	Endpoint       Endpoint           `json:"endpoint"`
	Title          string             `json:"title"`
	Selected       bool               `json:"selected"`
	Content        TabRendererContent `json:"content"`
	Icon           Icon               `json:"icon"`
	TabIdentifier  TabIdentifier      `json:"tabIdentifier"`
	TrackingParams string             `json:"trackingParams"`
}

type TabRendererContent

type TabRendererContent struct {
	SectionListRenderer SectionListRenderer `json:"sectionListRenderer"`
}

type Target

type Target struct {
	PlaylistID string `json:"playlistId"`
}

type TentacledRun

type TentacledRun struct {
	Text               string    `json:"text"`
	NavigationEndpoint *Endpoint `json:"navigationEndpoint,omitempty"`
}

type Text

type Text struct {
	Runs []PurpleRun `json:"runs"`
}

type ThumbnailClass

type ThumbnailClass struct {
	MusicThumbnailRenderer BackgroundMusicThumbnailRenderer `json:"musicThumbnailRenderer"`
}

type ThumbnailCrop

type ThumbnailCrop string
const (
	MusicThumbnailCropUnspecified ThumbnailCrop = "MUSIC_THUMBNAIL_CROP_UNSPECIFIED"
)

type ThumbnailElement

type ThumbnailElement struct {
	URL    string `json:"url"`
	Width  int64  `json:"width"`
	Height int64  `json:"height"`
}

type ThumbnailOverlay

type ThumbnailOverlay struct {
	MusicItemThumbnailOverlayRenderer ThumbnailOverlayMusicItemThumbnailOverlayRenderer `json:"musicItemThumbnailOverlayRenderer"`
}

type ThumbnailOverlayMusicItemThumbnailOverlayRenderer

type ThumbnailOverlayMusicItemThumbnailOverlayRenderer struct {
	Background      MusicItemThumbnailOverlayRendererBackground `json:"background"`
	Content         FluffyContent                               `json:"content"`
	ContentPosition ContentPosition                             `json:"contentPosition"`
	DisplayStyle    DisplayStyle                                `json:"displayStyle"`
}

type ThumbnailScale

type ThumbnailScale string
const (
	MusicThumbnailScaleAspectFill  ThumbnailScale = "MUSIC_THUMBNAIL_SCALE_ASPECT_FILL"
	MusicThumbnailScaleAspectFit   ThumbnailScale = "MUSIC_THUMBNAIL_SCALE_ASPECT_FIT"
	MusicThumbnailScaleUnspecified ThumbnailScale = "MUSIC_THUMBNAIL_SCALE_UNSPECIFIED"
)

type TopLevelButton

type TopLevelButton struct {
	LikeButtonRenderer LikeButtonRenderer `json:"likeButtonRenderer"`
}

type VerticalGradient

type VerticalGradient struct {
	GradientLayerColors []string `json:"gradientLayerColors"`
}

type VssLoggingContext

type VssLoggingContext struct {
	SerializedContextData string `json:"serializedContextData"`
}

type WatchEndpoint

type WatchEndpoint struct {
	VideoID                            string                             `json:"videoId"`
	PlaylistID                         string                             `json:"playlistId"`
	Params                             *Params                            `json:"params,omitempty"`
	LoggingContext                     LoggingContext                     `json:"loggingContext"`
	WatchEndpointMusicSupportedConfigs WatchEndpointMusicSupportedConfigs `json:"watchEndpointMusicSupportedConfigs"`
}

type WatchEndpointMusicConfig

type WatchEndpointMusicConfig struct {
	MusicVideoType MusicVideoType `json:"musicVideoType"`
}

type WatchEndpointMusicSupportedConfigs

type WatchEndpointMusicSupportedConfigs struct {
	WatchEndpointMusicConfig WatchEndpointMusicConfig `json:"watchEndpointMusicConfig"`
}

type WatchPlaylistEndpoint

type WatchPlaylistEndpoint struct {
	PlaylistID string `json:"playlistId"`
	Params     string `json:"params"`
}

type YoutubeMusicManager

type YoutubeMusicManager struct {
	Client        *http.Client
	CookieJar     *cookiejar.Jar
	HeaderCookies string
	Headers       *http.Header
	Context       map[string]interface{}
	// contains filtered or unexported fields
}

func NewYoutubeMusicManager

func NewYoutubeMusicManager() *YoutubeMusicManager

func (YoutubeMusicManager) GetHomePage

func (ymm YoutubeMusicManager) GetHomePage(limit int)

func (YoutubeMusicManager) Login

func (ymm YoutubeMusicManager) Login() error

Jump to

Keyboard shortcuts

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