final Paging paging = new Paging(); paging.count(200); // max statuses you can request for this call List<Status> statuses = twitter.getUserTimeline(userId, paging);
/** * Returns the most recent statuses posted in the last 24 hours from the specified user id. * <br>This method calls http://twitter.com/statuses/user_timeline * @param id String * @param count int * @param listener a listener object that receives the response * @see <a href="http://apiwiki.twitter.com/Twitter-REST-API-Method:-statuses-user_timeline">Twitter API Wiki / Twitter REST API Method: statuses user_timeline</a> * @deprecated Use getUserTimelineAsync(String id, Paging paging, TwitterListener listener) instead */ public void getUserTimelineAsync(String id, int count, TwitterListener listener) { getUserTimelineAsync(id, new Paging().count(count), listener); }
/** * Returns the most recent statuses posted in the last 24 hours from the authenticating user. * <br>This method calls http://twitter.com/statuses/user_timeline * * @param count int * @param sinceId Returns only statuses with an ID greater than (that is, more recent than) the specified ID * @param listener a listener object that receives the response * @see <a href="http://apiwiki.twitter.com/Twitter-REST-API-Method:-statuses-user_timeline">Twitter API Wiki / Twitter REST API Method: statuses user_timeline</a> * @since Twitter4J 2.0.0 * @deprecated Use getUserTimelineAsync(Paging paging, TwitterListener listener) instead */ public void getUserTimelineAsync(int count, long sinceId, TwitterListener listener) { getUserTimelineAsync(new Paging(sinceId).count(count), listener); }
/** * Returns the most recent statuses posted in the last 24 hours from the authenticating user. * <br>This method calls http://twitter.com/statuses/user_timeline * * @param count specifies the number of statuses to retrieve. May not be greater than 200 for performance purposes * @param sinceId returns only statuses with an ID greater than (that is, more recent than) the specified ID. * @return the 20 most recent statuses posted in the last 24 hours from the user * @throws TwitterException when Twitter service or network is unavailable * @see <a href="http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses-friends_timeline">Twitter API Wiki / Twitter REST API Method: statuses friends_timeline</a> * @since Twitter4J 2.0.0 * @deprecated Use getUserTimeline(String id, Paging paging) instead */ public List<Status> getUserTimeline(int count, long sinceId) throws TwitterException { return getUserTimeline(new Paging(sinceId).count(count)); }
/** * Returns the most recent statuses posted in the last 24 hours from the specified userid. * <br>This method calls http://twitter.com/statuses/user_timeline * * @param id specifies the ID or screen name of the user for whom to return the user_timeline * @param count specifies the number of statuses to retrieve. May not be greater than 200 for performance purposes * @param sinceId Returns only statuses with an ID greater than (that is, more recent than) the specified ID * @return list of the user Timeline * @throws TwitterException when Twitter service or network is unavailable * @since Twitter4J 1.1.8 * @see <a href="http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses-friends_timeline">Twitter API Wiki / Twitter REST API Method: statuses friends_timeline</a> * @deprecated Use getUserTimeline(String id, Paging paging) instead */ public List<Status> getUserTimeline(String id, int count, long sinceId) throws TwitterException { return getUserTimeline(id, new Paging(sinceId).count(count)); }