From 24f0a4e5c353a3580324aed58ad9945d17dff863 Mon Sep 17 00:00:00 2001 From: Francesco Nazzaro Date: Tue, 9 Feb 2021 17:50:57 +0100 Subject: Fix issue #35. Restore the original service API while keeping the (#36) mimic_ui feature. --- cdsapi/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3