mirror of
https://github.com/ihabunek/toot.git
synced 2024-09-29 04:35:54 -04:00
Fix formatting
This commit is contained in:
parent
6833607984
commit
e01bdaad93
@ -300,6 +300,7 @@ def follow(app, user, account):
|
|||||||
def unfollow(app, user, account):
|
def unfollow(app, user, account):
|
||||||
return _account_action(app, user, account, 'unfollow')
|
return _account_action(app, user, account, 'unfollow')
|
||||||
|
|
||||||
|
|
||||||
def _get_account_list(app, user, path):
|
def _get_account_list(app, user, path):
|
||||||
accounts = []
|
accounts = []
|
||||||
while path:
|
while path:
|
||||||
@ -308,10 +309,12 @@ def _get_account_list(app, user, path):
|
|||||||
path = _get_next_path(response.headers)
|
path = _get_next_path(response.headers)
|
||||||
return accounts
|
return accounts
|
||||||
|
|
||||||
|
|
||||||
def following(app, user, account):
|
def following(app, user, account):
|
||||||
path = '/api/v1/accounts/{}/{}'.format(account, 'following')
|
path = '/api/v1/accounts/{}/{}'.format(account, 'following')
|
||||||
return _get_account_list(app, user, path)
|
return _get_account_list(app, user, path)
|
||||||
|
|
||||||
|
|
||||||
def followers(app, user, account):
|
def followers(app, user, account):
|
||||||
path = '/api/v1/accounts/{}/{}'.format(account, 'followers')
|
path = '/api/v1/accounts/{}/{}'.format(account, 'followers')
|
||||||
return _get_account_list(app, user, path)
|
return _get_account_list(app, user, path)
|
||||||
@ -344,7 +347,7 @@ def single_status(app, user, status_id):
|
|||||||
|
|
||||||
|
|
||||||
def get_notifications(app, user, exclude_types=[], limit=20):
|
def get_notifications(app, user, exclude_types=[], limit=20):
|
||||||
params={"exclude_types[]": exclude_types, "limit": limit}
|
params = {"exclude_types[]": exclude_types, "limit": limit}
|
||||||
return http.get(app, user, '/api/v1/notifications', params).json()
|
return http.get(app, user, '/api/v1/notifications', params).json()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user