akai-org / akai-org/love_letter

Create API endpoint POST /api/v1/games

Aperta
#25 0 commenti 0 reazioni 1 assegnatario Rivendicata da @MaciejWojt Vedi su GitHub
backend
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.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.