@Override protected ResponseList<Status> backfillLoad(final Twitter twitter, final Paging paging) throws TwitterException { return twitter.getMentionsTimeline(paging); }
@Override protected ResponseList<Status> initialLoad(final Twitter twitter) throws TwitterException { return twitter.getMentionsTimeline(); }
@Override protected List<Status> doDirect() throws TwitterException { log.trace("doDirect.getMentionsTimeline()"); return getTwitter().getMentionsTimeline(); } }
@Override public void invoke(List<TwitterListener> listeners) throws TwitterException { ResponseList<Status> statuses = twitter.getMentionsTimeline(); for (TwitterListener listener : listeners) { try { listener.gotMentions(statuses); } catch (Exception e) { logger.warn("Exception at getMentions", e); } } } });
@Override public void invoke(List<TwitterListener> listeners) throws TwitterException { ResponseList<Status> statuses = twitter.getMentionsTimeline(paging); for (TwitterListener listener : listeners) { try { listener.gotMentions(statuses); } catch (Exception e) { logger.warn("Exception at getMentions", e); } } } });
@Override protected List<Status> doPoll() throws TwitterException { Paging paging = getLastIdPaging(); log.trace("doPoll.getMentionsTimeline(sinceId={})", paging.getSinceId()); return getTwitter().getMentionsTimeline(paging); }
List<Status> statuses = twitter.getMentionsTimeline(); System.out.println("Showing @" + user.getScreenName() + "'s mentions."); for (Status status : statuses) {
/** * Returns the 20 most recent mentions (status containing @username) for the * authenticating user. <br> * This method calls http://api.twitter.com/1.1/statuses/mentions_timeline * <p/> * {@sample.xml ../../../doc/twitter-connector.xml.sample twitter:getMentions} * * @param page Specifies the page of results to retrieve. * @param count Specifies the number of tweets to try and retrieve, up to a maximum of 200. The value of count is * best thought of as a limit to the number of tweets to return because suspended or deleted content is removed * after the count has been applied. * @param sinceId Returns results with an ID greater than (that is, more recent than) the specified ID. There are * limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since * the since_id, the since_id will be forced to the oldest ID available. * @return the 20 most recent mentions ({@link Status} containing @username) for the authenticating user. * @throws TwitterException when Twitter service or network is unavailable * @see <a href="http://dev.twitter.com/doc/get/statuses/mentions">GET * statuses/mentions | dev.twitter.com</a> */ @Processor public ResponseList<Status> getMentionsTimeline(@Placement(group = "Pagination") @Default(value = "1") int page, @Placement(group = "Pagination") @Default(value = "20") int count, @Placement(group = "Pagination") @Default(value = "-1") long sinceId) throws TwitterException { return getConnectionManagement().getTwitterClient().getMentionsTimeline(getPaging(page, count, sinceId)); }