diff options
author | Lorenz Diener <[email protected]> | 2017-04-26 11:16:11 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2017-04-26 11:16:11 +0200 |
commit | 67aa919f4002cdf6e45897373e95499815f5fc40 (patch) | |
tree | c5352da681e6f5827c763b6340ec4747a06d5031 | |
parent | 6d4cc61682f42ad6181dde8ef2fb765b304568bc (diff) | |
parent | a8d5ee75c14165a0a88b45e927107d6112a04156 (diff) | |
download | mastodon.py-67aa919f4002cdf6e45897373e95499815f5fc40.tar.gz |
Merge pull request #45 from naoyat/add_account_following_params
Added since_id/max_id/limit params to account_following()/account_followers()
-rw-r--r-- | mastodon/Mastodon.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index c69fe9e..03a475e 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -364,21 +364,23 @@ class Mastodon: | |||
364 | params = self.__generate_params(locals(), ['id']) | 364 | params = self.__generate_params(locals(), ['id']) |
365 | return self.__api_request('GET', '/api/v1/accounts/' + str(id) + '/statuses', params) | 365 | return self.__api_request('GET', '/api/v1/accounts/' + str(id) + '/statuses', params) |
366 | 366 | ||
367 | def account_following(self, id): | 367 | def account_following(self, id, max_id = None, since_id = None, limit = None): |
368 | """ | 368 | """ |
369 | Fetch users the given user is following. | 369 | Fetch users the given user is following. |
370 | 370 | ||
371 | Returns a list of user dicts. | 371 | Returns a list of user dicts. |
372 | """ | 372 | """ |
373 | return self.__api_request('GET', '/api/v1/accounts/' + str(id) + '/following') | 373 | params = self.__generate_params(locals(), ['id']) |
374 | return self.__api_request('GET', '/api/v1/accounts/' + str(id) + '/following', params) | ||
374 | 375 | ||
375 | def account_followers(self, id): | 376 | def account_followers(self, id, max_id = None, since_id = None, limit = None): |
376 | """ | 377 | """ |
377 | Fetch users the given user is followed by. | 378 | Fetch users the given user is followed by. |
378 | 379 | ||
379 | Returns a list of user dicts. | 380 | Returns a list of user dicts. |
380 | """ | 381 | """ |
381 | return self.__api_request('GET', '/api/v1/accounts/' + str(id) + '/followers') | 382 | params = self.__generate_params(locals(), ['id']) |
383 | return self.__api_request('GET', '/api/v1/accounts/' + str(id) + '/followers', params) | ||
382 | 384 | ||
383 | def follows(self, uri): | 385 | def follows(self, uri): |
384 | """ | 386 | """ |