Update get_user_tests
parent
7785fbe78d
commit
0edd1c9b88
@ -1,32 +1,42 @@
|
|||||||
# Get User Tests
|
# Get User Tests
|
||||||
|
|
||||||
|
## GET `/api/user/tests/<user_id>/<secret>`
|
||||||
|
|
||||||
Retrieves tests associated with a specific user from the database.
|
Retrieves tests associated with a specific user from the database.
|
||||||
|
|
||||||
## GET `/api/get_tests/<user_id>/<secret>`
|
## Request Parameters
|
||||||
|
|
||||||
## Parameters
|
- `user_id` - User ID of the user whose tests need to be retrieved
|
||||||
|
- `secret` - Secret key for authentication
|
||||||
| Parameter | Type | Description |
|
|
||||||
| - | - | - |
|
|
||||||
| user_id | integer | User ID of the user whose tests need to be retrieved |
|
|
||||||
| secret | String | Secret key for authentication |
|
|
||||||
|
|
||||||
## Example Request
|
## Example Request
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -X GET "https://example.com/api/get_tests/123/your_secret_key_here"
|
curl -X GET "https://url/api/user/tests/123/your_secret_key_here"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Example Response
|
## Example Response
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
[
|
||||||
"test_type": "words",
|
{
|
||||||
"test_length": 100,
|
"test_type": "words",
|
||||||
"test_time": 300,
|
"test_length": 300,
|
||||||
"test_seed": 987654321,
|
"test_time": 60,
|
||||||
"quote_id": 123,
|
"test_seed": 0,
|
||||||
"wpm": 65,
|
"quote_id": 0,
|
||||||
"accuracy": 98
|
"wpm": 60,
|
||||||
}
|
"accuracy": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"test_type": "words",
|
||||||
|
"test_length": 47,
|
||||||
|
"test_time": 15,
|
||||||
|
"test_seed": 0,
|
||||||
|
"quote_id": 0,
|
||||||
|
"wpm": 37,
|
||||||
|
"accuracy": 98
|
||||||
|
},
|
||||||
|
...
|
||||||
|
]
|
||||||
```
|
```
|
Loading…
Reference in New Issue
Block a user