onesignal 1.0.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +74 -0
- data/README.md +112 -88
- data/docs/App.md +9 -1
- data/docs/BasicNotification.md +230 -0
- data/docs/BasicNotificationAllOf.md +202 -0
- data/docs/{NotificationAllOfAndroidBackgroundLayout.md → BasicNotificationAllOfAndroidBackgroundLayout.md} +2 -2
- data/docs/BeginLiveActivityRequest.md +20 -0
- data/docs/CancelNotificationSuccessResponse.md +18 -0
- data/docs/CreateNotificationSuccessResponse.md +24 -0
- data/docs/{InlineResponse2005.md → CreatePlayerSuccessResponse.md} +2 -2
- data/docs/{InlineResponse4002.md → CreateSegmentConflictResponse.md} +2 -2
- data/docs/CreateSegmentSuccessResponse.md +20 -0
- data/docs/CreateSubscriptionRequestBody.md +20 -0
- data/docs/CreateUserConflictResponse.md +18 -0
- data/docs/CreateUserConflictResponseErrorsInner.md +22 -0
- data/docs/CreateUserConflictResponseErrorsItemsMeta.md +18 -0
- data/docs/DefaultApi.md +1591 -266
- data/docs/DeletePlayerNotFoundResponse.md +18 -0
- data/docs/{InlineResponse2001.md → DeletePlayerSuccessResponse.md} +2 -2
- data/docs/DeleteSegmentNotFoundResponse.md +18 -0
- data/docs/DeleteSegmentSuccessResponse.md +18 -0
- data/docs/DeliveryData.md +5 -5
- data/docs/{InlineResponse2008.md → ExportEventsSuccessResponse.md} +2 -2
- data/docs/ExportPlayersRequestBody.md +2 -2
- data/docs/ExportPlayersSuccessResponse.md +18 -0
- data/docs/Filter.md +1 -1
- data/docs/FilterExpressions.md +1 -1
- data/docs/GenericError.md +18 -0
- data/docs/GenericErrorErrorsInner.md +20 -0
- data/docs/InlineResponse200.md +2 -8
- data/docs/InlineResponse2003.md +18 -0
- data/docs/InlineResponse201.md +2 -4
- data/docs/InlineResponse202.md +18 -0
- data/docs/Notification.md +22 -30
- data/docs/NotificationAllOf.md +1 -175
- data/docs/{InlineResponse2002.md → NotificationHistorySuccessResponse.md} +2 -2
- data/docs/NotificationTarget.md +5 -25
- data/docs/NotificationWithMeta.md +21 -29
- data/docs/PlatformDeliveryData.md +5 -1
- data/docs/PlatformDeliveryDataEmailAllOf.md +30 -0
- data/docs/PlatformDeliveryDataSmsAllOf.md +22 -0
- data/docs/Player.md +1 -1
- data/docs/PlayerNotificationTarget.md +5 -1
- data/docs/PlayerNotificationTargetIncludeAliases.md +18 -0
- data/docs/PropertiesDeltas.md +22 -0
- data/docs/PropertiesObject.md +38 -0
- data/docs/Purchase.md +4 -2
- data/docs/RateLimiterError.md +18 -0
- data/docs/SubscriptionObject.md +50 -0
- data/docs/TransferSubscriptionRequestBody.md +18 -0
- data/docs/UpdateLiveActivityRequest.md +24 -0
- data/docs/UpdateLiveActivitySuccessResponse.md +20 -0
- data/docs/{InlineResponse2007.md → UpdatePlayerSuccessResponse.md} +3 -3
- data/docs/UpdatePlayerTagsSuccessResponse.md +18 -0
- data/docs/UpdateSubscriptionRequestBody.md +18 -0
- data/docs/UpdateUserRequest.md +22 -0
- data/docs/User.md +24 -0
- data/docs/UserIdentityRequestBody.md +18 -0
- data/docs/UserIdentityResponse.md +18 -0
- data/docs/UserSubscriptionOptions.md +18 -0
- data/lib/onesignal/api/default_api.rb +1583 -221
- data/lib/onesignal/api_client.rb +2 -2
- data/lib/onesignal/api_error.rb +1 -1
- data/lib/onesignal/configuration.rb +6 -6
- data/lib/onesignal/models/app.rb +57 -7
- data/lib/onesignal/models/basic_notification.rb +1442 -0
- data/lib/onesignal/models/basic_notification_all_of.rb +1252 -0
- data/lib/onesignal/models/{notification_all_of_android_background_layout.rb → basic_notification_all_of_android_background_layout.rb} +4 -4
- data/lib/onesignal/models/begin_live_activity_request.rb +238 -0
- data/lib/onesignal/models/button.rb +1 -1
- data/lib/onesignal/models/cancel_notification_success_response.rb +219 -0
- data/lib/onesignal/models/create_notification_success_response.rb +248 -0
- data/lib/onesignal/models/{inline_response2005.rb → create_player_success_response.rb} +4 -4
- data/lib/onesignal/models/{inline_response4002.rb → create_segment_conflict_response.rb} +4 -4
- data/lib/onesignal/models/create_segment_success_response.rb +229 -0
- data/lib/onesignal/models/create_subscription_request_body.rb +228 -0
- data/lib/onesignal/models/{inline_response4001.rb → create_user_conflict_response.rb} +6 -15
- data/lib/onesignal/models/create_user_conflict_response_errors_inner.rb +237 -0
- data/lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb +219 -0
- data/lib/onesignal/models/delete_player_not_found_response.rb +219 -0
- data/lib/onesignal/models/{inline_response2001.rb → delete_player_success_response.rb} +4 -4
- data/lib/onesignal/models/delete_segment_not_found_response.rb +219 -0
- data/lib/onesignal/models/delete_segment_success_response.rb +219 -0
- data/lib/onesignal/models/delivery_data.rb +6 -1
- data/lib/onesignal/models/{inline_response2008.rb → export_events_success_response.rb} +4 -4
- data/lib/onesignal/models/export_players_request_body.rb +3 -3
- data/lib/onesignal/models/export_players_success_response.rb +219 -0
- data/lib/onesignal/models/filter.rb +2 -2
- data/lib/onesignal/models/filter_expressions.rb +2 -2
- data/lib/onesignal/models/{inline_response400.rb → generic_error.rb} +5 -5
- data/lib/onesignal/models/generic_error_errors_inner.rb +228 -0
- data/lib/onesignal/models/get_notification_request_body.rb +1 -1
- data/lib/onesignal/models/inline_response200.rb +10 -46
- data/lib/onesignal/models/{inline_response4003.rb → inline_response2003.rb} +12 -12
- data/lib/onesignal/models/inline_response201.rb +8 -18
- data/lib/onesignal/models/inline_response202.rb +219 -0
- data/lib/onesignal/models/invalid_identifier_error.rb +1 -1
- data/lib/onesignal/models/notification.rb +173 -141
- data/lib/onesignal/models/notification200_errors.rb +1 -1
- data/lib/onesignal/models/notification_all_of.rb +6 -929
- data/lib/onesignal/models/{inline_response2002.rb → notification_history_success_response.rb} +4 -4
- data/lib/onesignal/models/notification_slice.rb +1 -1
- data/lib/onesignal/models/notification_target.rb +60 -126
- data/lib/onesignal/models/notification_with_meta.rb +168 -137
- data/lib/onesignal/models/notification_with_meta_all_of.rb +2 -1
- data/lib/onesignal/models/operator.rb +1 -1
- data/lib/onesignal/models/outcome_data.rb +1 -1
- data/lib/onesignal/models/outcomes_data.rb +1 -1
- data/lib/onesignal/models/platform_delivery_data.rb +25 -5
- data/lib/onesignal/models/platform_delivery_data_email_all_of.rb +287 -0
- data/lib/onesignal/models/platform_delivery_data_sms_all_of.rb +243 -0
- data/lib/onesignal/models/player.rb +9 -6
- data/lib/onesignal/models/player_notification_target.rb +60 -5
- data/lib/onesignal/models/player_notification_target_include_aliases.rb +221 -0
- data/lib/onesignal/models/player_slice.rb +1 -1
- data/lib/onesignal/models/properties_deltas.rb +239 -0
- data/lib/onesignal/models/properties_object.rb +313 -0
- data/lib/onesignal/models/purchase.rb +15 -6
- data/lib/onesignal/models/rate_limiter_error.rb +221 -0
- data/lib/onesignal/models/segment.rb +1 -1
- data/lib/onesignal/models/segment_notification_target.rb +1 -1
- data/lib/onesignal/models/string_map.rb +1 -1
- data/lib/onesignal/models/{filter_notification_target.rb → subscription_object.rb} +145 -78
- data/lib/onesignal/models/transfer_subscription_request_body.rb +221 -0
- data/lib/onesignal/models/update_live_activity_request.rb +309 -0
- data/lib/onesignal/models/update_live_activity_success_response.rb +228 -0
- data/lib/onesignal/models/{inline_response2007.rb → update_player_success_response.rb} +5 -5
- data/lib/onesignal/models/update_player_tags_request_body.rb +1 -1
- data/lib/onesignal/models/update_player_tags_success_response.rb +219 -0
- data/lib/onesignal/models/update_subscription_request_body.rb +219 -0
- data/lib/onesignal/models/update_user_request.rb +239 -0
- data/lib/onesignal/models/user.rb +250 -0
- data/lib/onesignal/models/user_identity_request_body.rb +221 -0
- data/lib/onesignal/models/user_identity_response.rb +221 -0
- data/lib/onesignal/models/user_subscription_options.rb +219 -0
- data/lib/onesignal/version.rb +2 -2
- data/lib/onesignal.rb +43 -12
- data/onesignal.gemspec +1 -1
- data/spec/api/default_api_spec.rb +249 -12
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +4 -4
- data/spec/models/app_spec.rb +25 -1
- data/spec/models/{notification_all_of_android_background_layout_spec.rb → basic_notification_all_of_android_background_layout_spec.rb} +7 -7
- data/spec/models/basic_notification_all_of_spec.rb +590 -0
- data/spec/models/basic_notification_spec.rb +678 -0
- data/spec/models/begin_live_activity_request_spec.rb +40 -0
- data/spec/models/button_spec.rb +1 -1
- data/spec/models/cancel_notification_success_response_spec.rb +34 -0
- data/spec/models/create_notification_success_response_spec.rb +52 -0
- data/spec/models/{inline_response2005_spec.rb → create_player_success_response_spec.rb} +7 -7
- data/spec/models/{inline_response4001_spec.rb → create_segment_conflict_response_spec.rb} +7 -7
- data/spec/models/{inline_response4002_spec.rb → create_segment_success_response_spec.rb} +8 -8
- data/spec/models/create_subscription_request_body_spec.rb +40 -0
- data/spec/models/create_user_conflict_response_errors_inner_spec.rb +46 -0
- data/spec/models/create_user_conflict_response_errors_items_meta_spec.rb +34 -0
- data/spec/models/create_user_conflict_response_spec.rb +34 -0
- data/spec/models/delete_player_not_found_response_spec.rb +34 -0
- data/spec/models/{inline_response2001_spec.rb → delete_player_success_response_spec.rb} +7 -7
- data/spec/models/delete_segment_not_found_response_spec.rb +34 -0
- data/spec/models/delete_segment_success_response_spec.rb +34 -0
- data/spec/models/delivery_data_spec.rb +1 -1
- data/spec/models/{inline_response2008_spec.rb → export_events_success_response_spec.rb} +7 -7
- data/spec/models/export_players_request_body_spec.rb +1 -1
- data/spec/models/export_players_success_response_spec.rb +34 -0
- data/spec/models/filter_expressions_spec.rb +1 -1
- data/spec/models/filter_spec.rb +1 -1
- data/spec/models/generic_error_errors_inner_spec.rb +40 -0
- data/spec/models/{inline_response4003_spec.rb → generic_error_spec.rb} +8 -8
- data/spec/models/get_notification_request_body_spec.rb +1 -1
- data/spec/models/{inline_response2007_spec.rb → inline_response2003_spec.rb} +8 -8
- data/spec/models/inline_response200_spec.rb +2 -20
- data/spec/models/inline_response201_spec.rb +2 -8
- data/spec/models/{inline_response400_spec.rb → inline_response202_spec.rb} +8 -8
- data/spec/models/invalid_identifier_error_spec.rb +1 -1
- data/spec/models/notification200_errors_spec.rb +1 -1
- data/spec/models/notification_all_of_spec.rb +1 -527
- data/spec/models/{inline_response2002_spec.rb → notification_history_success_response_spec.rb} +7 -7
- data/spec/models/notification_slice_spec.rb +1 -1
- data/spec/models/notification_spec.rb +56 -76
- data/spec/models/notification_target_spec.rb +17 -73
- data/spec/models/notification_with_meta_all_of_spec.rb +1 -1
- data/spec/models/notification_with_meta_spec.rb +56 -76
- data/spec/models/operator_spec.rb +1 -1
- data/spec/models/outcome_data_spec.rb +1 -1
- data/spec/models/outcomes_data_spec.rb +1 -1
- data/spec/models/platform_delivery_data_email_all_of_spec.rb +70 -0
- data/spec/models/platform_delivery_data_sms_all_of_spec.rb +46 -0
- data/spec/models/platform_delivery_data_spec.rb +13 -1
- data/spec/models/player_notification_target_include_aliases_spec.rb +34 -0
- data/spec/models/player_notification_target_spec.rb +17 -1
- data/spec/models/player_slice_spec.rb +1 -1
- data/spec/models/player_spec.rb +1 -1
- data/spec/models/properties_deltas_spec.rb +46 -0
- data/spec/models/{filter_notification_target_spec.rb → properties_object_spec.rb} +18 -24
- data/spec/models/purchase_spec.rb +7 -1
- data/spec/models/rate_limiter_error_spec.rb +34 -0
- data/spec/models/segment_notification_target_spec.rb +1 -1
- data/spec/models/segment_spec.rb +1 -1
- data/spec/models/string_map_spec.rb +1 -1
- data/spec/models/subscription_object_spec.rb +134 -0
- data/spec/models/transfer_subscription_request_body_spec.rb +34 -0
- data/spec/models/update_live_activity_request_spec.rb +60 -0
- data/spec/models/update_live_activity_success_response_spec.rb +40 -0
- data/spec/models/update_player_success_response_spec.rb +34 -0
- data/spec/models/update_player_tags_request_body_spec.rb +1 -1
- data/spec/models/update_player_tags_success_response_spec.rb +34 -0
- data/spec/models/update_subscription_request_body_spec.rb +34 -0
- data/spec/models/update_user_request_spec.rb +46 -0
- data/spec/models/user_identity_request_body_spec.rb +34 -0
- data/spec/models/user_identity_response_spec.rb +34 -0
- data/spec/models/user_spec.rb +52 -0
- data/spec/models/user_subscription_options_spec.rb +34 -0
- data/spec/spec_helper.rb +1 -1
- metadata +178 -53
- data/docs/FilterNotificationTarget.md +0 -40
- data/docs/InlineResponse400.md +0 -18
- data/docs/InlineResponse4001.md +0 -20
- data/docs/InlineResponse4003.md +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d087519e511c69b765b35d1f1c3ba69a245465c670d80e3dd1a69e3c50052a53
|
4
|
+
data.tar.gz: 6f87d39ff098997f9b4a13a1ed3f65ca570a802ac59934dc627fa79481b8678c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5572c14f560b567879b7ad5b9566bcd0fcb2ff907b695b0ac3d0e75d77856929563e73e4ffd8d0358713449f67dc8e8154ac42f34d99ff795f504a9fbab0aee5
|
7
|
+
data.tar.gz: 6adfcc757e606b4ac159bd6858e2a6b5e9e4af3fca4ee719d52a5608162c0088abd31f31622c61561363e1e10d863d445b4964a7238f72b096d99c0c56f495bc
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
onesignal (2.2.0)
|
5
|
+
typhoeus (~> 1.0, >= 1.0.1)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
ast (2.4.3)
|
11
|
+
byebug (11.1.3)
|
12
|
+
coderay (1.1.3)
|
13
|
+
date (3.4.1)
|
14
|
+
diff-lcs (1.6.1)
|
15
|
+
ethon (0.16.0)
|
16
|
+
ffi (>= 1.15.0)
|
17
|
+
ffi (1.17.1)
|
18
|
+
jaro_winkler (1.5.6)
|
19
|
+
method_source (1.1.0)
|
20
|
+
parallel (1.24.0)
|
21
|
+
parser (3.3.7.4)
|
22
|
+
ast (~> 2.4.1)
|
23
|
+
racc
|
24
|
+
pry (0.13.1)
|
25
|
+
coderay (~> 1.1)
|
26
|
+
method_source (~> 1.0)
|
27
|
+
pry-byebug (3.9.0)
|
28
|
+
byebug (~> 11.0)
|
29
|
+
pry (~> 0.13.0)
|
30
|
+
psych (5.2.3)
|
31
|
+
date
|
32
|
+
stringio
|
33
|
+
racc (1.8.1)
|
34
|
+
rainbow (3.1.1)
|
35
|
+
rake (13.0.6)
|
36
|
+
rspec (3.13.0)
|
37
|
+
rspec-core (~> 3.13.0)
|
38
|
+
rspec-expectations (~> 3.13.0)
|
39
|
+
rspec-mocks (~> 3.13.0)
|
40
|
+
rspec-core (3.13.3)
|
41
|
+
rspec-support (~> 3.13.0)
|
42
|
+
rspec-expectations (3.13.3)
|
43
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
44
|
+
rspec-support (~> 3.13.0)
|
45
|
+
rspec-mocks (3.13.2)
|
46
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
47
|
+
rspec-support (~> 3.13.0)
|
48
|
+
rspec-support (3.13.2)
|
49
|
+
rubocop (0.66.0)
|
50
|
+
jaro_winkler (~> 1.5.1)
|
51
|
+
parallel (~> 1.10)
|
52
|
+
parser (>= 2.5, != 2.5.1.1)
|
53
|
+
psych (>= 3.1.0)
|
54
|
+
rainbow (>= 2.2.2, < 4.0)
|
55
|
+
ruby-progressbar (~> 1.7)
|
56
|
+
unicode-display_width (>= 1.4.0, < 1.6)
|
57
|
+
ruby-progressbar (1.13.0)
|
58
|
+
stringio (3.0.6)
|
59
|
+
typhoeus (1.4.1)
|
60
|
+
ethon (>= 0.9.0)
|
61
|
+
unicode-display_width (1.5.0)
|
62
|
+
|
63
|
+
PLATFORMS
|
64
|
+
ruby
|
65
|
+
|
66
|
+
DEPENDENCIES
|
67
|
+
onesignal!
|
68
|
+
pry-byebug
|
69
|
+
rake (~> 13.0.1)
|
70
|
+
rspec (~> 3.6, >= 3.6.0)
|
71
|
+
rubocop (~> 0.66.0)
|
72
|
+
|
73
|
+
BUNDLED WITH
|
74
|
+
1.17.2
|
data/README.md
CHANGED
@@ -1,19 +1,4 @@
|
|
1
|
-
|
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
|
-
|
1
|
+
# onesignal
|
17
2
|
|
18
3
|
OneSignal - the Ruby gem for the OneSignal
|
19
4
|
|
@@ -21,166 +6,205 @@ A powerful way to send personalized messages at scale and build effective custom
|
|
21
6
|
|
22
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
23
8
|
|
24
|
-
|
25
|
-
|
26
|
-
|
9
|
+
- API version: 1.4.0
|
10
|
+
- Package version: 2.2.0
|
11
|
+
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
|
+
For more information, please visit [https://onesignal.com](https://onesignal.com)
|
27
13
|
|
28
14
|
## Installation
|
29
15
|
|
30
|
-
|
16
|
+
### Build a gem
|
31
17
|
|
32
|
-
|
33
|
-
|
18
|
+
To build the Ruby code into a gem:
|
19
|
+
|
20
|
+
```shell
|
21
|
+
gem build onesignal.gemspec
|
34
22
|
```
|
35
23
|
|
36
|
-
|
24
|
+
Then either install the gem locally:
|
25
|
+
|
26
|
+
```shell
|
27
|
+
gem install ./onesignal-2.2.0.gem
|
28
|
+
```
|
29
|
+
|
30
|
+
(for development, run `gem install --dev ./onesignal-2.2.0.gem` to install the development dependencies)
|
31
|
+
|
32
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
37
33
|
|
38
|
-
|
34
|
+
Finally add this to the Gemfile:
|
39
35
|
|
40
|
-
|
36
|
+
gem 'onesignal', '~> 2.2.0'
|
41
37
|
|
42
|
-
|
38
|
+
### Install from Git
|
43
39
|
|
44
|
-
|
40
|
+
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
|
45
41
|
|
46
|
-
|
42
|
+
gem 'onesignal', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
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
|
+
```
|
47
51
|
|
48
52
|
## Getting Started
|
49
53
|
|
50
54
|
Please follow the [installation](#installation) procedure and then run the following code:
|
51
55
|
|
52
56
|
```ruby
|
53
|
-
|
57
|
+
# Load the gem
|
54
58
|
require 'onesignal'
|
55
|
-
|
59
|
+
|
60
|
+
# Setup authorization
|
56
61
|
OneSignal.configure do |config|
|
57
62
|
# Configure Bearer authorization: app_key
|
58
|
-
config.
|
59
|
-
config.app_key = 'YOUR_APP_KEY'
|
63
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
60
64
|
end
|
61
65
|
|
62
66
|
api_instance = OneSignal::DefaultApi.new
|
63
|
-
|
67
|
+
app_id = 'app_id_example' # String | The OneSignal App ID for your app. Available in Keys & IDs.
|
68
|
+
activity_id = 'activity_id_example' # String | Live Activity record ID
|
69
|
+
begin_live_activity_request = OneSignal::BeginLiveActivityRequest.new({push_token: 'push_token_example', subscription_id: 'subscription_id_example'}) # BeginLiveActivityRequest |
|
64
70
|
|
65
71
|
begin
|
66
|
-
#
|
67
|
-
|
68
|
-
p result
|
72
|
+
#Start Live Activity
|
73
|
+
api_instance.begin_live_activity(app_id, activity_id, begin_live_activity_request)
|
69
74
|
rescue OneSignal::ApiError => e
|
70
|
-
puts "
|
75
|
+
puts "Exception when calling DefaultApi->begin_live_activity: #{e}"
|
71
76
|
end
|
77
|
+
|
72
78
|
```
|
73
79
|
|
74
80
|
## Documentation for API Endpoints
|
75
81
|
|
76
|
-
All URIs are relative to *https://onesignal.com
|
82
|
+
All URIs are relative to *https://api.onesignal.com*
|
77
83
|
|
78
84
|
Class | Method | HTTP request | Description
|
79
85
|
------------ | ------------- | ------------- | -------------
|
86
|
+
*OneSignal::DefaultApi* | [**begin_live_activity**](docs/DefaultApi.md#begin_live_activity) | **POST** /apps/{app_id}/live_activities/{activity_id}/token | Start Live Activity
|
80
87
|
*OneSignal::DefaultApi* | [**cancel_notification**](docs/DefaultApi.md#cancel_notification) | **DELETE** /notifications/{notification_id} | Stop a scheduled or currently outgoing notification
|
81
88
|
*OneSignal::DefaultApi* | [**create_app**](docs/DefaultApi.md#create_app) | **POST** /apps | Create an app
|
82
89
|
*OneSignal::DefaultApi* | [**create_notification**](docs/DefaultApi.md#create_notification) | **POST** /notifications | Create notification
|
83
90
|
*OneSignal::DefaultApi* | [**create_player**](docs/DefaultApi.md#create_player) | **POST** /players | Add a device
|
84
91
|
*OneSignal::DefaultApi* | [**create_segments**](docs/DefaultApi.md#create_segments) | **POST** /apps/{app_id}/segments | Create Segments
|
92
|
+
*OneSignal::DefaultApi* | [**create_subscription**](docs/DefaultApi.md#create_subscription) | **POST** /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions |
|
93
|
+
*OneSignal::DefaultApi* | [**create_user**](docs/DefaultApi.md#create_user) | **POST** /apps/{app_id}/users |
|
94
|
+
*OneSignal::DefaultApi* | [**delete_alias**](docs/DefaultApi.md#delete_alias) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete} |
|
85
95
|
*OneSignal::DefaultApi* | [**delete_player**](docs/DefaultApi.md#delete_player) | **DELETE** /players/{player_id} | Delete a user record
|
86
96
|
*OneSignal::DefaultApi* | [**delete_segments**](docs/DefaultApi.md#delete_segments) | **DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segments
|
87
|
-
*OneSignal::DefaultApi* | [**
|
97
|
+
*OneSignal::DefaultApi* | [**delete_subscription**](docs/DefaultApi.md#delete_subscription) | **DELETE** /apps/{app_id}/subscriptions/{subscription_id} |
|
98
|
+
*OneSignal::DefaultApi* | [**delete_user**](docs/DefaultApi.md#delete_user) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
|
99
|
+
*OneSignal::DefaultApi* | [**end_live_activity**](docs/DefaultApi.md#end_live_activity) | **DELETE** /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} | Stop Live Activity
|
100
|
+
*OneSignal::DefaultApi* | [**export_events**](docs/DefaultApi.md#export_events) | **POST** /notifications/{notification_id}/export_events?app_id={app_id} | Export CSV of Events
|
101
|
+
*OneSignal::DefaultApi* | [**export_players**](docs/DefaultApi.md#export_players) | **POST** /players/csv_export?app_id={app_id} | Export CSV of Players
|
102
|
+
*OneSignal::DefaultApi* | [**fetch_aliases**](docs/DefaultApi.md#fetch_aliases) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
|
103
|
+
*OneSignal::DefaultApi* | [**fetch_user**](docs/DefaultApi.md#fetch_user) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
|
104
|
+
*OneSignal::DefaultApi* | [**fetch_user_identity**](docs/DefaultApi.md#fetch_user_identity) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
|
88
105
|
*OneSignal::DefaultApi* | [**get_app**](docs/DefaultApi.md#get_app) | **GET** /apps/{app_id} | View an app
|
89
106
|
*OneSignal::DefaultApi* | [**get_apps**](docs/DefaultApi.md#get_apps) | **GET** /apps | View apps
|
107
|
+
*OneSignal::DefaultApi* | [**get_eligible_iams**](docs/DefaultApi.md#get_eligible_iams) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/iams |
|
90
108
|
*OneSignal::DefaultApi* | [**get_notification**](docs/DefaultApi.md#get_notification) | **GET** /notifications/{notification_id} | View notification
|
91
109
|
*OneSignal::DefaultApi* | [**get_notification_history**](docs/DefaultApi.md#get_notification_history) | **POST** /notifications/{notification_id}/history | Notification History
|
92
110
|
*OneSignal::DefaultApi* | [**get_notifications**](docs/DefaultApi.md#get_notifications) | **GET** /notifications | View notifications
|
93
111
|
*OneSignal::DefaultApi* | [**get_outcomes**](docs/DefaultApi.md#get_outcomes) | **GET** /apps/{app_id}/outcomes | View Outcomes
|
94
112
|
*OneSignal::DefaultApi* | [**get_player**](docs/DefaultApi.md#get_player) | **GET** /players/{player_id} | View device
|
95
113
|
*OneSignal::DefaultApi* | [**get_players**](docs/DefaultApi.md#get_players) | **GET** /players | View devices
|
114
|
+
*OneSignal::DefaultApi* | [**identify_user_by_alias**](docs/DefaultApi.md#identify_user_by_alias) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
|
115
|
+
*OneSignal::DefaultApi* | [**identify_user_by_subscription_id**](docs/DefaultApi.md#identify_user_by_subscription_id) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
|
116
|
+
*OneSignal::DefaultApi* | [**transfer_subscription**](docs/DefaultApi.md#transfer_subscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/owner |
|
96
117
|
*OneSignal::DefaultApi* | [**update_app**](docs/DefaultApi.md#update_app) | **PUT** /apps/{app_id} | Update an app
|
118
|
+
*OneSignal::DefaultApi* | [**update_live_activity**](docs/DefaultApi.md#update_live_activity) | **POST** /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push
|
97
119
|
*OneSignal::DefaultApi* | [**update_player**](docs/DefaultApi.md#update_player) | **PUT** /players/{player_id} | Edit device
|
98
120
|
*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
|
121
|
+
*OneSignal::DefaultApi* | [**update_subscription**](docs/DefaultApi.md#update_subscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id} |
|
122
|
+
*OneSignal::DefaultApi* | [**update_user**](docs/DefaultApi.md#update_user) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
|
123
|
+
|
99
124
|
|
100
125
|
## Documentation for Models
|
101
126
|
|
102
127
|
- [OneSignal::App](docs/App.md)
|
128
|
+
- [OneSignal::BasicNotification](docs/BasicNotification.md)
|
129
|
+
- [OneSignal::BasicNotificationAllOf](docs/BasicNotificationAllOf.md)
|
130
|
+
- [OneSignal::BasicNotificationAllOfAndroidBackgroundLayout](docs/BasicNotificationAllOfAndroidBackgroundLayout.md)
|
131
|
+
- [OneSignal::BeginLiveActivityRequest](docs/BeginLiveActivityRequest.md)
|
103
132
|
- [OneSignal::Button](docs/Button.md)
|
133
|
+
- [OneSignal::CancelNotificationSuccessResponse](docs/CancelNotificationSuccessResponse.md)
|
134
|
+
- [OneSignal::CreateNotificationSuccessResponse](docs/CreateNotificationSuccessResponse.md)
|
135
|
+
- [OneSignal::CreatePlayerSuccessResponse](docs/CreatePlayerSuccessResponse.md)
|
136
|
+
- [OneSignal::CreateSegmentConflictResponse](docs/CreateSegmentConflictResponse.md)
|
137
|
+
- [OneSignal::CreateSegmentSuccessResponse](docs/CreateSegmentSuccessResponse.md)
|
138
|
+
- [OneSignal::CreateSubscriptionRequestBody](docs/CreateSubscriptionRequestBody.md)
|
139
|
+
- [OneSignal::CreateUserConflictResponse](docs/CreateUserConflictResponse.md)
|
140
|
+
- [OneSignal::CreateUserConflictResponseErrorsInner](docs/CreateUserConflictResponseErrorsInner.md)
|
141
|
+
- [OneSignal::CreateUserConflictResponseErrorsItemsMeta](docs/CreateUserConflictResponseErrorsItemsMeta.md)
|
142
|
+
- [OneSignal::DeletePlayerNotFoundResponse](docs/DeletePlayerNotFoundResponse.md)
|
143
|
+
- [OneSignal::DeletePlayerSuccessResponse](docs/DeletePlayerSuccessResponse.md)
|
144
|
+
- [OneSignal::DeleteSegmentNotFoundResponse](docs/DeleteSegmentNotFoundResponse.md)
|
145
|
+
- [OneSignal::DeleteSegmentSuccessResponse](docs/DeleteSegmentSuccessResponse.md)
|
104
146
|
- [OneSignal::DeliveryData](docs/DeliveryData.md)
|
147
|
+
- [OneSignal::ExportEventsSuccessResponse](docs/ExportEventsSuccessResponse.md)
|
105
148
|
- [OneSignal::ExportPlayersRequestBody](docs/ExportPlayersRequestBody.md)
|
149
|
+
- [OneSignal::ExportPlayersSuccessResponse](docs/ExportPlayersSuccessResponse.md)
|
106
150
|
- [OneSignal::Filter](docs/Filter.md)
|
107
151
|
- [OneSignal::FilterExpressions](docs/FilterExpressions.md)
|
108
|
-
- [OneSignal::
|
152
|
+
- [OneSignal::GenericError](docs/GenericError.md)
|
153
|
+
- [OneSignal::GenericErrorErrorsInner](docs/GenericErrorErrorsInner.md)
|
109
154
|
- [OneSignal::GetNotificationRequestBody](docs/GetNotificationRequestBody.md)
|
110
155
|
- [OneSignal::InlineResponse200](docs/InlineResponse200.md)
|
111
|
-
- [OneSignal::InlineResponse2001](docs/InlineResponse2001.md)
|
112
|
-
- [OneSignal::InlineResponse2002](docs/InlineResponse2002.md)
|
113
156
|
- [OneSignal::InlineResponse2003](docs/InlineResponse2003.md)
|
114
|
-
- [OneSignal::InlineResponse2004](docs/InlineResponse2004.md)
|
115
|
-
- [OneSignal::InlineResponse2005](docs/InlineResponse2005.md)
|
116
157
|
- [OneSignal::InlineResponse201](docs/InlineResponse201.md)
|
117
|
-
- [OneSignal::
|
118
|
-
- [OneSignal::
|
119
|
-
- [OneSignal::InlineResponse4002](docs/InlineResponse4002.md)
|
120
|
-
- [OneSignal::InlineResponse409](docs/InlineResponse409.md)
|
158
|
+
- [OneSignal::InlineResponse202](docs/InlineResponse202.md)
|
159
|
+
- [OneSignal::InvalidIdentifierError](docs/InvalidIdentifierError.md)
|
121
160
|
- [OneSignal::Notification](docs/Notification.md)
|
161
|
+
- [OneSignal::Notification200Errors](docs/Notification200Errors.md)
|
122
162
|
- [OneSignal::NotificationAllOf](docs/NotificationAllOf.md)
|
123
|
-
- [OneSignal::
|
163
|
+
- [OneSignal::NotificationHistorySuccessResponse](docs/NotificationHistorySuccessResponse.md)
|
124
164
|
- [OneSignal::NotificationSlice](docs/NotificationSlice.md)
|
125
165
|
- [OneSignal::NotificationTarget](docs/NotificationTarget.md)
|
166
|
+
- [OneSignal::NotificationWithMeta](docs/NotificationWithMeta.md)
|
167
|
+
- [OneSignal::NotificationWithMetaAllOf](docs/NotificationWithMetaAllOf.md)
|
126
168
|
- [OneSignal::Operator](docs/Operator.md)
|
127
169
|
- [OneSignal::OutcomeData](docs/OutcomeData.md)
|
170
|
+
- [OneSignal::OutcomesData](docs/OutcomesData.md)
|
128
171
|
- [OneSignal::PlatformDeliveryData](docs/PlatformDeliveryData.md)
|
172
|
+
- [OneSignal::PlatformDeliveryDataEmailAllOf](docs/PlatformDeliveryDataEmailAllOf.md)
|
173
|
+
- [OneSignal::PlatformDeliveryDataSmsAllOf](docs/PlatformDeliveryDataSmsAllOf.md)
|
129
174
|
- [OneSignal::Player](docs/Player.md)
|
130
175
|
- [OneSignal::PlayerNotificationTarget](docs/PlayerNotificationTarget.md)
|
176
|
+
- [OneSignal::PlayerNotificationTargetIncludeAliases](docs/PlayerNotificationTargetIncludeAliases.md)
|
131
177
|
- [OneSignal::PlayerSlice](docs/PlayerSlice.md)
|
178
|
+
- [OneSignal::PropertiesDeltas](docs/PropertiesDeltas.md)
|
179
|
+
- [OneSignal::PropertiesObject](docs/PropertiesObject.md)
|
132
180
|
- [OneSignal::Purchase](docs/Purchase.md)
|
181
|
+
- [OneSignal::RateLimiterError](docs/RateLimiterError.md)
|
133
182
|
- [OneSignal::Segment](docs/Segment.md)
|
134
183
|
- [OneSignal::SegmentNotificationTarget](docs/SegmentNotificationTarget.md)
|
135
184
|
- [OneSignal::StringMap](docs/StringMap.md)
|
185
|
+
- [OneSignal::SubscriptionObject](docs/SubscriptionObject.md)
|
186
|
+
- [OneSignal::TransferSubscriptionRequestBody](docs/TransferSubscriptionRequestBody.md)
|
187
|
+
- [OneSignal::UpdateLiveActivityRequest](docs/UpdateLiveActivityRequest.md)
|
188
|
+
- [OneSignal::UpdateLiveActivitySuccessResponse](docs/UpdateLiveActivitySuccessResponse.md)
|
189
|
+
- [OneSignal::UpdatePlayerSuccessResponse](docs/UpdatePlayerSuccessResponse.md)
|
136
190
|
- [OneSignal::UpdatePlayerTagsRequestBody](docs/UpdatePlayerTagsRequestBody.md)
|
191
|
+
- [OneSignal::UpdatePlayerTagsSuccessResponse](docs/UpdatePlayerTagsSuccessResponse.md)
|
192
|
+
- [OneSignal::UpdateSubscriptionRequestBody](docs/UpdateSubscriptionRequestBody.md)
|
193
|
+
- [OneSignal::UpdateUserRequest](docs/UpdateUserRequest.md)
|
194
|
+
- [OneSignal::User](docs/User.md)
|
195
|
+
- [OneSignal::UserIdentityRequestBody](docs/UserIdentityRequestBody.md)
|
196
|
+
- [OneSignal::UserIdentityResponse](docs/UserIdentityResponse.md)
|
197
|
+
- [OneSignal::UserSubscriptionOptions](docs/UserSubscriptionOptions.md)
|
198
|
+
|
137
199
|
|
138
200
|
## Documentation for Authorization
|
139
201
|
|
202
|
+
|
140
203
|
### app_key
|
141
204
|
|
142
205
|
- **Type**: Bearer authentication
|
143
206
|
|
144
|
-
```rb
|
145
|
-
OneSignal.configure do |config|
|
146
|
-
config.app_key = 'APP_KEY' # replace with your app key
|
147
|
-
end
|
148
|
-
```
|
149
|
-
|
150
207
|
### user_key
|
151
208
|
|
152
209
|
- **Type**: Bearer authentication
|
153
210
|
|
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.
|
data/docs/App.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **id** | **String** | | [readonly] |
|
7
|
+
| **id** | **String** | | [optional][readonly] |
|
8
8
|
| **name** | **String** | The name of your app, as displayed on your apps list on the dashboard. This can be renamed. | [optional] |
|
9
9
|
| **players** | **Integer** | | [optional][readonly] |
|
10
10
|
| **messageable_players** | **Integer** | | [optional][readonly] |
|
@@ -23,6 +23,10 @@
|
|
23
23
|
| **safari_apns_certificates** | **String** | | [optional][readonly] |
|
24
24
|
| **safari_apns_p12** | **String** | Safari: Your apple push notification p12 certificate file for Safari Push Notifications, converted to a string and Base64 encoded. | [optional] |
|
25
25
|
| **safari_apns_p12_password** | **String** | Safari: Password for safari_apns_p12 file | [optional] |
|
26
|
+
| **apns_key_id** | **String** | iOS: Required if using p8. Unique identifier for the p8 authentication key. | [optional] |
|
27
|
+
| **apns_team_id** | **String** | iOS: Required if using p8. Team ID generated by Apple for your developer account. | [optional] |
|
28
|
+
| **apns_bundle_id** | **String** | iOS: Required if using p8. Bundle ID for your app in the Apple ecosystem. | [optional] |
|
29
|
+
| **apns_p8** | **String** | iOS: Required if using p8. Base64 encoded p8 key | [optional] |
|
26
30
|
| **safari_site_origin** | **String** | Safari (Recommended): The hostname to your website including http(s):// | [optional] |
|
27
31
|
| **safari_push_id** | **String** | | [optional][readonly] |
|
28
32
|
| **safari_icon_16_16** | **String** | | [optional][readonly] |
|
@@ -60,6 +64,10 @@ instance = OneSignal::App.new(
|
|
60
64
|
safari_apns_certificates: null,
|
61
65
|
safari_apns_p12: null,
|
62
66
|
safari_apns_p12_password: null,
|
67
|
+
apns_key_id: null,
|
68
|
+
apns_team_id: null,
|
69
|
+
apns_bundle_id: null,
|
70
|
+
apns_p8: null,
|
63
71
|
safari_site_origin: null,
|
64
72
|
safari_push_id: null,
|
65
73
|
safari_icon_16_16: null,
|