Class Playlist
- java.lang.Object
-
- com.wrapper.spotify.model_objects.AbstractModelObject
-
- com.wrapper.spotify.model_objects.specification.Playlist
-
- All Implemented Interfaces:
IModelObject
public class Playlist extends AbstractModelObject
Retrieve information about Playlist objects by building instances from this class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPlaylist.BuilderBuilder class for buildingPlaylistinstances.static classPlaylist.JsonUtilJsonUtil class for buildingPlaylistinstances.-
Nested classes/interfaces inherited from interface com.wrapper.spotify.model_objects.IModelObject
IModelObject.IJsonUtil<T>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Playlist.Builderbuilder()Create a builder for building an instance of a model object.StringgetDescription()Get the description of the playlist.ExternalUrlgetExternalUrls()Get the external URLs of the playlist.FollowersgetFollowers()Get information about the followers of the playlist.StringgetHref()Get the full Spotify API endpoint url of the playlist.StringgetId()Get the Spotify ID of a playlist.Image[]getImages()Images for the playlist.BooleangetIsCollaborative()Check whether the playlist is collaborative or not.BooleangetIsPublicAccess()Check whether a playlist is available in public or is private.StringgetName()Get the name of a playlist.UsergetOwner()Get the owners user object of a playlist.StringgetSnapshotId()Get the snapshot ID, the version identifier for the current playlist.Paging<PlaylistTrack>getTracks()Get information about the tracks of the playlist.ModelObjectTypegetType()Get the model object type.StringgetUri()Get the Spotify URI of a playlist.
-
-
-
Method Detail
-
getIsCollaborative
public Boolean getIsCollaborative()
Check whether the playlist is collaborative or not.- Returns:
trueif the owner allows other users to modify the playlist,falseif not.- See Also:
- Spotify: Working With Playlists
-
getDescription
public String getDescription()
Get the description of the playlist.- Returns:
- The playlist description. Only returned for modified, verified playlists, otherwise
null.
-
getExternalUrls
public ExternalUrl getExternalUrls()
Get the external URLs of the playlist.
Example: Spotify-URL.- Returns:
- Known external URLs for this playlist.
-
getFollowers
public Followers getFollowers()
Get information about the followers of the playlist.
Example: Follower count.- Returns:
- Information about the followers of the playlist.
-
getHref
public 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
public String getId()
Get the Spotify ID of a playlist.- Returns:
- The Spotify ID for the playlist.
-
getImages
public 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:
- Spotify: Working With Playlists
-
getName
public String getName()
Get the name of a playlist.- Returns:
- Playlist name.
-
getOwner
public User getOwner()
Get the owners user object of a playlist.- Returns:
- A user object.
-
getIsPublicAccess
public Boolean getIsPublicAccess()
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:
- Spotify: Working With Playlists
-
getSnapshotId
public 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:
RemoveTracksFromPlaylistRequest
-
getTracks
public Paging<PlaylistTrack> getTracks()
Get information about the tracks of the playlist.- Returns:
- Information about the tracks of the playlist.
-
getType
public ModelObjectType getType()
Get the model object type. In this case "playlist".- Returns:
- The object type: "playlist"
-
getUri
public String getUri()
Get the Spotify URI of a playlist.- Returns:
- Spotify playlist URI.
-
builder
public Playlist.Builder 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.- Returns:
- A builder object.
-
-