CloudFivePush
Dead simple push notifications. This rubygem is just a very simple wrapper around the Cloud Five push notification API. With it (and an account on http://cloudfiveapp.com), you can painlessly schedule push notifications to android and ios devices from your server.
Installation
Add this line to your application's Gemfile:
gem 'cloud_five_push'
And then execute:
$ bundle
Or install it yourself as:
$ gem install cloud_five_push
Usage
Global configuration:
CloudFivePush.api_key = "my_api_key"
Sending a notification immediately to all your users:
CloudFivePush.broadcast! "Hello from Cloud Five!"
Send a notification to just some of your users:
= CloudFivePush::Message.new
. = "Hello from Cloud Five"
.user_identifiers = [123, 345, "[email protected]"] # use whatever you registered with on the mobile app
.send!
Schedule a notification to be sent in the future:
= CloudFivePush::Message.new
. = "Hello from Cloud Five"
.scheduled_at = Time.now + 3600 # 1 hour from now
.send!
Contributing
- Fork it ( http://github.com/cloudfive/pushapi-ruby/fork )
- 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