Headers:
-
Authorization: nadeo_v1 t={token}An access token for theNadeoLiveServicesaudience
Service provided by Openplanet
Get surrounding records for a score
GET
https://live-services.trackmania.nadeo.live/api/token/leaderboard/group/{groupUid}/map/{mapUid}/surround/{lower}/{upper}?score={score}&onlyWorld={onlyWorld}
Headers:
Authorization: nadeo_v1 t={token}
An access token for the NadeoLiveServices audience
Path parameters:
{groupUid}
(string)
The ID of the group/season
*
{mapUid}
(string)
The UID of the map
*
{lower}
(integer)
The amount of records to return that are lower than the requested score
*
1
{upper}
(integer)
The amount of records to return that are higher than the requested score
*
1
Query parameters:
{score}
(integer)
The score/time (in milliseconds) to get surrounding records for
{onlyWorld}
(boolean)
Whether to only retrieve records from the world leaderboard
Gets surrounding records for a score on a map's leaderboard.
Remarks:
groupUid "Personal_Best" can be used to get the global leaderboard.groupUid, make sure you're only referencing currently open leaderboards. Maps with closed leaderboards will result in an empty response.lower and upper parameters used to support more than 1, but now no more than one upper and one lower record is returned.tops array - one for each of the account's assigned sub-zones (representing the leaderboards of the continent, country, city, etc.). Use onlyWorld to only retrieve data for the global leaderboard.accountId and zone data) between the surrounding ones. This is because in-game this endpoint is used to determine surrounding records for your own PB (that might not have fully uploaded to the leaderboards yet), so it supports an arbitrary score value that the game sets based on your PB.score parameter may be omitted to retrieve the player's PB leaderboard position and its surrounding data. When the authenticated player doesn't have a PB on the requested map (or when using a dedicated server account), any request without a score parameter will return an empty object ({}).score values for some entries. Instead, those leaderboard entries will contain -1 in the score field.Example request:
GET https://live-services.trackmania.nadeo.live/api/token/leaderboard/group/Personal_Best/map/mVkXbeiVyQQXIIJhVQcmiwlGDL8/surround/1/1?score=60785
Example response:
{
"groupUid": "Personal_Best",
"mapUid": "mVkXbeiVyQQXIIJhVQcmiwlGDL8",
"tops": [
{
"zoneId": "301e1b69-7e13-11e8-8060-e284abfd2bc4",
"zoneName": "World",
"top": [
{
"accountId": "2a13aa7d-992d-4a7c-a3c5-d29b08b7f8cb",
"zoneId": "30228671-7e13-11e8-8060-e284abfd2bc4",
"zoneName": "Sweden",
"position": 29,
"score": 60783
},
{
"accountId": "924598eb-c042-4f12-a189-b7f03c4b83b2",
"zoneId": "301ff90f-7e13-11e8-8060-e284abfd2bc4",
"zoneName": "Stuttgart",
"position": 30,
"score": 60785
},
{
"accountId": "794a286c-44d9-4276-83ce-431cba7bab74",
"zoneId": "302012a4-7e13-11e8-8060-e284abfd2bc4",
"zoneName": "Duisburg",
"position": 31,
"score": 60797
}
]
}
]
}
If the groupUid is invalid (or the referenced leaderboard is closed), the response will be an empty object:
{}
If the map does not exist, the response will be based off an empty leaderboard (i.e. it only shows the requested score):
{
"groupUid": "Personal_Best",
"mapUid": "mVkXbeiVyQQXIIJhVQcmiwlGDL8_fake",
"tops": [
{
"zoneId": "301e1b69-7e13-11e8-8060-e284abfd2bc4",
"zoneName": "World",
"top": [
{
"accountId": "caa61df0-7222-492b-8e39-a23ef67a36bd",
"zoneId": "301e1b69-7e13-11e8-8060-e284abfd2bc4",
"zoneName": "World",
"position": 1,
"score": 60785
}
]
}
]
}