aboutsummaryrefslogtreecommitdiff
path: root/pyfunkwhale/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyfunkwhale/client.py')
-rw-r--r--pyfunkwhale/client.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pyfunkwhale/client.py b/pyfunkwhale/client.py
index 1fce019..cf19673 100644
--- a/pyfunkwhale/client.py
+++ b/pyfunkwhale/client.py
@@ -76,6 +76,13 @@ class Client(object):
self._get_token()
write_file(self.token_filename, self.token)
+ def _get_JWT_token(self):
+ """
+ Get a JWT token.
+ """
+ data = {"username": self.username, "password": self.password}
+ return self.call('/token', 'post', data=data).json()
+
def call(self, endpoint: str, method: str, params: dict = None,
data: dict = None) -> Response:
"""