/onesignal

Ruby wrapper for the OneSignal API https://documentation.onesignal.com/docs/server-api-overview

Primary LanguageRubyMIT LicenseMIT

Stories in Ready Build Status Dependency Status Code Climate

Onesignal

This Gem is a Ruby wrapper for the Onesignal API which provides Push Notification delivery and automation.

Installation

This project hasn't been released yet. It's under development.

Usage

To use the API client it is necessary to set the server APP_ID. You can find the APP_ID on the settings page of your app.

Onesignal.configure do |config|
  config.app_id = 'APP_ID'
end

Then the client will be ready to receive method calls on the Onesignal module.

result = Onesignal.add_device(device_type: 0, identifier: 'ce777617da7f548fe7a9ab6febb56')
Onesignal.notify(message: 'Test notification', devices_ids: result.device_id)

Methods supported by this gem and their parameters can be found in the API Reference

Contributing

  1. Fork it ( https://github.com/[my-github-username]/onesignal/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request