We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 38fdcc7 commit 646e22dCopy full SHA for 646e22d
1 file changed
pushover.py
@@ -163,6 +163,17 @@ def poll(self):
163
setattr(self, when, request.answer[when])
164
return request
165
166
+ def cancel(self):
167
+ """If the message request has a priority of 2, Pushover will keep
168
+ sending the same notification until it either reaches its ``expire`` value
169
+ or is aknowledged by the client. Calling the :func:`cancel` function will
170
+ cancel the notification early.
171
+ """
172
+ if (self.receipt and not any(getattr(self, parameter)
173
+ for parameter in self.parameters)):
174
+ request = Request("post", RECEIPT_URL + self.receipt + "/cancel.json", {})
175
+ return request
176
+
177
178
class Client:
179
"""This is the main class of the module. It represents a specific Pushover
0 commit comments