Interface PlaylistsSpotifyService
-
public interface PlaylistsSpotifyService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description retrofit2.Call<Result>changePlaylistDetails(String playlistId, Map<String,Object> body)Change a playlist’s name and public/private state.retrofit2.Call<Playlist>createPlaylist(String userId, Map<String,Object> options)Create a playlistretrofit2.Call<Pager<PlaylistSimple>>getMyPlaylists()Get a list of the playlists owned or followed by the current Spotify user.retrofit2.Call<Pager<PlaylistSimple>>getMyPlaylists(Map<String,Object> options)Get a list of the playlists owned or followed by the current Spotify user.retrofit2.Call<Playlist>getPlaylist(String playlistId)Get a playlist owned by a Spotify user.retrofit2.Call<Playlist>getPlaylist(String playlistId, Map<String,Object> options)Get a playlist owned by a Spotify user.retrofit2.Call<List<Image>>getPlaylistCoverImages(String playlistId)Get the current image associated with a specific playlist.retrofit2.Call<Pager<PlaylistSimple>>getPlaylists(String userId)Get a list of the playlists owned or followed by a Spotify user.retrofit2.Call<Pager<PlaylistSimple>>getPlaylists(String userId, Map<String,Object> options)Get a list of the playlists owned or followed by a Spotify user.retrofit2.Call<Result>uploadPlaylistCoverImage(String playlistId, String base64Image)Replace the image used to represent a specific playlist.
-
-
-
Method Detail
-
getMyPlaylists
@GET("me/playlists") retrofit2.Call<Pager<PlaylistSimple>> getMyPlaylists()Get a list of the playlists owned or followed by the current Spotify user.- Returns:
- List of user's playlists wrapped in a
Pagerobject
-
getMyPlaylists
@GET("me/playlists") retrofit2.Call<Pager<PlaylistSimple>> getMyPlaylists(@QueryMap Map<String,Object> options)Get a list of the playlists owned or followed by the current Spotify user.- Parameters:
options- Optional parameters. For list of supported parameters see endpoint documentation- Returns:
- List of user's playlists wrapped in a
Pagerobject
-
getPlaylists
@GET("users/{id}/playlists") retrofit2.Call<Pager<PlaylistSimple>> getPlaylists(@Path("id") String userId)Get a list of the playlists owned or followed by a Spotify user.- Parameters:
userId- The user's Spotify user ID.- Returns:
- List of user's playlists wrapped in a
Pagerobject - See Also:
- Get a List of a User’s Playlists
-
getPlaylists
@GET("users/{id}/playlists") retrofit2.Call<Pager<PlaylistSimple>> getPlaylists(@Path("id") String userId, @QueryMap Map<String,Object> options)Get a list of the playlists owned or followed by a Spotify user.- Parameters:
userId- The user's Spotify user ID.options- Optional parameters. For list of supported parameters see endpoint documentation- Returns:
- List of user's playlists wrapped in a
Pagerobject - See Also:
- Get a List of a User’s Playlists
-
getPlaylist
@GET("playlists/{playlist_id}") retrofit2.Call<Playlist> getPlaylist(@Path("playlist_id") String playlistId)Get a playlist owned by a Spotify user.- Parameters:
playlistId- The Spotify ID for the playlist.- Returns:
- Requested Playlist.
- See Also:
- Get a Playlist
-
getPlaylist
@GET("playlists/{playlist_id}") retrofit2.Call<Playlist> getPlaylist(@Path("playlist_id") String playlistId, @QueryMap Map<String,Object> options)Get a playlist owned by a Spotify user.- Parameters:
playlistId- The Spotify ID for the playlist.options- Optional parameters. For list of supported parameters see endpoint documentation- Returns:
- Requested Playlist.
- See Also:
- Get a Playlist
-
createPlaylist
@POST("users/{user_id}/playlists") retrofit2.Call<Playlist> createPlaylist(@Path("user_id") String userId, @Body Map<String,Object> options)Create a playlist- Parameters:
userId- The playlist's owner's User IDoptions- The body parameters- Returns:
- The created playlist
- See Also:
- Create a Playlist
-
changePlaylistDetails
@PUT("playlists/{playlist_id}") retrofit2.Call<Result> changePlaylistDetails(@Path("playlist_id") String playlistId, @Body Map<String,Object> body)Change a playlist’s name and public/private state. (The user must, of course, own the playlist.)- Parameters:
playlistId- The playlist's Idbody- The body parameters. For list of supported parameters see endpoint documentation- Returns:
- An empty result
- See Also:
- Change a Playlist's Details
-
getPlaylistCoverImages
@GET("playlists/{playlist_id}/images") retrofit2.Call<List<Image>> getPlaylistCoverImages(@Path("playlist_id") String playlistId)Get the current image associated with a specific playlist.- Parameters:
playlistId- The Spotify ID for the playlist- Returns:
- A list of image objects
- See Also:
- Get a Playlist Cover Image
-
uploadPlaylistCoverImage
@PUT("playlists/{playlist_id}/images") @Headers("Content-Type: image/jpeg") retrofit2.Call<Result> uploadPlaylistCoverImage(@Path("playlist_id") String playlistId, @Body String base64Image)Replace the image used to represent a specific playlist.- Parameters:
playlistId- The Spotify ID for the playlistbase64Image- Base64 encoded JPEG image data, maximum payload size is 256 KB- Returns:
- A successful request will return a 202 ACCEPTED response code
-
-