Tournament standings
const url = 'https://foxleague.ai/api/tournaments/1/standings';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://foxleague.ai/api/tournaments/1/standingsReturns the group, league or Swiss table built from finished matches only. Rows come by group, then by rank: points (3 for a win, 1 for a draw), then among teams level on points a table of their matches against each other (points, goal difference, goals scored), then overall goal difference, goals scored and rating. A match neither team could play counts as a loss for both and costs each team one point. A knockout tournament or an unknown id answers an empty list.
Who: anyone.
Refusals: none specific to this route.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The tournament 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.
One team’s row in a group, league or Swiss table.
object
Matches drawn.
Goals conceded.
Goals scored.
A, B and so on for a group, League for a round robin; null for a Swiss tournament.
Id of the row.
Matches lost.
Seat id of the team: the id of its row in participants.
Finished matches played.
Points: 3 for a win, 1 for a draw, minus 1 for each match neither team could play.
The tournament id.
Matches won.
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": [ { "drawn": 1, "goals_against": 2, "goals_for": 7, "group_name": "League", "id": 8801, "lost": 0, "participant_id": 2150, "played": 3, "points": 7, "tournament_id": 377, "won": 2 }, { "drawn": 0, "goals_against": 4, "goals_for": 5, "group_name": "League", "id": 8803, "lost": 1, "participant_id": 2152, "played": 3, "points": 6, "tournament_id": 377, "won": 2 }, { "drawn": 1, "goals_against": 6, "goals_for": 2, "group_name": "League", "id": 8802, "lost": 2, "participant_id": 2151, "played": 3, "points": 1, "tournament_id": 377, "won": 0 } ], "success": true}