aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/Mastodon.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 70aac20..8dcdf1b 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -1394,14 +1394,24 @@ class Mastodon:
1394 # Reading data: Follow suggestions 1394 # Reading data: Follow suggestions
1395 ### 1395 ###
1396 @api_version("3.0.0", "3.0.0", __DICT_VERSION_ACCOUNT) 1396 @api_version("3.0.0", "3.0.0", __DICT_VERSION_ACCOUNT)
1397 def directory(self): 1397 def directory(self, offset=None, limit=None, order=None, local=None):
1398 """ 1398 """
1399 Fetch the contents of the profile directory, if enabled on the server. 1399 Fetch the contents of the profile directory, if enabled on the server.
1400 1400
1401 `offset` how many accounts to skip before returning results. Default 0.
1402
1403 `limit` how many accounts to load. Default 40.
1404
1405 `order` "active" to sort by most recently posted statuses (default) or
1406 "new" to sort by most recently created profiles.
1407
1408 `local` True to return only local accounts.
1409
1401 Returns a list of `user dicts`_. 1410 Returns a list of `user dicts`_.
1402 1411
1403 """ 1412 """
1404 return self.__api_request('GET', '/api/v1/directory') 1413 params = self.__generate_params(locals())
1414 return self.__api_request('GET', '/api/v1/directory', params)
1405 1415
1406 ### 1416 ###
1407 # Reading data: Endorsements 1417 # Reading data: Endorsements
Powered by cgit v1.2.3 (git 2.41.0)