Package twitter4j.v1

Interface RateLimitStatus

All Superinterfaces:
Serializable

public interface RateLimitStatus extends Serializable
A data interface representing Twitter REST API's rate limit status
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the current limit in effect
    This value is identical to the "X-Rate-Limit-Limit" response header.
    int
    Returns the remaining number of API requests available.
    This value is identical to the "X-Rate-Limit-Remaining" response header.
    int
    Returns the seconds the current rate limiting period ends.
    This should be a same as getResetTime().getTime()/1000.
    int
    Returns the amount of seconds until the current rate limiting period ends.
    This is a value provided/calculated only by Twitter4J for handiness and not a part of the twitter API spec.
  • Method Details

    • getRemaining

      int getRemaining()
      Returns the remaining number of API requests available.
      This value is identical to the "X-Rate-Limit-Remaining" response header.
      Returns:
      the remaining number of API requests available
      Since:
      Twitter4J 3.0.0
    • getLimit

      int getLimit()
      Returns the current limit in effect
      This value is identical to the "X-Rate-Limit-Limit" response header.
      Returns:
      the current limit in effect
    • getResetTimeInSeconds

      int getResetTimeInSeconds()
      Returns the seconds the current rate limiting period ends.
      This should be a same as getResetTime().getTime()/1000.
      Returns:
      the seconds the current rate limiting period ends
      Since:
      Twitter4J 2.0.9
    • getSecondsUntilReset

      int getSecondsUntilReset()
      Returns the amount of seconds until the current rate limiting period ends.
      This is a value provided/calculated only by Twitter4J for handiness and not a part of the twitter API spec.
      Returns:
      the amount of seconds until next rate limiting period
      Since:
      Twitter4J 2.1.0