class documentation
class PushoverClient: (source)
A client for sending notifications to mobile devices via the Pushover API.
| Method | send |
Send a single notification. Returns the parsed JSON response. |
| Class Variable | device |
Restrict to a single device name, if set |
| Class Variable | timeout |
Timeout for HTTP requests in seconds (default 10.0) |
| Class Variable | token |
Application/API token |
| Class Variable | user |
User or group key |
def sendNotification(self, message:
str, title: str | None = None, priority: int = 0, sound: str | None = None, url: str | None = None, urlTitle: str | None = None, html: bool = False, retry: int | None = None, expire: int | None = None) -> dict:
(source)
¶
Send a single notification. Returns the parsed JSON response.
| Parameters | |
message:str | The message to send (max 1024 characters). |
title:str | None | Optional title for the message (max 250 characters). |
priority:int | Message priority (-2 to 2). Default is 0 (normal). |
sound:str | None | Optional sound name. Default is "pushover". |
url:str | None | Optional supplementary URL to show with the message. |
urlstr | None | Optional title for the supplementary URL. |
html:bool | Whether to interpret the message as HTML (default: False). |
retry:int | None | Required if priority=2 (emergency). The retry interval in seconds (minimum 30). |
expire:int | None | Required if priority=2 (emergency). The total time in seconds Pushover will keep retrying (maximum 10800). |
| Returns | |
dict | Parsed JSON response from the Pushover API. |
| Raises | |
PushoverError - If the API returns an error or a non-200 status code | |