getPlaylistTracks

abstract suspend fun getPlaylistTracks(id: String, market: String? = null, fields: List<String>? = null, additionalTypes: List<String> = listOf("track"), limit: Int = 20, offset: Int = 0): SpotifyApiResponse<PlaylistTracks, ErrorBody>(source)

Get playlist tracks API returns all the tracks for a particular playlist. This is a paginated API.

offset is the page you are requesting for. Initially it will be 0.

You will have to increment it for subsequent pages.

You can know if there are more pages from PlaylistTracks.isNext.

See the Spotify Doc.

Return

PlaylistTracks when success and ErrorBody when error.

Parameters

id
market
fields
limit
offset