-
Notifications
You must be signed in to change notification settings - Fork 28
ReceiptAndCancelEmerg
Hal Hockersmith edited this page Jul 10, 2016
·
1 revision
Emergency Priority messages can be handled via the Receipts and Callback API of Pushover
With the receipt token from a Response the emergency message status can be queried using the Receipt endpoint.
With a client (likely previously created)
PushoverClient client = new PushoverRestClient();
simply call "Message Receipt" with the API Token and message receipt
Response resp = client.requestEmergencyReceipt(APP_TOKEN, receipt);
and a Receipt will be created with the success or failure of the request.
A message can be canceled to stop the repeated delivery early through the Cancel endpoint. Simply use the client's cancelEmergencyMessage(API_TOKEN,Recipt Token)
call to request the message be stopped.
With a client
PushoverClient client = new PushoverRestClient();
simply call "Cancel Message" and the emergency message will be halted.
Response resp = client.cancelEmergencyMessage(APP_TOKEN, receipt);
The Response returned will detail the success or failure of the cancel call.