#Ruby AirGram Client
This is an unofficial wrapper for the AirGram notifications service. It provides a wrapper to interact with both the guest and the authenticated methods.
gem install rb-airgram
You can either initialize the client with the username and password set, or if you are only planning on using the guest sending function, you can initialize it with no parameters.
require 'airgram' # Without authentication client = Airgram.new # Send a notificiation with no authentication needed (url is optional) client.send_as_guest("email@example.com", "Some awesome message", "http://www.bbc.com") # Auth needed for below functions # Username = Service Key # Password = Service Secret client = Airgram.new(:username => "XXXX", :password => "XXXX") # Subscribe a new user client.subscribe("firstname.lastname@example.org") # Send notification to subscribed user (url is optional) client.send("email@example.com", "Some awesome message", "http://www.bbc.com") # Send notification to EVERY subscribed user (url is optional) client.broadcast("Some awesome message", "http://www.bbc.com")
See AirGram API Docs for more information.
All methods return either true / false depending on whether the notification request succeeds.