This package provides a programmatic interface from R.
One possibility is to use a file .rpushbullet.json
in the
$HOME
directory. (Note that on Windows you may have to set the
$HOME
environment variable.) It uses the JSON format which uses
a key:value pair notation; values may be arrays. A simple example
follows.
{ "key": "abc...YourKeyHereBetweenQuote....xyz",
"devices": [ "abc...SomeId.......xyz", "abc...SomeOtherId..xyz" ],
"names": [ "Phone", "Browser" ],
"defaultdevice": "Phone"
}
The entire block is delimited by a pair of curly braces. Within the
curly braces we have
However, use of a configuration file is not mandatory. The arguments
can also be supplied as global options (which could be done in the
usual R startup files, see Startup
for details) as well
as via standard function arguments when calling the corresponding
functions. When using global options, use the names
rpushbullet.key
, rpushbullet.devices
, rpushbullet.names
,
and rpushbullet.defaultdevice
corresponding to the entries in
the JSON file shown above.
The main function is pbPost
which can be used to send a
message comprising a note (with free-form body and title), link (for
sending a URL), address or even a file. The message recipients is
typically one (or several) of the devices known to the user (see the
next section for details), it can also be an email address in which
case
pbPost
, as well
as the documentation for pbGetDevices
.