DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

ref: d11c5cc5c63436f4a534ac2b395559063a96cd6f deck-builder/api/README.md -rw-r--r-- 939 bytes
d11c5cc5Jonni Liljamo wip(client): log ui 1 year, 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Laurelin API

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

## API Doc
Paths may change in the future.

| 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 (subject to change) |
| GET /game/all\_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 |
| GET /game/my\_games | get all own games | derived from auth header |
| POST /game/:id/join | join a game | registered user who is not the game creator |