From 1f36deb11950a627b52a587fc3ec30c37f9bb456 Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Sat, 12 Oct 2019 22:05:35 +0200 Subject: Add, test and document profile directory API (fixes #188) --- mastodon/Mastodon.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'mastodon/Mastodon.py') diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 9c6f1ce..d07bae7 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -1238,6 +1238,19 @@ class Mastodon: """ return self.__api_request('GET', '/api/v1/suggestions') + ### + # Reading data: Follow suggestions + ### + @api_version("3.0.0", "3.0.0", __DICT_VERSION_ACCOUNT) + def directory(self): + """ + Fetch the contents of the profile directory, if enabled on the server. + + Returns a list of `user dicts`_. + + """ + return self.__api_request('GET', '/api/v1/directory') + ### # Reading data: Endorsements ### -- cgit v1.2.3