akai-org / akai-org/love_letter
Create API endpoint POST /api/v1/games
- Vorherrschende Sprache
- Python
- Sterne
- 0
- Forks
- 0
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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”
}
```
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.