Get beatmap top scores (non-legacy)
The beatmaps.getBeatmapTopNonLegacyScores method on a Client instance makes a GET request to the beatmaps/{beatmap}/solo-scores endpoint and returns an array of user scores on a beatmap. beatmaps.getBeatmapTopNonLegacyScoresV2 makes a request to the same endpoint, but has the X-API-Version header set to 20220705.
Example
const scores = await api.beatmaps.getBeatmapTopNonLegacyScores(1816113, {
query: {
mode: 'osu'
}
});
Parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
| beatmap | number | ID of the beatmap to get top scores from | |
| options | GetBeatmapTopNonLegacyScoresOptions | ✓ |
options.query
| Parameter | Type | Optional | Description |
|---|---|---|---|
| legacy_only | boolean | ✓ | Set to true to only return legacy scores |
| mode | GameMode | ✓ | Gamemode of the scores to return |
Returns
If using beatmaps.getBeatmapTopNonLegacyScores:
Promise<
(Score & {
user: UserCompact & {
country: Country;
cover: Cover;
};
})[]
>;
If using beatmaps.getBeatmapTopNonLegacyScoresV2:
Promise<
(ScoreV2 & {
user: UserCompact & {
country: Country;
cover: Cover;
};
})[]
>;
Types
Possible Exceptions
See the error handling documentation for more information.
invalid_json_syntaxnetwork_errorunexpected_response
Notice that something is missing? Found a typo? Think something's incomplete? Or think that something can be explained better? Feel free to open a pull request or submit an issue on the library's Github repository .