1
0
mirror of https://github.com/ihabunek/toot.git synced 2024-11-03 04:17:21 -05:00

Improve argument naming

This commit is contained in:
Ivan Habunek 2022-11-22 10:01:51 +01:00
parent 662b1b5bbb
commit e03b80d0be
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95

View File

@ -47,8 +47,8 @@ def process_response(response):
return response
def get(app, user, url, params=None, headers=None):
url = app.base_url + url
def get(app, user, path, params=None, headers=None):
url = app.base_url + path
headers = headers or {}
headers["Authorization"] = f"Bearer {user.access_token}"
@ -66,8 +66,8 @@ def anon_get(url, params=None):
return process_response(response)
def post(app, user, url, data=None, files=None, allow_redirects=True, headers=None):
url = app.base_url + url
def post(app, user, path, data=None, files=None, allow_redirects=True, headers=None):
url = app.base_url + path
headers = headers or {}
headers["Authorization"] = f"Bearer {user.access_token}"
@ -78,8 +78,8 @@ def post(app, user, url, data=None, files=None, allow_redirects=True, headers=No
return process_response(response)
def delete(app, user, url, data=None, headers=None):
url = app.base_url + url
def delete(app, user, path, data=None, headers=None):
url = app.base_url + path
headers = headers or {}
headers["Authorization"] = f"Bearer {user.access_token}"