I am a but puzzled about the lastfm API, more exactly about the PaginatedResult
I read all users from a group in a PaginatedResult:
PaginatedResult<de.umass.lastfm.User> users = Group.getMembers("Classic Rock", key);
Then I tried two methods to display all the users. There should be about 25000, but I only get about 25. Only first page? How could I get all the results?
// for (int i = 0; i < users.getTotalPages();i++){
for (User thisuser: users.getPageResults()){
//for each user
System.out.print(thisuser.getName() + " - age: " + thisuser.getAge() + " - country: " + thisuser.getCountry() + " - "+ thisuser.getGender() + " - is: " + thisuser.getId() + " - playcount: " + thisuser.getPlaycount() + " - num playlists: " + thisuser.getNumPlaylists() + "\n");
}
// }
for (User thisuser: users){
//for each user
System.out.print(thisuser.getName() + " - age: " + thisuser.getAge() + " - country: " + thisuser.getCountry() + " - "+ thisuser.getGender() + " - is: " + thisuser.getId() + " - playcount: " + thisuser.getPlaycount() + " - num playlists: " + thisuser.getNumPlaylists() + "\n");
}