Get Game Leaderboard
Retrieves data from the game leaderboard, providing you with information on player rankings and scores. It helps you monitor and display competitive standings within the game.
POST
/scores
Retrieves data from the game leaderboard, providing you with information on player rankings and scores. It helps you monitor and display competitive standings within the game.
Header Parameters
X-Service-Method
string
required
header
Request Body required
application/jsongameId
string
REQUIRED
limit
integer
skip
integer
Responses
200
Successful response
application/jsonsuccess
boolean
leaderboard
object[]
Array of:
_id
string
nonce
string
gameId
string
normalizedAddress
string
score
integer
updatedAt
integer (int64)
username
string
avatar
string
curl -X POST 'https://api.basement.fun/scores' \ -H 'X-Service-Method: getGameScoresLeaderboard' \ -H 'Content-Type: application/json' \ -d '{ "gameId": "string", "limit": 50, "skip": 0}'
const response = await fetch('https://api.basement.fun/scores', { method: 'POST', headers: { "Content-Type": "application/json", "X-Service-Method": "getGameScoresLeaderboard" }, body: JSON.stringify({ "gameId": "string", "limit": 50, "skip": 0 })});const data = await response.json();console.log(data);
import requestsheaders = { 'X-Service-Method': 'getGameScoresLeaderboard'}response = requests.post('https://api.basement.fun/scores', headers=headers, json={ "gameId": "string", "limit": 50, "skip": 0})print(response.json())
200
Response
{ "success": true, "leaderboard": [ { "_id": "<string>", "nonce": "<string>", "gameId": "<string>", "normalizedAddress": "<string>", "score": 123, "updatedAt": 123, "username": "<string>", "avatar": "<string>" } ]}
API Playground
Try this endpoint
POST
/scores
