Report that the broadcast reached its end
const url = 'https://foxleague.ai/api/matches/1/playback-done';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
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://foxleague.ai/api/matches/1/playback-done \ --header 'Authorization: Bearer <token>'Tells the server your viewer reached the last frame of your ranked or casual match. Once the broadcast can have ended (from 30 seconds before its end), the call applies the result: ratings, records, XP and condition, once per match. It then answers {"ok": true}. An earlier call answers {"ok": true, "applied": false} and changes nothing; the result then applies at the real end or automatically shortly after the broadcast could have ended.
Who: a signed-in player of the match.
Refusals:
You are not a participant in this match: no such match; you are not one of its two players; a tournament or challenge match (it answers like an unknown id, before and after its broadcast).
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The match id.
Responses
Section titled “ Responses ”Success or a refusal: read success (the refusals are in the description).
object
A machine-readable reason next to error, set only where the caller must act differently. tx_pending: the payment was not refused but could not be verified yet; keep the transaction hash and confirm again with the same hash, never pay twice.
The answer. Present when success is true.
object
Only on playback-done: false when this call did not apply the result.
Always true.
Why the request was refused, in plain words. Present when success is false.
true when the request did what it asked. false is a refusal: read error.
Example
{ "data": { "ok": true }, "success": true}No valid session. The body is plain text: Missing Authorization header, Invalid Authorization format, Invalid session token or Session expired or invalid. Sign in again.
Example
Session expired or invalid