ntfy
#
- class platypush.message.event.ntfy.NotificationEvent(*args, id: str, topic: str, message: str, title: str | None = None, priority: int | None = None, time: int | None = None, attachment: Mapping | None = None, actions: Collection[Mapping] | None = None, tags: Collection[str] | None = None, url: str | None = None, **kwargs)[source]#
Bases:
Event
Event triggered when a message/notification is received on a subscribed channel.
- __init__(*args, id: str, topic: str, message: str, title: str | None = None, priority: int | None = None, time: int | None = None, attachment: Mapping | None = None, actions: Collection[Mapping] | None = None, tags: Collection[str] | None = None, url: str | None = None, **kwargs)[source]#
- Parameters:
id – Message ID.
topic – The topic where the message was received.
message – Message body.
title – Message title.
priority – Message priority.
time – Message UNIX timestamp.
tags – Notification tags.
url – URL spawned when the notification is clicked.
actions –
List of actions associated to the notification. Example:
[ { "action": "view", "label": "Open portal", "url": "https://home.nest.com/", "clear": true }, { "action": "http", "label": "Turn down", "url": "https://api.nest.com/", "method": "PUT", "headers": { "Authorization": "Bearer abcdef..." }, "body": "{\"temperature\": 65}" }, { "action": "broadcast", "label": "Take picture", "intent": "com.myapp.TAKE_PICTURE_INTENT", "extras": { "camera": "front" } } ]
attachment –
Attachment metadata. Example:
{ "name": "image.jpg", "type": "image/jpeg", "size": 30017, "expires": 1654144935, "url": "https://ntfy.example.com/file/01234abcd.jpg" }