forked from DGNum/uptime-kuma-api
feat: add support for uptime kuma 1.19.3
This commit is contained in:
parent
4c9d017f62
commit
982c37045a
4 changed files with 23 additions and 4 deletions
|
@ -8,7 +8,7 @@ This package was developed to configure Uptime Kuma with Ansible. The Ansible co
|
|||
|
||||
Python version 3.6+ is required.
|
||||
|
||||
Supported Uptime Kuma versions: 1.17.0 - 1.19.2
|
||||
Supported Uptime Kuma versions: 1.17.0 - 1.19.3
|
||||
|
||||
Installation
|
||||
---
|
||||
|
|
|
@ -5,7 +5,7 @@ if [ $version ]
|
|||
then
|
||||
versions=("$version")
|
||||
else
|
||||
versions=(1.19.2 1.18.5 1.17.1)
|
||||
versions=(1.19.3 1.18.5 1.17.1)
|
||||
fi
|
||||
|
||||
for version in ${versions[*]}
|
||||
|
|
|
@ -58,6 +58,7 @@ def monitor_docstring(mode) -> str:
|
|||
:param str, optional radiusCallingStationId: Calling Station Id. Identifier of the calling device., defaults to None
|
||||
"""
|
||||
|
||||
|
||||
def notification_docstring(mode) -> str:
|
||||
return f"""
|
||||
:param str{", optional" if mode == "edit" else ""} name: Friendly Name
|
||||
|
@ -206,7 +207,7 @@ def notification_docstring(mode) -> str:
|
|||
:param str, optional ntfypassword: Notification option for ``type`` :attr:`~.NotificationType.NTFY`
|
||||
:param str, optional ntfytopic: Notification option for ``type`` :attr:`~.NotificationType.NTFY`
|
||||
:param int, optional ntfyPriority: Notification option for ``type`` :attr:`~.NotificationType.NTFY`
|
||||
:param int, optional ntfyIcon: Notification option for ``type`` :attr:`~.NotificationType.NTFY`
|
||||
:param str, optional ntfyIcon: Notification option for ``type`` :attr:`~.NotificationType.NTFY`
|
||||
:param str, optional ntfyserverurl: Notification option for ``type`` :attr:`~.NotificationType.NTFY`
|
||||
:param bool, optional smseagleEncoding: Notification option for ``type`` :attr:`~.NotificationType.SMSEAGLE`. True to send messages in unicode.
|
||||
:param int, optional smseaglePriority: Notification option for ``type`` :attr:`~.NotificationType.SMSEAGLE`. Message priority (0-9, default = 0).
|
||||
|
@ -214,8 +215,12 @@ def notification_docstring(mode) -> str:
|
|||
:param str, optional smseagleToken: Notification option for ``type`` :attr:`~.NotificationType.SMSEAGLE`. API Access token.
|
||||
:param str, optional smseagleRecipient: Notification option for ``type`` :attr:`~.NotificationType.SMSEAGLE`. Recipient(s) (multiple must be separated with comma).
|
||||
:param str, optional smseagleUrl: Notification option for ``type`` :attr:`~.NotificationType.SMSEAGLE`. Your SMSEagle device URL.
|
||||
:param str, optional webhookUrl: Notification option for ``type`` :attr:`~.NotificationType.ZOHOCLIQ`
|
||||
:param str, optional kookGuildID: Notification option for ``type`` :attr:`~.NotificationType.KOOK`
|
||||
:param str, optional kookBotToken: Notification option for ``type`` :attr:`~.NotificationType.KOOK`
|
||||
"""
|
||||
|
||||
|
||||
def proxy_docstring(mode) -> str:
|
||||
return f"""
|
||||
:param ProxyProtocol{", optional" if mode == "edit" else ""} protocol: Proxy Protocol
|
||||
|
@ -229,6 +234,7 @@ def proxy_docstring(mode) -> str:
|
|||
:param bool, optional applyExisting: Apply on all existing monitors, defaults to False
|
||||
"""
|
||||
|
||||
|
||||
def docker_host_docstring(mode) -> str:
|
||||
return f"""
|
||||
:param str{", optional" if mode == "edit" else ""} name: Friendly Name
|
||||
|
|
|
@ -136,6 +136,12 @@ class NotificationType(str, Enum):
|
|||
SMSEAGLE = "SMSEagle"
|
||||
"""SMSEagle"""
|
||||
|
||||
ZOHOCLIQ = "ZohoCliq"
|
||||
"""ZohoCliq"""
|
||||
|
||||
KOOK = "Kook"
|
||||
"""Kook"""
|
||||
|
||||
|
||||
notification_provider_options = {
|
||||
NotificationType.ALERTA: dict(
|
||||
|
@ -376,7 +382,14 @@ notification_provider_options = {
|
|||
smseagleToken=dict(type="str"),
|
||||
smseagleRecipient=dict(type="str"),
|
||||
smseagleUrl=dict(type="str")
|
||||
)
|
||||
),
|
||||
NotificationType.ZOHOCLIQ: dict(
|
||||
webhookUrl=dict(type="str")
|
||||
),
|
||||
NotificationType.KOOK: dict(
|
||||
kookGuildID=dict(type="str"),
|
||||
kookBotToken=dict(type="str")
|
||||
),
|
||||
}
|
||||
|
||||
notification_provider_conditions = dict(
|
||||
|
|
Loading…
Reference in a new issue