Get rank
This route can be used to retrieve the rank of a given user.
GET /v2/:game/:discr/:platform/:user
Route parameters
Key |
Description |
---|---|
|
the game name |
|
the major discriminant (a discriminant is a criteria that identify the board where the score has to be put. Note that a game can have several independent leaderboard which are identified by a distinct discriminant) |
|
the game platform (e.g. _steam_) |
|
the username |
Query parameters
Query parameters are optional and are useful to filter the local board related to the requested score.
Field |
Default |
Remarks |
---|---|---|
|
1 |
By default: return only the requested score |
|
n/a |
|
|
n/a |
An array of additional discriminants which are cumulative |
|
n/a |
An array of launcher names which are not cumulative |
|
n/a |
|
|
0 |
If 1 extra fields are returned |
|
0 |
If 1 stats fields are returned |
Response
Code |
Remarks |
---|---|
200 |
The requested score has been found and the local board has been returned successfully |
204 |
There is no score for the requested |
400 |
|
500 |
Internal error |
The response is sent in the JSON format.
{
"rank": 35,
"ranking": [{ ... }, { ... }, {
"rank": 35,
"platform": "octopod",
"session": "a",
"user": "b",
"pseudo": "c",
"score": 42,
"created_at": "2020/12/01 10:09:08",
"extra": "<data of format texte ou binaire retourné via un Base64>",
"discr": ["time:10mn", "difficulty:hard"],
"launcher": "wanadev2",
"stats": {"foo": bar}
}, { ... }, { ... }, ...]
}
Note that:
extra
field is returned only ifextra
query parameter is equal to 1stats
field is returned only ifstats
query parameter is equal to 1the number of results depends on the
number_of_results
query parameters (1 by default)the posted score is always centered in its local board