From 7de1bdc00968359ce35314acdd0f6afc05813132 Mon Sep 17 00:00:00 2001 From: Paul Woolcock Date: Thu, 13 Sep 2018 21:37:44 -0400 Subject: [PATCH] Implements the methods for the follow suggestions API Closes #72 --- src/lib.rs | 2 ++ src/mastodon_client.rs | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index b4c0a0f..78bbd18 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -206,6 +206,7 @@ impl MastodonClient for Mastodon { (get) get_push_subscription: "push/subscription" => Subscription, (delete) delete_push_subscription: "push/subscription" => Empty, (get) get_filters: "filters" => Vec, + (get) get_follow_suggestions: "suggestions" => Vec, } route_v2! { @@ -231,6 +232,7 @@ impl MastodonClient for Mastodon { (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 { 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 { fn delete_filter(&self, id: u64) -> Result { unimplemented!("This method was not implemented"); } + /// GET /api/v1/suggestions + fn get_follow_suggestions(&self) -> Result> { + unimplemented!("This method was not implemented"); + } + /// DELETE /api/v1/suggestions/:account_id + fn delete_from_suggestions(&self, id: u64) -> Result { + unimplemented!("This method was not implemented"); + } }