diff options
author | Francesco Nazzaro <francesconazzaro89@gmail.com> | 2021-02-09 17:50:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-09 16:50:57 +0000 |
commit | 24f0a4e5c353a3580324aed58ad9945d17dff863 (patch) | |
tree | 80ad073f293fee92c4d5bcb4de0d4c93ef010e10 | |
parent | c0093b9b6707f3e2cb4c0f142fa5e91567d1daf6 (diff) |
Fix issue #35. Restore the original service API while keeping the (#36)
mimic_ui feature.
-rw-r--r-- | cdsapi/api.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cdsapi/api.py b/cdsapi/api.py index eb82e34..a603716 100644 --- a/cdsapi/api.py +++ b/cdsapi/api.py @@ -350,9 +350,10 @@ class Client(object): result.download(target) return result - def service(self, name, mimic_ui=False, *args, **kwargs): + def service(self, name, *args, **kwargs): self.delete = False # Don't delete results name = "/".join(name.split(".")) + mimic_ui = kwargs.pop('mimic_ui', False) # To mimic the CDS ui the request should be populated directly with the kwargs if mimic_ui: request = kwargs |