Skip to content
This repository was archived by the owner on Jul 4, 2020. It is now read-only.
This repository was archived by the owner on Jul 4, 2020. It is now read-only.

Pagination results (value for total) on artist search a little peculiar #201

@dnblankedelman

Description

@dnblankedelman

Let me demonstrate using curl:

First, with an offset of 0:
$ curl -s -X GET "https://api.spotify.com/v1/search?q=chloe&type=artist&limit=10&offset=0" -H "Accept: application/json"|jq '.artists|[.total]'

[
  341
]

Then with an offset of 10:
$ curl -s -X GET "https://api.spotify.com/v1/search?q=chloe&type=artist&limit=10&offset=10" -H "Accept: application/json"|jq '.artists|[.total]'

[
  328
]

Now let's try 20:
$ curl -s -X GET "https://api.spotify.com/v1/search?q=chloe&type=artist&limit=10&offset=20" -H "Accept: application/json"|jq '.artists|[.total]'

[
  331
]

And just for fun, an offset of 330:
`$ curl -s -X GET "https://api.spotify.com/v1/search?q=chloe&type=artist&limit=10&offset=330" -H "Accept: application/json"|jq '.artists|[.total]'``

[
  331
]

So I'm having a hard time understanding the behavior. Is this a bug, or do I not quite get how this value is supposed to work? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions