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. The team fields are null for a wallet without a team.
Who: anyone.
Refusals:
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 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.
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", "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" }, "success": true}