aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2019-10-12 22:05:35 +0200
committerLorenz Diener <[email protected]>2019-10-12 22:05:35 +0200
commit1f36deb11950a627b52a587fc3ec30c37f9bb456 (patch)
tree450aed6468f83de31492e90b0cefb42b2e07765a /mastodon/Mastodon.py
parent63bf5afc61503ebd99a7e7bc36014b378db98d23 (diff)
downloadmastodon.py-1f36deb11950a627b52a587fc3ec30c37f9bb456.tar.gz
Add, test and document profile directory API (fixes #188)
Diffstat (limited to 'mastodon/Mastodon.py')
-rw-r--r--mastodon/Mastodon.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 9c6f1ce..d07bae7 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -1239,6 +1239,19 @@ class Mastodon:
1239 return self.__api_request('GET', '/api/v1/suggestions') 1239 return self.__api_request('GET', '/api/v1/suggestions')
1240 1240
1241 ### 1241 ###
1242 # Reading data: Follow suggestions
1243 ###
1244 @api_version("3.0.0", "3.0.0", __DICT_VERSION_ACCOUNT)
1245 def directory(self):
1246 """
1247 Fetch the contents of the profile directory, if enabled on the server.
1248
1249 Returns a list of `user dicts`_.
1250
1251 """
1252 return self.__api_request('GET', '/api/v1/directory')
1253
1254 ###
1242 # Reading data: Endorsements 1255 # Reading data: Endorsements
1243 ### 1256 ###
1244 @api_version("2.5.0", "2.5.0", __DICT_VERSION_ACCOUNT) 1257 @api_version("2.5.0", "2.5.0", __DICT_VERSION_ACCOUNT)
Powered by cgit v1.2.3 (git 2.41.0)