-
Notifications
You must be signed in to change notification settings - Fork 23
API Specification
WIP all contents of this page are subject to change.
Current API version: v1
(all current endpoints will of the form mac/<endpoint>/v1
)
Do:
- Remember best-practices when naming API endpoints.
- Remember JSON conventions
Endpoint URL: mac/game/v1
Payload:
{}
No payload required. This endpoint should be hit every time the player joins a new lobby/game. To update a lobby, use
mac/user/v#
instead.
Response:
"server": {
"players": [
"76561198210264393": {
"isSelf": false,
"name": "x",
"steamInfo": {
"accountName": "x",
"pfp": "x",
"steamID": "x",
"vacBans": "x",
//...Any Other info you can find
},
"gameInfo": {
"team": "RED"
"ping": 64,
"kills": 0,
"deaths": 0,
//...
},
"localVerdict": "Cheater",
"databaseVerdict": "Suspicious",
},
{
//....
}
],
"map": "X",
"ip": "X",
"maxPlayers": 32,
"players": 17,
"gamemode": {
"matchmaking": false,
"type": "Arena",
"vanilla": false
}
}
Response contains server data, game details such as map, IP and gamemode, and a list of every player in the game (including self)
Endpoint URL: mac/user/v1
Payload:
{
"steamID64": ["xyz", "abc"],
"name": ["foo", "bar"]
}
The payload shall consist of a list of
steamID64
values OR a list of in-game names of players to fetch. Either may be null or the empty list.
Response:
{
"players": [
"abc": {
"isSelf": false,
"name": "x",
"steamInfo": {
"accountName": "x",
"pfp": "x",
"steamID": "x",
"vacBans": "x",
//...Any Other info you can find
},
"gameInfo": {
"team": "RED"
"ping": 64,
"kills": 0,
"deaths": 0,
//...
},
"localVerdict": "Cheater",
"databaseVerdict": "Suspicious",
},
{
"isSelf": false,
"name": "foo",
//....
}
],
"errors": {
"xyz": "Player not found in game.",
"bar": "Player not found in game."
},
}
The response shall contain a
players
object for each player that was both provided in the payload, and found in the game. And anerrors
object for each player that the back-end could not return aplayers
object for
Payload:
{
"<steamID64>": {
"localVerdict": "abc"
}
}
The payload shall contain a key-object pair where the key is the steamID64 of a desired user, and the object contains a single element, a key-value pair of
"verdict": < verdict string >
. This updates the back-end entry for the verdict of that player (defined by the steamID64).
Response:
{
"errors": {}
}
The response shall contain an errors object that would detail any errors encountered whilst trying to update the specified players stored data.