summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Woolcock <paul@woolcock.us>2019-09-03 15:22:43 -0400
committerPaul Woolcock <paul@woolcock.us>2019-09-04 10:16:05 -0400
commit817e18fc16e9ed0fb04f28b8a5531bf32bb33d0b (patch)
treec481ae8c1e19b0a4b1e9e45bc7f911959166d6ea
parentf41253241e5c90121e8f4ca8dd4b45c13c02f8f3 (diff)
Add the "Dismiss Notification" endpoint
-rw-r--r--src/lib.rs1
-rw-r--r--src/mastodon_client.rs4
2 files changed, 5 insertions, 0 deletions
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<H: HttpSend> MastodonClient<H> for Mastodon<H> {
(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<Filter>,
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<H: HttpSend = HttpSender> {
fn clear_notifications(&self) -> Result<Empty> {
unimplemented!("This method was not implemented");
}
+ /// POST /api/v1/notifications/dismiss
+ fn dismiss_notification(&self, id: &str) -> Result<Empty> {
+ unimplemented!("This method was not implemented");
+ }
/// GET /api/v1/accounts/:id
fn get_account(&self, id: &str) -> Result<Account> {
unimplemented!("This method was not implemented");