Class TwitterTimelineReader

Direct Known Subclasses:
TwitterTimelineMentionsReader, TwitterTimelineTweetsReader

public abstract class TwitterTimelineReader extends AbstractTwitterReader
Base class for the Twitter API v2 readers of a user's timeline, optionally limited by date and tweet ID range.
  • Constructor Details

    • TwitterTimelineReader

      public TwitterTimelineReader(String apiKey, String apiSecret, String accessToken, String accessTokenSecret, String username)
    • TwitterTimelineReader

      public TwitterTimelineReader(String apiKey, String apiSecret, String bearerToken, String username)
  • Method Details

    • getUsername

      public String getUsername()
    • getStartDate

      public LocalDateTime getStartDate()
      Indicates the oldest UTC timestamp search criteria.
    • setStartDate

      public TwitterTimelineReader setStartDate(LocalDateTime startDate)
      Indicates the oldest UTC timestamp search criteria.
    • getEndDate

      public LocalDateTime getEndDate()
      Indicates the newest UTC timestamp search criteria.
    • setEndDate

      public TwitterTimelineReader setEndDate(LocalDateTime endDate)
      Indicates the newest UTC timestamp search criteria.
    • getSinceId

      public String getSinceId()
      Returns the sinceId search criteria. Only Tweets greater than the sinceId will be returned. If both startDate and sinceId are set, only sinceId will be used.
    • setSinceId

      public void setSinceId(String sinceId)
      Sets the sinceId search criteria. Only Tweets greater than the sinceId will be returned. If both startDate and sinceId are set, only sinceId will be used.
    • getUntilId

      public String getUntilId()
      Returns the untilId search criteria. Only Tweets lesser than the sinceId will be returned.
    • setUntilId

      public void setUntilId(String untilId)
      Sets the untilId search criteria. Only Tweets lesser than the sinceId will be returned.
    • searchImpl

      public abstract Response searchImpl()
      Requests the next page of the user's timeline using this reader's criteria; returning null ends reading.
    • search

      protected Response search()
      Description copied from class: AbstractTwitterReader
      Requests the next page of results (see AbstractTwitterReader.getNextToken()); returning null ends reading.
      Specified by:
      search in class AbstractTwitterReader
    • addExceptionProperties

      public DataException addExceptionProperties(DataException exception)
      Description copied from class: Endpoint
      Adds this endpoint's current state to a DataException. Since this method is called whenever an exception is thrown, subclasses should override it to add their specific information.
      Overrides:
      addExceptionProperties in class AbstractTwitterReader