eddelbuettel/rpushbullet — pull request #6 by r2evans (2014-06-12 16:19:51+00:00)
Title: rpushbullet.json generator function plus format of `$devices`

Dirk,

I think this fork marries up with some of our discussion and your rudder.

- changed format of $devices to list of lists
- removed check for names, they are included in $devices now
- added pb{Load,Save}Config for dealing with .rpushbullet.json
- changed .getDevices() to accept both older device list and newer
list of lists
- added logic in pbPost() to check $nickname and $iden for recipients
- updated docs

If you're satisfied with `pbSaveConfig()` and `pbLoadConfig()`, it makes sense to change `.onAttach()` to load the file. I thought the ability to manually load a file was useful (and symmetric with saving to a file).

There are a couple of minor inconsistencies I haven't resolved yet, though:

- not certain if the 'pbDevices' class is being applied as you initially intended; in this patch, it's being applied to the whole structure that includes `$key`, `$devices`, and `$defaultdevice`, whereas it had been applied just to the `$devices` vector;
- I'm not entirely satisfied with some of my new argument names; and
- I suspect that, with this proposed structure of `$devices`, perhaps print.* and summary.* functions could use an update.

Let me know if you need this patch adjusted.