DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

01e7dee657b7452a5e8d4fdd2e8f457858d0d469 — Jonni Liljamo 1 year, 11 months ago 39d197b
docs(sdbapi): add API docs to README.md
1 files changed, 16 insertions(+), 0 deletions(-)

M sdbapi/README.md
M sdbapi/README.md => sdbapi/README.md +16 -0
@@ 2,3 2,19 @@

## Deployment
Configure `SDBAPI_JWT_SECRET` in `docker-compose.yaml` to be randomized.

## API Doc
| path | action | who can |
|------|--------|---------|
| GET /info | get API info | public |
|-|-|-|
| POST /user/register | register a user | public |
| POST /user/token | get the token of a user, aka login | public |
| GET /user/:id | get generic user info | public |
| GET /user/_/:id | get private user info | id owner |
|-|-|-|
| GET /game/:id | get game info | registered users |
| GET /game/get_forming | get all games that are forming | registered users |
| POST /game/create | create a game | registered users |
| PATCH /game/:id/state | change the state of a game | only the game creator, aka P1 |