| β¬ οΈ Back | π Docs Root |
The NotificationsApiProvider is the concrete implementation of the NotificationsDataProvider protocol. It handles communication with the Django backend for managing appointment confirmations and cancellations.
Located in: src/telegram_bot/infrastructure/api_route/notifications.py
This provider uses the BaseApiClient to perform structured HTTP requests to the backendβs management endpoints.
confirm_appointment(appointment_id: int) -> dictSends a confirmation request for a specific appointment.
POST/api/v1/booking/appointments/manage/{
"appointment_id": 123,
"action": "confirm"
}
{"success": true}).cancel_appointment(appointment_id: int, reason: str | None = None, note: str | None = None) -> dictSends a cancellation request with an optional reason and note.
POST/api/v1/booking/appointments/manage/{
"appointment_id": 123,
"action": "cancel",
"cancel_reason": "master_busy",
"cancel_note": "Master is busy at this time"
}
BaseApiClient: All requests are routed through the base client to handle authentication, base URLs, and error logging.NotificationsService: This provider is injected into the service layer, allowing the bot to trigger backend actions without knowing the specific API details.While the initial structure was auto-generated as a standard CRUD provider, it has been specialized to match the specific requirements of the booking management flow.