Notifiee
The Notifiee gem allows Ruby developers to programmatically send notifications to team members (via multiple channels like Email, SMS, Telegram, Slack, Messenger, and Twitter DMs) through the Notifiee web service. The API is implemented as JSON over HTTP.
Installation
Add this line to your application's Gemfile:
gem 'notifiee'
then bundle:
$ bundle
Or install globally:
$ gem install notifiee
Usage
First configure your API client:
NotifieeAPI::Client.api_key = "YOUR_API_KEY"
In Rails projects this should go in a notifiee initializer and the API key should probably be set with an ENV variable:
# config/initializers/notifiee.rb
NotifieeAPI::Client.api_key = ENV["YOUR_API_KEY"]
Your API key is associated with a project created within the notifiee.com web interface. To get an API key you will need to sign up.
Once the configuration is set you can send notifications in your code like this:
NotifieeAPI.notify(:bob, [:telegram], 'Something happened in our app!')
# or with a subject
NotifieeAPI.notify(:bob, [:telegram], 'Something happened in our app!', subject: 'Our App Notification')
NOTE: :bob
is a notifiee that you would have had to have created from within the notifiee.com web interface and configured the Telegram channel for.
License
The gem is available as open source under the terms of the MIT License.