Playlists class
Endpoint of playlists
- Inheritance
-
- Object
- EndpointBase
- EndpointPaging
- Playlists
Constructors
- Playlists(SpotifyApiBase api)
Properties
-
featured
→ Pages<
PlaylistSimple> -
Returns the featuerd playlists
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
me
→ Pages<
PlaylistSimple> -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addTrack(
String trackUri, String playlistId, {int position = -1}) → Future< void> -
Adds a track with
trackUri
(i.e spotify:track:4iV5W9uYEdYUVa79Axb7Rh) to a playlist withplaylistId
-
addTracks(
List< String> uris, String playlistId) → Future<void> -
Adds a collection of
uris
(i.e each list item in the format of "spotify:track:4iV5W9uYEdYUVa79Axb7Rh") to a playlist withplaylistId
-
clear(
String playlistId) → Future< String> -
Clears all items of
playlistId
. -
createPlaylist(
String userId, String playlistName, {bool? public, bool? collaborative, String? description}) → Future< Playlist> -
userId
- the Spotify user ID -
followedBy(
String playlistId, List< String> userIds) → Future<List< bool> > -
check if a playlist is followed by provided users
playlistId
- the playlist IDuserIds
- the ids of the users The output List of boolean maps to the order of provided userIds list -
followedByUsers(
String playlistId, List< String> userIds) → Future<Map< String, bool> > -
check if a playlist is followed by provided users
playlistId
- the playlist IDuserIds
- the ids of the users -
followPlaylist(
String playlistId, {bool public = true}) → Future< void> -
playlistId
- the playlist ID -
get(
String playlistId) → Future< Playlist> -
getByCategoryId(
String categoryId, {Market? country, String? locale}) → Pages< PlaylistSimple> -
country
- a country: an ISO 3166-1 alpha-2 country code. Provide this parameter to ensure that the category exists for a particular country. -
getTracksByPlaylistId(
dynamic playlistId) → Pages< Track> -
Returns
track
s from a given spotifyplaylistId
-
getUsersPlaylists(
String userId, [int limit = defaultLimit, int offset = 0]) → Pages< PlaylistSimple> -
Returns a playlist of a user with
userId
-
images(
String playlistId) → Future< Iterable< Image> > -
Returns the cover images of
playlistId
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removePlaylist(
String playlistId) → Future< void> -
Removes a playlist with
playlistId
-
removeTrack(
String trackUri, String playlistId, [List< int> ? positions]) → Future<void> -
Removes a track with
trackUri
in the playlist withplaylistId
-
removeTracks(
List< String> trackUris, String playlistId) → Future<void> -
Removes multiple tracks from a playlist wish
playlistId
trackUris
- the Spotify track uris (i.e each list item in the format of "spotify:track:4iV5W9uYEdYUVa79Axb7Rh") -
reorder(
String playlistId, {required int rangeStart, required int insertBefore, int rangeLength = 1, String? snapshotId}) → Future< String> -
Reorders items in a playlist with
playlistId
and its optionalsnapshotId
against which you want to make the changes. -
replace(
String playlistId, List< String> uris) → Future<String> -
Replaces items (tracks, episodes etc.) in a playlist with
playlistId
-
toString(
) → String -
A string representation of this object.
inherited
-
unfollowPlaylist(
String playlistId) → Future< void> - unfollow a certain private/public playlist
-
updatePlaylist(
String playlistId, String playlistName, {bool? public, bool? collaborative, String? description}) → Future< void> -
playlistId
- the ID of the playlist to update -
updatePlaylistImage(
String playlistId, String imageData) → Future< void> -
playlistId
- the ID of the playlist to update
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited