Learn R Programming

pushoverr (version 0.1.1)

content_value,PushoverResponse-method: Get a value from a API query response

Description

Pushover API calls return JSON data containing parameter-value data related to the query. content_value extracts the value for a given parameter from a PushoverResponse-class object.

Usage

## S3 method for class 'PushoverResponse':
content_value(object, param)

Arguments

object
param
The name of a parameter in the response

Value

  • A string containing the value associated with the given parameter.

Examples

Run this code
# Get the acknowledged status of an emergency message
message <- PushoverMessage(message='EMERGENCY!', priority=2,
                           token='KzGDORePK8gMaC0QOYAMyEEuzJnyUi',
                           user='uQiRzpo4DXghDmr9QzzfQu27cmVRsG')
response <- send(message)
acknowledged <- as.numeric(content_value(response, 'acknowledged'))

Run the code above in your browser using DataLab