示例#1
0
 @Override
 protected void access() throws TwitterException {
   ResponseList<Status> timeline =
       twitter.getHomeTimeline(
           new Paging()
               .count(configProperties.getInteger(ClientConfiguration.PROPERTY_PAGING_TIMELINE)));
   timeline.forEach(listeners::onStatus);
 }
示例#2
0
  /**
   * インスタンスを生成する
   *
   * @param messageBus スケジューラー
   * @param accountId アカウントID (long)
   */
  public TimelineChannel(MessageBus messageBus, String accountId) {
    this.messageBus = messageBus;
    this.accountId = accountId;
    listeners = messageBus.getListeners(accountId, "statuses/timeline");

    configuration = ClientConfiguration.getInstance();
    configProperties = configuration.getConfigProperties();
    intervalOfTimeline =
        configProperties.getInteger(ClientConfiguration.PROPERTY_INTERVAL_TIMELINE);
  }