public class WildFyre
extends java.lang.Object
| Constructor and Description |
|---|
WildFyre() |
| Modifier and Type | Method and Description |
|---|---|
static LoggedUser |
connect(java.lang.String token)
Connects to the server with the specified token.
|
static LoggedUser |
connect(java.lang.String username,
java.lang.String password)
Connects to the server with the specified user.
|
static void |
disconnect()
Disconnects the API from the currently-logged-in user.
|
static LoggedUser |
getMe()
Returns the logged-in user of the API, that is, the user corresponding to the saved-token.
|
static boolean |
isConnected()
Is the user connected?
|
public static LoggedUser connect(java.lang.String username, java.lang.String password) throws Request.CantConnectException
username - the user's usernamepassword - the user's passwordgetMe().Request.CantConnectExceptionpublic static LoggedUser connect(java.lang.String token) throws Request.CantConnectException
token - the tokengetMe().Request.CantConnectExceptionpublic static void disconnect()
public static LoggedUser getMe()
public static boolean isConnected()
Note that this method does not specify whether the connection is still valid, it only specifies whether
either methods connect(token) or connect(username,
password) where successful.
true if the user is registered.