Implements a mechanism to automatically clear overlapping events in user calendars. Introduces a new model for email templates, enabling customizable notifications to event organizers when their events are declined due to overlaps. Adds a background task to find overlapping events based on calendar settings and automatically cancels the later event, sending a notification email to the organizer, if configured. |
||
|---|---|---|
| .idea | ||
| src | ||
| .gitignore | ||
| Dockerfile | ||
| LICENSE.md | ||
| README.md | ||
| docker-compose.yaml | ||
| requirements.txt | ||
| version.txt | ||
README.md
Room Booking
This application allows you to create an event in a room booking calendar via a REST API.
Setup
If you see this page, the application is already running.
You will have to create users, API keys and calendars via admin interface.
Usage
A full documentation of the API is available at /api/docs/.
Authentication is done via a Bearer token in the Authorization header.
Create an event
To create an event, you need to send a POST request to /api/{calendar}/events/
with the following JSON payload:
{
"name": "Event Title",
"start": "2025-01-02T12:00:00",
"end": "2025-01-02T13:00:00"
}
Curl example:
curl -s \
-H "Authorization: Bearer secrettoken" \
-H "Content-Type: application/json" \
-d "{\"name\": \"Test-Event\", \"start\": \"$(date --iso-8601=minutes)\", \"end\": \"$(date --iso-8601=minutes -d '+2 hours')\"}" \
localhost:8000/api/test-kalender/event
The response will contain the event ID:
{"id": "4zx3QAFzoxV3vaZSKGaH2S"}
Delete an event
To delete an event, you need to send a DELETE request to /api/{calendar}/events/{event_id}.
Curl example:
curl -s -X DELETE \
-H "Authorization: Bearer secrettoken" \
-H "Content-Type: application/json" \
localhost:8000/api/test-kalender/event/4zx3QAFzoxV3vaZSKGaH2S
The response will be empty but the status code will be 204.