Document /tierlist

This commit is contained in:
zkldi
2021-08-13 03:42:41 +01:00
parent b76aea4723
commit e274ad459a
+67 -1
View File
@@ -60,7 +60,6 @@ GET /api/v1/games/iidx/SP
| Property | Type | Description |
| :: | :: | :: |
| `alg` (Optional) | String | If present, specifies an alternative algorithm to sort players on, instead of the default. |
| `start` (Optional) | Integer | If present, specifies a starting point to display the leaderboard from. Essentially pagination. |
### Response
@@ -252,6 +251,73 @@ GET /api/v1/games/iidx/SP/charts/some_chart_id
*****
## Return tierlist information for this chart
`GET /api/v1/games/:game/:playtype/charts/:chartID/tierlist`
Retrieve the tierlist information for this chart. If no tierlistID is provided, this falls back
to the GPT's default.
!!! warn
If the GPT has no default tierlist, then the server will return a 501.
### Parameters
| Property | Type | Description |
| :: | :: | :: |
| `tierlistID` | string, Optional | Optionally, provide a tierlist ID to use instead of the default. |
### Response
| Property | Type | Description |
| :: | :: | :: |
| `tierlist` | TierlistDocument | The related tierlist document. |
| `tierlistData` | Array<TierlistDataDocument> | All of the tierlist data for this chart. |
### Example
#### Request
```
GET /api/v1/games/iidx/SP/charts/chart_id/tierlist
```
#### Response
```js
{
tierlist: {
game: "iidx",
playtype: "SP",
name: "Default IIDX SP Tierlist",
// ...
},
tierlistData: [{
type: "lamp",
key: "HARD CLEAR",
chartID: "chart_id",
data: {
value: 12.5,
humanised: "C",
flags: {}
},
// ...
}, {
type: "lamp",
key: "CLEAR",
chartID: "chart_id",
data: {
value: 12.4,
humanised: "C",
flags: {
idvDifference: true
}
},
// ...
}]
}
```
*****
## Retrieve playcount for this chart.
`GET /api/v1/games/:game/:playtype/charts/:chartID/playcount`