Match Result
const url = 'https://example.com/server/v1/matches/1/result';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"played":true,"winningTeam":"example","draw":false,"players":[{"steam64":1,"won":false,"kills":0,"deaths":0,"headshotKills":0,"hits":0,"headshotHits":0,"damageDealt":0,"damageTaken":0}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/server/v1/matches/1/result \ --header 'Content-Type: application/json' \ --data '{ "played": true, "winningTeam": "example", "draw": false, "players": [ { "steam64": 1, "won": false, "kills": 0, "deaths": 0, "headshotKills": 0, "hits": 0, "headshotHits": 0, "damageDealt": 0, "damageTaken": 0 } ] }'The match’s final per-player line. This is what moves Elo, and what ends a match.
Safe to retry: a repeat is answered alreadyRecorded and changes nothing. Accepted
for a match already marked finished, since that is what happens to one whose result
was slow to arrive.
Body:
played false when nobody turned up. Scores nothing, releases the match.
winningTeam the name of the winning team, or null.
draw true when the match ended level. Elo moves on kills and deaths.
players every player on the roster, including no-shows and leavers.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”POST /matches/{matchId}/result. The match’s final per-player line.
object
False when nobody turned up: scores nothing
Every player on the roster, including no-shows and leavers
One player’s line on a match result. Everything but the id is optional.
object
Responses
Section titled “Responses”Successful Response
Validation Error
object
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}