Leaderboard of teams by ELO
const url = 'https://foxleague.ai/api/leaderboard';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/leaderboardAnswers one page of teams ranked by ELO, highest first. Teams with no player cards come after all the others. Every row is a public profile. With window, the win, draw and loss counts cover only that period; ELO and league are always lifetime. total counts every team on the board, whatever the window.
places holds the place on the whole board of each row of users, in the same order. With search, only the teams that match are listed, total counts the matches and places still holds each match’s place on the whole board. With me, the answer also carries me: that wallet’s place and row, whatever page or search is asked for; me is null when the wallet has no team.
Who: anyone.
Refusals:
Invalid window '<window>'. Use one of: 7d, 30d, 90d, all:windowis not one of the four values.Invalid <parameter>: a NUL byte is not a character.:searchormeheld a NUL byte.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Rows per page, 1 to 500. Default 25; a value below 1 reads as 1.
Rows to skip from the top. Default 0; a negative value reads as 0.
Period of the win, draw and loss counts: 7d, 30d, 90d or all (the default). ELO and league are always lifetime.
Only teams whose team name, username or wallet address contains this text. Upper and lower case are the same.
A wallet address. The answer then carries me: that team’s place on the whole board and its row.
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
Rows per page used for this answer.
One team’s place on the leaderboard and its row.
object
The team’s place on the whole leaderboard; 1 is first.
The team’s row.
object
The title shown on the profile, such as Tournament Champion; null when none.
The team badge (see Team.badge); null without a team.
The name of the player’s active developer team; null when none.
ELO rating, lifetime.
User id.
true when the player has an active developer team.
Bronze, Silver, Gold, Platinum or Diamond.
Matches drawn. On the leaderboard with a window, only within it.
Matches lost. On the leaderboard with a window, only within it.
Matches won. On the leaderboard with a window, only within it.
Player cards the wallet holds. 0 means the team cannot play.
The team name; null for a wallet without a team.
Tournaments won.
Display name; null when none.
true when the team carries the verified mark.
The wallet address.
Rows skipped from the top.
The place on the whole leaderboard of each row of users, in the same order; 1 is first.
Teams on the leaderboard, whatever the window. With search, the teams that match.
The rows, highest ELO first. Teams with no player cards come last.
A player’s public profile.
object
The title shown on the profile, such as Tournament Champion; null when none.
The team badge (see Team.badge); null without a team.
The name of the player’s active developer team; null when none.
ELO rating, lifetime.
User id.
true when the player has an active developer team.
Bronze, Silver, Gold, Platinum or Diamond.
Matches drawn. On the leaderboard with a window, only within it.
Matches lost. On the leaderboard with a window, only within it.
Matches won. On the leaderboard with a window, only within it.
Player cards the wallet holds. 0 means the team cannot play.
The team name; null for a wallet without a team.
Tournaments won.
Display name; null when none.
true when the team carries the verified mark.
The wallet address.
The period of the win, draw and loss counts: 7d, 30d, 90d or all.
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": { "limit": 25, "me": null, "offset": 0, "places": [ 1, 2 ], "total": 1874, "users": [ { "active_title": "Tournament Champion", "badge": "ipfs://bafybeihkoviema7g3gxyt6la7vd5ho32ictqbilu3wnlo3rs7ewhnp7lly", "developer_team_name": null, "elo_rating": 1734, "id": 412, "is_developer": false, "league": "Gold", "matches_drawn": 12, "matches_lost": 31, "matches_won": 58, "player_count": 24, "team_name": "Fox Rovers", "tournament_wins": 2, "username": null, "verified": false, "wallet_address": "erd15feryxhrdz9m6y09mr8wrerwzgj6f8ntxvhxyrdlm5aahn0t09nl4ujy86" }, { "active_title": null, "badge": "ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi", "developer_team_name": null, "elo_rating": 1688, "id": 1093, "is_developer": false, "league": "Gold", "matches_drawn": 9, "matches_lost": 29, "matches_won": 44, "player_count": 18, "team_name": "Red Kites", "tournament_wins": 0, "username": null, "verified": true, "wallet_address": "erd124fl6zy54klay937yrnujckpak28lrdjg0eel92ue3gm36kcwf9tfwwqlt" } ], "window": "all" }, "success": true}