aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2020-04-12 11:17:37 +0200
committerneodarz <neodarz@neodarz.net>2020-04-12 11:17:37 +0200
commit2c8fa5251fa49bd8f7e537fbdbc801bc7bc04e59 (patch)
treeb5d1ad3c04cf144ce421f3b80a6e809aa2e25b57
parent9ab6caef3c048b254b55fae422c64ebafd330296 (diff)
downloadpyfunkwhale-2c8fa5251fa49bd8f7e537fbdbc801bc7bc04e59.tar.xz
pyfunkwhale-2c8fa5251fa49bd8f7e537fbdbc801bc7bc04e59.zip
Add rate-limit endpoint
Diffstat (limited to '')
-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 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: