You use this REST API with 3 different keys. You should have an appid, a write key and an admin key.
Important notes:
To request some keys for your game, contact bytten.games@gmail.com.
Requests a list of scores.
Parameter | Type | Description |
---|---|---|
filter multiple |
str | fieldName,value |
order |
str | Either 'asc' or 'desc' |
sort |
str | fieldName |
count |
int | How many results to return. Defaults to 20 |
The response is a JSON array of objects for each score matching the filter:
[ { 'id': 57, <-- id of the score record (used in admin ops) 'submission': ['2014-05-04 16:45:26.072', 1399218326072], <-- the date this score was submitted 'win': true, 'board': 'justthedungeons', 'mods': '', 'cheats': '', The following fields were defined via admin operations in this example: 'completion': ['2014-05-04 16:45:26.072', 1399218326072], 'duration': ['01:32:53.123', 5573123], 'seed': '-9253512911549523', 'coins': 576, 'artifacts': 8, 'playerName': 'Tom', 'playerId': '2345678923282359', 'image': 'http://i.imgur.com/doesntexist' } ]
Submits/adds a score to a leaderboard.
Parameter | Type | Description |
---|---|---|
writeKey mandatory |
str | Your private write key |
win mandatory |
bool | Whether the player won or not |
board mandatory |
str | The ID of the board to add to |
mods |
str | What mods are installed on the game. (This scheme allows scores from modded games to be filtered out, but relies on mod writers obeying the rules.) |
cheats |
str | What cheats were active while playing. (If your game has cheats, it can be useful to submit this value with the score so that it can be filtered out.) |
(fieldName)
multiple |
(fieldType) | Submit values for your custom fields |
Creates a new field that can store information in score records and be used to filter and sort results.
Parameter | Type | Description |
---|---|---|
adminKey mandatory |
str | Your super-secret admin key |
name mandatory |
str | The name of your new field |
type mandatory |
str | The type of your field. See below for supported types |
Supported types:
['01:32:53.123', 5573123]
['2014-05-04 16:45:26.072783', 1399218326072]
Hides a field and its values from list results. The field and all the values originally present before deletion can be restored by using add-field with the same name and type.
Parameter | Type | Description |
---|---|---|
adminKey mandatory |
str | Your super-secret admin key |
name mandatory |
str | The name of the field to delete |
Hides a score from list results. The score and all its values can be restored by using restore-score if you still have the score id.
Parameter | Type | Description |
---|---|---|
adminKey mandatory |
str | Your super-secret admin key |
id mandatory |
str | The id of the score to delete |
Brings back a score that was deleted with del-score.
Parameter | Type | Description |
---|---|---|
adminKey mandatory |
str | Your super-secret admin key |
id mandatory |
str | The id of the deleted score to restore |
Dumps all deleted and undeleted scores in the database for your app in JSON format, along with all deleted and undeleted fields. You can use this to perform a backup. The load on the server is higher than for other queries, so please use it sparingly.
Parameter | Type | Description |
---|---|---|
adminKey mandatory |
str | Your super-secret admin key |