我是一个,但疑惑的LastFM等API,更准确地对PaginatedResult
我读了所有用户在PaginatedResult一组:
PaginatedResult<de.umass.lastfm.User> users = Group.getMembers("Classic Rock", key);
然后我尝试了两种方法来显示所有用户。 应该有大约25000,但我只得到约25只第一页? 我怎么能得到所有的结果吗?
// 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");
}