uuid -> id

This commit is contained in:
Eden Kirin
2023-03-31 17:20:23 +02:00
parent d45aca6c30
commit 80c7c80451
2 changed files with 13 additions and 13 deletions

View File

@ -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": {

View File

@ -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"
}
###