From 817e18fc16e9ed0fb04f28b8a5531bf32bb33d0b Mon Sep 17 00:00:00 2001 From: Paul Woolcock Date: Tue, 3 Sep 2019 15:22:43 -0400 Subject: [PATCH] Add the "Dismiss Notification" endpoint --- src/lib.rs | 1 + src/mastodon_client.rs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index b2f59a2..774d350 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -239,6 +239,7 @@ impl MastodonClient for Mastodon { (post (uri: Cow<'static, str>,)) follows: "follows" => Account, (post multipart (file: Cow<'static, str>,)) media: "media" => Attachment, (post) clear_notifications: "notifications/clear" => Empty, + (post (id: &str,)) dismiss_notification: "notifications/dismiss" => Empty, (get) get_push_subscription: "push/subscription" => Subscription, (delete) delete_push_subscription: "push/subscription" => Empty, (get) get_filters: "filters" => Vec, diff --git a/src/mastodon_client.rs b/src/mastodon_client.rs index d1defad..6a63c7c 100644 --- a/src/mastodon_client.rs +++ b/src/mastodon_client.rs @@ -120,6 +120,10 @@ pub trait MastodonClient { fn clear_notifications(&self) -> Result { unimplemented!("This method was not implemented"); } + /// POST /api/v1/notifications/dismiss + fn dismiss_notification(&self, id: &str) -> Result { + unimplemented!("This method was not implemented"); + } /// GET /api/v1/accounts/:id fn get_account(&self, id: &str) -> Result { unimplemented!("This method was not implemented");