aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mastodon/suggestions.py')
-rw-r--r--mastodon/suggestions.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/mastodon/suggestions.py b/mastodon/suggestions.py
new file mode 100644
index 0000000..ab55993
--- /dev/null
+++ b/mastodon/suggestions.py
@@ -0,0 +1,32 @@
1# suggestions.py - follow suggestion endpoints
2
3from .versions import _DICT_VERSION_ACCOUNT
4from .utility import api_version
5
6from .internals import Mastodon as Internals
7
8class Mastodon(Internals):
9 ###
10 # Reading data: Follow suggestions
11 ###
12 @api_version("2.4.3", "2.4.3", _DICT_VERSION_ACCOUNT)
13 def suggestions(self):
14 """
15 Fetch follow suggestions for the logged-in user.
16
17 Returns a list of :ref:`account dicts <account dicts>`.
18
19 """
20 return self.__api_request('GET', '/api/v1/suggestions')
21
22 ###
23 # Writing data: Follow suggestions
24 ###
25 @api_version("2.4.3", "2.4.3", _DICT_VERSION_ACCOUNT)
26 def suggestion_delete(self, account_id):
27 """
28 Remove the user with the given `account_id` from the follow suggestions.
29 """
30 account_id = self.__unpack_id(account_id)
31 url = '/api/v1/suggestions/{0}'.format(str(account_id))
32 self.__api_request('DELETE', url) \ No newline at end of file
Powered by cgit v1.2.3 (git 2.41.0)