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

master
Paul Woolcock 6 years ago
parent 788177f5e8
commit 20a9c69adc
  1. 2
      src/entities/relationship.rs
  2. 2
      src/lib.rs
  3. 2
      src/mastodon_client.rs

@ -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,
}

@ -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,

@ -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

Loading…
Cancel
Save