Provides a hook to Boxcar, a notification service for iOS devices. Boxcar has an API for service providers like Twitter, Facebook et. al., and one for boxcar users who want to setup notifications for arbitrary events, like what can be done with Growl and the Boxcar Growl plugin on Mac OS X.
If you want to use the users API, you must add Growl as a service on your Boxcar account.
npm install hook.io-boxcar
Edit the config.json file with your API key and secret (if you have one). You might want to use one of the existing generic providers in Boxcar. If so, the broadcast functionality will not be available.
Start with
hookio-boxcar
and you're all set.
Event | Payload | Description |
---|---|---|
boxcar::subscribe | email (String) | Subscribes a user for notifications |
boxcar::notify | email, message (JSON Object) | Notifies a given user with given message |
boxcar::broadcast | message (String) | Notifies all subscribing users with given message |
boxcar::notifyUser | message (String) | Uses the "User API" to send notification to self |
When using boxcar::notify
, send payload as JSON Object:
var notification = {
email: "[email protected]",
message: "blah-blah"
};
someHook.emit('boxcar::notify', notification);
Note: the current implementation of notify
only supports one email address, and not a collection of addresses which is possible with the Provider API.
Event | Payload | Description |
---|---|---|
boxcar::response | result | HTML result code |
{
"boxcar": {
"providerKey": "fF4FiLb...", // Private service key or generic key
"providerSecret": "3G6k...", // Only needed with private key
"username": "[email protected]", // Only needed if using Users API
"password": "...", // Only needed if using Users API
"fromScreenName": "", // Optional
"fromRemoteServiceId": "", // Optional
"redirectPayload": "", // Optional
"sourceUrl": "", // Optional
"iconUrl": "" // Optional
}
}