Exemplo n.º 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);
 }
Exemplo n.º 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);
  }