uuid -> id
This commit is contained in:
24
README.md
24
README.md
@ -92,7 +92,7 @@ To activate virtual environment:
|
|||||||
poetry shell
|
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
|
## System overview
|
||||||
@ -220,7 +220,7 @@ Response body:
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"player": {
|
"player": {
|
||||||
"uuid": "75bba7cd-a4c1-4b50-b0b5-6382c2822a25",
|
"id": "75bba7cd-a4c1-4b50-b0b5-6382c2822a25",
|
||||||
"name": "Pero",
|
"name": "Pero",
|
||||||
"position": {
|
"position": {
|
||||||
"x": 0,
|
"x": 0,
|
||||||
@ -234,17 +234,17 @@ Response body:
|
|||||||
|
|
||||||
### Player Move
|
### Player Move
|
||||||
|
|
||||||
- POST `/player/{uuid}/move/left`
|
- POST `/player/{id}/move/left`
|
||||||
- POST `/player/{uuid}/move/right`
|
- POST `/player/{id}/move/right`
|
||||||
- POST `/player/{uuid}/move/up`
|
- POST `/player/{id}/move/up`
|
||||||
- POST `/player/{uuid}/move/down`
|
- POST `/player/{id}/move/down`
|
||||||
|
|
||||||
Request body: None
|
Request body: None
|
||||||
|
|
||||||
Response code:
|
Response code:
|
||||||
- 200 OK: Destination reached
|
- 200 OK: Destination reached
|
||||||
- 201 Created: Player moved successfully
|
- 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
|
- 409 Conflict: Invalid move, obstacle or position out of board
|
||||||
- 422 Unprocessable Content: Validation error
|
- 422 Unprocessable Content: Validation error
|
||||||
|
|
||||||
@ -252,7 +252,7 @@ Response body:
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"player": {
|
"player": {
|
||||||
"uuid": "string",
|
"id": "string",
|
||||||
"name": "Pero",
|
"name": "Pero",
|
||||||
"position": {
|
"position": {
|
||||||
"x": 50,
|
"x": 50,
|
||||||
@ -266,7 +266,7 @@ Response body:
|
|||||||
|
|
||||||
### Get Player Info
|
### Get Player Info
|
||||||
|
|
||||||
GET `/player/{{uuid}}`
|
GET `/player/{{id}}`
|
||||||
|
|
||||||
Request body: None
|
Request body: None
|
||||||
|
|
||||||
@ -274,7 +274,7 @@ Response body:
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"player": {
|
"player": {
|
||||||
"uuid": "string",
|
"id": "string",
|
||||||
"name": "Pero",
|
"name": "Pero",
|
||||||
"position": {
|
"position": {
|
||||||
"x": 50,
|
"x": 50,
|
||||||
@ -334,7 +334,7 @@ Data:
|
|||||||
},
|
},
|
||||||
"players": [
|
"players": [
|
||||||
{
|
{
|
||||||
"uuid": "test-player-id",
|
"id": "test-player-id",
|
||||||
"name": "Pero",
|
"name": "Pero",
|
||||||
"active": true,
|
"active": true,
|
||||||
"position": {
|
"position": {
|
||||||
@ -345,7 +345,7 @@ Data:
|
|||||||
"move_attempt_count": 3
|
"move_attempt_count": 3
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"uuid": "95962b49-0003-4bf2-b205-71f2590f2318",
|
"id": "95962b49-0003-4bf2-b205-71f2590f2318",
|
||||||
"name": "Mirko",
|
"name": "Mirko",
|
||||||
"active": true,
|
"active": true,
|
||||||
"position": {
|
"position": {
|
||||||
|
|||||||
@ -39,7 +39,7 @@ POST http://localhost:8010/player/test-player-pero/product/purchase
|
|||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"product_uuid": "cocacola-id"
|
"product_id": "cocacola-id"
|
||||||
}
|
}
|
||||||
###
|
###
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user