create a room
POST /v1/rooms
<- { "room_id": "" }
create a player (the first player will be room owner)
POST /v1/rooms/<room_id>/players
-> { "name": "" }
<- { "access_token": "" }
get the room state
authorized
GET /v1/rooms/<room_id>
delete the room
authorized (owner)
DELETE /v1/rooms/<room_id>
create a next game
authorized (owner)
POST /v1/rooms/<room_id>/games
-> { "name": ""}
update the current game (change name, complete, reset)
authorized (owner)
PATCH /v1/rooms/<room_id>/currentgame
-> { "name": "", "complete": false, "reset": false }
post the current game card
authorized
PUT /v1/rooms/<room_id>/currentgame/cards
-> { "score": 0 }
- create a room
- add a player to the room and save , the first player will be room owner
- observe the room state
- post cards
- switch games
- update the current game
- add player to the existing room
- observe the room state
- post cards
The simpliest way to run and test application is using docker and sample scripts for API
Usage
docker build -t planning-poker-app .
docker run -dp 3000:8080 planning-poker-app
cd ./scripts
export POKER_HOST=localhost:3000
create_room.sh
export POKER_ROOM="<room_id>"
create_player.sh
export POKER_SESSION="<access_token>"
get_room.sh
...
POKER_PORT
(required) - port of applicationPOKER_MODE
(optional) -debug
enables additional logs