diff --git a/README.md b/README.md index 4836bf6..a553684 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,12 @@ This package was developed to configure Uptime Kuma with Ansible. The Ansible co Python version 3.7+ is required. -Supported Uptime Kuma versions: 1.17.0 - 1.21.2 +Supported Uptime Kuma versions: + +| uptime-kuma-api | Uptime Kuma | +|-----------------|-----------------| +| 1.0.0 | 1.21.3 | +| 0.1.0 - 0.13.0 | 1.17.0 - 1.21.2 | Installation --- diff --git a/run_tests.sh b/run_tests.sh index af7ff36..ff942c7 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -5,7 +5,7 @@ if [ $version ] then versions=("$version") else - versions=(1.21.2 1.21.1 1.20.2 1.19.6 1.18.5 1.17.1) + versions=(1.21.3) fi for version in ${versions[*]} diff --git a/tests/test_maintenance.py b/tests/test_maintenance.py index e5cf40e..cb443e3 100644 --- a/tests/test_maintenance.py +++ b/tests/test_maintenance.py @@ -30,7 +30,7 @@ class TestMaintenance(UptimeKumaTestCase): if parse_version(self.api.version) >= parse_version("1.21.2"): expected_maintenance.update({ - "timezone": "Europe/Berlin" + "timezoneOption": "Europe/Berlin" }) # add maintenance @@ -242,7 +242,7 @@ class TestMaintenance(UptimeKumaTestCase): "daysOfMonth": [], "cron": "50 5 * * *", "durationMinutes": 120, - "timezone": "Europe/Berlin" + "timezoneOption": "Europe/Berlin" } self.do_test_maintenance_strategy(expected_maintenance) diff --git a/uptime_kuma_api/api.py b/uptime_kuma_api/api.py index cf86537..d8c0bf4 100644 --- a/uptime_kuma_api/api.py +++ b/uptime_kuma_api/api.py @@ -848,7 +848,7 @@ class UptimeKumaApi(object): timeRange: list = None, cron: str = "30 3 * * *", durationMinutes: int = 60, - timezone: str = None + timezoneOption: str = None ) -> dict: if not dateRange: dateRange = [ @@ -883,7 +883,7 @@ class UptimeKumaApi(object): data.update({ "cron": cron, "durationMinutes": durationMinutes, - "timezone": timezone, + "timezoneOption": timezoneOption, }) return data @@ -2915,7 +2915,7 @@ class UptimeKumaApi(object): ], "cron": "", "durationMinutes": null, - "timezone": "Europe/Berlin", + "timezoneOption": "Europe/Berlin", "timezoneOffset": "+02:00", "status": "ended" } @@ -2967,7 +2967,7 @@ class UptimeKumaApi(object): "cron": null, "duration": null, "durationMinutes": 0, - "timezone": "Europe/Berlin", + "timezoneOption": "Europe/Berlin", "timezoneOffset": "+02:00", "status": "ended" } @@ -3016,7 +3016,7 @@ class UptimeKumaApi(object): ... ], ... weekdays=[], ... daysOfMonth=[], - ... timezone="Europe/Berlin" + ... timezoneOption="Europe/Berlin" ... ) { "msg": "Added Successfully.", @@ -3049,7 +3049,7 @@ class UptimeKumaApi(object): ... ], ... weekdays=[], ... daysOfMonth=[], - ... timezone="Europe/Berlin" + ... timezoneOption="Europe/Berlin" ... ) { "msg": "Added Successfully.", @@ -3087,7 +3087,7 @@ class UptimeKumaApi(object): ... 0 ... ], ... daysOfMonth=[], - ... timezone="Europe/Berlin" + ... timezoneOption="Europe/Berlin" ... ) { "msg": "Added Successfully.", @@ -3126,7 +3126,7 @@ class UptimeKumaApi(object): ... 30, ... "lastDay1" ... ], - ... timezone="Europe/Berlin" + ... timezoneOption="Europe/Berlin" ... ) { "msg": "Added Successfully.", @@ -3149,7 +3149,7 @@ class UptimeKumaApi(object): ... daysOfMonth=[], ... cron="50 5 * * *", ... durationMinutes=120, - ... timezone="Europe/Berlin" + ... timezoneOption="Europe/Berlin" ... ) { "msg": "Added Successfully.",