ElRubioLoco / HowManyContenders

A Trackmania Next plugin, allowing to see the total number of players who played a map.So you can more precisely see where you are in terms of performance.
https://openplanet.dev/plugin/howmanycontenders
GNU General Public License v3.0
1 stars 0 forks source link

Use another API call to get number of contenders #2

Closed ElRubioLoco closed 1 year ago

ElRubioLoco commented 1 year ago

Have to consider using request down below to get the counts of contenders.

POST https://live-services.trackmania.nadeo.live/api/token/leaderboard/group/map?scores[{mapUid}]={score} API call.

See documentation HERE.

It seems to return zones :

[
    {
        "groupUid": "Personal_Best",
        "mapUid": "gjt2DWATrQ_NdrbrXG0G9oDpTfh",
        "score": 15800,
        "zones": [
            {
                "zoneId": "301e1b69-7e13-11e8-8060-e284abfd2bc4",
                "zoneName": "World",
                "ranking": {
                    "position": 294,
                    "length": 0
                }
            }
        ]
    },
    {
        "groupUid": "Personal_Best",
        "mapUid": "XiGZvMOqIgT3_g0TdeFa0lxMp46",
        "score": 17500,
        "zones": [
            {
                "zoneId": "301e1b69-7e13-11e8-8060-e284abfd2bc4",
                "zoneName": "World",
                "ranking": {
                    "position": 42,
                    "length": 0
                }
            }
        ]
    }
]