Class Playlist
java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject
se.michaelthelin.spotify.model_objects.specification.Playlist
- All Implemented Interfaces:
Serializable, IModelObject, IPlaylist<Paging<PlaylistTrack>>
Retrieve information about
Playlist objects by building instances from this class.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder class for buildingPlaylistinstances.static final classJsonUtil class for buildingPlaylistinstances.Nested classes/interfaces inherited from interface IModelObject
IModelObject.IJsonUtil<T> -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Create a builder for building an instance of a model object.booleanGet the description of the playlist.Get the external URLs of the playlist.Get information about the followers 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 playlist is collaborative or not.getItems()Get information about the tracks of the 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.inthashCode()toString()Returns a String representation of this model object in the style:
-
Method Details
-
getIsCollaborative
Check whether the playlist is collaborative or not.- Specified by:
getIsCollaborativein interfaceIPlaylist<Paging<PlaylistTrack>>- Returns:
trueif the owner allows other users to modify the playlist,falseif not.- See Also:
-
getDescription
Get the description of the playlist.- Specified by:
getDescriptionin interfaceIPlaylist<Paging<PlaylistTrack>>- Returns:
- The playlist description. Only returned for modified, verified playlists, otherwise
null.
-
getExternalUrls
Get the external URLs of the playlist.
Example: Spotify-URL.- Specified by:
getExternalUrlsin interfaceIPlaylist<Paging<PlaylistTrack>>- Returns:
- Known external URLs for this playlist.
-
getFollowers
Get information about the followers of the playlist.
Example: Follower count.- Returns:
- Information about the followers of the playlist.
-
getHref
Get the full Spotify API endpoint url of the playlist.- Specified by:
getHrefin interfaceIPlaylist<Paging<PlaylistTrack>>- Returns:
- A link to the Web API endpoint providing full details of the playlist.
-
getId
Get the Spotify ID of a playlist.- Specified by:
getIdin interfaceIPlaylist<Paging<PlaylistTrack>>- Returns:
- The Spotify ID for the playlist.
-
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.- Specified by:
getImagesin interfaceIPlaylist<Paging<PlaylistTrack>>- Returns:
- An array of images in different sizes.
- See Also:
-
getName
Get the name of a playlist.- Specified by:
getNamein interfaceIPlaylist<Paging<PlaylistTrack>>- Returns:
- Playlist name.
-
getOwner
Get the owners user object of a playlist.- Specified by:
getOwnerin interfaceIPlaylist<Paging<PlaylistTrack>>- Returns:
- A user object.
-
getPublic
Check whether a playlist is available in public or is private.- Specified by:
getPublicin interfaceIPlaylist<Paging<PlaylistTrack>>- Returns:
truethe playlist is public,falsethe playlist is private,nullthe playlist status is not relevant.- See Also:
-
getSnapshotId
Get the snapshot ID, the version identifier for the current playlist. Can be supplied in other requests to target a specific playlist version.- Specified by:
getSnapshotIdin interfaceIPlaylist<Paging<PlaylistTrack>>- Returns:
- The version identifier for the current playlist.
- See Also:
-
getItems
Get information about the tracks of the playlist.- Specified by:
getItemsin interfaceIPlaylist<Paging<PlaylistTrack>>- Returns:
- Information about the tracks of the playlist.
-
getType
Get the model object type. In this case "playlist".- Specified by:
getTypein interfaceIPlaylist<Paging<PlaylistTrack>>- Returns:
- The object type: "playlist"
-
getUri
Get the Spotify URI of a playlist.- Specified by:
getUriin interfaceIPlaylist<Paging<PlaylistTrack>>- Returns:
- Spotify playlist URI.
-
toString
Description copied from class:AbstractModelObjectReturns a String representation of this model object in the style:ModelObject(attr1=value1, attr2=value2, ...)- Specified by:
toStringin classAbstractModelObject
-
builder
Description copied from interface:IModelObjectCreate a builder for building an instance of a model object.
The type of the builder and its methods depend on its corresponding implementation.- Specified by:
builderin interfaceIModelObject- Returns:
- A builder object.
-
equals
-
hashCode
-