Fix block, unblock, mute and unmute

These 4 API calls should return a Relationship, not an Account
This commit is contained in:
Paul Woolcock
2019-04-25 05:45:52 -04:00
parent 6c978f090f
commit 26a4754b2e
2 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -250,10 +250,10 @@ impl<H: HttpSend> MastodonClient<H> for Mastodon<H> {
(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,
+4 -4
View File
@@ -133,19 +133,19 @@ pub trait MastodonClient<H: HttpSend = HttpSender> {
unimplemented!("This method was not implemented");
}
/// GET /api/v1/accounts/:id/block
fn block(&self, id: &str) -> Result<Account> {
fn block(&self, id: &str) -> Result<Relationship> {
unimplemented!("This method was not implemented");
}
/// GET /api/v1/accounts/:id/unblock
fn unblock(&self, id: &str) -> Result<Account> {
fn unblock(&self, id: &str) -> Result<Relationship> {
unimplemented!("This method was not implemented");
}
/// GET /api/v1/accounts/:id/mute
fn mute(&self, id: &str) -> Result<Account> {
fn mute(&self, id: &str) -> Result<Relationship> {
unimplemented!("This method was not implemented");
}
/// GET /api/v1/accounts/:id/unmute
fn unmute(&self, id: &str) -> Result<Account> {
fn unmute(&self, id: &str) -> Result<Relationship> {
unimplemented!("This method was not implemented");
}
/// GET /api/v1/notifications/:id