public class WildFyre extends Object
| Constructor and Description |
|---|
WildFyre() |
| Modifier and Type | Method and Description |
|---|---|
static LoggedUser |
connect(String token)
Connects to the server with the specified token.
|
static LoggedUser |
connect(String username,
String password)
Connects to the server with the specified user.
|
static void |
disconnect()
Disconnects the API from the currently-logged-in user.
|
static boolean |
isConnected()
Is the user connected?
|
public static LoggedUser connect(String username, String password) throws net.wildfyre.http.Request.CantConnectException, InvalidCredentialsException
username - the user's usernamepassword - the user's passwordUsers.me().net.wildfyre.http.Request.CantConnectExceptionInvalidCredentialsExceptionpublic static LoggedUser connect(String token) throws net.wildfyre.http.Request.CantConnectException
token - the tokenUsers.me().net.wildfyre.http.Request.CantConnectExceptionpublic static void disconnect()
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.