public class Configuration
extends java.lang.Object
RobinhoodApi.
Many things (mostly ApiMethods)
require a Configuration to function
| Constructor and Description |
|---|
Configuration()
Construct a
Configuration with no data |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears all user data from the
Configuration. |
java.lang.String |
getAccountNumber() |
java.lang.String |
getAccountUrl()
Method returning the Account URL for the logged in user.
|
AuthorizationData |
getAuthData() |
static Configuration |
getDefault() |
static long |
getRatelimit() |
java.lang.String |
getToken()
Method which gets the saved authorization token if the user is logged in.
|
boolean |
hasToken()
Whether or not an authToken exists.
|
void |
setAccountNumber(java.lang.String accountNumber) |
void |
setAuthData(AuthorizationData authData) |
void |
setAuthToken(java.lang.String token)
Method which registers the authToken for the user into the Configuration Manager
|
static void |
setRatelimit(int newRateLimitValue)
Set a new ratelimit (in milliseconds)
|
public Configuration()
Configuration with no datapublic AuthorizationData getAuthData()
AuthorizationDatapublic void setAuthData(AuthorizationData authData)
authData - The new AuthorizationDatapublic boolean hasToken()
true if an authToken existspublic java.lang.String getToken()
NotLoggedInException - if there is no stored Token. This must be
populated by the setToken() method firstpublic void setAuthToken(java.lang.String token)
token - verified Authorization Token for the userpublic java.lang.String getAccountNumber()
NotLoggedInException - If the Configuration is
not logged inpublic void setAccountNumber(java.lang.String accountNumber)
public java.lang.String getAccountUrl()
NotLoggedInException - If the Configuration is not logged inpublic static Configuration getDefault()
public static long getRatelimit()
public static void setRatelimit(int newRateLimitValue)
newRateLimitValue - The new RateLimit in millisecondspublic void clear()
Configuration.