|
|||||||||
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 | |
---|---|
(package private) |
RateLimitStatusJSONImpl(twitter4j.internal.http.HttpResponse res)
|
private |
RateLimitStatusJSONImpl(int hourlyLimit,
int remainingHits,
int resetTimeInSeconds,
java.util.Date resetTime)
|
(package private) |
RateLimitStatusJSONImpl(twitter4j.internal.org.json.JSONObject json)
|
Method Summary | |
---|---|
(package private) static RateLimitStatus |
createFeatureSpecificRateLimitStatusFromResponseHeader(twitter4j.internal.http.HttpResponse res)
|
(package private) static RateLimitStatus |
createFromResponseHeader(twitter4j.internal.http.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()
|
(package private) void |
init(twitter4j.internal.org.json.JSONObject json)
|
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)
RateLimitStatusJSONImpl(twitter4j.internal.http.HttpResponse res) throws TwitterException
TwitterException
RateLimitStatusJSONImpl(twitter4j.internal.org.json.JSONObject json) throws TwitterException
TwitterException
Method Detail |
---|
void init(twitter4j.internal.org.json.JSONObject json) throws TwitterException
TwitterException
static RateLimitStatus createFromResponseHeader(twitter4j.internal.http.HttpResponse res)
static RateLimitStatus createFeatureSpecificRateLimitStatusFromResponseHeader(twitter4j.internal.http.HttpResponse res)
public int getRemainingHits()
getRemainingHits
in interface RateLimitStatus
public int getHourlyLimit()
getHourlyLimit
in interface RateLimitStatus
public int getResetTimeInSeconds()
getResetTimeInSeconds
in interface RateLimitStatus
public int getSecondsUntilReset()
getSecondsUntilReset
in interface RateLimitStatus
public java.util.Date getResetTime()
getResetTime
in interface RateLimitStatus
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public 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 |