Learn R Programming

pushoverr (version 0.1.1)

check_receipt: Determine whether or not an emergency message has been acknowledged

Description

check_receipt issues a query to Pushover to determine whether or not an emergency-priority message has been acknowledged and when (if applicable). If a callback URL was specified with the message, it will also report whether or not that callback URL was POSTed to and when.

is.acknowledged checks to see whether or not the given emergency message receipt has been acknowledged or not.

Usage

check_receipt(receipt, ...)

is.acknowledged(receipt, info = TRUE, ...)

Arguments

receipt
A message receipt (e.g., 'KAWXTswy4cekx6vZbHBKbCKk1c1fdf')
...
An application token can be specified with token
info
is.acknowledged will print out additional information about who acknowledged the message, when, and if and when the callback URL

Value

  • A PushoverResponse object containing the response from the server

    is.acknowledged returns a boolean indicating whether the message has been acknowledged (TRUE) or not (FALSE)

Details

is.acknowledged returns whether a message was acknowledged (TRUE) or not (FALSE) as well as some information about when the message was received and by whom.

Examples

Run this code
response <- check_receipt(token='KzGDORePK8gMaC0QOYAMyEEuzJnyUi',
                          receipt='KAWXTswy4cekx6vZbHBKbCKk1c1fdf')

if(is.acknowledged(token='KzGDORePK8gMaC0QOYAMyEEuzJnyUi',
                   receipt='KAWXTswy4cekx6vZbHBKbCKk1c1fdf'))
{
    cat('Message has been read.\n')
}

Run the code above in your browser using DataLab