POST /.../unfollow returns a Relationship, not an Account

This commit is contained in:
Paul Woolcock
2018-09-06 14:36:40 -04:00
parent 788177f5e8
commit 20a9c69adc
3 changed files with 4 additions and 2 deletions
+2
View File
@@ -20,4 +20,6 @@ pub struct Relationship {
pub muting_notifications: bool,
/// Whether the user is currently blocking the accounts's domain
pub domain_blocking: bool,
/// Whether the user's reblogs will show up in the home timeline
pub showing_reblogs: bool,
}
+1 -1
View File
@@ -194,7 +194,7 @@ impl<H: HttpSend> MastodonClient<H> for Mastodon<H> {
route_id! {
(get) get_account: "accounts/{}" => Account,
(post) follow: "accounts/{}/follow" => Account,
(post) unfollow: "accounts/{}/unfollow" => Account,
(post) unfollow: "accounts/{}/unfollow" => Relationship,
(get) block: "accounts/{}/block" => Account,
(get) unblock: "accounts/{}/unblock" => Account,
(get) mute: "accounts/{}/mute" => Account,
+1 -1
View File
@@ -116,7 +116,7 @@ pub trait MastodonClient<H: HttpSend = HttpSender> {
unimplemented!("This method was not implemented");
}
/// POST /api/v1/accounts/:id/unfollow
fn unfollow(&self, id: u64) -> Result<Account> {
fn unfollow(&self, id: u64) -> Result<Relationship> {
unimplemented!("This method was not implemented");
}
/// GET /api/v1/accounts/:id/block