public class GHRateLimit extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
GHRateLimit.Record
A rate limit record.
|
static class |
GHRateLimit.UnknownLimitRecord
A limit record used as a placeholder when the the actual limit is not known.
|
| Modifier and Type | Field and Description |
|---|---|
int |
limit
Deprecated.
This value should never have been made public. Use
getLimit() |
int |
remaining
Deprecated.
This value should never have been made public. Use
getRemaining() |
Date |
reset
Deprecated.
This value should never have been made public. Use
getResetDate() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
GHRateLimit.Record |
getCore()
The core object provides your rate limit status for all non-search-related resources in the REST API.
|
int |
getLimit()
Gets the total number of Core API calls per hour allotted for this connection.
|
int |
getRemaining()
Gets the remaining number of Core APIs requests allowed before this connection will be throttled.
|
Date |
getResetDate()
Returns the date at which the Core API rate limit will reset.
|
long |
getResetEpochSeconds()
Gets the time in epoch seconds when the Core API rate limit will reset.
|
int |
hashCode() |
boolean |
isExpired()
Whether the rate limit reset date for this instance has passed.
|
String |
toString() |
@Deprecated public int remaining
getRemaining()@Deprecated public int limit
getLimit()@Deprecated public Date reset
getResetDate()Date.Date(long) which expects UTC epoch milliseconds, so this Date instance is meaningless as a
date. To use this field in any meaningful way, it must be converted to a long using Date.getTime()
multiplied by 1000.@Nonnull public Date getResetDate()
public int getRemaining()
public int getLimit()
public long getResetEpochSeconds()
public boolean isExpired()
@Nonnull public GHRateLimit.Record getCore()
Copyright © 2020. All rights reserved.