Get Current User's Playlists
client.Me.Playlists.List(ctx, query) (*CursorURLPage[SimplifiedPlaylistObject], error)
GET/me/playlists
Get a list of the playlists owned or followed by the current Spotify user.
Parameters
Returns
Get Current User's Playlists
package main
import (
"context"
"fmt"
"github.com/cjavdev/spotted-go"
"github.com/cjavdev/spotted-go/option"
)
func main() {
client := spotted.NewClient(
option.WithAccessToken("My Access Token"),
)
page, err := client.Me.Playlists.List(context.TODO(), spotted.MePlaylistListParams{
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
{
"href": "https://api.spotify.com/v1/me/shows?offset=0&limit=20\n",
"limit": 20,
"next": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"offset": 0,
"previous": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"total": 4,
"items": [
{
"id": "id",
"collaborative": true,
"description": "description",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"images": [
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
"width": 300,
"published": true
}
],
"name": "name",
"owner": {
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"published": true,
"type": "user",
"uri": "uri",
"display_name": "display_name"
},
"published": true,
"snapshot_id": "snapshot_id",
"tracks": {
"href": "href",
"published": true,
"total": 0
},
"type": "type",
"uri": "uri"
}
],
"published": true
}Returns Examples
{
"href": "https://api.spotify.com/v1/me/shows?offset=0&limit=20\n",
"limit": 20,
"next": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"offset": 0,
"previous": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"total": 4,
"items": [
{
"id": "id",
"collaborative": true,
"description": "description",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"images": [
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
"width": 300,
"published": true
}
],
"name": "name",
"owner": {
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"published": true,
"type": "user",
"uri": "uri",
"display_name": "display_name"
},
"published": true,
"snapshot_id": "snapshot_id",
"tracks": {
"href": "href",
"published": true,
"total": 0
},
"type": "type",
"uri": "uri"
}
],
"published": true
}