diff options
author | naoya_t <[email protected]> | 2017-04-26 11:51:24 +0900 |
---|---|---|
committer | naoya_t <[email protected]> | 2017-04-26 11:51:24 +0900 |
commit | a8d5ee75c14165a0a88b45e927107d6112a04156 (patch) | |
tree | 99274f1a3adba07bd218d7322c9999f34691b542 /mastodon | |
parent | fde6806120ecb23de0e2da698e4a5a2635f7013d (diff) | |
download | mastodon.py-a8d5ee75c14165a0a88b45e927107d6112a04156.tar.gz |
mastodon/Added since_id/max_id/limit params to account_following()/account_folowers()
Diffstat (limited to 'mastodon')
-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 08075a7..8456f9e 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 account_relationships(self, id): | 385 | def account_relationships(self, id): |
384 | """ | 386 | """ |