List of usage examples for twitter4j Twitter getBlocksList
PagableResponseList<User> getBlocksList(long cursor) throws TwitterException;
From source file:de.vanita5.twittnuker.loader.support.UserBlocksLoader.java
License:Open Source License
@Override protected final PagableResponseList<User> getCursoredUsers(final Twitter twitter, final CursorPaging paging) throws TwitterException { if (twitter == null) return null; return twitter.getBlocksList(paging); }
From source file:org.getlantern.firetweet.loader.support.UserBlocksLoader.java
License:Open Source License
@Override protected final PageableResponseList<User> getCursoredUsers(final Twitter twitter, final CursorPaging paging) throws TwitterException { if (twitter == null) return null; return twitter.getBlocksList(paging); }
From source file:twitter4j.examples.block.GetBlockingUsers.java
License:Apache License
/** * Usage: java twitter4j.examples.block.GetBlockingUsers * * @param args message//ww w. ja v a2s . c o m */ public static void main(String[] args) { try { Twitter twitter = new TwitterFactory().getInstance(); int page = 1; List<User> users; do { users = twitter.getBlocksList(page); for (User user : users) { System.out.println("@" + user.getScreenName()); } page++; // this code ends up in an infinite loop due to the issue 1988 // http://code.google.com/p/twitter-api/issues/detail?id=1988 } while (users.size() > 0 && page <= 10); System.out.println("done."); System.exit(0); } catch (TwitterException te) { te.printStackTrace(); System.out.println("Failed to get blocking users: " + te.getMessage()); System.exit(-1); } }