aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2022-11-22 01:12:44 +0200
committerGitHub <[email protected]>2022-11-22 01:12:44 +0200
commitbf96add20c56b23d6c6a7e56de7caf67f0d8d421 (patch)
tree298851e1ede1fc0ad8dc9612139757d8c1dd9427
parentf3d25fa19deb2caf0793d685a542509f94c2c8a9 (diff)
parentb857861e38644484cb3b40dd5053ca0f0bbb4066 (diff)
downloadmastodon.py-bf96add20c56b23d6c6a7e56de7caf67f0d8d421.tar.gz
Merge pull request #268 from heharkon/master
Directory listing functionality had some possible parameters missing
-rw-r--r--mastodon/Mastodon.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 48b1307..a2986cb 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -1389,14 +1389,24 @@ class Mastodon:
1389 # Reading data: Follow suggestions 1389 # Reading data: Follow suggestions
1390 ### 1390 ###
1391 @api_version("3.0.0", "3.0.0", __DICT_VERSION_ACCOUNT) 1391 @api_version("3.0.0", "3.0.0", __DICT_VERSION_ACCOUNT)
1392 def directory(self): 1392 def directory(self, offset=None, limit=None, order=None, local=None):
1393 """ 1393 """
1394 Fetch the contents of the profile directory, if enabled on the server. 1394 Fetch the contents of the profile directory, if enabled on the server.
1395 1395
1396 `offset` how many accounts to skip before returning results. Default 0.
1397
1398 `limit` how many accounts to load. Default 40.
1399
1400 `order` "active" to sort by most recently posted statuses (default) or
1401 "new" to sort by most recently created profiles.
1402
1403 `local` True to return only local accounts.
1404
1396 Returns a list of `user dicts`_. 1405 Returns a list of `user dicts`_.
1397 1406
1398 """ 1407 """
1399 return self.__api_request('GET', '/api/v1/directory') 1408 params = self.__generate_params(locals())
1409 return self.__api_request('GET', '/api/v1/directory', params)
1400 1410
1401 ### 1411 ###
1402 # Reading data: Endorsements 1412 # Reading data: Endorsements
Powered by cgit v1.2.3 (git 2.41.0)