A Ruby wrapper for the Urban Airship v3 API
You can view detailed documentation of this library at http://rdoc.info/github/anthonator/dirigible/master/frames. We try to make sure that our documentation is up-to-date and thorough. However, we do recommend keeping the Urban Airship v3 API documentation handy.
If you find any discrepency in our documentation please file an issue.
Add this line to your application's Gemfile:
gem 'dirigible'
And then execute:
$ bundle
Or install it yourself as:
$ gem install dirigible
Configure dirigible...
Dirigible.configure do |config|
config.app_key = YOUR_APP_KEY
config.master_secret = YOUR_MASTER_SECRET
end
Make an API request...
begin
response = Dirigible::Push.create({
audience: { device_token: "998BAD77A8347EFE7920F5367A4811C4385D526AE42C598A629A73B94EEDBAC8" },
notification: { alert: "Hello!" },
device_types: "all"
})
puts "YAY!" if response[:ok] == true # All JSON responses are converted to hash's
rescue Dirigible::Error => e
puts "BUSTED!!! #{e.message}"
end
In order to make any requests you must first configure your app key and master secret...
Dirigible.configure do |config|
config.app_key = YOUR_APP_KEY
config.master_secret = YOUR_MASTER_SECRET
end
Change the HTTP library used for making requests to Urban Airship. Since we use Faraday you can use any supported adapter...
Dirigible.configure do |config|
...
config.http_adapter = :excon
end
- List tags
- Create a tag
- Adding and removing devices from a tag
- Delete a tag
- Batch modification of tags
- Get Android APID device information
- Get Backberry PIN device information
- Get iOS device token information
- List Android APID's registered to an application
- List Blackberry PIN's registered to an application
- Count iOS device tokens registered to an application
- List iOS device tokens registered to an application
- List iOS device tokens that can't recieve messages
- Register an Android APID
- Register a Blackberry PIN device
- Register an iOS device token
- Delete a Blackberry PIN device
- Delete an iOS device token
- List all segments for an application
- Create a segment
- Get a specific segment
- Update a segment
- Delete a segment
- Retrieve cutoff dates
- Look up location boundary information
- Search for locations using a bounding box
- Search for a location by latitude and longitude
- Search for a location boundary by name
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Dirigible is maintained and funded by Sticksnleaves
Thanks to all of our contributors