Retrieves a list of notifications from Uptime Kuma.
(&self)
| 1568 | |
| 1569 | /// Retrieves a list of notifications from Uptime Kuma. |
| 1570 | pub async fn get_notifications(&self) -> Result<NotificationList> { |
| 1571 | match self.worker.is_ready().await { |
| 1572 | true => Ok(self.worker.notifications.lock().await.clone()), |
| 1573 | false => Err(Error::NotReady), |
| 1574 | } |
| 1575 | } |
| 1576 | |
| 1577 | /// Retrieves information about a specific notification identified by its ID. |
| 1578 | pub async fn get_notification(&self, notification_id: i32) -> Result<Notification> { |
no test coverage detected