akai-org / akai-org/love_letter
Create API endpoint POST /api/v1/games
- Lingua principale
- Python
- Stelle
- 0
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Implement API endpoint (in file src/routers/api.py) which will react to POST /api/v1/games with JSON
```
{
‘room_name’: ,
‘max_players’: ,
`password`: ,
}
```
Where “max_players” is limited to values 2-6
If success, append a new room to the imported object "game_manager" (method add_new_game), then return JSON with a status code 200 (Ok):
```
{
‘room_name’: ,
‘max_players’: ,
‘password’:
}
```
If the room exists with a specific name, return JSON with a status code 403 (Forbidden):
```
{
‘message’: “The room {room_name} already exists”
}
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.