From a8d5ee75c14165a0a88b45e927107d6112a04156 Mon Sep 17 00:00:00 2001 From: naoya_t Date: Wed, 26 Apr 2017 11:51:24 +0900 Subject: [PATCH] mastodon/Added since_id/max_id/limit params to account_following()/account_folowers() --- mastodon/Mastodon.py | 10 ++++++---- 1 file 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: params = self.__generate_params(locals(), ['id']) return self.__api_request('GET', '/api/v1/accounts/' + str(id) + '/statuses', params) - def account_following(self, id): + def account_following(self, id, max_id = None, since_id = None, limit = None): """ Fetch users the given user is following. Returns a list of user dicts. """ - return self.__api_request('GET', '/api/v1/accounts/' + str(id) + '/following') + params = self.__generate_params(locals(), ['id']) + return self.__api_request('GET', '/api/v1/accounts/' + str(id) + '/following', params) - def account_followers(self, id): + def account_followers(self, id, max_id = None, since_id = None, limit = None): """ Fetch users the given user is followed by. Returns a list of user dicts. """ - return self.__api_request('GET', '/api/v1/accounts/' + str(id) + '/followers') + params = self.__generate_params(locals(), ['id']) + return self.__api_request('GET', '/api/v1/accounts/' + str(id) + '/followers', params) def account_relationships(self, id): """