Welcome to the Party Planning REST API project! This is a simple REST API for managing party planning tasks. The tasks:
- Creating tables
- Adding people to the guest list
- Managing the guest list
- Deleting guests from the guest list
- Calculating total number of empty seats in the venue at any point
Start docker container:
docker compose up -d
Make app:
make run-api
Stop docker container:
docker compose down
POST /tables
body:
{
"capacity": 10
}
response:
{
"id": 2,
"capacity": 10
}
POST /guest_list/name
body:
{
"table": int,
"accompanying_guests": int
}
response:
{
"name": "string"
}
GET /guest_list
response:
{
"guests": [
{
"name": "string",
"table": int,
"accompanying_guests": int
}, ...
]
}
PUT /guests/name
body:
{
"accompanying_guests": int
}
response:
{
"name": "string"
}
When a guest leaves, all their accompanying guests leave as well.
DELETE /guests/name
response code: 204
GET /guests
response:
{
"guests": [
{
"name": "string",
"accompanying_guests": int,
"time_arrived": "string"
}
]
}
GET /seats_empty
response:
{
"seats_empty": int
}