Merge pull request #45 from naoyat/add_account_following_params

Added since_id/max_id/limit params to account_following()/account_followers()
This commit is contained in:
Lorenz Diener 2017-04-26 11:16:11 +02:00 cometido por GitHub
commit 67aa919f40

Veure arxiu

@ -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 follows(self, uri):
"""