onesignal 0.2.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +14 -0
- data/Gemfile +6 -1
- data/LICENSE +6 -3
- data/README.md +144 -99
- data/RELEASE_INSTRUCTIONS.md +11 -0
- data/Rakefile +8 -8
- data/docs/App.md +76 -0
- data/docs/Button.md +22 -0
- data/docs/DefaultApi.md +1394 -0
- data/docs/DeliveryData.md +26 -0
- data/docs/ExportPlayersRequestBody.md +22 -0
- data/docs/Filter.md +24 -0
- data/docs/FilterExpressions.md +26 -0
- data/docs/FilterNotificationTarget.md +40 -0
- data/docs/GetNotificationRequestBody.md +22 -0
- data/docs/InlineResponse200.md +24 -0
- data/docs/InlineResponse2001.md +18 -0
- data/docs/InlineResponse2002.md +20 -0
- data/docs/InlineResponse2005.md +20 -0
- data/docs/InlineResponse2007.md +18 -0
- data/docs/InlineResponse2008.md +18 -0
- data/docs/InlineResponse201.md +20 -0
- data/docs/InlineResponse400.md +18 -0
- data/docs/InlineResponse4001.md +20 -0
- data/docs/InlineResponse4002.md +20 -0
- data/docs/InlineResponse4003.md +18 -0
- data/docs/InvalidIdentifierError.md +20 -0
- data/docs/Notification.md +240 -0
- data/docs/Notification200Errors.md +49 -0
- data/docs/NotificationAllOf.md +192 -0
- data/docs/NotificationAllOfAndroidBackgroundLayout.md +22 -0
- data/docs/NotificationSlice.md +24 -0
- data/docs/NotificationTarget.md +64 -0
- data/docs/NotificationWithMeta.md +260 -0
- data/docs/NotificationWithMetaAllOf.md +38 -0
- data/docs/Operator.md +18 -0
- data/docs/OutcomeData.md +22 -0
- data/docs/OutcomesData.md +18 -0
- data/docs/PlatformDeliveryData.md +28 -0
- data/docs/Player.md +70 -0
- data/docs/PlayerNotificationTarget.md +36 -0
- data/docs/PlayerSlice.md +24 -0
- data/docs/Purchase.md +22 -0
- data/docs/Segment.md +22 -0
- data/docs/SegmentNotificationTarget.md +20 -0
- data/docs/StringMap.md +102 -0
- data/docs/UpdatePlayerTagsRequestBody.md +18 -0
- data/lib/onesignal/api/default_api.rb +1365 -0
- data/lib/onesignal/api_client.rb +393 -0
- data/lib/onesignal/api_error.rb +57 -0
- data/lib/onesignal/configuration.rb +245 -0
- data/lib/onesignal/models/app.rb +519 -20
- data/lib/onesignal/models/button.rb +242 -0
- data/lib/onesignal/models/delivery_data.rb +260 -0
- data/lib/onesignal/models/export_players_request_body.rb +242 -0
- data/lib/onesignal/models/filter.rb +294 -0
- data/lib/onesignal/models/filter_expressions.rb +336 -0
- data/lib/onesignal/models/filter_notification_target.rb +330 -0
- data/lib/onesignal/models/get_notification_request_body.rb +273 -0
- data/lib/onesignal/models/inline_response200.rb +257 -0
- data/lib/onesignal/models/inline_response2001.rb +219 -0
- data/lib/onesignal/models/inline_response2002.rb +228 -0
- data/lib/onesignal/models/inline_response2005.rb +228 -0
- data/lib/onesignal/models/inline_response2007.rb +219 -0
- data/lib/onesignal/models/inline_response2008.rb +219 -0
- data/lib/onesignal/models/inline_response201.rb +229 -0
- data/lib/onesignal/models/inline_response400.rb +221 -0
- data/lib/onesignal/models/inline_response4001.rb +230 -0
- data/lib/onesignal/models/inline_response4002.rb +230 -0
- data/lib/onesignal/models/inline_response4003.rb +221 -0
- data/lib/onesignal/models/invalid_identifier_error.rb +234 -0
- data/lib/onesignal/models/notification.rb +1414 -9
- data/lib/onesignal/models/notification200_errors.rb +105 -0
- data/lib/onesignal/models/notification_all_of.rb +1144 -0
- data/lib/onesignal/models/notification_all_of_android_background_layout.rb +241 -0
- data/lib/onesignal/models/notification_slice.rb +248 -0
- data/lib/onesignal/models/notification_target.rb +495 -0
- 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 +254 -0
- data/lib/onesignal/models/outcome_data.rb +286 -0
- data/lib/onesignal/models/outcomes_data.rb +221 -0
- data/lib/onesignal/models/platform_delivery_data.rb +265 -0
- data/lib/onesignal/models/player.rb +480 -13
- data/lib/onesignal/models/player_notification_target.rb +330 -0
- data/lib/onesignal/models/player_slice.rb +248 -0
- data/lib/onesignal/models/purchase.rb +255 -0
- data/lib/onesignal/models/segment.rb +252 -0
- data/lib/onesignal/models/segment_notification_target.rb +234 -0
- data/lib/onesignal/models/string_map.rb +640 -0
- data/lib/onesignal/models/update_player_tags_request_body.rb +220 -0
- data/lib/onesignal/version.rb +13 -1
- data/lib/onesignal.rb +73 -16
- data/onesignal.gemspec +37 -27
- data/spec/api/default_api_spec.rb +285 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/app_spec.rb +212 -0
- data/spec/models/button_spec.rb +46 -0
- data/spec/models/delivery_data_spec.rb +58 -0
- data/spec/models/export_players_request_body_spec.rb +46 -0
- data/spec/models/filter_expressions_spec.rb +66 -0
- data/spec/models/filter_notification_target_spec.rb +100 -0
- data/spec/models/filter_spec.rb +56 -0
- data/spec/models/get_notification_request_body_spec.rb +50 -0
- data/spec/models/inline_response2001_spec.rb +34 -0
- data/spec/models/inline_response2002_spec.rb +40 -0
- data/spec/models/inline_response2005_spec.rb +40 -0
- data/spec/models/inline_response2007_spec.rb +34 -0
- data/spec/models/inline_response2008_spec.rb +34 -0
- data/spec/models/inline_response200_spec.rb +52 -0
- data/spec/models/inline_response201_spec.rb +40 -0
- data/spec/models/inline_response4001_spec.rb +40 -0
- data/spec/models/inline_response4002_spec.rb +40 -0
- data/spec/models/inline_response4003_spec.rb +34 -0
- data/spec/models/inline_response400_spec.rb +34 -0
- data/spec/models/invalid_identifier_error_spec.rb +40 -0
- data/spec/models/notification200_errors_spec.rb +31 -0
- data/spec/models/notification_all_of_android_background_layout_spec.rb +46 -0
- data/spec/models/notification_all_of_spec.rb +560 -0
- data/spec/models/notification_slice_spec.rb +52 -0
- data/spec/models/notification_spec.rb +704 -0
- data/spec/models/notification_target_spec.rb +172 -0
- 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 +38 -0
- data/spec/models/outcome_data_spec.rb +50 -0
- data/spec/models/outcomes_data_spec.rb +34 -0
- data/spec/models/platform_delivery_data_spec.rb +64 -0
- data/spec/models/player_notification_target_spec.rb +88 -0
- data/spec/models/player_slice_spec.rb +52 -0
- data/spec/models/player_spec.rb +190 -0
- data/spec/models/purchase_spec.rb +46 -0
- data/spec/models/segment_notification_target_spec.rb +40 -0
- data/spec/models/segment_spec.rb +46 -0
- data/spec/models/string_map_spec.rb +286 -0
- data/spec/models/update_player_tags_request_body_spec.rb +34 -0
- data/spec/spec_helper.rb +111 -0
- metadata +203 -64
- data/.gitignore +0 -10
- data/.rubocop.yml +0 -17
- data/.travis.yml +0 -16
- data/CODE_OF_CONDUCT.md +0 -49
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/lib/onesignal/app_id_missing_error.rb +0 -7
- data/lib/onesignal/client.rb +0 -44
- data/lib/onesignal/models/base_model.rb +0 -19
- data/lib/onesignal/request.rb +0 -94
- data/lib/onesignal/request_error.rb +0 -21
- data/lib/onesignal/resources/app_resource.rb +0 -27
- data/lib/onesignal/resources/base_resource.rb +0 -35
- data/lib/onesignal/resources/notification_resource.rb +0 -33
- data/lib/onesignal/resources/player_resource.rb +0 -53
metadata
CHANGED
@@ -1,109 +1,205 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onesignal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
autorequire:
|
9
|
-
bindir:
|
7
|
+
- OneSignal
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: typhoeus
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
20
|
-
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '1.11'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: minitest
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
19
|
+
version: '1.0'
|
20
|
+
- - ">="
|
32
21
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
34
|
-
type: :
|
22
|
+
version: 1.0.1
|
23
|
+
type: :runtime
|
35
24
|
prerelease: false
|
36
25
|
version_requirements: !ruby/object:Gem::Requirement
|
37
26
|
requirements:
|
38
27
|
- - "~>"
|
39
28
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
41
|
-
-
|
42
|
-
name: rake
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
29
|
+
version: '1.0'
|
30
|
+
- - ">="
|
46
31
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '10.0'
|
32
|
+
version: 1.0.1
|
55
33
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
34
|
+
name: rspec
|
57
35
|
requirement: !ruby/object:Gem::Requirement
|
58
36
|
requirements:
|
59
37
|
- - "~>"
|
60
38
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
39
|
+
version: '3.6'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 3.6.0
|
62
43
|
type: :development
|
63
44
|
prerelease: false
|
64
45
|
version_requirements: !ruby/object:Gem::Requirement
|
65
46
|
requirements:
|
66
47
|
- - "~>"
|
67
48
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
69
|
-
|
49
|
+
version: '3.6'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 3.6.0
|
53
|
+
description: OneSignal
|
70
54
|
email:
|
71
|
-
-
|
55
|
+
- devrel@onesignal.com
|
72
56
|
executables: []
|
73
57
|
extensions: []
|
74
58
|
extra_rdoc_files: []
|
75
59
|
files:
|
76
|
-
- ".gitignore"
|
77
|
-
- ".rubocop.yml"
|
78
|
-
- ".travis.yml"
|
79
60
|
- CHANGELOG.md
|
80
|
-
- CODE_OF_CONDUCT.md
|
81
61
|
- Gemfile
|
82
62
|
- LICENSE
|
83
63
|
- README.md
|
64
|
+
- RELEASE_INSTRUCTIONS.md
|
84
65
|
- Rakefile
|
85
|
-
-
|
86
|
-
-
|
66
|
+
- docs/App.md
|
67
|
+
- docs/Button.md
|
68
|
+
- docs/DefaultApi.md
|
69
|
+
- docs/DeliveryData.md
|
70
|
+
- docs/ExportPlayersRequestBody.md
|
71
|
+
- docs/Filter.md
|
72
|
+
- docs/FilterExpressions.md
|
73
|
+
- docs/FilterNotificationTarget.md
|
74
|
+
- docs/GetNotificationRequestBody.md
|
75
|
+
- docs/InlineResponse200.md
|
76
|
+
- docs/InlineResponse2001.md
|
77
|
+
- docs/InlineResponse2002.md
|
78
|
+
- docs/InlineResponse2005.md
|
79
|
+
- docs/InlineResponse2007.md
|
80
|
+
- docs/InlineResponse2008.md
|
81
|
+
- docs/InlineResponse201.md
|
82
|
+
- docs/InlineResponse400.md
|
83
|
+
- docs/InlineResponse4001.md
|
84
|
+
- docs/InlineResponse4002.md
|
85
|
+
- docs/InlineResponse4003.md
|
86
|
+
- docs/InvalidIdentifierError.md
|
87
|
+
- docs/Notification.md
|
88
|
+
- docs/Notification200Errors.md
|
89
|
+
- docs/NotificationAllOf.md
|
90
|
+
- docs/NotificationAllOfAndroidBackgroundLayout.md
|
91
|
+
- docs/NotificationSlice.md
|
92
|
+
- docs/NotificationTarget.md
|
93
|
+
- docs/NotificationWithMeta.md
|
94
|
+
- docs/NotificationWithMetaAllOf.md
|
95
|
+
- docs/Operator.md
|
96
|
+
- docs/OutcomeData.md
|
97
|
+
- docs/OutcomesData.md
|
98
|
+
- docs/PlatformDeliveryData.md
|
99
|
+
- docs/Player.md
|
100
|
+
- docs/PlayerNotificationTarget.md
|
101
|
+
- docs/PlayerSlice.md
|
102
|
+
- docs/Purchase.md
|
103
|
+
- docs/Segment.md
|
104
|
+
- docs/SegmentNotificationTarget.md
|
105
|
+
- docs/StringMap.md
|
106
|
+
- docs/UpdatePlayerTagsRequestBody.md
|
87
107
|
- lib/onesignal.rb
|
88
|
-
- lib/onesignal/
|
89
|
-
- lib/onesignal/
|
108
|
+
- lib/onesignal/api/default_api.rb
|
109
|
+
- lib/onesignal/api_client.rb
|
110
|
+
- lib/onesignal/api_error.rb
|
111
|
+
- lib/onesignal/configuration.rb
|
90
112
|
- lib/onesignal/models/app.rb
|
91
|
-
- lib/onesignal/models/
|
113
|
+
- lib/onesignal/models/button.rb
|
114
|
+
- lib/onesignal/models/delivery_data.rb
|
115
|
+
- lib/onesignal/models/export_players_request_body.rb
|
116
|
+
- lib/onesignal/models/filter.rb
|
117
|
+
- lib/onesignal/models/filter_expressions.rb
|
118
|
+
- lib/onesignal/models/filter_notification_target.rb
|
119
|
+
- lib/onesignal/models/get_notification_request_body.rb
|
120
|
+
- lib/onesignal/models/inline_response200.rb
|
121
|
+
- lib/onesignal/models/inline_response2001.rb
|
122
|
+
- lib/onesignal/models/inline_response2002.rb
|
123
|
+
- lib/onesignal/models/inline_response2005.rb
|
124
|
+
- lib/onesignal/models/inline_response2007.rb
|
125
|
+
- lib/onesignal/models/inline_response2008.rb
|
126
|
+
- lib/onesignal/models/inline_response201.rb
|
127
|
+
- lib/onesignal/models/inline_response400.rb
|
128
|
+
- lib/onesignal/models/inline_response4001.rb
|
129
|
+
- lib/onesignal/models/inline_response4002.rb
|
130
|
+
- lib/onesignal/models/inline_response4003.rb
|
131
|
+
- lib/onesignal/models/invalid_identifier_error.rb
|
92
132
|
- lib/onesignal/models/notification.rb
|
133
|
+
- lib/onesignal/models/notification200_errors.rb
|
134
|
+
- lib/onesignal/models/notification_all_of.rb
|
135
|
+
- lib/onesignal/models/notification_all_of_android_background_layout.rb
|
136
|
+
- lib/onesignal/models/notification_slice.rb
|
137
|
+
- lib/onesignal/models/notification_target.rb
|
138
|
+
- lib/onesignal/models/notification_with_meta.rb
|
139
|
+
- lib/onesignal/models/notification_with_meta_all_of.rb
|
140
|
+
- lib/onesignal/models/operator.rb
|
141
|
+
- lib/onesignal/models/outcome_data.rb
|
142
|
+
- lib/onesignal/models/outcomes_data.rb
|
143
|
+
- lib/onesignal/models/platform_delivery_data.rb
|
93
144
|
- lib/onesignal/models/player.rb
|
94
|
-
- lib/onesignal/
|
95
|
-
- lib/onesignal/
|
96
|
-
- lib/onesignal/
|
97
|
-
- lib/onesignal/
|
98
|
-
- lib/onesignal/
|
99
|
-
- lib/onesignal/
|
145
|
+
- lib/onesignal/models/player_notification_target.rb
|
146
|
+
- lib/onesignal/models/player_slice.rb
|
147
|
+
- lib/onesignal/models/purchase.rb
|
148
|
+
- lib/onesignal/models/segment.rb
|
149
|
+
- lib/onesignal/models/segment_notification_target.rb
|
150
|
+
- lib/onesignal/models/string_map.rb
|
151
|
+
- lib/onesignal/models/update_player_tags_request_body.rb
|
100
152
|
- lib/onesignal/version.rb
|
101
153
|
- onesignal.gemspec
|
102
|
-
|
154
|
+
- spec/api/default_api_spec.rb
|
155
|
+
- spec/api_client_spec.rb
|
156
|
+
- spec/configuration_spec.rb
|
157
|
+
- spec/models/app_spec.rb
|
158
|
+
- spec/models/button_spec.rb
|
159
|
+
- spec/models/delivery_data_spec.rb
|
160
|
+
- spec/models/export_players_request_body_spec.rb
|
161
|
+
- spec/models/filter_expressions_spec.rb
|
162
|
+
- spec/models/filter_notification_target_spec.rb
|
163
|
+
- spec/models/filter_spec.rb
|
164
|
+
- spec/models/get_notification_request_body_spec.rb
|
165
|
+
- spec/models/inline_response2001_spec.rb
|
166
|
+
- spec/models/inline_response2002_spec.rb
|
167
|
+
- spec/models/inline_response2005_spec.rb
|
168
|
+
- spec/models/inline_response2007_spec.rb
|
169
|
+
- spec/models/inline_response2008_spec.rb
|
170
|
+
- spec/models/inline_response200_spec.rb
|
171
|
+
- spec/models/inline_response201_spec.rb
|
172
|
+
- spec/models/inline_response4001_spec.rb
|
173
|
+
- spec/models/inline_response4002_spec.rb
|
174
|
+
- spec/models/inline_response4003_spec.rb
|
175
|
+
- spec/models/inline_response400_spec.rb
|
176
|
+
- spec/models/invalid_identifier_error_spec.rb
|
177
|
+
- spec/models/notification200_errors_spec.rb
|
178
|
+
- spec/models/notification_all_of_android_background_layout_spec.rb
|
179
|
+
- spec/models/notification_all_of_spec.rb
|
180
|
+
- spec/models/notification_slice_spec.rb
|
181
|
+
- spec/models/notification_spec.rb
|
182
|
+
- spec/models/notification_target_spec.rb
|
183
|
+
- spec/models/notification_with_meta_all_of_spec.rb
|
184
|
+
- spec/models/notification_with_meta_spec.rb
|
185
|
+
- spec/models/operator_spec.rb
|
186
|
+
- spec/models/outcome_data_spec.rb
|
187
|
+
- spec/models/outcomes_data_spec.rb
|
188
|
+
- spec/models/platform_delivery_data_spec.rb
|
189
|
+
- spec/models/player_notification_target_spec.rb
|
190
|
+
- spec/models/player_slice_spec.rb
|
191
|
+
- spec/models/player_spec.rb
|
192
|
+
- spec/models/purchase_spec.rb
|
193
|
+
- spec/models/segment_notification_target_spec.rb
|
194
|
+
- spec/models/segment_spec.rb
|
195
|
+
- spec/models/string_map_spec.rb
|
196
|
+
- spec/models/update_player_tags_request_body_spec.rb
|
197
|
+
- spec/spec_helper.rb
|
198
|
+
homepage: https://onesignal.com/
|
103
199
|
licenses:
|
104
|
-
- MIT
|
200
|
+
- Modified MIT
|
105
201
|
metadata: {}
|
106
|
-
post_install_message:
|
202
|
+
post_install_message:
|
107
203
|
rdoc_options: []
|
108
204
|
require_paths:
|
109
205
|
- lib
|
@@ -111,16 +207,59 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
111
207
|
requirements:
|
112
208
|
- - ">="
|
113
209
|
- !ruby/object:Gem::Version
|
114
|
-
version: 2.
|
210
|
+
version: '2.4'
|
115
211
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
212
|
requirements:
|
117
213
|
- - ">="
|
118
214
|
- !ruby/object:Gem::Version
|
119
215
|
version: '0'
|
120
216
|
requirements: []
|
121
|
-
|
122
|
-
|
123
|
-
signing_key:
|
217
|
+
rubygems_version: 3.3.11
|
218
|
+
signing_key:
|
124
219
|
specification_version: 4
|
125
|
-
summary:
|
126
|
-
test_files:
|
220
|
+
summary: OneSignal
|
221
|
+
test_files:
|
222
|
+
- spec/api/default_api_spec.rb
|
223
|
+
- spec/api_client_spec.rb
|
224
|
+
- spec/configuration_spec.rb
|
225
|
+
- spec/models/notification_spec.rb
|
226
|
+
- spec/models/notification_target_spec.rb
|
227
|
+
- spec/models/inline_response2002_spec.rb
|
228
|
+
- spec/models/filter_notification_target_spec.rb
|
229
|
+
- spec/models/get_notification_request_body_spec.rb
|
230
|
+
- spec/models/update_player_tags_request_body_spec.rb
|
231
|
+
- spec/models/segment_spec.rb
|
232
|
+
- spec/models/delivery_data_spec.rb
|
233
|
+
- spec/models/inline_response2008_spec.rb
|
234
|
+
- spec/models/segment_notification_target_spec.rb
|
235
|
+
- spec/models/inline_response2001_spec.rb
|
236
|
+
- spec/models/player_slice_spec.rb
|
237
|
+
- spec/models/outcome_data_spec.rb
|
238
|
+
- spec/models/string_map_spec.rb
|
239
|
+
- spec/models/player_spec.rb
|
240
|
+
- spec/models/player_notification_target_spec.rb
|
241
|
+
- spec/models/filter_expressions_spec.rb
|
242
|
+
- spec/models/button_spec.rb
|
243
|
+
- spec/models/notification_all_of_android_background_layout_spec.rb
|
244
|
+
- spec/models/inline_response4001_spec.rb
|
245
|
+
- spec/models/operator_spec.rb
|
246
|
+
- spec/models/inline_response2005_spec.rb
|
247
|
+
- spec/models/export_players_request_body_spec.rb
|
248
|
+
- spec/models/notification_with_meta_spec.rb
|
249
|
+
- spec/models/notification_slice_spec.rb
|
250
|
+
- spec/models/notification_all_of_spec.rb
|
251
|
+
- spec/models/purchase_spec.rb
|
252
|
+
- spec/models/app_spec.rb
|
253
|
+
- spec/models/outcomes_data_spec.rb
|
254
|
+
- spec/models/notification200_errors_spec.rb
|
255
|
+
- spec/models/inline_response4002_spec.rb
|
256
|
+
- spec/models/inline_response200_spec.rb
|
257
|
+
- spec/models/inline_response201_spec.rb
|
258
|
+
- spec/models/inline_response4003_spec.rb
|
259
|
+
- spec/models/invalid_identifier_error_spec.rb
|
260
|
+
- spec/models/notification_with_meta_all_of_spec.rb
|
261
|
+
- spec/models/filter_spec.rb
|
262
|
+
- spec/models/platform_delivery_data_spec.rb
|
263
|
+
- spec/models/inline_response2007_spec.rb
|
264
|
+
- spec/models/inline_response400_spec.rb
|
265
|
+
- spec/spec_helper.rb
|
data/.gitignore
DELETED
data/.rubocop.yml
DELETED
data/.travis.yml
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
cache: bundler
|
3
|
-
|
4
|
-
rvm:
|
5
|
-
- 2.0.0
|
6
|
-
- 2.1.0
|
7
|
-
- 2.2.0
|
8
|
-
- 2.3.0
|
9
|
-
|
10
|
-
before_install:
|
11
|
-
- gem install bundler -v 1.11.2
|
12
|
-
|
13
|
-
notifications:
|
14
|
-
slack:
|
15
|
-
rooms:
|
16
|
-
secure: Gr8OCGVXegUFZmA0GYQnvAMs6cei1139C7sce13VvcG1HulIvpidnobJuNghfTx44psQTYDptHpz8AVn+kChbsQ46+0zXdNgCq2t9fJAVzTlTGnsB5O28FjUUEJAppjztUeRPKJX+B284AHJ0ZM/Vw7upoJ9IPbJ9bpcr5Xbms8eF/iYmJcicZ7iZNkHET8PFKqQP4H4/ahBOHfiI150zys1Pjos66wRukss1K52i6cvGmMajx58aVxDdwrw8wksNOHFu7VuoThipNHTIFyzr39EdG+DDrrfDLkLtpcb4+3QFn3/XZO7WHNfubnUY2DQ9xZrn8mUgIBFx6bVbcZ+xt/eh+4h5cDQyeEFY3GI+GiWJBDQa8VS69+CZQqEAvBNzHMPAkp19DZt0KFPEQqNG7KwXwuMx/kVsbnDhSGGN7d1Dc2m1XXVHViOUS6YePPzwjOZ3B7MTtb4FFSnsDeYvFFeBxqkX7a25L4llR9AcBMMxgCHDJi070qr3bOoQv9Qwi/Xw4P92ZLQ+VRoskzPRmbFcdfZxsI6R9orxJ1YgA/FGuQZAbmVQ3gZAWcW4iP1sgYh8EkOUH/c1c5tb03gC4OyU1R44L/FBBQiAXBCAl50PhJgCR13KrR6vxBnV/AIg+Pbk1uQPx4zqda4UbertMc+bB0M6EDV9OUPezb59Pk=
|
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
# Contributor Code of Conduct
|
2
|
-
|
3
|
-
As contributors and maintainers of this project, and in the interest of
|
4
|
-
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
-
contribute through reporting issues, posting feature requests, updating
|
6
|
-
documentation, submitting pull requests or patches, and other activities.
|
7
|
-
|
8
|
-
We are committed to making participation in this project a harassment-free
|
9
|
-
experience for everyone, regardless of level of experience, gender, gender
|
10
|
-
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
-
body size, race, ethnicity, age, religion, or nationality.
|
12
|
-
|
13
|
-
Examples of unacceptable behavior by participants include:
|
14
|
-
|
15
|
-
* The use of sexualized language or imagery
|
16
|
-
* Personal attacks
|
17
|
-
* Trolling or insulting/derogatory comments
|
18
|
-
* Public or private harassment
|
19
|
-
* Publishing other's private information, such as physical or electronic
|
20
|
-
addresses, without explicit permission
|
21
|
-
* Other unethical or unprofessional conduct
|
22
|
-
|
23
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
-
threatening, offensive, or harmful.
|
28
|
-
|
29
|
-
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
-
fairly and consistently applying these principles to every aspect of managing
|
31
|
-
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
-
Conduct may be permanently removed from the project team.
|
33
|
-
|
34
|
-
This code of conduct applies both within project spaces and in public spaces
|
35
|
-
when an individual is representing the project or its community.
|
36
|
-
|
37
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
-
reported by contacting a project maintainer at babartmann@gmail.com. All
|
39
|
-
complaints will be reviewed and investigated and will result in a response that
|
40
|
-
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
-
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
-
incident.
|
43
|
-
|
44
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
-
version 1.3.0, available at
|
46
|
-
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
-
|
48
|
-
[homepage]: http://contributor-covenant.org
|
49
|
-
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'bundler/setup'
|
4
|
-
require 'onesignal'
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require 'irb'
|
14
|
-
IRB.start
|
data/bin/setup
DELETED
data/lib/onesignal/client.rb
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
module OneSignal
|
2
|
-
class Client
|
3
|
-
BASE_URL = 'https://onesignal.com/api/v1'.freeze
|
4
|
-
|
5
|
-
attr_reader :auth_token, :app_id
|
6
|
-
|
7
|
-
def initialize(auth_token: nil, app_id: nil)
|
8
|
-
@auth_token = auth_token
|
9
|
-
@app_id = app_id
|
10
|
-
|
11
|
-
ensure_auth_token_presence
|
12
|
-
end
|
13
|
-
|
14
|
-
def apps
|
15
|
-
@apps ||= AppResource.new(self)
|
16
|
-
end
|
17
|
-
|
18
|
-
def players
|
19
|
-
ensure_app_id_presence
|
20
|
-
|
21
|
-
@players ||= PlayerResource.new(self)
|
22
|
-
end
|
23
|
-
|
24
|
-
def notifications
|
25
|
-
ensure_app_id_presence
|
26
|
-
|
27
|
-
@notifications ||= NotificationResource.new(self)
|
28
|
-
end
|
29
|
-
|
30
|
-
private
|
31
|
-
|
32
|
-
def ensure_auth_token_presence
|
33
|
-
if auth_token.nil?
|
34
|
-
raise ArgumentError, 'missing keyword: auth_token'
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
def ensure_app_id_presence
|
39
|
-
if app_id.nil?
|
40
|
-
raise AppIdMissingError
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module OneSignal
|
2
|
-
class BaseModel
|
3
|
-
def self.to_proc
|
4
|
-
method(:new).to_proc
|
5
|
-
end
|
6
|
-
|
7
|
-
def initialize(attributes = {})
|
8
|
-
attributes.each { |key, value| send("#{key}=", value) }
|
9
|
-
end
|
10
|
-
|
11
|
-
def inspect
|
12
|
-
values = Hash[
|
13
|
-
instance_variables.map { |name| [name, instance_variable_get(name)] }
|
14
|
-
]
|
15
|
-
|
16
|
-
"<#{self.class.name} #{values}>"
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
data/lib/onesignal/request.rb
DELETED
@@ -1,94 +0,0 @@
|
|
1
|
-
require 'net/http'
|
2
|
-
|
3
|
-
module OneSignal
|
4
|
-
class Request
|
5
|
-
def initialize(client)
|
6
|
-
@client = client
|
7
|
-
end
|
8
|
-
|
9
|
-
def get(path, params = {})
|
10
|
-
uri = uri(path)
|
11
|
-
|
12
|
-
if @client.app_id
|
13
|
-
params[:app_id] = @client.app_id
|
14
|
-
end
|
15
|
-
|
16
|
-
uri.query = URI.encode_www_form(params)
|
17
|
-
|
18
|
-
request(uri, Net::HTTP::Get)
|
19
|
-
end
|
20
|
-
|
21
|
-
def post(path, params)
|
22
|
-
uri = uri(path)
|
23
|
-
request(uri, Net::HTTP::Post, params)
|
24
|
-
end
|
25
|
-
|
26
|
-
def put(path, params)
|
27
|
-
uri = uri(path)
|
28
|
-
request(uri, Net::HTTP::Put, params)
|
29
|
-
end
|
30
|
-
|
31
|
-
def delete(path, params = {})
|
32
|
-
uri = uri(path)
|
33
|
-
|
34
|
-
if @client.app_id
|
35
|
-
params[:app_id] = @client.app_id
|
36
|
-
end
|
37
|
-
|
38
|
-
uri.query = URI.encode_www_form(params)
|
39
|
-
|
40
|
-
request(uri, Net::HTTP::Delete, params)
|
41
|
-
end
|
42
|
-
|
43
|
-
private
|
44
|
-
|
45
|
-
def uri(path)
|
46
|
-
URI.parse(OneSignal::Client::BASE_URL + path)
|
47
|
-
end
|
48
|
-
|
49
|
-
def request(uri, klass, params = nil)
|
50
|
-
request = klass.new(uri.request_uri)
|
51
|
-
|
52
|
-
if params && @client.app_id
|
53
|
-
params[:app_id] = @client.app_id
|
54
|
-
end
|
55
|
-
|
56
|
-
if params
|
57
|
-
request.body = params.to_json
|
58
|
-
end
|
59
|
-
|
60
|
-
response = make_request(uri, request)
|
61
|
-
|
62
|
-
ensure_success(response, uri, params)
|
63
|
-
|
64
|
-
response
|
65
|
-
end
|
66
|
-
|
67
|
-
def make_request(uri, request)
|
68
|
-
add_headers(request)
|
69
|
-
http = http_object(uri)
|
70
|
-
http.request(request)
|
71
|
-
end
|
72
|
-
|
73
|
-
def add_headers(request)
|
74
|
-
request.add_field('Content-Type', 'application/json')
|
75
|
-
request.add_field('Authorization', "Basic #{@client.auth_token}")
|
76
|
-
end
|
77
|
-
|
78
|
-
def http_object(uri)
|
79
|
-
http = Net::HTTP.new(uri.host, uri.port)
|
80
|
-
http.use_ssl = true
|
81
|
-
http.open_timeout = 30
|
82
|
-
http.read_timeout = 30
|
83
|
-
|
84
|
-
http
|
85
|
-
end
|
86
|
-
|
87
|
-
def ensure_success(response, uri, params = nil)
|
88
|
-
if response.code != '200'
|
89
|
-
message = "OneSignal error - uri: #{uri} - params: #{params}"
|
90
|
-
raise RequestError.new(message, response.code, response.body)
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|
94
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
module OneSignal
|
2
|
-
class RequestError < StandardError
|
3
|
-
attr_reader :http_status
|
4
|
-
attr_reader :http_body
|
5
|
-
|
6
|
-
def initialize(message, http_status, http_body)
|
7
|
-
@http_status = http_status
|
8
|
-
@http_body = http_body
|
9
|
-
|
10
|
-
if @http_status
|
11
|
-
message += " - http status : #{@http_status}"
|
12
|
-
end
|
13
|
-
|
14
|
-
if @http_body
|
15
|
-
message += " - http body : #{@http_body}"
|
16
|
-
end
|
17
|
-
|
18
|
-
super(message)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
module OneSignal
|
2
|
-
class AppResource < BaseResource
|
3
|
-
def all
|
4
|
-
get('/apps')
|
5
|
-
|
6
|
-
response_body.map(&OneSignal::App)
|
7
|
-
end
|
8
|
-
|
9
|
-
def find(id)
|
10
|
-
get("/apps/#{id}")
|
11
|
-
|
12
|
-
OneSignal::App.new(response_body)
|
13
|
-
end
|
14
|
-
|
15
|
-
def create(params)
|
16
|
-
post('/apps', params)
|
17
|
-
|
18
|
-
OneSignal::App.new(response_body)
|
19
|
-
end
|
20
|
-
|
21
|
-
def update(id, params)
|
22
|
-
put("/apps/#{id}", params)
|
23
|
-
|
24
|
-
OneSignal::App.new(response_body)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|