This a simple wrapper to pushwoosh remote API
Add this line to your application's Gemfile:
gem 'pushwoosh'
And then execute:
$ bundle
Or install it yourself as:
$ gem install pushwoosh
Pushwoosh.PushNotification.new(auth_hash).notify_all(message, other_options)
Pushwoosh.PushNotification.new(auth_hash).notify_devices(message, devices, other_options)
auth_hash = { auth: '55555-5555', application: '1234zxcvb' }
for other_options
hash you can see the https://www.pushwoosh.com/programming-push-notification/pushwoosh-push-notification-remote-api/#PushserviceAPI-Method-messages-create and you can choose any key you want
Create a initializer in your application
config/initializers/pushwoosh.rb
and put configs
Pushwoosh.configure do |config|
config.application = '5555-5555'
config.auth = 'abcdefghijklmnopq'
end
Pushwoosh.notify_all(message, other_options)
Pushwoosh.notify_devices(message, devices, other_options)
*NOTE: devices is an array
- 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