Checks the availability of a given username.
username
- the username to be checked
available
- Boolean -true
if the username is available,false
if not
Registers a user in the database.
username
- the player's usernamepassword
- the player's password
successful
- Boolean -true
if the operation was successful and the account has been created,false
if notuuid
- String - the player's UUIDaccesstoken
- String - the access token required to perform write operations
Checks the validity of the credentials and provides a new access token if they are valid.
username
- the player's usernamepassword
- the player's password
successful
- Boolean -true
if the credentials are valid,false
otherwiseuuid
- String - the player's UUIDaccesstoken
- String - the new access token
Changes the user's access token without returning it back to prevent further actions on the account.
uuid
- user ID
successful
- Boolean - alwaystrue
Retrieves the scores for a given game mode.
mode
- the game modelimit
(optional) - the number of top scores to retrieve (default: 50)
scores
- Array - an array of scores
Sets a player's score.
uuid
- the player's UUIDaccesstoken
- the player's access tokendata
- an object with properties:mode
- game modescore
- scoredeathcount
- death count
authError
- Boolean -true
if an auth-related error occured,false
otherwiseauthErrorString
- String - present ifauthError = true
accesstoken
- String - the new access tokensuccessful
- Boolean - indicates whether the operation was successful
username
- the player's username
scores
- Array - an array of scores