aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2020-04-11 18:44:24 +0200
committerneodarz <neodarz@neodarz.net>2020-04-11 18:44:24 +0200
commite2aabaaf0f8acbd64017ae89ddfa537d1d810350 (patch)
tree92dae8884d41083ae1f2aee2e96bde939daf586c
parent1f53a3aced63f61a183ea555ef6ace3388d078b5 (diff)
downloadpyfunkwhale-e2aabaaf0f8acbd64017ae89ddfa537d1d810350.tar.xz
pyfunkwhale-e2aabaaf0f8acbd64017ae89ddfa537d1d810350.zip
Add abilty to retreive a single artist
-rw-r--r--README.md2
-rw-r--r--pyfunkwhale/funkwhale.py11
2 files changed, 12 insertions, 1 deletions
diff --git a/README.md b/README.md
index f022bda..acf5eaf 100644
--- a/README.md
+++ b/README.md
@@ -71,7 +71,7 @@ List of features implemented or planned:
- [x] Login with OAuth2 Authorization Code flow
- [/] Artists
- [x] List artists
- - [ ] Retrieve a single artist
+ - [x] Retrieve a single artist
- [ ] List available user libraries containing work from this artist
- [ ] Albums
- [ ] List albums
diff --git a/pyfunkwhale/funkwhale.py b/pyfunkwhale/funkwhale.py
index bca346a..99dcfae 100644
--- a/pyfunkwhale/funkwhale.py
+++ b/pyfunkwhale/funkwhale.py
@@ -40,3 +40,14 @@ class Funkwhale(object):
params = self._build_params(arguments)
return self.client.call('/artists/', 'get', params).json()
+
+ def artist(self, _id, refresh: bool = False):
+ """
+ Retrieve a single artist
+ """
+
+ arguments = locals()
+
+ params = self._build_params(arguments)
+
+ return self.client.call(f'/artists/{_id}', 'get', params).json()