mirror of
https://github.com/ihabunek/toot
synced 2025-01-11 00:53:49 +01:00
Added vote method to api
This commit is contained in:
parent
6a6225caa5
commit
b50fb9d9fd
@ -361,6 +361,12 @@ def whois(app, user, account):
|
||||
return http.get(app, user, f'/api/v1/accounts/{account}').json()
|
||||
|
||||
|
||||
def vote(app, user, poll_id, choices: list):
|
||||
url = f"/api/v1/polls/{poll_id}/votes"
|
||||
json = {'choices': choices}
|
||||
return http.post(app, user, url, json=json).json()
|
||||
|
||||
|
||||
def mute(app, user, account):
|
||||
return _account_action(app, user, account, 'mute')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user