twitter4j.Twitter.getMentionsTimeline()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(157)

本文整理了Java中twitter4j.Twitter.getMentionsTimeline()方法的一些代码示例,展示了Twitter.getMentionsTimeline()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Twitter.getMentionsTimeline()方法的具体详情如下:
包路径:twitter4j.Twitter
类名称:Twitter
方法名:getMentionsTimeline

Twitter.getMentionsTimeline介绍

暂无

代码示例

代码示例来源:origin: Tristan971/Lyrebird

@Override
protected ResponseList<Status> backfillLoad(final Twitter twitter, final Paging paging) throws TwitterException {
  return twitter.getMentionsTimeline(paging);
}

代码示例来源:origin: Tristan971/Lyrebird

@Override
protected ResponseList<Status> initialLoad(final Twitter twitter) throws TwitterException {
  return twitter.getMentionsTimeline();
}

代码示例来源:origin: org.apache.camel/camel-twitter

@Override
  protected List<Status> doDirect() throws TwitterException {
    log.trace("doDirect.getMentionsTimeline()");
    return getTwitter().getMentionsTimeline();
  }
}

代码示例来源:origin: org.twitter4j/twitter4j-async

@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);
      }
    }
  }
});

代码示例来源:origin: org.twitter4j/twitter4j-async

@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);
      }
    }
  }
});

代码示例来源:origin: org.apache.camel/camel-twitter

@Override
protected List<Status> doPoll() throws TwitterException {
  Paging paging = getLastIdPaging();
  log.trace("doPoll.getMentionsTimeline(sinceId={})", paging.getSinceId());
  return getTwitter().getMentionsTimeline(paging);
}

代码示例来源:origin: stackoverflow.com

List<Status> statuses = twitter.getMentionsTimeline();
System.out.println("Showing @" + user.getScreenName() + "'s mentions.");
for (Status status : statuses) {

代码示例来源:origin: org.mule.modules/mule-module-twitter

/**
 * 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));
}

相关文章