aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--pyfunkwhale/funkwhale.py23
2 files changed, 25 insertions, 1 deletions
diff --git a/README.md b/README.md
index 7d16a33..ef7c45d 100644
--- a/README.md
+++ b/README.md
@@ -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()