diff options
author | neodarz <neodarz@neodarz.net> | 2020-04-12 11:14:01 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2020-04-12 11:14:01 +0200 |
commit | 7485bb63466f17febe2e165940bdc6d70e2e715f (patch) | |
tree | c6e075ee7ffe74b6582326d4cf1f7978eadd3882 | |
parent | deb60837020b8e11830d5546939f6dead6398a03 (diff) | |
download | pyfunkwhale-7485bb63466f17febe2e165940bdc6d70e2e715f.tar.xz pyfunkwhale-7485bb63466f17febe2e165940bdc6d70e2e715f.zip |
Add endpoint for retrieve current user information
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | pyfunkwhale/funkwhale.py | 7 |
2 files changed, 8 insertions, 1 deletions
@@ -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: |