Skip to content

Commit

Permalink
Merge branch 'master' into recommendations-album
Browse files Browse the repository at this point in the history
  • Loading branch information
rinukkusu authored Nov 29, 2023
2 parents 30e0c93 + ca66bd1 commit e9ffb4d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/src/endpoints/playlists.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ class Playlists extends EndpointPaging {
'v1/users/$userId/playlists', (json) => PlaylistSimple.fromJson(json));
}

/// [playlistId] - the Spotify playlist ID
/// Returns `track`s from a given spotify [playlistId]
Pages<Track> getTracksByPlaylistId(playlistId) {
return _getPages('v1/playlists/$playlistId/tracks',
// restricting the return items to `track`
final query = _buildQuery({'additional_types': 'track'});
return _getPages('v1/playlists/$playlistId/tracks$query',
(json) => Track.fromJson(json['track']));
}

Expand Down

0 comments on commit e9ffb4d

Please sign in to comment.