From 2c8fa5251fa49bd8f7e537fbdbc801bc7bc04e59 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sun, 12 Apr 2020 11:17:37 +0200 Subject: Add rate-limit endpoint --- README.md | 2 +- pyfunkwhale/funkwhale.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 82dd441..023c872 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ List of features implemented or planned: - [ ] Create an account - [ ] Request a password request - [x] Retrieve user information - - [ ] Retrieve rate-limit information and current usage status + - [x] Retrieve rate-limit information and current usage status - [x] Artists - [x] List artists - [x] Retrieve a single artist diff --git a/pyfunkwhale/funkwhale.py b/pyfunkwhale/funkwhale.py index 1f8257b..1faf788 100644 --- a/pyfunkwhale/funkwhale.py +++ b/pyfunkwhale/funkwhale.py @@ -62,6 +62,13 @@ class Funkwhale(object): return self.client.call('/users/users/me', 'get').json() + def rate_limit(self): + """ + Retrieve rate-limit information and current usage status + """ + + return self.client.call('/rate-limit', 'get').json() + def artists(self, q: str = None, ordering: str = None, playable: bool = None, page: int = None, page_size: int = None) -> dict: -- cgit v1.2.1