A player's public profile
const url = 'https://foxleague.ai/api/users/example';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/users/exampleAnswers the public profile of one wallet, with its team’s best XI OVR (best_xi_ovr) and the formation it comes from (best_xi_formation), the number its leaderboard row shows. The team fields are null for a wallet without a team.
Who: anyone.
Refusals:
Invalid wallet address: a NUL byte is not a character.: the wallet in the path held a NUL byte.User not found: no account has this wallet.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The wallet address (erd1...).
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
The title shown on the profile, such as Tournament Champion; null when none.
The team badge (see Team.badge); null without a team.
The formation that best XI is built in, such as 4-3-3. null with best_xi_ovr.
The team’s best XI OVR now, one decimal: the average OVR of the strongest XI its manager can field from the cards they own, the same number every page shows (see Team.best_xi_ovr). null when no card the wallet owns fits a slot.
The name of the player’s active developer team; null when none.
ELO rating, lifetime.
User id.
true when the manager is a FoxLeague admin. The app then shows a gold check next to the team name in place of the blue verified mark, even when the team is not verified.
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.
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": { "active_title": "Tournament Champion", "badge": "ipfs://bafybeihkoviema7g3gxyt6la7vd5ho32ictqbilu3wnlo3rs7ewhnp7lly", "best_xi_formation": "4-3-3", "best_xi_ovr": 52.6, "developer_team_name": null, "elo_rating": 1734, "id": 412, "is_admin": false, "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" }, "success": true}