aboutsummaryrefslogtreecommitdiff
path: root/pyfunkwhale/funkwhale.py
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2020-04-11 22:50:22 +0200
committerneodarz <neodarz@neodarz.net>2020-04-11 22:50:22 +0200
commit5a72f69fb66094cb9ad75410abaa4a6f970da0cb (patch)
treee05f6cc831160500517a9852a411ac10b8df4f54 /pyfunkwhale/funkwhale.py
parentcb0b33d55855f1dd99b73cb01e2c2af8b6a89d0d (diff)
downloadpyfunkwhale-5a72f69fb66094cb9ad75410abaa4a6f970da0cb.tar.xz
pyfunkwhale-5a72f69fb66094cb9ad75410abaa4a6f970da0cb.zip
Add ability to list favorites tracks
Diffstat (limited to 'pyfunkwhale/funkwhale.py')
-rw-r--r--pyfunkwhale/funkwhale.py23
1 files changed, 23 insertions, 0 deletions
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()