diff --git a/README.md b/README.md index 2261ef2..dfb7591 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ To activate virtual environment: poetry shell ``` -WebSockets server runs on port **8011**. To run WS Server on different port, edit `settings.py` configuration. +WebSockets server runs on port **8011**. To run WS Server on different port, edit `settings.py` configuration. ## System overview @@ -220,7 +220,7 @@ Response body: } }, "player": { - "uuid": "75bba7cd-a4c1-4b50-b0b5-6382c2822a25", + "id": "75bba7cd-a4c1-4b50-b0b5-6382c2822a25", "name": "Pero", "position": { "x": 0, @@ -234,17 +234,17 @@ Response body: ### Player Move -- POST `/player/{uuid}/move/left` -- POST `/player/{uuid}/move/right` -- POST `/player/{uuid}/move/up` -- POST `/player/{uuid}/move/down` +- POST `/player/{id}/move/left` +- POST `/player/{id}/move/right` +- POST `/player/{id}/move/up` +- POST `/player/{id}/move/down` Request body: None Response code: - 200 OK: Destination reached - 201 Created: Player moved successfully -- 403 Forbidden: Player uuid not valid, probably timeout +- 403 Forbidden: Player id not valid, probably timeout - 409 Conflict: Invalid move, obstacle or position out of board - 422 Unprocessable Content: Validation error @@ -252,7 +252,7 @@ Response body: ```json { "player": { - "uuid": "string", + "id": "string", "name": "Pero", "position": { "x": 50, @@ -266,7 +266,7 @@ Response body: ### Get Player Info -GET `/player/{{uuid}}` +GET `/player/{{id}}` Request body: None @@ -274,7 +274,7 @@ Response body: ```json { "player": { - "uuid": "string", + "id": "string", "name": "Pero", "position": { "x": 50, @@ -334,7 +334,7 @@ Data: }, "players": [ { - "uuid": "test-player-id", + "id": "test-player-id", "name": "Pero", "active": true, "position": { @@ -345,7 +345,7 @@ Data: "move_attempt_count": 3 }, { - "uuid": "95962b49-0003-4bf2-b205-71f2590f2318", + "id": "95962b49-0003-4bf2-b205-71f2590f2318", "name": "Mirko", "active": true, "position": { diff --git a/api_tests/requests.http b/api_tests/requests.http index e2855a5..d84efb9 100644 --- a/api_tests/requests.http +++ b/api_tests/requests.http @@ -39,7 +39,7 @@ POST http://localhost:8010/player/test-player-pero/product/purchase Content-Type: application/json { - "product_uuid": "cocacola-id" + "product_id": "cocacola-id" } ###