Interface IPlaylist<T extends IHasTotal>
- Type Parameters:
T- The concrete type of the items/tracks metadata object.PlaylistusesPagingandPlaylistSimplifiedusesPlaylistTracksInformation.
- All Known Implementing Classes:
Playlist, PlaylistSimplified
public interface IPlaylist<T extends IHasTotal>
Represents the common properties of Spotify Playlist objects (full and simplified).
This interface provides a common base for Playlist and
PlaylistSimplified objects.
-
Method Summary
Modifier and TypeMethodDescriptionGet the description of the playlist.Get the external URLs of the playlist.getHref()Get the full Spotify API endpoint url of the playlist.getId()Get the Spotify ID of a playlist.Image[]Images for the playlist.Check whether the owner allows other users to modify the playlist.getItems()Get the track/item metadata for this playlist.getName()Get the name of a playlist.getOwner()Get the owners user object of a playlist.Check whether a playlist is available in public or is private.Get the snapshot ID, the version identifier for the current playlist.getType()Get the model object type.getUri()Get the Spotify URI of a playlist.
-
Method Details
-
getIsCollaborative
Boolean getIsCollaborative()Check whether the owner allows other users to modify the playlist.- Returns:
trueif other users are allowed to modify the playlist,falseotherwise.- See Also:
-
getDescription
String getDescription()Get the description of the playlist.- Returns:
- The playlist description. Only returned for modified, verified playlists, otherwise
null.
-
getExternalUrls
ExternalUrl getExternalUrls()Get the external URLs of the playlist.
Example: Spotify-URL.- Returns:
- Known external URLs for this playlist.
-
getHref
String getHref()Get the full Spotify API endpoint url of the playlist.- Returns:
- A link to the Web API endpoint providing full details of the playlist.
-
getId
-
getImages
Image[] getImages()Images for the playlist. The array may be empty or contain up to three images. The images are returned by size in descending order.
Note: If returned, the source URL for the image is temporary and will expire in less than a day.- Returns:
- An array of images in different sizes.
- See Also:
-
getName
-
getOwner
-
getPublic
Boolean getPublic()Check whether a playlist is available in public or is private.- Returns:
truethe playlist is public,falsethe playlist is private,nullthe playlist status is not relevant.- See Also:
-
getItems
T getItems()Get the track/item metadata for this playlist. The concrete typeTisPagingfor a fullPlaylistandPlaylistTracksInformationfor aPlaylistSimplified.- Returns:
- Track/item metadata for the playlist.
-
getSnapshotId
String getSnapshotId()Get the snapshot ID, the version identifier for the current playlist. Can be supplied in other requests to target a specific playlist version.- Returns:
- The version identifier for the current playlist.
- See Also:
-
getType
ModelObjectType getType()Get the model object type. In this case "playlist".- Returns:
- The object type: "playlist"
-
getUri
-