Closed jpenninkhof closed 4 years ago
The Opt
variants all support the limit and offset fields which allow you to retrieve whichever page you're looking for.
I agree it's possible to do, but I find it way too cumbersome and think a lot of users will do want to do that, resulting in a lot of people writing having to write similar code for getting paged results back, that's why I added the helpers in my PR #79 without breaking the current API
Other suggestions on how to make it easier to retrieve results from multiple pages are welcome ofc. I'll see if I can free up some time to work on it.
btw, duplicate of #75?
The 'Opt' version will work for me. Must have overlooked it. Thanks!
I added a more convenient way to move through the pages. You can check out the example here: https://github.com/zmb3/spotify/blob/master/examples/paging/page.go
It seems that e.g. getPlaylist doesn't support the paging features of the Spotify API. As Spotify limits output per page to 100, this means that the wrapper will only retrieve the first 100 items of a playlist or album. The following pages are inaccessibly through the wrapper.