Leaderboard endpoints
Leaderboard
Explanation: Returns leaderboard for provided game. Can be filtered by additional fields.
- Endpoint specs
- Example 200 response
- Path:
https://api.elympics.cc/v2/leaderboardservice/leaderboard?TournamentId=(tournament-id)&GameId=(game-id)&PageNumber=(page-number)&PageSize=(page-size)&TimeScope=0&FetchType=0
- Method:
GET
- Query params:
GameId
- required. Id of the game for which leaderboard should be returnedTimeScope
- required. value 0 means that all available values will be consideredFetchType
- required. value 0 means that maximum score value for each place will be returnedTournamentId
- id of the tournamentPageNumber
- Number of the page. Default: 1PageSize
- Size of the page. Default: 10
- Headers:
Elympics-Publisher-API-Key: YOUR_API_KEY
Authorization: Bearer PLAYER_JWT_TOKEN
{
"data": [
{
"userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", # Elympics user id
"nickname": "string", # Nickname of the player assigned in Elympics system
"telegramId": "string", # User's telegram Id
"position": 0, # Position in leaderboard
"points": 0, # Score points earned
}
],
"pageNumber": 0, # Current page number
"pageSize": 0, # Current page size
"totalPages": 0, # Total number of pages
"totalRecords": 0, # Total number of records
}
User centred leaderboard
Explanation: Returns page from game's leaderboard where player currently is. Can be filtered by additional fields.
- Endpoint specs
- Example 200 response
- Path:
https://api.elympics.cc/v2/leaderboardservice/leaderboard/user-centred?TournamentId=(tournament-id)&GameId=(game-id)&TimeScope=0&FetchType=0
- Method:
GET
- Query params:
GameId
- required. Id of the game for which leaderboard should be returnedTimeScope
- required. value 0 means that all available values will be consideredFetchType
- required. value 0 means that maximum score value for each place will be returnedTournamentId
- id of the tournament
- Headers:
Elympics-Publisher-API-Key: YOUR_API_KEY
Authorization: Bearer PLAYER_JWT_TOKEN
caution
If player is not on the leaderboard, this endpoint will return empty response.
{
"data": [
{
"userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", # Elympics user id
"nickname": "string", # Nickname of the player assigned in Elympics system
"telegramId": "string", # User's telegram Id
"position": 0, # Position in leaderboard
"points": 0, # Score points earned
}
],
"pageNumber": 0, # Page number on which user currently is
"pageSize": 0, # Current page size
"totalPages": 0, # Total number of pages
"totalRecords": 0, # Total number of records
}