lily_website

πŸ“„ Notifications API Provider

⬅️ 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.

πŸ› οΈ Class: NotificationsApiProvider

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.

πŸ” Core Methods

1. confirm_appointment(appointment_id: int) -> dict

Sends a confirmation request for a specific appointment.

2. cancel_appointment(appointment_id: int, reason: str | None = None, note: str | None = None) -> dict

Sends a cancellation request with an optional reason and note.

🧩 Integration

πŸ“ Note on Evolution

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.