2024-03-20 23:58:14 +00:00
|
|
|
# Leaderboard
|
|
|
|
|
2024-03-20 17:42:11 +00:00
|
|
|
This API endpoint retrieves the highest test data from each user and returns it as a JSON array.
|
|
|
|
|
2024-03-20 23:58:14 +00:00
|
|
|
## Endpoint
|
2024-03-20 17:42:11 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
GET /api/leaderboard
|
|
|
|
```
|
|
|
|
|
2024-03-20 23:58:14 +00:00
|
|
|
## Request Parameters
|
2024-03-20 17:42:11 +00:00
|
|
|
|
|
|
|
This endpoint does not require any request parameters.
|
|
|
|
|
2024-03-20 23:58:14 +00:00
|
|
|
## Example Request
|
2024-03-20 17:42:11 +00:00
|
|
|
|
|
|
|
```bash
|
|
|
|
curl -X GET "https://example.com/api/leaderboard"
|
|
|
|
```
|
|
|
|
|
2024-03-20 23:58:14 +00:00
|
|
|
## Response
|
2024-03-20 17:42:11 +00:00
|
|
|
|
|
|
|
```json
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"userName": "user_1",
|
|
|
|
"wpm": 85,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"userName": "user_2",
|
|
|
|
"score": 80,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"userName": "user_3",
|
|
|
|
"wpm": 73,
|
|
|
|
}
|
|
|
|
]
|
|
|
|
```
|