HerokuNotification
HerokuNotification provides an easy way of interfacing with the Heroku
Notifications API.
Usage
The Notifications API requires a subject, text, and details of who or what
you want to send the message to:
HerokuNotification.post(:subject => "Will you be my valentine?",
:text => "Please help be support rampant consumerism.",
:to => @user)
Alternatively you can explicitly provie the recipient type and id:
HerokuNotification.post(:subject => "Will you be my valentine?",
:text => "Please help be support rampant consumerism.",
:to => "user",
:id => 1)
Include any additional parameters (e.g., :html
) and they will be sent
along also.
Why would I want to use this?
Because you're too lazy to read the API docs for the main notifications
service, or you don't want to have to keep up with any API changes*. Both
are perfectly valid, and not mutually exclusive.
*I'll keep this client gem in line with the currently deployed API, while
making every effort to maintain backward compatibility in the gem.
Compatibility
Test suite has currently only been confirmed on the following platforms:
Contributions
Patches gladly accepted. Please fork this repo, add a relevant test, and send
me a pull request.