Search code examples
androidapideezer

Deezer API : Get user's favorite albums


I'm using Deezer's Android SDK in order to retrieve a specific user's favorite albums.

During my tests, I use my own account (I have about 250 favorite albums), but when I try to get the albums from the API, it always returns me 28 of them (and always the same).

I tried with DeezerRequest request = DeezerRequestFactory.requestCurrentUserAlbums(); method or even with http://developers.deezer.com/api/explorer?url=user/me/albums and the result is always the same.

Do you have any idea on how to fix this issue?


Solution

  • This is because the results in the API are paginated, which means you get 25 entries at a time.

    In Android, the list you get is a PaginatedList, which will also provide you with a "next" url, which you can use to get the next page (and so on)