From 7bf12208b36efd45bfb1d9be1df6f261bfbd6a67 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Apr 2020 18:07:17 +0200 Subject: Add abaility to build parameters --- pyfunkwhale/funkwhale.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pyfunkwhale/funkwhale.py b/pyfunkwhale/funkwhale.py index 8f399ab..ec88f0d 100644 --- a/pyfunkwhale/funkwhale.py +++ b/pyfunkwhale/funkwhale.py @@ -13,5 +13,13 @@ class Funkwhale(object): scopes, username, password, domain, authorization_endpoint, token_endpoint, token_filename) + def _build_params(self, arguments): + params = {} + for k, v in arguments.items(): + if k != 'self' and v is not None: + params[k] = v + + return params + def artists(self): return self.client.call('/artists/', 'get').json() -- cgit v1.2.1