Learn R Programming

pushoverr (version 0.1.1)

PushoverResponse: Create a PushoverResponse to store a Pushover server response

Description

The PushoverResponse function is a constructor that creates PushoverResponse-class objects. These objects store information from responses to Pushover queries

Usage

PushoverResponse(status = NA_integer_, request = NA_character_,
  status_code = NA_integer_, headers = NA, content = NA)

Arguments

status
The status response from Pushover 1=good, 0=problem
request
The unique identifier associated with the message
status_code
The HTTP status code returned
headers
A list containing the headers in the HTTP response
content
A list containing the content from the response. This will vary depending on the type of query sent to the server.

See Also

PushoverResponse-class

Examples

Run this code
library(pushoverr)

# Create PushoverResponse object
response <- POST(url="https://api.pushover.net:443/1/messages.json",
                 body=params)
response <- PushoverResponse(status=1,
                             request='8345bfe5fbd7d346028f2863de77c8c4',
                             status_code=200,cheaders=resp$headers,
                             content=content(rsp))

Run the code above in your browser using DataLab