diff options
author | neodarz <neodarz@neodarz.net> | 2020-04-11 18:41:37 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2020-04-11 18:41:37 +0200 |
commit | 1f53a3aced63f61a183ea555ef6ace3388d078b5 (patch) | |
tree | d9d66ba90ec4ab527c8cc0b2b587693dbe0a3390 | |
parent | 05572298b8e59972ac5439f4d435d67b8714ab19 (diff) | |
download | pyfunkwhale-1f53a3aced63f61a183ea555ef6ace3388d078b5.tar.xz pyfunkwhale-1f53a3aced63f61a183ea555ef6ace3388d078b5.zip |
Separate uri parameter and params parameter
-rw-r--r-- | pyfunkwhale/funkwhale.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pyfunkwhale/funkwhale.py b/pyfunkwhale/funkwhale.py index 79e9c65..bca346a 100644 --- a/pyfunkwhale/funkwhale.py +++ b/pyfunkwhale/funkwhale.py @@ -14,9 +14,14 @@ class Funkwhale(object): token_endpoint, token_filename) def _build_params(self, arguments): + """ + Build params dict for python-requests. Not that all key who start + with an underscore are treated as par of the uri and are not in + the params dict. + """ params = {} for k, v in arguments.items(): - if k != 'self' and v is not None: + if k != 'self' and v is not None and not k.startswith("_"): params[k] = v return params |