Learn R Programming

⚠️There's a newer version (1.1.0) of this package.Take me there.

pushoverr

Got some R code that takes a while to complete? Enough time to take a little walk or go get a coffee, but maybe not long enough to go home for the day? pushoverr is an R package that allows you to send push notifications via Pushover to your mobile devices (iOS or Android) or desktop. Now you'll be able to easily let yourself know when it's done (or whenever else you want to send yourself or your group a message).

Prerequisites

You'll need a free account with Pushover. Once you have that, log in and register an application. You should now have two codes---a user key and an API token/key. These are what identify you and your app(s) to Pushover. You'll pass these along to pushoverr whenever you send a message. You'll also need the Pushover app for iOS or Android (desktop notifications coming soon).

Installation

Installing pushoverr is as easy as running:

install.packages('pushoverr')

Latest and Greatest (Fingers Crossed) via GitHub

If you like living on the edge (or need a previous version), you can use devtools to install the latest and greatest version of pushoverr from GitHub. To do so:

if(!require('devtools')) install.packages('devtools')
library(devtools)
install_github('briandconnelly/pushoverr')

You'll also need to make sure that you have the excellent httr package, which makes working with web connections easy. For an up-to-date R setup, this can be done by running install.packages('httpr').

Using pushoverr

Now that pushoverr's been installed, you're ready to start pushing some notifications. To begin using pushoverr, you'll need to first load the library. To do this, run:

library(pushoverr)

Example 1: Send Yourself A Message

In order to send a message, you'll need to have your user key and an app token. Then:

pushover(message='Mr. Watson--come here--I want to see you.', user=<YOUR USER KEY>, token=<YOUR APP TOKEN>)

Within just a few seconds, your phone/tablet/watch/whatever should be abuzz with this historic message.

Example 2: Send Yourself an Important Message

Pushoverr provides message different message priorities. Quiet messages arrive without playing a sound, high priority messages arrive with a reddish background, and emergency messages arrive and repeat until they've been acknowledged. pushoverr provides easy methods for sending these:

pushover_quiet(message='The kittens are sleeping', user=<YOUR USER KEY>, token=<YOUR APP TOKEN>)

Or more urgently:

pushover_emergency(message='The kittens are awake, and they are angry!', user=<YOUR USER KEY>, token=<YOUR APP TOKEN>)

Emergency messages return a receipt token that can be checked with is.acknowledged() to see whether or not it has been acknowledged.

Example 3: Saving Your Credentials

Remembering to include your user key and app token every time you send a message is a big hassle. You can set these once and use them for all subsequent messages:

set_pushover_app(token=<YOUR APP TOKEN>, user=<YOUR USER KEY>)
pushover('I can now send so many more messages!')

And to temporarily use a different app token or user:

pushover('You can get with this (app)')
pushover('Or you can get with that (app)', token=<OTHER APP TOKEN>)

Tip: If you'll always be using the same user key and app token, you can add this step to your Rprofile file (see ?Startup) so that it is done automatically each time R is started.

Example 4: Sending to a Specific Device

If you have more than one device with Pushover, you can also send messages to a specific device:

pushover('If you pretend like this is important, you can walk out of the boring meeting', device='Phone')

Feature Requests and Bug Reports

For all feature requests and bug reports, visit pushoverr on GitHub.

Related Links

alternate Pushover tool for R

Disclaimer

This package and its author are not affiliated with Superblock, developers of Pushover.

Copy Link

Version

Install

install.packages('pushoverr')

Monthly Downloads

379

Version

0.1.4

License

BSD_2_clause + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Brian Connelly

Last Published

November 6th, 2014

Functions in pushoverr (0.1.4)

set_pushover_app

Store Pushover app and user information and use for all subsequent queries
PushoverMessage-class

The PushoverMessage class
check_receipt

Determine whether or not an emergency message has been acknowledged
send_pushovermessage

Send a PushoverMessage object
PushoverResponse-class

The PushoverResponse class
validate_key

Determine whether or not a given user/group key is valid
status,PushoverResponse-method

Return the Pushover response status
get_devices

Get a list of the user's registered devices
http_status_code,PushoverResponse-method

Return the HTTP status code returned by a Pushover API query
pushover_priorities

List of the priorities available and their descriptions
content_value,PushoverResponse-method

Get a value from a API query response
validate_PushoverMessage

Validate a given PushoverMessage object
show,PushoverMessage-method

Print information about a PushoverMessage object
PushoverMessage

Create a Pushover message
is.valid_token

Determine whether or not a given API token is valid
pushoverr

pushoverr: Send push notifications using Pushover
receipt,PushoverResponse-method

Get the receipt from a Pushover server response (M)
is.success,PushoverResponse-method

Return whether a PushoverResponse indicated success (TRUE) or not (FALSE)
send,PushoverMessage-method

Send a Pushover message
show,PushoverResponse-method

Print information about a PushoverResponse object
is.valid_device

Determine whether or not a given device name is valid
request,PushoverResponse-method

Return the Pushover response request token
get_pushover_sounds

Get a list of available message sounds
cancel_receipt

Cancel an emergency message
PushoverResponse

Create a PushoverResponse to store a Pushover server response
validate_PushoverResponse

Validate a given PushoverResponse object
is.valid_receipt

Determine whether or not a given message receipt is valid
pushover

Send a message using Pushover
headers,PushoverResponse-method

Get the HTTP headers returned by a Pushover API query