uploadClientPlaylistCover

suspend fun uploadClientPlaylistCover(playlist: String, imagePath: String? = null, imageFile: VfsFile? = null, image: BufferedImage? = null, imageData: String? = null, imageUrl: String? = null)(source)

Replace the image used to represent a specific playlist. Image type must be jpeg.

You must specify a JPEG image path or image data, maximum payload size is 256 KB

Required conditions: This access token must be tied to the user who owns the playlist, and must have the scope ugc-image-upload granted. In addition, the token must also contain playlist-modify-public and/or playlist-modify-private, depending on the public status of the playlist you want to update.

Api Reference

Parameters

playlist

the id or uri for the playlist.

imagePath

Optionally specify the full local path to the image

imageUrl

Optionally specify a URL to the image

imageFile

Optionally specify the image VfsFile. Note that in each platform, there is a toVfs method to convert the platform's file type to a VfsFile. For example, java.util.File.toVfs() will return a VfsFile.

image

Optionally specify the image's BufferedImage object

imageData

Optionally specify the Base64-encoded image data yourself

Throws

if invalid data is provided