Fix block, unblock, mute and unmute

These 4 API calls should return a Relationship, not an Account
master
Paul Woolcock 5 years ago
parent 6c978f090f
commit 26a4754b2e
  1. 8
      src/lib.rs
  2. 8
      src/mastodon_client.rs

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

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

Loading…
Cancel
Save