Documentation ¶
Index ¶
Constants ¶
View Source
const ( PUBLIC playlistPrivacyStatus = "PUBLIC" PRIVATE playlistPrivacyStatus = "PRIVATE" UNLISTED playlistPrivacyStatus = "UNLISTED" NoFilter searchFilter = "" SongsFilter searchFilter = "songs" AlbumsFilter searchFilter = "albums" VideosFilter searchFilter = "videos" UploadsFilter searchFilter = "uploads" ArtistesFilter searchFilter = "artists" PlaylistsFilter searchFilter = "playlists" FeaturedPlaylistsFilter searchFilter = "featured_playlists" CommunityPlaylistsFilter searchFilter = "community_playlists" NoScope searchScope = "" LibraryScope searchScope = "library" UploadsScope searchScope = "uploads" )
View Source
const BaseAPIURL = "https://music.youtube.com/youtubei/v1/"
Variables ¶
This section is empty.
Functions ¶
func CreatePlaylist ¶
func CreatePlaylist(title, description string, privacyStatus playlistPrivacyStatus, sourcePlaylist string, videoIDs []string) (string, error)
CreatePlaylist creates a new playlist on YTMusic
func DeletePlaylist ¶
DeletePlaylist deletes a playlist.
Types ¶
type GetContinuationsOpts ¶
type GetContinuationsOpts[T Track | SearchResult] struct { ParseFunc ParseFunc[T] Limit int RequestFunc RequestFunc ContinuationType string Endpoint string Body map[string]any }
type Playlist ¶
type PlaylistCreator ¶
type RequestFunc ¶
type SearchResult ¶
type SearchResult struct { Category string ResultType string VideoID string Title string Artistes []string }
func SearchTracks ¶
func SearchTracks(query string, filter searchFilter, scope searchScope, limit int, shouldIgnoreSpelling bool) ([]SearchResult, error)
SearchTracks returns a list of tracks from YTMusic that match the query provided.
Currently, this is tailored to return information relating to songs.
Click to show internal directories.
Click to hide internal directories.