From 0edd1c9b8865db7e46f6bea07e8946f9429f9be7 Mon Sep 17 00:00:00 2001 From: Arlo Date: Mon, 25 Mar 2024 10:21:58 +0000 Subject: [PATCH] Update get_user_tests --- get_user_tests.md | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/get_user_tests.md b/get_user_tests.md index b7503a9..ba03199 100644 --- a/get_user_tests.md +++ b/get_user_tests.md @@ -1,32 +1,42 @@ # Get User Tests +## GET `/api/user/tests//` + Retrieves tests associated with a specific user from the database. -## GET `/api/get_tests//` +## Request Parameters -## Parameters - -| Parameter | Type | Description | -| - | - | - | -| user_id | integer | User ID of the user whose tests need to be retrieved | -| secret | String | Secret key for authentication | +- `user_id` - User ID of the user whose tests need to be retrieved +- `secret` - Secret key for authentication ## Example Request ```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 ```json -{ - "test_type": "words", - "test_length": 100, - "test_time": 300, - "test_seed": 987654321, - "quote_id": 123, - "wpm": 65, - "accuracy": 98 -} +[ + { + "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 + }, + ... +] ``` \ No newline at end of file