diff --git a/README.md b/README.md index ffb0d4c..a95e4bb 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,10 @@ Redash.create_data_source("pg", "First Data Source", { - Custom options. +- **schedule (optional)** + + - Schedule configurations + ```python ### EXAMPLE ### diff --git a/redashAPI/client.py b/redashAPI/client.py index 477bfac..24a6adb 100644 --- a/redashAPI/client.py +++ b/redashAPI/client.py @@ -53,7 +53,7 @@ def create_data_source(self, _type: str, name: str, options: dict=None): return self.post('data_sources', payload) - def create_query(self, ds_id: int, name: str, qry: str, desc: str="", with_results: bool=True, options: dict=None): + def create_query(self, ds_id: int, name: str, qry: str, desc: str="", with_results: bool=True, options: dict=None, schedule: dict=None): if options is None or not isinstance(options, dict): options = {} @@ -62,7 +62,8 @@ def create_query(self, ds_id: int, name: str, qry: str, desc: str="", with_resul "name": name, "query": qry, "description": desc, - "options": options + "options": options, + "schedule": schedule } res = self.post('queries', payload)