twitter4j
Interface RateLimitStatus

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
RateLimitStatusJSONImpl

public interface RateLimitStatus
extends java.io.Serializable

A data interface representing Twitter REST API's rate limit status

Author:
Yusuke Yamamoto - yusuke at mac.com
See Also:
Rate Limiting | dev.twitter.com

Method Summary
 int getHourlyLimit()
          Returns the current limit in effect
This value is identical to the "X-RateLimit-Limit" response header.
 int getRemainingHits()
          Returns the remaining number of API requests available.
This value is identical to the "X-RateLimit-Remaining" response header.
 java.util.Date getResetTime()
          Returns the time the current rate limiting period ends.
This value is a java.util.Date-typed variation of the "X-RateLimit-Reset" response header.
 int getResetTimeInSeconds()
          Returns the seconds the current rate limiting period ends.
This should be a same as getResetTime().getTime()/1000.
 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.
 

Method Detail

getRemainingHits

int getRemainingHits()
Returns the remaining number of API requests available.
This value is identical to the "X-RateLimit-Remaining" response header.

Returns:
the remaining number of API requests available

getHourlyLimit

int getHourlyLimit()
Returns the current limit in effect
This value is identical to the "X-RateLimit-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

getResetTime

java.util.Date getResetTime()
Returns the time the current rate limiting period ends.
This value is a java.util.Date-typed variation of the "X-RateLimit-Reset" response header.

Returns:
the time the current rate limiting period ends
Since:
Twitter4J 2.0.9