Add Custom Playlist Cover Image
client.Playlists.Images.Update(ctx, playlistID, body) (*Response, error)
PUT/playlists/{playlist_id}/images
Replace the image used to represent a specific playlist.
Parameters
Returns
type PlaylistImageUpdateResponse interface{…}
Add Custom Playlist Cover Image
package main
import (
"bytes"
"context"
"fmt"
"io"
"github.com/cjavdev/spotted-go"
"github.com/cjavdev/spotted-go/option"
)
func main() {
client := spotted.NewClient(
option.WithAccessToken("My Access Token"),
)
image, err := client.Playlists.Images.Update(
context.TODO(),
"3cEYpjA9oz9GiPac4AsH4n",
io.Reader(bytes.NewBuffer([]byte("some file contents"))),
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", image)
}