public static class GHRateLimit.Record extends Object
| Constructor and Description |
|---|
Record(int limit,
int remaining,
long resetEpochSeconds)
Instantiates a new Record.
|
Record(int limit,
int remaining,
long resetEpochSeconds,
String updatedAt)
Instantiates a new Record.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
getLimit()
Gets the total number of API calls per hour allotted for this connection.
|
int |
getRemaining()
Gets the remaining number of requests allowed before this connection will be throttled.
|
Date |
getResetDate()
Returns the date at which the rate limit will reset, adjusted to local machine time if the local machine's
clock not synchronized with to the same clock as the GitHub server.
|
long |
getResetEpochSeconds()
Gets the time in epoch seconds when the rate limit will reset.
|
int |
hashCode() |
boolean |
isExpired()
Whether the rate limit reset date indicated by this instance is expired
|
String |
toString() |
public Record(int limit,
int remaining,
long resetEpochSeconds)
limit - the limitremaining - the remainingresetEpochSeconds - the reset epoch secondspublic Record(int limit,
int remaining,
long resetEpochSeconds,
@CheckForNull
String updatedAt)
limit - the limitremaining - the remainingresetEpochSeconds - the reset epoch secondsupdatedAt - the updated atpublic int getRemaining()
public int getLimit()
public long getResetEpochSeconds()
getResetDate() or implement a RateLimitChecker instead.#getResetDate()public boolean isExpired()
@Nonnull public Date getResetDate()
RateLimitChecker instead.Copyright © 2020. All rights reserved.