use of net.dean.jraw.paginators.ImportantUserPaginator in project Slide by ccrama.
the class UserSubscriptions method doFriendsOf.
private static List<String> doFriendsOf() {
if (friends == null || friends.isEmpty()) {
friends = new CaseInsensitiveArrayList();
CaseInsensitiveArrayList finished = new CaseInsensitiveArrayList();
ImportantUserPaginator pag = new ImportantUserPaginator(Authentication.reddit, "friends");
pag.setLimit(100);
try {
while (pag.hasNext()) {
for (UserRecord s : pag.next()) {
finished.add(s.getFullName());
}
}
friends = (finished);
return friends;
} catch (Exception e) {
// failed;
e.printStackTrace();
}
}
return friends;
}
Aggregations