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