-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document
getBeatmapTopNonLegacyScores
- Loading branch information
1 parent
76638c8
commit acac09e
Showing
6 changed files
with
86 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
docs/content/current/get-beatmap-top-non-legacy-scores.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
title: Get beatmap top scores (non-legacy) | ||
ref: beatmaps | ||
--- | ||
|
||
# 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. | ||
|
||
### Example | ||
|
||
```ts | ||
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](/references/get-beatmap-top-non-legacy-scores-options) | ✓ | | | ||
|
||
#### options.query | ||
|
||
| Parameter | Type | Optional | Description | | ||
| ----------- | --------------------------------- | -------- | ---------------------------------------- | | ||
| legacy_only | boolean | ✓ | Set to true to only return legacy scores | | ||
| mode | [GameMode](/references/game-mode) | ✓ | Gamemode of the scores to return | | ||
|
||
### Returns | ||
|
||
```ts | ||
Promise< | ||
(Score & { | ||
user: UserCompact & { | ||
country: Country; | ||
cover: Cover; | ||
}; | ||
})[] | ||
>; | ||
``` | ||
|
||
#### Types | ||
|
||
- [Score](/references/score) | ||
- [UserCompact](/references/user-compact) | ||
- [Country](/references/country) | ||
- [Cover](/references/cover) | ||
|
||
### Possible Exceptions | ||
|
||
See the [error handling documentation](/extras/error-handling) for more information. | ||
|
||
- `invalid_json_syntax` | ||
- `network_error` | ||
- `unexpected_response` |
19 changes: 19 additions & 0 deletions
19
docs/content/references/get-beatmap-top-non-legacy-scores-options.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
title: GetBeatmapTopNonLegacyScoresOptions | ||
ref: interface | ||
--- | ||
|
||
# GetBeatmapTopNonLegacyScoresOptions | ||
|
||
```ts | ||
interface GetBeatmapTopNonLegacyScoresOptions { | ||
query?: { | ||
legacy_only?: boolean; | ||
mode?: GameMode; | ||
}; | ||
} | ||
``` | ||
|
||
## Types | ||
|
||
- [GameMode](/references/game-mode) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters