ppy / osu-web

the browser-facing portion of osu!
https://osu.ppy.sh
GNU Affero General Public License v3.0
981 stars 383 forks source link

/beatmaps/scores does not return legacy score anymore #10920

Closed MrHeliX closed 9 months ago

MrHeliX commented 9 months ago

Endpoint: https://osu.ppy.sh/docs/index.html#get-beatmap-scores

This endpoint now seems to return both Lazer scores and legacy scores. At the moment I am only interested in legacy scores. I am aware I can add legacy_only=1 to the URL to achieve this, however the score fields in the response will still contain the Lazer scores, not the legacy scores. I'd have the legacy scores in that response as well.

For example for this beatmap: https://osu.ppy.sh/beatmapsets/1061947#osu/2251927 The API returns the following topscore:

{
    "accuracy": 1,
    "best_id": null,
    "created_at": "2020-04-16T21:30:40Z",
    "id": 907334364,
    "max_combo": 870,
    "mode": "osu",
    "mode_int": 0,
    "mods": [
        "HD",
        "DT"
    ],
    "passed": true,
    "perfect": true,
    "pp": 408.542,
    "rank": "XH",
    "replay": false,
    "score": 1119360,
    "statistics": {
        "count_100": 0,
        "count_300": 619,
        "count_50": 0,
        "count_geki": null,
        "count_katu": null,
        "count_miss": 0
    },
    "type": "solo_score",
    "user_id": 2204373,
    "current_user_attributes": {
        "pin": null
    },
},

However his actual score is 15,327,012 as seen on the website. The score field contains 1119360, even though I asked for legacy_only specifically.

MrHeliX commented 9 months ago

Closing because apparently you can use the header x-api-version: 20240130 to get this data