|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecttwitter4j.RateLimitStatusJSONImpl
final class RateLimitStatusJSONImpl
A data class representing Twitter REST API's rate limit status
| Field Summary | |
|---|---|
private int |
hourlyLimit
|
private int |
remainingHits
|
private java.util.Date |
resetTime
|
private int |
resetTimeInSeconds
|
private int |
secondsUntilReset
|
private static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
private |
RateLimitStatusJSONImpl(int hourlyLimit,
int remainingHits,
int resetTimeInSeconds,
java.util.Date resetTime)
|
| Method Summary | |
|---|---|
(package private) static RateLimitStatus |
createFromJSONResponse(HttpResponse res)
|
(package private) static RateLimitStatus |
createFromResponseHeader(HttpResponse res)
|
boolean |
equals(java.lang.Object o)
|
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. |
int |
hashCode()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private int remainingHits
private int hourlyLimit
private int resetTimeInSeconds
private int secondsUntilReset
private java.util.Date resetTime
private static final long serialVersionUID
| Constructor Detail |
|---|
private RateLimitStatusJSONImpl(int hourlyLimit,
int remainingHits,
int resetTimeInSeconds,
java.util.Date resetTime)
| Method Detail |
|---|
static RateLimitStatus createFromJSONResponse(HttpResponse res)
throws TwitterException
TwitterExceptionstatic RateLimitStatus createFromResponseHeader(HttpResponse res)
public int getRemainingHits()
getRemainingHits in interface RateLimitStatuspublic int getHourlyLimit()
getHourlyLimit in interface RateLimitStatuspublic int getResetTimeInSeconds()
getResetTimeInSeconds in interface RateLimitStatuspublic int getSecondsUntilReset()
getSecondsUntilReset in interface RateLimitStatuspublic java.util.Date getResetTime()
getResetTime in interface RateLimitStatuspublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||