diff options
Diffstat (limited to '')
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | pyfunkwhale/funkwhale.py | 23 |
2 files changed, 25 insertions, 1 deletions
@@ -93,6 +93,7 @@ List of features implemented or planned: - [x] License - [x] List licences - [x] Retrieve a single license -- [ ] favorites +- [\] favorites + - [x] List favorites - [ ] Mark a given track as favorite - [ ] Remove diff --git a/pyfunkwhale/funkwhale.py b/pyfunkwhale/funkwhale.py index 23d6412..38c388d 100644 --- a/pyfunkwhale/funkwhale.py +++ b/pyfunkwhale/funkwhale.py @@ -351,3 +351,26 @@ class Funkwhale(object): params = self._build_params(arguments) return self.client.call(f'/licenses/{_code}', 'get', params).json() + + def favorites_tracks(self, q: str = None, user: str = None, + page: int = None, page_size: int = None) -> dict: + """ + List favorites tracks + + Parameters + ---------- + q : str, optional + Search query used to filter favorites tracks + user : str, optional + Limit results to favorites tracks belonging to the given user + page : int, optional + Default value : 1 + page_size : int, optional + Default value : 25 + """ + + arguments = locals() + + params = self._build_params(arguments) + + return self.client.call(f'/favorites/tracks/', 'get', params).json() |