mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-12 09:18:25 +03:00
Add more GPT endpoint definitions
This commit is contained in:
+108
-1
@@ -53,7 +53,7 @@ GET /api/v1/games/iidx/SP
|
||||
|
||||
## Retrieve the player leaderboard.
|
||||
|
||||
`GET /api/v1/leaderboard`
|
||||
`GET /api/v1/games/:game/:playtype/leaderboard`
|
||||
|
||||
### Parameters
|
||||
|
||||
@@ -571,3 +571,110 @@ GET /api/v1/games/bms/7K/tableID/insane
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*****
|
||||
|
||||
## Retrieve the score leaderboard for this Game.
|
||||
|
||||
`GET /api/v1/games/:game/:playtype/score-leaderboard`
|
||||
|
||||
### Parameters
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `alg` | String | An alternative algorithm to use instead of the GPTs default. |
|
||||
| `limit` | Optional Integer | Optionally, provide a number between 1 and 50 to change the amount of scores returned. |
|
||||
|
||||
### Response
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `pbs` | Array<PBScoreDocument> | The array of pbs part of the score leaderboard. |
|
||||
| `songs` | Array<SongDocument> | The array of songs part of the PBs. |
|
||||
| `charts` | Array<ChartDocument> | The array of charts part of the PBs. |
|
||||
| `users` | Array<UserDocument> | The array of users part of the PBs. |
|
||||
|
||||
*****
|
||||
|
||||
## Get the distribution of players for a provided class.
|
||||
|
||||
`GET /api/v1/games/:game/:playtype/player-distribution`
|
||||
|
||||
### Parameters
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `class` | String | Must be one of the GPTs supported classes, This specifies what distribution to return. |
|
||||
|
||||
### Response
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `<body>` | Record<ClassValue, integer> | Returns a record of the class value against the amount of people who have it. |
|
||||
|
||||
### Example
|
||||
|
||||
#### Request
|
||||
```
|
||||
GET /api/v1/games/bms/7K/player-distribution?class=stslDan
|
||||
```
|
||||
|
||||
#### Response
|
||||
|
||||
```js
|
||||
{
|
||||
"12": 1,
|
||||
"11": 5,
|
||||
"10": 7,
|
||||
"9": 6,
|
||||
"8": 4,
|
||||
// Note that keys will be empty if nobody has them.
|
||||
"5": 30,
|
||||
// ... so on
|
||||
}
|
||||
```
|
||||
|
||||
!!! info
|
||||
You can find the humanised conversions for these classes in the gptConfig for this GPT.
|
||||
|
||||
See [tachi-common](https://github.com/tng-dev/tachi-common) for more information.
|
||||
|
||||
*****
|
||||
|
||||
## Retrieve recent class updates from all users on this game.
|
||||
|
||||
`GET /api/v1/games/:game/:playtype/player-distribution`
|
||||
|
||||
### Parameters
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `limit` | Optional Integer | Optionally, An integer between 1 and 50 can be provided to limit the amount of returns. Defaults to 10. |
|
||||
|
||||
### Response
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `users` | Array<UserDocument> | Array of the users who achieved the courses. |
|
||||
| `classes` | Array<ClassAchievementDocument> | Data about the recently achieved classes. |
|
||||
|
||||
*****
|
||||
|
||||
## Retrieve the most recent highlighted scores for this GPT.
|
||||
|
||||
`GET /api/v1/games/:game/:playtype/scores/highlighted`
|
||||
|
||||
### Parameters
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `limit` | Optional Integer | Optionally, provide an integer between 1 and 100 to return this amount of scores. Defaults to 10. |
|
||||
|
||||
### Response
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `scores` | Array<ScoreDocument> | The highlighted scores. |
|
||||
| `users` | Array<UserDocument> | The users who own the scores. |
|
||||
| `songs` | Array<SongDocument> | The songs the scores are on. |
|
||||
| `charts` | Array<ChartDocument> | The charts the scores are on. |
|
||||
|
||||
Reference in New Issue
Block a user