go build ./cmd/web
Deprecated and removed, see https://github.com/ParallelLines/planning-poker instead.
# create session
POST localhost:10080/api/sessions
{
"id": 1234,
"votes_info": [],
"votes_hidden": true,
}# check if session exists
GET localhost:10080/api/sessions/SESSION_ID
http code 204 or 404# join session
POST localhost:10080/api/sessions/SESSION_ID/join
Content-Type: application/json
{
"name": "Roman"
}
{
"id": 1234,
"name": "Roman",
"last_active": "2023-03-22T20:29:50.403844814Z",
"active": true
}# establish websocket connection
# ugly url due to workaround for std mux
GET localhost:10080/api/sessions/SESSION_ID/get/USER_ID
## votes hidden
{"id":1234,"votes_info":[{"name":"Not Roman","is_voted":true,"vote":5,"is_current_user":false},{"name":"Roman","is_voted":false,"vote":null,"is_current_user":true}],"votes_hidden":true}
## votes shown/session data visible
{"id":1234,"votes_info":[{"name":"Not Roman","is_voted":true,"vote":5,"is_current_user":false},{"name":"Roman","is_voted":true,"vote":5,"is_current_user":true}],"votes_hidden":false}POST localhost:10080/api/sessions/SESSION_ID/vote
Content-Type: application/json
{
"user_id": USER_ID,
"vote": 8
}POST localhost:10080/api/sessions/SESSION_ID/clearPOST localhost:10080/api/sessions/SESSION_ID/show