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

:game

the game name

:discr

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)

:platform

the game platform (e.g. _steam_)

:user

the username

Query parameters

Query parameters are optional and are useful to filter the local board related to the requested score.

Field

Default

Remarks

number_of_results

1

By default: return only the requested score

platform

n/a

discr

n/a

An array of additional discriminants which are cumulative

launcher

n/a

An array of launcher names which are not cumulative

country

n/a

extra

0

If 1 extra fields are returned

stats

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 (platform/user) in the leaderboard

400

(game/discr) does not exist or query parameters are invalid (see error message)

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 if extra query parameter is equal to 1

  • stats field is returned only if stats query parameter is equal to 1

  • the number of results depends on the number_of_results query parameters (1 by default)

  • the posted score is always centered in its local board