The notebook has a function: “get_featured_playlists”.
Lets say I call this function with offset 40 and limit 20.
next_playlists_response = get_featured_playlists(url=URL_FEATURE_PLAYLISTS, access_token=token.get(‘access_token’), offset=40, limit=20)
The response should give record from 40-60. And the next url in the response should have offset set to 60. However the offset is set to 20
However the href is still showing 0 offset:
next_playlists_response.get(‘playlists’).get(‘href’)
‘https://api.spotify.com/v1/browse/featured-playlists?offset=0&limit=20’
And the next shows as 20 offset
next_playlists_response.get(‘playlists’).get(‘next’)
‘https://api.spotify.com/v1/browse/featured-playlists?offset=20&limit=20’
I printed the url to which I made the first get and it had the offset 40, so my assumption is that it fetched records 40-60.
|
next_playlists_response = get_featured_playlists(url=URL_FEATURE_PLAYLISTS, access_token=token.get(‘access_token’), offset=40, limit=20)
What am I missing?