MCPcopy Create free account
hub / github.com/BigBoot/AutoKuma / get_notification

Method get_notification

kuma-client/src/client.rs:1578–1585  ·  view source on GitHub ↗

Retrieves information about a specific notification identified by its ID.

(&self, notification_id: i32)

Source from the content-addressed store, hash-verified

1576
1577 /// Retrieves information about a specific notification identified by its ID.
1578 pub async fn get_notification(&self, notification_id: i32) -> Result<Notification> {
1579 self.get_notifications().await.and_then(|notifications| {
1580 notifications
1581 .into_iter()
1582 .find(|notification| notification.id == Some(notification_id))
1583 .ok_or_else(|| Error::IdNotFound("Notification".to_owned(), notification_id))
1584 })
1585 }
1586
1587 /// Adds a new notification to Uptime Kuma.
1588 pub async fn add_notification(&self, mut notification: Notification) -> Result<Notification> {

Callers 1

handleFunction · 0.80

Calls 1

get_notificationsMethod · 0.45

Tested by

no test coverage detected