Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrapper does not paginate #7

Closed
SuhaybY opened this issue Jan 9, 2021 · 0 comments · Fixed by #8
Closed

Wrapper does not paginate #7

SuhaybY opened this issue Jan 9, 2021 · 0 comments · Fixed by #8
Labels
bug Something isn't working

Comments

@SuhaybY
Copy link
Collaborator

SuhaybY commented Jan 9, 2021

When searching for 'Drake', the wrapper does not allow a user to continue searching if he has not found his result yet.

It seems that Spotify is using offset pagination as indicated by the href and next keys in the result object:

{
  tracks: {
    href: 'https://api.spotify.com/v1/search?query=drake&type=track&offset=0&limit=20',
    items: [
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object]
    ],
    limit: 20,
    next: 'https://api.spotify.com/v1/search?query=drake&type=track&offset=20&limit=20',
    offset: 0,
    previous: null,
    total: 26505
  }
}

The wrapper must have a method to continue the search by using the result object's next link.

@SuhaybY SuhaybY added the bug Something isn't working label Jan 9, 2021
KrishnaSolo added a commit that referenced this issue Jan 11, 2021
-required to allow reviewer to test branch locally-
SuhaybY added a commit that referenced this issue Jan 12, 2021
…hing

#7 - Added option to allow searching with offset and set limit of items re…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant