Documentation
¶
Index ¶
- func AddTracksToPlaylist(client *http.Client, playlistId string, videoIds []string) error
- func ReadValue(object interface{}, arrayOfkeys []interface{}) interface{}
- func ReadValueString(object interface{}, arrayOfkeys []interface{}) string
- type CreatedPlaylist
- type PlaylistAllTracksResponse
- type PlaylistDetails
- type PlaylistPageResponse
- type PlaylistTracksResponse
- type SearchQuery
- type Track
- type YoutubePlaylist
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddTracksToPlaylist ¶
AddTracksToPlaylist adds the given video IDs to an existing playlist
func ReadValue ¶
func ReadValue(object interface{}, arrayOfkeys []interface{}) interface{}
ReadValue navigates through nested JSON structure using a path of string or int keys
func ReadValueString ¶
func ReadValueString(object interface{}, arrayOfkeys []interface{}) string
ReadValueString reads a string value from a nested JSON structure
Types ¶
type CreatedPlaylist ¶
type CreatedPlaylist = parsers.CreatedPlaylist
func CreatePlaylist ¶
func CreatePlaylist(client *http.Client, title string, description string, videoIds []string) (CreatedPlaylist, error)
CreatePlaylist creates a new private playlist and returns its details
type PlaylistAllTracksResponse ¶
type PlaylistAllTracksResponse = parsers.PlaylistAllTracksResponse
func FetchAllPlaylistTracks ¶
func FetchAllPlaylistTracks(client *http.Client, playlistId string) (PlaylistAllTracksResponse, error)
FetchAllPlaylistTracks fetches every track in a playlist, paginating automatically
type PlaylistDetails ¶
type PlaylistDetails = parsers.PlaylistDetails
func FetchPlaylist ¶
func FetchPlaylist(client *http.Client, playlistId string) (PlaylistDetails, error)
FetchPlaylist returns the details of a playlist by ID
type PlaylistPageResponse ¶
type PlaylistPageResponse = parsers.PlaylistPageResponse
func FetchUserPlaylists ¶
func FetchUserPlaylists(httpClient *http.Client, continuation string) (PlaylistPageResponse, error)
FetchUserPlaylists returns a page of the authenticated user's playlists. Pass an empty continuation string to fetch the first page.
type PlaylistTracksResponse ¶
type PlaylistTracksResponse = parsers.PlaylistTracksResponse
func FetchPlaylistTracks ¶
func FetchPlaylistTracks(client *http.Client, playlistId string, continuation string) (PlaylistTracksResponse, error)
FetchPlaylistTracks returns a page of tracks for a playlist. Pass an empty continuation string to fetch the first page.
type SearchQuery ¶
SearchQuery specifies the parameters for a track search
type Track ¶
Re-export types from parsers package
type YoutubePlaylist ¶
type YoutubePlaylist = parsers.YoutubePlaylist
func FetchLikedPlaylist ¶
func FetchLikedPlaylist(client *http.Client) (YoutubePlaylist, error)
FetchLikedPlaylist returns the authenticated user's "Liked Music" playlist