<commit_before>[![Build Status](https://circleci.com/gh/upmysport/one_signal.svg?style=shield)](https://circleci.com/gh/upmysport/one_signal)
[![Dependency Status](https://gemnasium.com/upmysport/one_signal.svg)](https://gemnasium.com/upmysport/one_signal)
[![Code Climate](https://codeclimate.com/github/upmysport/one_signal/badges/gpa.svg)](https://codeclimate.com/github/upmysport/one_signal)
# OneSignal

This Gem is a Ruby wrapper for the [OneSignal API](https://documentation.onesignal.com/docs/server-api-overview) which provides Push Notification delivery and automation.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'one_signal'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install one_signal

## Usage

TODO: Write usage instructions here

## Contributing

1. Fork it ( https://github.com/[my-github-username]/one_signal/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<commit_msg>Add first draft of usage documentation<commit_after>[![Build Status](https://circleci.com/gh/upmysport/one_signal.svg?style=shield)](https://circleci.com/gh/upmysport/one_signal)
[![Dependency Status](https://gemnasium.com/upmysport/one_signal.svg)](https://gemnasium.com/upmysport/one_signal)
[![Code Climate](https://codeclimate.com/github/upmysport/one_signal/badges/gpa.svg)](https://codeclimate.com/github/upmysport/one_signal)
# OneSignal

This Gem is a Ruby wrapper for the [OneSignal API](https://documentation.onesignal.com/docs/server-api-overview) which provides Push Notification delivery and automation.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'one_signal'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install one_signal

## 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.

```ruby
OneSignal.configure do |config|
  config.app_id = 'TEST_APP_ID'
end
```

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

```ruby
OneSignal.add_device(device_type: 0, identifier: 'ce777617da7f548fe7a9ab6febb56')
```

Methods supported by this gem and their parameters can be found in the [API Reference](https://documentation.onesignal.com/docs/server-api-overview)


## Contributing

1. Fork it ( https://github.com/[my-github-username]/one_signal/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
{'fraction_non_alphanumeric': 0.12445730824891461, 'fraction_numerical': 0.009406657018813314, 'mean_word_length': 4.946236559139785, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 17, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '847766', 'n_tokens_mistral': 921, 'n_tokens_neox': 857, 'n_words': 249}