aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2020-04-12 11:14:01 +0200
committerneodarz <neodarz@neodarz.net>2020-04-12 11:14:01 +0200
commit7485bb63466f17febe2e165940bdc6d70e2e715f (patch)
treec6e075ee7ffe74b6582326d4cf1f7978eadd3882
parentdeb60837020b8e11830d5546939f6dead6398a03 (diff)
downloadpyfunkwhale-7485bb63466f17febe2e165940bdc6d70e2e715f.tar.xz
pyfunkwhale-7485bb63466f17febe2e165940bdc6d70e2e715f.zip
Add endpoint for retrieve current user information
-rw-r--r--README.md2
-rw-r--r--pyfunkwhale/funkwhale.py7
2 files changed, 8 insertions, 1 deletions
diff --git a/README.md b/README.md
index d9fb025..82dd441 100644
--- a/README.md
+++ b/README.md
@@ -81,7 +81,7 @@ List of features implemented or planned:
- [x] Get an JWT token
- [ ] Create an account
- [ ] Request a password request
- - [ ] Retrieve user information
+ - [x] Retrieve user information
- [ ] Retrieve rate-limit information and current usage status
- [x] Artists
- [x] List artists
diff --git a/pyfunkwhale/funkwhale.py b/pyfunkwhale/funkwhale.py
index 02b76f2..1f8257b 100644
--- a/pyfunkwhale/funkwhale.py
+++ b/pyfunkwhale/funkwhale.py
@@ -55,6 +55,13 @@ class Funkwhale(object):
return self.client.call('/oauth/apps/', 'post', data=datas).json()
+ def user_me(self):
+ """
+ Retrieve profile informations of the current user
+ """
+
+ return self.client.call('/users/users/me', 'get').json()
+
def artists(self, q: str = None, ordering: str = None,
playable: bool = None, page: int = None,
page_size: int = None) -> dict: