public class RateLimitStatusImpl extends java.lang.Object implements RateLimitStatus
| Constructor and Description |
|---|
RateLimitStatusImpl(int remaining,
int limit,
int resetTimeInSeconds) |
RateLimitStatusImpl(int remaining,
int limit,
int resetTimeInSeconds,
int costValue) |
| Modifier and Type | Method and Description |
|---|---|
int |
getLimit()
Returns the current limit in effect
This value is identical to the "X-Rate-Limit-Limit" response header. |
int |
getRemaining()
Returns the remaining number of API requests available.
This value is identical to the "X-Rate-Limit-Remaining" response header. |
int |
getRemainingHits()
Returns the remaining number of API requests available.
This value is identical to the "X-Rate-Limit-Remaining" 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. |
java.lang.String |
toString() |
public RateLimitStatusImpl(int remaining,
int limit,
int resetTimeInSeconds)
public RateLimitStatusImpl(int remaining,
int limit,
int resetTimeInSeconds,
int costValue)
public int getRemaining()
RateLimitStatusgetRemaining in interface RateLimitStatuspublic int getRemainingHits()
RateLimitStatusgetRemainingHits in interface RateLimitStatuspublic int getLimit()
RateLimitStatusgetLimit in interface RateLimitStatuspublic int getResetTimeInSeconds()
RateLimitStatusgetResetTimeInSeconds in interface RateLimitStatuspublic int getSecondsUntilReset()
RateLimitStatusgetSecondsUntilReset in interface RateLimitStatuspublic java.lang.String toString()
toString in class java.lang.Object