2024-03-20 23:58:14 +00:00
|
|
|
# Get User Tests
|
|
|
|
|
2024-03-25 09:40:43 +00:00
|
|
|
## GET `/api/user/tests/<user_id>/<secret>`
|
2024-03-20 23:58:14 +00:00
|
|
|
|
2024-03-25 09:40:43 +00:00
|
|
|
Retrieves tests associated with a specific user from the database.
|
2024-03-20 23:58:14 +00:00
|
|
|
|
2024-03-25 09:40:43 +00:00
|
|
|
## Request Parameters
|
2024-03-20 23:58:14 +00:00
|
|
|
|
2024-03-25 09:40:43 +00:00
|
|
|
- `user_id` - User ID of the user whose tests need to be retrieved
|
|
|
|
- `secret` - Secret key for authentication
|
2024-03-20 23:58:14 +00:00
|
|
|
|
|
|
|
## Example Request
|
|
|
|
|
|
|
|
```bash
|
2024-03-25 09:40:43 +00:00
|
|
|
curl -X GET "https://url/api/user/tests/123/your_secret_key_here"
|
2024-03-20 23:58:14 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Example Response
|
|
|
|
|
|
|
|
```json
|
2024-03-25 09:40:43 +00:00
|
|
|
[
|
|
|
|
{
|
|
|
|
"test_type": "words",
|
|
|
|
"test_length": 300,
|
|
|
|
"test_time": 60,
|
|
|
|
"test_seed": 0,
|
|
|
|
"quote_id": 0,
|
|
|
|
"wpm": 60,
|
|
|
|
"accuracy": 100
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"test_type": "words",
|
|
|
|
"test_length": 47,
|
|
|
|
"test_time": 15,
|
|
|
|
"test_seed": 0,
|
|
|
|
"quote_id": 0,
|
|
|
|
"wpm": 37,
|
|
|
|
"accuracy": 98
|
|
|
|
},
|
|
|
|
...
|
|
|
|
]
|
2024-03-20 23:58:14 +00:00
|
|
|
```
|