There seems to be bug in the graded assignment

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?

I see the request_url is not being used to make the call which appends the offset and limit. Its using default url everytime.

However the documentation confused me. I was trying it with offset 90 and limit and expecting next to be none.

The comment "You can see that the value of the next field is None, indicating that you reached the last page. On the other hand, you can see that previous contains the URL to request the data from the previous page, so you can even go backward if required. will not be valid unless function is fixe to use the correct url with offset and limit.

The other problem, I face is the environment stay up for smaller windows and number of changes to do is bigger. I had to recreate the environment multiple times. It should accept the changes for grading, atleast till what is done or may be break the excercises to smaller units