Package com.jcabi.github
Class Limit.Smart
- java.lang.Object
 - 
- com.jcabi.github.Limit.Smart
 
 
- 
- All Implemented Interfaces:
 JsonReadable,Limit
- Enclosing interface:
 - Limit
 
@Immutable @Loggable(1) public static final class Limit.Smart extends Object implements Limit
Smart limits with extra features. 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from interface com.jcabi.github.Limit
Limit.Smart, Limit.Throttled 
 - 
 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Githubgithub()Github we're in.javax.json.JsonObjectjson()Describe it in a JSON object.intlimit()Limit of number of requests.intremaining()Remaining number of requests.Datereset()When will the limit be reset. 
 - 
 
- 
- 
Constructor Detail
- 
Smart
public Smart(Limit limit)
Public ctor.- Parameters:
 limit- Limit
 
 - 
 
- 
Method Detail
- 
limit
public int limit() throws IOExceptionLimit of number of requests.- Returns:
 - Number of requests you can make in total
 - Throws:
 IOException- If it fails
 
- 
remaining
public int remaining() throws IOExceptionRemaining number of requests.- Returns:
 - Number of requests you can still make
 - Throws:
 IOException- If it fails
 
- 
reset
public Date reset() throws IOException
When will the limit be reset.- Returns:
 - Date when this will happen
 - Throws:
 IOException- If it fails
 
- 
json
public javax.json.JsonObject json() throws IOExceptionDescription copied from interface:JsonReadableDescribe it in a JSON object.- Specified by:
 jsonin interfaceJsonReadable- Returns:
 - JSON object
 - Throws:
 IOException- If there is any I/O problem
 
 - 
 
 -