onesignal 1.0.0.beta1 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +31 -0
- data/LICENSE +24 -0
- data/README.md +75 -45
- data/RELEASE_INSTRUCTIONS.md +11 -0
- data/docs/DefaultApi.md +86 -86
- data/docs/InlineResponse200.md +1 -1
- data/docs/InlineResponse2001.md +1 -1
- data/docs/InlineResponse2002.md +1 -1
- data/docs/InlineResponse2005.md +4 -2
- data/docs/{InlineResponse2003.md → InlineResponse2007.md} +3 -3
- data/docs/InlineResponse2008.md +18 -0
- data/docs/InlineResponse4002.md +4 -2
- data/docs/InlineResponse4003.md +18 -0
- data/docs/InvalidIdentifierError.md +20 -0
- data/docs/Notification.md +12 -12
- data/docs/Notification200Errors.md +49 -0
- data/docs/NotificationAllOf.md +11 -11
- data/docs/NotificationSlice.md +1 -1
- data/docs/NotificationTarget.md +1 -1
- data/docs/NotificationWithMeta.md +260 -0
- data/docs/NotificationWithMetaAllOf.md +38 -0
- data/docs/OutcomesData.md +18 -0
- data/docs/Player.md +2 -2
- data/docs/PlayerNotificationTarget.md +1 -1
- data/docs/StringMap.md +1 -1
- data/lib/onesignal/api/default_api.rb +82 -55
- data/lib/onesignal/api_client.rb +9 -7
- data/lib/onesignal/api_error.rb +2 -2
- data/lib/onesignal/configuration.rb +6 -3
- data/lib/onesignal/models/app.rb +3 -2
- data/lib/onesignal/models/button.rb +3 -2
- data/lib/onesignal/models/delivery_data.rb +8 -2
- data/lib/onesignal/models/export_players_request_body.rb +3 -2
- data/lib/onesignal/models/filter.rb +3 -2
- data/lib/onesignal/models/filter_expressions.rb +3 -2
- data/lib/onesignal/models/filter_notification_target.rb +3 -2
- data/lib/onesignal/models/get_notification_request_body.rb +3 -2
- data/lib/onesignal/models/inline_response200.rb +4 -3
- data/lib/onesignal/models/inline_response2001.rb +4 -3
- data/lib/onesignal/models/inline_response2002.rb +4 -3
- data/lib/onesignal/models/inline_response2005.rb +19 -9
- data/lib/onesignal/models/{inline_response2003.rb → inline_response2007.rb} +7 -6
- data/lib/onesignal/models/{inline_response2004.rb → inline_response2008.rb} +13 -21
- data/lib/onesignal/models/inline_response201.rb +3 -2
- data/lib/onesignal/models/inline_response400.rb +3 -2
- data/lib/onesignal/models/inline_response4001.rb +3 -2
- data/lib/onesignal/models/inline_response4002.rb +20 -10
- data/lib/onesignal/models/{inline_response409.rb → inline_response4003.rb} +14 -22
- data/lib/onesignal/models/invalid_identifier_error.rb +234 -0
- data/lib/onesignal/models/notification.rb +39 -19
- data/lib/onesignal/models/notification200_errors.rb +105 -0
- data/lib/onesignal/models/notification_all_of.rb +38 -18
- data/lib/onesignal/models/notification_all_of_android_background_layout.rb +3 -2
- data/lib/onesignal/models/notification_slice.rb +4 -3
- data/lib/onesignal/models/notification_target.rb +4 -3
- data/lib/onesignal/models/notification_with_meta.rb +1526 -0
- data/lib/onesignal/models/notification_with_meta_all_of.rb +322 -0
- data/lib/onesignal/models/operator.rb +3 -2
- data/lib/onesignal/models/outcome_data.rb +3 -2
- data/lib/onesignal/models/outcomes_data.rb +221 -0
- data/lib/onesignal/models/platform_delivery_data.rb +3 -2
- data/lib/onesignal/models/player.rb +6 -8
- data/lib/onesignal/models/player_notification_target.rb +4 -3
- data/lib/onesignal/models/player_slice.rb +3 -2
- data/lib/onesignal/models/purchase.rb +3 -2
- data/lib/onesignal/models/segment.rb +3 -2
- data/lib/onesignal/models/segment_notification_target.rb +3 -2
- data/lib/onesignal/models/string_map.rb +3 -7
- data/lib/onesignal/models/update_player_tags_request_body.rb +3 -2
- data/lib/onesignal/version.rb +3 -3
- data/lib/{OneSignal.rb → onesignal.rb} +10 -5
- data/onesignal.gemspec +5 -4
- data/spec/api/default_api_spec.rb +20 -20
- data/spec/api_client_spec.rb +4 -4
- data/spec/configuration_spec.rb +2 -2
- data/spec/models/app_spec.rb +2 -2
- data/spec/models/button_spec.rb +2 -2
- data/spec/models/delivery_data_spec.rb +2 -2
- data/spec/models/export_players_request_body_spec.rb +2 -2
- data/spec/models/filter_expressions_spec.rb +2 -2
- data/spec/models/filter_notification_target_spec.rb +2 -2
- data/spec/models/filter_spec.rb +2 -2
- data/spec/models/get_notification_request_body_spec.rb +2 -2
- data/spec/models/inline_response2001_spec.rb +2 -2
- data/spec/models/inline_response2002_spec.rb +2 -2
- data/spec/models/inline_response2005_spec.rb +9 -3
- data/spec/models/{inline_response2003_spec.rb → inline_response2007_spec.rb} +8 -8
- data/spec/models/{inline_response409_spec.rb → inline_response2008_spec.rb} +9 -15
- data/spec/models/inline_response200_spec.rb +2 -2
- data/spec/models/inline_response201_spec.rb +2 -2
- data/spec/models/inline_response4001_spec.rb +2 -2
- data/spec/models/inline_response4002_spec.rb +9 -3
- data/spec/models/inline_response4003_spec.rb +34 -0
- data/spec/models/inline_response400_spec.rb +2 -2
- data/spec/models/{inline_response2004_spec.rb → invalid_identifier_error_spec.rb} +10 -10
- data/spec/models/notification200_errors_spec.rb +31 -0
- data/spec/models/notification_all_of_android_background_layout_spec.rb +2 -2
- data/spec/models/notification_all_of_spec.rb +3 -3
- data/spec/models/notification_slice_spec.rb +2 -2
- data/spec/models/notification_spec.rb +3 -3
- data/spec/models/notification_target_spec.rb +2 -2
- data/spec/models/notification_with_meta_all_of_spec.rb +94 -0
- data/spec/models/notification_with_meta_spec.rb +764 -0
- data/spec/models/operator_spec.rb +2 -2
- data/spec/models/outcome_data_spec.rb +2 -2
- data/spec/models/outcomes_data_spec.rb +34 -0
- data/spec/models/platform_delivery_data_spec.rb +2 -2
- data/spec/models/player_notification_target_spec.rb +2 -2
- data/spec/models/player_slice_spec.rb +2 -2
- data/spec/models/player_spec.rb +2 -2
- data/spec/models/purchase_spec.rb +2 -2
- data/spec/models/segment_notification_target_spec.rb +2 -2
- data/spec/models/segment_spec.rb +2 -2
- data/spec/models/string_map_spec.rb +2 -2
- data/spec/models/update_player_tags_request_body_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -2
- metadata +51 -29
- data/docs/InlineResponse2004.md +0 -20
- data/docs/InlineResponse409.md +0 -20
- data/git_push.sh +0 -58
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ed573134bbb56b24a52664d42154e91205f9ea004d945816cece64b091f70a0
|
4
|
+
data.tar.gz: 9216667b6c7d0b68e7fd13556a27f88006bab0ed59747b3bf2e17a095c95afa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b57b8d0ed69672c664b0ec114576d702b0c601eef83e8c2db0a32d483a9bd79ecb5cfe27e442ede4785bd7fd18d039f4d3389487c20966ad22319f3198922dd5
|
7
|
+
data.tar.gz: d8f30f8aa642aab8150a908fc594d8c1c3e7e1f9da56999ed5b7f0c122682b741ab66c29f6beabe6c531b64c97c253ed062f9cf0c67794ee94e86cd6c7279972
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# Change Log
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
|
+
|
5
|
+
## [1.0.0.beta1] - 2021-10-13
|
6
|
+
### Major Release
|
7
|
+
**INCLUDES BREAKING CHANGES**
|
8
|
+
This release is the code-generated Ruby client made with OpenAPI Generator.
|
9
|
+
The release is a complete overhaul and includes a new API.
|
10
|
+
See README for full documentation.
|
11
|
+
|
12
|
+
**Full Changelog**: https://github.com/OneSignal/onesignal-ruby-client/compare/v0.3.0...1.0.0.beta1
|
13
|
+
|
14
|
+
## [0.3.0] - 2016-05-10
|
15
|
+
### Added
|
16
|
+
* Models dynamically create attributes on initialization
|
17
|
+
|
18
|
+
## [0.2.0] - 2016-04-29
|
19
|
+
### Added
|
20
|
+
* Ruby 2.0 compatibility
|
21
|
+
* CHANGELOG
|
22
|
+
|
23
|
+
### Fixed
|
24
|
+
* Typos in README
|
25
|
+
|
26
|
+
## 0.1.0 - 2016-03-29
|
27
|
+
### Added
|
28
|
+
* Methods for all OneSignal resources
|
29
|
+
|
30
|
+
[0.3.0]: https://github.com/coding-chimp/onesignal/compare/v0.2.0...v0.3.0
|
31
|
+
[0.2.0]: https://github.com/coding-chimp/onesignal/compare/v0.1.0...v0.2.0
|
data/LICENSE
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
Modified MIT License
|
2
|
+
|
3
|
+
Copyright 2022 OneSignal
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
1. The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
2. All copies of substantial portions of the Software may only be used in connection
|
16
|
+
with services provided by OneSignal.
|
17
|
+
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
24
|
+
THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,4 +1,19 @@
|
|
1
|
-
|
1
|
+
<h1 align="center">Welcome to the official OneSignal Ruby Client 👋</h1>
|
2
|
+
|
3
|
+
[![Gem Version][rgb]][rgl]
|
4
|
+
|
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
|
+
|
2
17
|
|
3
18
|
OneSignal - the Ruby gem for the OneSignal
|
4
19
|
|
@@ -6,75 +21,54 @@ A powerful way to send personalized messages at scale and build effective custom
|
|
6
21
|
|
7
22
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
23
|
|
9
|
-
|
10
|
-
- Package version: 1.0.0
|
11
|
-
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
|
-
For more information, please visit [https://onesignal.com](https://onesignal.com)
|
13
|
-
|
14
|
-
## Installation
|
15
|
-
|
16
|
-
### Build a gem
|
24
|
+
OneSignal is a simple ruby wrapper for the [OneSignal API][osa].
|
17
25
|
|
18
|
-
|
26
|
+
### 🖤 [RubyGems](https://rubygems.org/gems/onesignal)
|
19
27
|
|
20
|
-
|
21
|
-
gem build onesignal.gemspec
|
22
|
-
```
|
28
|
+
## Installation
|
23
29
|
|
24
|
-
|
30
|
+
Add this line to your application's Gemfile:
|
25
31
|
|
26
|
-
```
|
27
|
-
gem
|
32
|
+
```ruby
|
33
|
+
gem 'onesignal', '~> 1.0.1'
|
28
34
|
```
|
29
35
|
|
30
|
-
|
31
|
-
|
32
|
-
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
36
|
+
And then execute:
|
33
37
|
|
34
|
-
|
38
|
+
$ bundle
|
35
39
|
|
36
|
-
|
40
|
+
Or install it yourself as:
|
37
41
|
|
38
|
-
|
42
|
+
$ gem install onesignal
|
39
43
|
|
40
|
-
|
44
|
+
Or install from Github:
|
41
45
|
|
42
|
-
gem
|
43
|
-
|
44
|
-
### Include the Ruby code directly
|
45
|
-
|
46
|
-
Include the Ruby code directly using `-I` as follows:
|
47
|
-
|
48
|
-
```shell
|
49
|
-
ruby -Ilib script.rb
|
50
|
-
```
|
46
|
+
$ gem "onesignal", '~> 1.0.1', git: 'git://github.com/OneSignal/onesignal-ruby-api.git'
|
51
47
|
|
52
48
|
## Getting Started
|
53
49
|
|
54
50
|
Please follow the [installation](#installation) procedure and then run the following code:
|
55
51
|
|
56
52
|
```ruby
|
57
|
-
|
53
|
+
require 'time'
|
58
54
|
require 'onesignal'
|
59
|
-
|
60
|
-
# Setup authorization
|
55
|
+
# setup authorization
|
61
56
|
OneSignal.configure do |config|
|
62
57
|
# Configure Bearer authorization: app_key
|
63
|
-
config.
|
58
|
+
config.user_key = 'YOUR_USER_KEY' # Change this
|
59
|
+
config.app_key = 'YOUR_APP_KEY'
|
64
60
|
end
|
65
61
|
|
66
62
|
api_instance = OneSignal::DefaultApi.new
|
67
|
-
|
68
|
-
notification_id = 'notification_id_example' # String |
|
63
|
+
notification = OneSignal::Notification.new({app_id: 'YOUR APP ID'}) # Notification
|
69
64
|
|
70
65
|
begin
|
71
|
-
#
|
72
|
-
result = api_instance.
|
66
|
+
# Create notification
|
67
|
+
result = api_instance.create_notification(notification)
|
73
68
|
p result
|
74
69
|
rescue OneSignal::ApiError => e
|
75
|
-
puts "
|
70
|
+
puts "Error when calling DefaultApi->create_notification: #{e}"
|
76
71
|
end
|
77
|
-
|
78
72
|
```
|
79
73
|
|
80
74
|
## Documentation for API Endpoints
|
@@ -103,7 +97,6 @@ Class | Method | HTTP request | Description
|
|
103
97
|
*OneSignal::DefaultApi* | [**update_player**](docs/DefaultApi.md#update_player) | **PUT** /players/{player_id} | Edit device
|
104
98
|
*OneSignal::DefaultApi* | [**update_player_tags**](docs/DefaultApi.md#update_player_tags) | **PUT** /apps/{app_id}/users/{external_user_id} | Edit tags with external user id
|
105
99
|
|
106
|
-
|
107
100
|
## Documentation for Models
|
108
101
|
|
109
102
|
- [OneSignal::App](docs/App.md)
|
@@ -142,15 +135,52 @@ Class | Method | HTTP request | Description
|
|
142
135
|
- [OneSignal::StringMap](docs/StringMap.md)
|
143
136
|
- [OneSignal::UpdatePlayerTagsRequestBody](docs/UpdatePlayerTagsRequestBody.md)
|
144
137
|
|
145
|
-
|
146
138
|
## Documentation for Authorization
|
147
139
|
|
148
|
-
|
149
140
|
### app_key
|
150
141
|
|
151
142
|
- **Type**: Bearer authentication
|
152
143
|
|
144
|
+
```rb
|
145
|
+
OneSignal.configure do |config|
|
146
|
+
config.app_key = 'APP_KEY' # replace with your app key
|
147
|
+
end
|
148
|
+
```
|
149
|
+
|
153
150
|
### user_key
|
154
151
|
|
155
152
|
- **Type**: Bearer authentication
|
156
153
|
|
154
|
+
```rb
|
155
|
+
OneSignal.configure do |config|
|
156
|
+
config.user_key = 'USER_KEY' # replace with your user key
|
157
|
+
end
|
158
|
+
```
|
159
|
+
|
160
|
+
## License
|
161
|
+
|
162
|
+
The gem is available as open source under the terms of the [MIT License][mit].
|
163
|
+
|
164
|
+
[rgb]: https://img.shields.io/gem/v/onesignal.svg
|
165
|
+
[rgl]: https://rubygems.org/gems/onesignal
|
166
|
+
[osa]: https://documentation.onesignal.com/reference/
|
167
|
+
[mit]: http://opensource.org/licenses/MIT
|
168
|
+
|
169
|
+
## Author
|
170
|
+
|
171
|
+
* Website: https://onesignal.com
|
172
|
+
* Twitter: [@onesignal](https://twitter.com/onesignal)
|
173
|
+
* Github: [@OneSignal](https://github.com/OneSignal)
|
174
|
+
|
175
|
+
## 🤝 Contributing
|
176
|
+
|
177
|
+
Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/OneSignal/onesignal-ruby-client/issues).
|
178
|
+
|
179
|
+
## Show your support
|
180
|
+
|
181
|
+
Give a ⭐️ if this project helped you!
|
182
|
+
|
183
|
+
## 📝 License
|
184
|
+
|
185
|
+
Copyright © 2022 [OneSignal](https://github.com/OneSignal).<br />
|
186
|
+
This project is [MIT](https://opensource.org/licenses/MIT) licensed.
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Release Instructions
|
2
|
+
1. Generate new client version using OpenApi Generator
|
3
|
+
2. Make sure `ruby.yml` has the correct gem version
|
4
|
+
2. Create a new PR and merge
|
5
|
+
* Carefully review the PR to ensure nothing is overwritten and you are including all desired changes
|
6
|
+
* Ensure the correct version number is being sent in the header params `OS-Usage-Data` (`api_client.rb`)
|
7
|
+
3. Generate the gem: `gem build onesignal`
|
8
|
+
4. Publish to RubyGems
|
9
|
+
* To publish version 0.1.0 of a new gem called 'squid-utils', run: `gem push squid-utils-0.1.0.gem`
|
10
|
+
* To publish a beta version, simply add `.beta1`, `.beta2` etc... after the semantic version (e.g: `1.0.0.beta1`)
|
11
|
+
|