1- # onesignal
1+ < h1 align = " center " >Welcome to the official OneSignal Ruby Client 👋</ h1 >
22
33[ ![ Gem Version] [ rgb ]] [ rgl ]
44
5+ <p >
6+ <a href =" https://github.com/OneSignal/onesignal-ruby-client/blob/master/README.md " target =" _blank " >
7+ <img alt="Documentation" src="https://img.shields.io/badge/documentation-yes-brightgreen.svg" />
8+ </a >
9+ <a href =" https://github.com/OneSignal/onesignal-ruby-client/graphs/commit-activity " target =" _blank " >
10+ <img alt="Maintenance" src="https://img.shields.io/badge/Maintained%3F-yes-green.svg" />
11+ </a >
12+ <a href =" https://twitter.com/onesignal " target =" _blank " >
13+ <img alt="Twitter: onesignal" src="https://img.shields.io/twitter/follow/onesignal.svg?style=social" />
14+ </a >
15+ </p >
16+
17+
518OneSignal - the Ruby gem for the OneSignal
619
720A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
@@ -10,6 +23,10 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g
1023
1124OneSignal is a simple ruby wrapper for the [ OneSignal API] [ osa ] .
1225
26+ ### 🖤 [ RubyGems] ( https://rubygems.org/gems/onesignal )
27+
28+ ## 🚧 In Beta 🚧
29+
1330## Installation
1431
1532Add this line to your application's Gemfile:
@@ -26,32 +43,32 @@ Or install it yourself as:
2643
2744 $ gem install onesignal --pre
2845
46+ Or install from Github:
47+ $ gem "onesignal", '~ > 1.0.0.beta1', git: 'git://github.com/OneSignal/onesignal-ruby-client.git'
48+
2949## Getting Started
3050
3151Please follow the [ installation] ( #installation ) procedure and then run the following code:
3252
3353``` ruby
34- # Load the gem
54+ require ' time '
3555require ' onesignal'
36-
37- # Setup authorization
56+ # setup authorization
3857OneSignal .configure do |config |
3958 # Configure Bearer authorization: app_key
40- config.access_token = ' YOUR_BEARER_TOKEN '
59+ config.access_token = ' YOUR BEARER TOKEN ' # Change this
4160end
4261
4362api_instance = OneSignal ::DefaultApi .new
44- app_id = ' app_id_example' # String |
45- notification_id = ' notification_id_example' # String |
63+ notification = OneSignal ::Notification .new ({app_id: ' YOUR APP ID' }) # Notification
4664
4765begin
48- # Stop a scheduled or currently outgoing notification
49- result = api_instance.cancel_notification(app_id, notification_id )
66+ # Create notification
67+ result = api_instance.create_notification(notification )
5068 p result
5169rescue OneSignal ::ApiError => e
52- puts " Exception when calling DefaultApi->cancel_notification : #{ e } "
70+ puts " Error when calling DefaultApi->create_notification : #{ e } "
5371end
54-
5572```
5673
5774## Documentation for API Endpoints
@@ -139,3 +156,22 @@ The gem is available as open source under the terms of the [MIT License][mit].
139156[ rgl ] : https://rubygems.org/gems/onesignal
140157[ osa ] : https://documentation.onesignal.com/reference/
141158[ mit ] : http://opensource.org/licenses/MIT
159+
160+ ## Author
161+
162+ * Website: https://onesignal.com
163+ * Twitter: [ @onesignal ] ( https://twitter.com/onesignal )
164+ * Github: [ @OneSignal ] ( https://github.com/OneSignal )
165+
166+ ## 🤝 Contributing
167+
168+ Contributions, issues and feature requests are welcome!<br />Feel free to check [ issues page] ( https://github.com/OneSignal/onesignal-ruby-client/issues ) .
169+
170+ ## Show your support
171+
172+ Give a ⭐️ if this project helped you!
173+
174+ ## 📝 License
175+
176+ Copyright © 2022 [ OneSignal] ( https://github.com/OneSignal ) .<br />
177+ This project is [ MIT] ( https://opensource.org/licenses/MIT ) licensed.
0 commit comments