diff options
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/Mastodon.py | 14 |
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 |