Implements the methods for the follow suggestions API

Closes #72
master
Paul Woolcock 6 years ago
parent 7d164cb8db
commit 7de1bdc009
  1. 2
      src/lib.rs
  2. 8
      src/mastodon_client.rs

@ -206,6 +206,7 @@ impl<H: HttpSend> MastodonClient<H> for Mastodon<H> {
(get) get_push_subscription: "push/subscription" => Subscription, (get) get_push_subscription: "push/subscription" => Subscription,
(delete) delete_push_subscription: "push/subscription" => Empty, (delete) delete_push_subscription: "push/subscription" => Empty,
(get) get_filters: "filters" => Vec<Filter>, (get) get_filters: "filters" => Vec<Filter>,
(get) get_follow_suggestions: "suggestions" => Vec<Account>,
} }
route_v2! { route_v2! {
@ -231,6 +232,7 @@ impl<H: HttpSend> MastodonClient<H> for Mastodon<H> {
(delete) delete_status: "statuses/{}" => Empty, (delete) delete_status: "statuses/{}" => Empty,
(get) get_filter: "filters/{}" => Filter, (get) get_filter: "filters/{}" => Filter,
(delete) delete_filter: "filters/{}" => Empty, (delete) delete_filter: "filters/{}" => Empty,
(delete) delete_from_suggestions: "suggestions/{}" => Empty,
} }
fn add_filter(&self, request: &mut AddFilterRequest) -> Result<Filter> { fn add_filter(&self, request: &mut AddFilterRequest) -> Result<Filter> {

@ -253,4 +253,12 @@ pub trait MastodonClient<H: HttpSend = HttpSender> {
fn delete_filter(&self, id: u64) -> Result<Empty> { fn delete_filter(&self, id: u64) -> Result<Empty> {
unimplemented!("This method was not implemented"); unimplemented!("This method was not implemented");
} }
/// GET /api/v1/suggestions
fn get_follow_suggestions(&self) -> Result<Vec<Account>> {
unimplemented!("This method was not implemented");
}
/// DELETE /api/v1/suggestions/:account_id
fn delete_from_suggestions(&self, id: u64) -> Result<Empty> {
unimplemented!("This method was not implemented");
}
} }

Loading…
Cancel
Save