From 26a4754b2e1c05f82491b353f238182fe39776ab Mon Sep 17 00:00:00 2001 From: Paul Woolcock Date: Thu, 25 Apr 2019 05:45:52 -0400 Subject: [PATCH] Fix block, unblock, mute and unmute These 4 API calls should return a Relationship, not an Account --- src/lib.rs | 8 ++++---- src/mastodon_client.rs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 6c1b9e0..48c43c3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -250,10 +250,10 @@ impl MastodonClient for Mastodon { (get) get_account: "accounts/{}" => Account, (post) follow: "accounts/{}/follow" => Relationship, (post) unfollow: "accounts/{}/unfollow" => Relationship, - (get) block: "accounts/{}/block" => Account, - (get) unblock: "accounts/{}/unblock" => Account, - (get) mute: "accounts/{}/mute" => Account, - (get) unmute: "accounts/{}/unmute" => Account, + (get) block: "accounts/{}/block" => Relationship, + (get) unblock: "accounts/{}/unblock" => Relationship, + (get) mute: "accounts/{}/mute" => Relationship, + (get) unmute: "accounts/{}/unmute" => Relationship, (get) get_notification: "notifications/{}" => Notification, (get) get_status: "statuses/{}" => Status, (get) get_context: "statuses/{}/context" => Context, diff --git a/src/mastodon_client.rs b/src/mastodon_client.rs index 23c6f8b..e1f8d01 100644 --- a/src/mastodon_client.rs +++ b/src/mastodon_client.rs @@ -133,19 +133,19 @@ pub trait MastodonClient { unimplemented!("This method was not implemented"); } /// GET /api/v1/accounts/:id/block - fn block(&self, id: &str) -> Result { + fn block(&self, id: &str) -> Result { unimplemented!("This method was not implemented"); } /// GET /api/v1/accounts/:id/unblock - fn unblock(&self, id: &str) -> Result { + fn unblock(&self, id: &str) -> Result { unimplemented!("This method was not implemented"); } /// GET /api/v1/accounts/:id/mute - fn mute(&self, id: &str) -> Result { + fn mute(&self, id: &str) -> Result { unimplemented!("This method was not implemented"); } /// GET /api/v1/accounts/:id/unmute - fn unmute(&self, id: &str) -> Result { + fn unmute(&self, id: &str) -> Result { unimplemented!("This method was not implemented"); } /// GET /api/v1/notifications/:id