diff options
author | Paul Woolcock <paul@woolcock.us> | 2018-09-13 21:37:44 -0400 |
---|---|---|
committer | Paul Woolcock <paul@woolcock.us> | 2018-09-14 09:11:13 -0400 |
commit | 7de1bdc00968359ce35314acdd0f6afc05813132 (patch) | |
tree | 0fef8dad4d80e278c8efbc3dd0d4fa78410aa7ee /src | |
parent | 7d164cb8dbf32466956109dc9be23e911f946645 (diff) |
Implements the methods for the follow suggestions API
Closes #72
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 2 | ||||
-rw-r--r-- | src/mastodon_client.rs | 8 |
2 files changed, 10 insertions, 0 deletions
@@ -206,6 +206,7 @@ impl<H: HttpSend> MastodonClient<H> for Mastodon<H> { (get) get_push_subscription: "push/subscription" => Subscription, (delete) delete_push_subscription: "push/subscription" => Empty, (get) get_filters: "filters" => Vec<Filter>, + (get) get_follow_suggestions: "suggestions" => Vec<Account>, } route_v2! { @@ -231,6 +232,7 @@ impl<H: HttpSend> MastodonClient<H> for Mastodon<H> { (delete) delete_status: "statuses/{}" => Empty, (get) get_filter: "filters/{}" => Filter, (delete) delete_filter: "filters/{}" => Empty, + (delete) delete_from_suggestions: "suggestions/{}" => Empty, } fn add_filter(&self, request: &mut AddFilterRequest) -> Result<Filter> { diff --git a/src/mastodon_client.rs b/src/mastodon_client.rs index 539886f..e1e9c6a 100644 --- a/src/mastodon_client.rs +++ b/src/mastodon_client.rs @@ -253,4 +253,12 @@ pub trait MastodonClient<H: HttpSend = HttpSender> { fn delete_filter(&self, id: u64) -> Result<Empty> { 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"); + } } |