onesignal 5.7.0 → 5.9.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/AGENTS.md +66 -0
- data/CHANGELOG.md +14 -0
- data/CLAUDE.md +5 -0
- data/Gemfile.lock +1 -1
- data/README.md +5 -3
- data/docs/ApiKeyToken.md +6 -6
- data/docs/ApiKeyTokensListResponse.md +1 -1
- data/docs/App.md +34 -34
- data/docs/BasicNotification.md +117 -117
- data/docs/BasicNotificationAllOf.md +103 -103
- data/docs/BasicNotificationAllOfAndroidBackgroundLayout.md +3 -3
- data/docs/Button.md +3 -3
- data/docs/CopyTemplateRequest.md +1 -1
- data/docs/CreateApiKeyRequest.md +3 -3
- data/docs/CreateApiKeyResponse.md +2 -2
- data/docs/CreateNotificationSuccessResponse.md +4 -4
- data/docs/CreateSegmentConflictResponse.md +2 -2
- data/docs/CreateSegmentSuccessResponse.md +2 -2
- data/docs/CreateTemplateRequest.md +11 -11
- data/docs/CreateUserConflictResponse.md +1 -1
- data/docs/CreateUserConflictResponseErrorsInner.md +3 -3
- data/docs/CreateUserConflictResponseErrorsItemsMeta.md +1 -1
- data/docs/CustomEvent.md +5 -5
- data/docs/CustomEventsRequest.md +1 -1
- data/docs/DefaultApi.md +90 -86
- data/docs/DeliveryData.md +5 -5
- data/docs/ExportEventsSuccessResponse.md +1 -1
- data/docs/ExportSubscriptionsRequestBody.md +3 -3
- data/docs/ExportSubscriptionsSuccessResponse.md +1 -1
- data/docs/Filter.md +8 -8
- data/docs/GenericError.md +3 -3
- data/docs/GenericSuccessBoolResponse.md +1 -1
- data/docs/GetNotificationHistoryRequestBody.md +3 -3
- data/docs/GetSegmentsSuccessResponse.md +4 -4
- data/docs/LanguageStringMap.md +43 -43
- data/docs/Notification.md +118 -118
- data/docs/NotificationAllOf.md +1 -1
- data/docs/NotificationHistorySuccessResponse.md +2 -2
- data/docs/NotificationSlice.md +8 -4
- data/docs/NotificationTarget.md +14 -14
- data/docs/NotificationWithMeta.md +130 -130
- data/docs/NotificationWithMetaAllOf.md +14 -14
- data/docs/Operator.md +1 -1
- data/docs/OutcomeData.md +3 -3
- data/docs/OutcomesData.md +1 -1
- data/docs/PlatformDeliveryData.md +8 -8
- data/docs/PlatformDeliveryDataEmailAllOf.md +7 -7
- data/docs/PlatformDeliveryDataSmsAllOf.md +3 -3
- data/docs/PropertiesBody.md +1 -1
- data/docs/PropertiesDeltas.md +3 -3
- data/docs/PropertiesObject.md +11 -11
- data/docs/Purchase.md +4 -4
- data/docs/RateLimitError.md +2 -2
- data/docs/Segment.md +3 -3
- data/docs/SegmentData.md +7 -7
- data/docs/SegmentNotificationTarget.md +2 -2
- data/docs/StartLiveActivityRequest.md +16 -16
- data/docs/StartLiveActivitySuccessResponse.md +1 -1
- data/docs/Subscription.md +17 -17
- data/docs/SubscriptionBody.md +1 -1
- data/docs/SubscriptionNotificationTarget.md +12 -12
- data/docs/TemplateResource.md +6 -6
- data/docs/TemplatesListResponse.md +1 -1
- data/docs/TransferSubscriptionRequestBody.md +1 -1
- data/docs/UpdateApiKeyRequest.md +3 -3
- data/docs/UpdateLiveActivityRequest.md +9 -9
- data/docs/UpdateLiveActivitySuccessResponse.md +1 -1
- data/docs/UpdateTemplateRequest.md +10 -10
- data/docs/UpdateUserRequest.md +3 -3
- data/docs/User.md +3 -3
- data/docs/UserIdentityBody.md +1 -1
- data/docs/WebButton.md +4 -4
- data/lib/onesignal/api/default_api.rb +4 -1
- data/lib/onesignal/api_client.rb +2 -2
- data/lib/onesignal/api_error.rb +1 -1
- data/lib/onesignal/configuration.rb +1 -1
- data/lib/onesignal/helpers.rb +24 -0
- data/lib/onesignal/models/api_key_token.rb +1 -1
- data/lib/onesignal/models/api_key_tokens_list_response.rb +1 -1
- data/lib/onesignal/models/app.rb +1 -1
- data/lib/onesignal/models/basic_notification.rb +2 -1
- data/lib/onesignal/models/basic_notification_all_of.rb +2 -1
- data/lib/onesignal/models/basic_notification_all_of_android_background_layout.rb +1 -1
- data/lib/onesignal/models/button.rb +1 -1
- data/lib/onesignal/models/copy_template_request.rb +1 -1
- data/lib/onesignal/models/create_api_key_request.rb +1 -1
- data/lib/onesignal/models/create_api_key_response.rb +1 -1
- data/lib/onesignal/models/create_notification_success_response.rb +2 -2
- data/lib/onesignal/models/create_segment_conflict_response.rb +1 -1
- data/lib/onesignal/models/create_segment_success_response.rb +1 -1
- data/lib/onesignal/models/create_template_request.rb +1 -1
- data/lib/onesignal/models/create_user_conflict_response.rb +1 -1
- data/lib/onesignal/models/create_user_conflict_response_errors_inner.rb +1 -1
- data/lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb +1 -1
- data/lib/onesignal/models/custom_event.rb +1 -1
- data/lib/onesignal/models/custom_events_request.rb +1 -1
- data/lib/onesignal/models/delivery_data.rb +1 -1
- data/lib/onesignal/models/export_events_success_response.rb +1 -1
- data/lib/onesignal/models/export_subscriptions_request_body.rb +1 -1
- data/lib/onesignal/models/export_subscriptions_success_response.rb +1 -1
- data/lib/onesignal/models/filter.rb +1 -1
- data/lib/onesignal/models/filter_expression.rb +1 -1
- data/lib/onesignal/models/generic_error.rb +1 -1
- data/lib/onesignal/models/generic_success_bool_response.rb +1 -1
- data/lib/onesignal/models/get_notification_history_request_body.rb +1 -1
- data/lib/onesignal/models/get_segments_success_response.rb +1 -1
- data/lib/onesignal/models/language_string_map.rb +1 -1
- data/lib/onesignal/models/notification.rb +2 -1
- data/lib/onesignal/models/notification_all_of.rb +1 -1
- data/lib/onesignal/models/notification_history_success_response.rb +1 -1
- data/lib/onesignal/models/notification_slice.rb +22 -2
- data/lib/onesignal/models/notification_target.rb +1 -1
- data/lib/onesignal/models/notification_with_meta.rb +2 -1
- data/lib/onesignal/models/notification_with_meta_all_of.rb +1 -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 +1 -1
- data/lib/onesignal/models/platform_delivery_data_email_all_of.rb +1 -1
- data/lib/onesignal/models/platform_delivery_data_sms_all_of.rb +1 -1
- data/lib/onesignal/models/properties_body.rb +1 -1
- data/lib/onesignal/models/properties_deltas.rb +1 -1
- data/lib/onesignal/models/properties_object.rb +1 -1
- data/lib/onesignal/models/purchase.rb +1 -1
- data/lib/onesignal/models/rate_limit_error.rb +1 -1
- data/lib/onesignal/models/segment.rb +1 -1
- data/lib/onesignal/models/segment_data.rb +1 -1
- data/lib/onesignal/models/segment_notification_target.rb +1 -1
- data/lib/onesignal/models/start_live_activity_request.rb +1 -1
- data/lib/onesignal/models/start_live_activity_success_response.rb +1 -1
- data/lib/onesignal/models/subscription.rb +1 -1
- data/lib/onesignal/models/subscription_body.rb +1 -1
- data/lib/onesignal/models/subscription_notification_target.rb +1 -1
- data/lib/onesignal/models/template_resource.rb +1 -1
- data/lib/onesignal/models/templates_list_response.rb +1 -1
- data/lib/onesignal/models/transfer_subscription_request_body.rb +1 -1
- data/lib/onesignal/models/update_api_key_request.rb +1 -1
- data/lib/onesignal/models/update_live_activity_request.rb +1 -1
- data/lib/onesignal/models/update_live_activity_success_response.rb +1 -1
- data/lib/onesignal/models/update_template_request.rb +1 -1
- data/lib/onesignal/models/update_user_request.rb +1 -1
- data/lib/onesignal/models/user.rb +1 -1
- data/lib/onesignal/models/user_identity_body.rb +1 -1
- data/lib/onesignal/models/web_button.rb +1 -1
- data/lib/onesignal/version.rb +2 -2
- data/lib/onesignal.rb +1 -1
- data/onesignal.gemspec +1 -1
- data/spec/api/default_api_spec.rb +2 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/api_key_token_spec.rb +1 -1
- data/spec/models/api_key_tokens_list_response_spec.rb +1 -1
- data/spec/models/app_spec.rb +1 -1
- data/spec/models/basic_notification_all_of_android_background_layout_spec.rb +1 -1
- data/spec/models/basic_notification_all_of_spec.rb +1 -1
- data/spec/models/basic_notification_spec.rb +1 -1
- data/spec/models/button_spec.rb +1 -1
- data/spec/models/copy_template_request_spec.rb +1 -1
- data/spec/models/create_api_key_request_spec.rb +1 -1
- data/spec/models/create_api_key_response_spec.rb +1 -1
- data/spec/models/create_notification_success_response_spec.rb +1 -1
- data/spec/models/create_segment_conflict_response_spec.rb +1 -1
- data/spec/models/create_segment_success_response_spec.rb +1 -1
- data/spec/models/create_template_request_spec.rb +1 -1
- data/spec/models/create_user_conflict_response_errors_inner_spec.rb +1 -1
- data/spec/models/create_user_conflict_response_errors_items_meta_spec.rb +1 -1
- data/spec/models/create_user_conflict_response_spec.rb +1 -1
- data/spec/models/custom_event_spec.rb +1 -1
- data/spec/models/custom_events_request_spec.rb +1 -1
- data/spec/models/delivery_data_spec.rb +1 -1
- data/spec/models/export_events_success_response_spec.rb +1 -1
- data/spec/models/export_subscriptions_request_body_spec.rb +1 -1
- data/spec/models/export_subscriptions_success_response_spec.rb +1 -1
- data/spec/models/filter_expression_spec.rb +1 -1
- data/spec/models/filter_spec.rb +1 -1
- data/spec/models/generic_error_spec.rb +1 -1
- data/spec/models/generic_success_bool_response_spec.rb +1 -1
- data/spec/models/get_notification_history_request_body_spec.rb +1 -1
- data/spec/models/get_segments_success_response_spec.rb +1 -1
- data/spec/models/language_string_map_spec.rb +1 -1
- data/spec/models/notification_all_of_spec.rb +1 -1
- data/spec/models/notification_history_success_response_spec.rb +1 -1
- data/spec/models/notification_slice_spec.rb +13 -1
- data/spec/models/notification_spec.rb +1 -1
- data/spec/models/notification_target_spec.rb +1 -1
- data/spec/models/notification_with_meta_all_of_spec.rb +1 -1
- data/spec/models/notification_with_meta_spec.rb +1 -1
- 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 +1 -1
- data/spec/models/platform_delivery_data_sms_all_of_spec.rb +1 -1
- data/spec/models/platform_delivery_data_spec.rb +1 -1
- data/spec/models/properties_body_spec.rb +1 -1
- data/spec/models/properties_deltas_spec.rb +1 -1
- data/spec/models/properties_object_spec.rb +1 -1
- data/spec/models/purchase_spec.rb +1 -1
- data/spec/models/rate_limit_error_spec.rb +1 -1
- data/spec/models/segment_data_spec.rb +1 -1
- data/spec/models/segment_notification_target_spec.rb +1 -1
- data/spec/models/segment_spec.rb +1 -1
- data/spec/models/start_live_activity_request_spec.rb +1 -1
- data/spec/models/start_live_activity_success_response_spec.rb +1 -1
- data/spec/models/subscription_body_spec.rb +1 -1
- data/spec/models/subscription_notification_target_spec.rb +1 -1
- data/spec/models/subscription_spec.rb +1 -1
- data/spec/models/template_resource_spec.rb +1 -1
- data/spec/models/templates_list_response_spec.rb +1 -1
- data/spec/models/transfer_subscription_request_body_spec.rb +1 -1
- data/spec/models/update_api_key_request_spec.rb +1 -1
- data/spec/models/update_live_activity_request_spec.rb +1 -1
- data/spec/models/update_live_activity_success_response_spec.rb +1 -1
- data/spec/models/update_template_request_spec.rb +1 -1
- data/spec/models/update_user_request_spec.rb +1 -1
- data/spec/models/user_identity_body_spec.rb +1 -1
- data/spec/models/user_spec.rb +1 -1
- data/spec/models/web_button_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/mkmf.log +3 -3
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.4.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
- metadata +4 -2
data/docs/DefaultApi.md
CHANGED
|
@@ -100,12 +100,12 @@ require 'onesignal'
|
|
|
100
100
|
# setup authorization
|
|
101
101
|
OneSignal.configure do |config|
|
|
102
102
|
# Configure Bearer authorization: rest_api_key
|
|
103
|
-
config.rest_api_key = '
|
|
103
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
104
104
|
|
|
105
105
|
end
|
|
106
106
|
|
|
107
107
|
api_instance = OneSignal::DefaultApi.new
|
|
108
|
-
app_id = '
|
|
108
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
109
109
|
notification_id = 'b3a0c8bd-3a4c-4b22-9a73-3f1a8c2d1b88' # String |
|
|
110
110
|
|
|
111
111
|
begin
|
|
@@ -178,13 +178,13 @@ require 'onesignal'
|
|
|
178
178
|
# setup authorization
|
|
179
179
|
OneSignal.configure do |config|
|
|
180
180
|
# Configure Bearer authorization: organization_api_key
|
|
181
|
-
config.organization_api_key = '
|
|
181
|
+
config.organization_api_key = 'YOUR_ORGANIZATION_API_KEY'
|
|
182
182
|
|
|
183
183
|
end
|
|
184
184
|
|
|
185
185
|
api_instance = OneSignal::DefaultApi.new
|
|
186
186
|
template_id = 'e4d3c2b1-a09f-4f1e-8d7c-6b5a4f3e2d1c' # String |
|
|
187
|
-
app_id = '
|
|
187
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
188
188
|
copy_template_request = OneSignal::CopyTemplateRequest.new({target_app_id: 'target_app_id_example'}) # CopyTemplateRequest |
|
|
189
189
|
|
|
190
190
|
begin
|
|
@@ -258,12 +258,12 @@ require 'onesignal'
|
|
|
258
258
|
# setup authorization
|
|
259
259
|
OneSignal.configure do |config|
|
|
260
260
|
# Configure Bearer authorization: rest_api_key
|
|
261
|
-
config.rest_api_key = '
|
|
261
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
262
262
|
|
|
263
263
|
end
|
|
264
264
|
|
|
265
265
|
api_instance = OneSignal::DefaultApi.new
|
|
266
|
-
app_id = '
|
|
266
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
267
267
|
alias_label = 'external_id' # String |
|
|
268
268
|
alias_id = 'YOUR_USER_EXTERNAL_ID' # String |
|
|
269
269
|
user_identity_body = OneSignal::UserIdentityBody.new # UserIdentityBody |
|
|
@@ -340,12 +340,12 @@ require 'onesignal'
|
|
|
340
340
|
# setup authorization
|
|
341
341
|
OneSignal.configure do |config|
|
|
342
342
|
# Configure Bearer authorization: rest_api_key
|
|
343
|
-
config.rest_api_key = '
|
|
343
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
344
344
|
|
|
345
345
|
end
|
|
346
346
|
|
|
347
347
|
api_instance = OneSignal::DefaultApi.new
|
|
348
|
-
app_id = '
|
|
348
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
349
349
|
subscription_id = '7e4c5b9a-1f60-4d07-9b1a-2e8c8d2cae51' # String |
|
|
350
350
|
user_identity_body = OneSignal::UserIdentityBody.new # UserIdentityBody |
|
|
351
351
|
|
|
@@ -420,12 +420,12 @@ require 'onesignal'
|
|
|
420
420
|
# setup authorization
|
|
421
421
|
OneSignal.configure do |config|
|
|
422
422
|
# Configure Bearer authorization: organization_api_key
|
|
423
|
-
config.organization_api_key = '
|
|
423
|
+
config.organization_api_key = 'YOUR_ORGANIZATION_API_KEY'
|
|
424
424
|
|
|
425
425
|
end
|
|
426
426
|
|
|
427
427
|
api_instance = OneSignal::DefaultApi.new
|
|
428
|
-
app_id = '
|
|
428
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
429
429
|
create_api_key_request = OneSignal::CreateApiKeyRequest.new # CreateApiKeyRequest |
|
|
430
430
|
|
|
431
431
|
begin
|
|
@@ -498,7 +498,7 @@ require 'onesignal'
|
|
|
498
498
|
# setup authorization
|
|
499
499
|
OneSignal.configure do |config|
|
|
500
500
|
# Configure Bearer authorization: organization_api_key
|
|
501
|
-
config.organization_api_key = '
|
|
501
|
+
config.organization_api_key = 'YOUR_ORGANIZATION_API_KEY'
|
|
502
502
|
|
|
503
503
|
end
|
|
504
504
|
|
|
@@ -574,12 +574,12 @@ require 'onesignal'
|
|
|
574
574
|
# setup authorization
|
|
575
575
|
OneSignal.configure do |config|
|
|
576
576
|
# Configure Bearer authorization: rest_api_key
|
|
577
|
-
config.rest_api_key = '
|
|
577
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
578
578
|
|
|
579
579
|
end
|
|
580
580
|
|
|
581
581
|
api_instance = OneSignal::DefaultApi.new
|
|
582
|
-
app_id = '
|
|
582
|
+
app_id = 'YOUR_APP_ID' # String | Your OneSignal App ID in UUID v4 format.
|
|
583
583
|
custom_events_request = OneSignal::CustomEventsRequest.new({events: [OneSignal::CustomEvent.new({name: 'name_example'})]}) # CustomEventsRequest |
|
|
584
584
|
|
|
585
585
|
begin
|
|
@@ -652,7 +652,7 @@ require 'onesignal'
|
|
|
652
652
|
# setup authorization
|
|
653
653
|
OneSignal.configure do |config|
|
|
654
654
|
# Configure Bearer authorization: rest_api_key
|
|
655
|
-
config.rest_api_key = '
|
|
655
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
656
656
|
|
|
657
657
|
end
|
|
658
658
|
|
|
@@ -662,6 +662,7 @@ require 'securerandom'
|
|
|
662
662
|
notification = OneSignal::Notification.new
|
|
663
663
|
notification.app_id = 'YOUR_APP_ID'
|
|
664
664
|
notification.contents = OneSignal::LanguageStringMap.new({ en: 'Hello from OneSignal!' })
|
|
665
|
+
notification.headings = OneSignal::LanguageStringMap.new({ en: 'Push Notification' })
|
|
665
666
|
notification.include_aliases = { 'external_id' => ['YOUR_USER_EXTERNAL_ID'] }
|
|
666
667
|
notification.target_channel = 'push'
|
|
667
668
|
# Idempotency key: a client-generated UUID that lets you safely retry on network failure.
|
|
@@ -704,13 +705,14 @@ The `create_notification_with_retry` method mirrors `create_notification` but ge
|
|
|
704
705
|
require 'onesignal'
|
|
705
706
|
|
|
706
707
|
OneSignal.configure do |config|
|
|
707
|
-
config.rest_api_key = '
|
|
708
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
708
709
|
end
|
|
709
710
|
|
|
710
711
|
api_instance = OneSignal::DefaultApi.new
|
|
711
712
|
notification = OneSignal::Notification.new
|
|
712
713
|
notification.app_id = 'YOUR_APP_ID'
|
|
713
714
|
notification.contents = OneSignal::LanguageStringMap.new({ en: 'Hello from OneSignal!' })
|
|
715
|
+
notification.headings = OneSignal::LanguageStringMap.new({ en: 'Push Notification' })
|
|
714
716
|
notification.include_aliases = { 'external_id' => ['YOUR_USER_EXTERNAL_ID'] }
|
|
715
717
|
notification.target_channel = 'push'
|
|
716
718
|
# No idempotency_key set: the helper generates a UUIDv4 and reuses it across retries.
|
|
@@ -784,14 +786,14 @@ require 'onesignal'
|
|
|
784
786
|
# setup authorization
|
|
785
787
|
OneSignal.configure do |config|
|
|
786
788
|
# Configure Bearer authorization: rest_api_key
|
|
787
|
-
config.rest_api_key = '
|
|
789
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
788
790
|
|
|
789
791
|
end
|
|
790
792
|
|
|
791
793
|
api_instance = OneSignal::DefaultApi.new
|
|
792
|
-
app_id = '
|
|
794
|
+
app_id = 'YOUR_APP_ID' # String | The OneSignal App ID for your app. Available in Keys & IDs.
|
|
793
795
|
opts = {
|
|
794
|
-
segment: OneSignal::Segment.new({name: '
|
|
796
|
+
segment: OneSignal::Segment.new({name: 'Inactive 30 days', filters: [OneSignal::Filter.new]}) # Segment |
|
|
795
797
|
}
|
|
796
798
|
|
|
797
799
|
begin
|
|
@@ -864,12 +866,12 @@ require 'onesignal'
|
|
|
864
866
|
# setup authorization
|
|
865
867
|
OneSignal.configure do |config|
|
|
866
868
|
# Configure Bearer authorization: rest_api_key
|
|
867
|
-
config.rest_api_key = '
|
|
869
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
868
870
|
|
|
869
871
|
end
|
|
870
872
|
|
|
871
873
|
api_instance = OneSignal::DefaultApi.new
|
|
872
|
-
app_id = '
|
|
874
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
873
875
|
alias_label = 'external_id' # String |
|
|
874
876
|
alias_id = 'YOUR_USER_EXTERNAL_ID' # String |
|
|
875
877
|
subscription_body = OneSignal::SubscriptionBody.new # SubscriptionBody |
|
|
@@ -946,7 +948,7 @@ require 'onesignal'
|
|
|
946
948
|
# setup authorization
|
|
947
949
|
OneSignal.configure do |config|
|
|
948
950
|
# Configure Bearer authorization: rest_api_key
|
|
949
|
-
config.rest_api_key = '
|
|
951
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
950
952
|
|
|
951
953
|
end
|
|
952
954
|
|
|
@@ -1022,12 +1024,12 @@ require 'onesignal'
|
|
|
1022
1024
|
# setup authorization
|
|
1023
1025
|
OneSignal.configure do |config|
|
|
1024
1026
|
# Configure Bearer authorization: rest_api_key
|
|
1025
|
-
config.rest_api_key = '
|
|
1027
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
1026
1028
|
|
|
1027
1029
|
end
|
|
1028
1030
|
|
|
1029
1031
|
api_instance = OneSignal::DefaultApi.new
|
|
1030
|
-
app_id = '
|
|
1032
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
1031
1033
|
user = OneSignal::User.new # User |
|
|
1032
1034
|
|
|
1033
1035
|
begin
|
|
@@ -1112,12 +1114,12 @@ require 'onesignal'
|
|
|
1112
1114
|
# setup authorization
|
|
1113
1115
|
OneSignal.configure do |config|
|
|
1114
1116
|
# Configure Bearer authorization: rest_api_key
|
|
1115
|
-
config.rest_api_key = '
|
|
1117
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
1116
1118
|
|
|
1117
1119
|
end
|
|
1118
1120
|
|
|
1119
1121
|
api_instance = OneSignal::DefaultApi.new
|
|
1120
|
-
app_id = '
|
|
1122
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
1121
1123
|
alias_label = 'external_id' # String |
|
|
1122
1124
|
alias_id = 'YOUR_USER_EXTERNAL_ID' # String |
|
|
1123
1125
|
alias_label_to_delete = 'external_id' # String |
|
|
@@ -1194,12 +1196,12 @@ require 'onesignal'
|
|
|
1194
1196
|
# setup authorization
|
|
1195
1197
|
OneSignal.configure do |config|
|
|
1196
1198
|
# Configure Bearer authorization: organization_api_key
|
|
1197
|
-
config.organization_api_key = '
|
|
1199
|
+
config.organization_api_key = 'YOUR_ORGANIZATION_API_KEY'
|
|
1198
1200
|
|
|
1199
1201
|
end
|
|
1200
1202
|
|
|
1201
1203
|
api_instance = OneSignal::DefaultApi.new
|
|
1202
|
-
app_id = '
|
|
1204
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
1203
1205
|
token_id = '0aa1b2c3-d4e5-46f7-8899-aabbccddeeff' # String |
|
|
1204
1206
|
|
|
1205
1207
|
begin
|
|
@@ -1272,12 +1274,12 @@ require 'onesignal'
|
|
|
1272
1274
|
# setup authorization
|
|
1273
1275
|
OneSignal.configure do |config|
|
|
1274
1276
|
# Configure Bearer authorization: rest_api_key
|
|
1275
|
-
config.rest_api_key = '
|
|
1277
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
1276
1278
|
|
|
1277
1279
|
end
|
|
1278
1280
|
|
|
1279
1281
|
api_instance = OneSignal::DefaultApi.new
|
|
1280
|
-
app_id = '
|
|
1282
|
+
app_id = 'YOUR_APP_ID' # String | The OneSignal App ID for your app. Available in Keys & IDs.
|
|
1281
1283
|
segment_id = 'd6c5a3e1-9f17-44a1-9d10-7c0e4a2b1c8e' # String | The segment_id can be found in the URL of the segment when viewing it in the dashboard.
|
|
1282
1284
|
|
|
1283
1285
|
begin
|
|
@@ -1350,12 +1352,12 @@ require 'onesignal'
|
|
|
1350
1352
|
# setup authorization
|
|
1351
1353
|
OneSignal.configure do |config|
|
|
1352
1354
|
# Configure Bearer authorization: rest_api_key
|
|
1353
|
-
config.rest_api_key = '
|
|
1355
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
1354
1356
|
|
|
1355
1357
|
end
|
|
1356
1358
|
|
|
1357
1359
|
api_instance = OneSignal::DefaultApi.new
|
|
1358
|
-
app_id = '
|
|
1360
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
1359
1361
|
subscription_id = '7e4c5b9a-1f60-4d07-9b1a-2e8c8d2cae51' # String |
|
|
1360
1362
|
|
|
1361
1363
|
begin
|
|
@@ -1427,13 +1429,13 @@ require 'onesignal'
|
|
|
1427
1429
|
# setup authorization
|
|
1428
1430
|
OneSignal.configure do |config|
|
|
1429
1431
|
# Configure Bearer authorization: rest_api_key
|
|
1430
|
-
config.rest_api_key = '
|
|
1432
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
1431
1433
|
|
|
1432
1434
|
end
|
|
1433
1435
|
|
|
1434
1436
|
api_instance = OneSignal::DefaultApi.new
|
|
1435
1437
|
template_id = 'e4d3c2b1-a09f-4f1e-8d7c-6b5a4f3e2d1c' # String |
|
|
1436
|
-
app_id = '
|
|
1438
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
1437
1439
|
|
|
1438
1440
|
begin
|
|
1439
1441
|
# Delete template
|
|
@@ -1505,12 +1507,12 @@ require 'onesignal'
|
|
|
1505
1507
|
# setup authorization
|
|
1506
1508
|
OneSignal.configure do |config|
|
|
1507
1509
|
# Configure Bearer authorization: rest_api_key
|
|
1508
|
-
config.rest_api_key = '
|
|
1510
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
1509
1511
|
|
|
1510
1512
|
end
|
|
1511
1513
|
|
|
1512
1514
|
api_instance = OneSignal::DefaultApi.new
|
|
1513
|
-
app_id = '
|
|
1515
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
1514
1516
|
alias_label = 'external_id' # String |
|
|
1515
1517
|
alias_id = 'YOUR_USER_EXTERNAL_ID' # String |
|
|
1516
1518
|
|
|
@@ -1584,13 +1586,13 @@ require 'onesignal'
|
|
|
1584
1586
|
# setup authorization
|
|
1585
1587
|
OneSignal.configure do |config|
|
|
1586
1588
|
# Configure Bearer authorization: rest_api_key
|
|
1587
|
-
config.rest_api_key = '
|
|
1589
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
1588
1590
|
|
|
1589
1591
|
end
|
|
1590
1592
|
|
|
1591
1593
|
api_instance = OneSignal::DefaultApi.new
|
|
1592
1594
|
notification_id = 'b3a0c8bd-3a4c-4b22-9a73-3f1a8c2d1b88' # String | The ID of the notification to export events from.
|
|
1593
|
-
app_id = '
|
|
1595
|
+
app_id = 'YOUR_APP_ID' # String | The ID of the app that the notification belongs to.
|
|
1594
1596
|
|
|
1595
1597
|
begin
|
|
1596
1598
|
# Export CSV of Events
|
|
@@ -1662,12 +1664,12 @@ require 'onesignal'
|
|
|
1662
1664
|
# setup authorization
|
|
1663
1665
|
OneSignal.configure do |config|
|
|
1664
1666
|
# Configure Bearer authorization: rest_api_key
|
|
1665
|
-
config.rest_api_key = '
|
|
1667
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
1666
1668
|
|
|
1667
1669
|
end
|
|
1668
1670
|
|
|
1669
1671
|
api_instance = OneSignal::DefaultApi.new
|
|
1670
|
-
app_id = '
|
|
1672
|
+
app_id = 'YOUR_APP_ID' # String | The app ID that you want to export devices from
|
|
1671
1673
|
opts = {
|
|
1672
1674
|
export_subscriptions_request_body: OneSignal::ExportSubscriptionsRequestBody.new # ExportSubscriptionsRequestBody |
|
|
1673
1675
|
}
|
|
@@ -1742,12 +1744,12 @@ require 'onesignal'
|
|
|
1742
1744
|
# setup authorization
|
|
1743
1745
|
OneSignal.configure do |config|
|
|
1744
1746
|
# Configure Bearer authorization: rest_api_key
|
|
1745
|
-
config.rest_api_key = '
|
|
1747
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
1746
1748
|
|
|
1747
1749
|
end
|
|
1748
1750
|
|
|
1749
1751
|
api_instance = OneSignal::DefaultApi.new
|
|
1750
|
-
app_id = '
|
|
1752
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
1751
1753
|
alias_label = 'external_id' # String |
|
|
1752
1754
|
alias_id = 'YOUR_USER_EXTERNAL_ID' # String |
|
|
1753
1755
|
|
|
@@ -1822,12 +1824,12 @@ require 'onesignal'
|
|
|
1822
1824
|
# setup authorization
|
|
1823
1825
|
OneSignal.configure do |config|
|
|
1824
1826
|
# Configure Bearer authorization: rest_api_key
|
|
1825
|
-
config.rest_api_key = '
|
|
1827
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
1826
1828
|
|
|
1827
1829
|
end
|
|
1828
1830
|
|
|
1829
1831
|
api_instance = OneSignal::DefaultApi.new
|
|
1830
|
-
app_id = '
|
|
1832
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
1831
1833
|
subscription_id = '7e4c5b9a-1f60-4d07-9b1a-2e8c8d2cae51' # String |
|
|
1832
1834
|
|
|
1833
1835
|
begin
|
|
@@ -1900,12 +1902,12 @@ require 'onesignal'
|
|
|
1900
1902
|
# setup authorization
|
|
1901
1903
|
OneSignal.configure do |config|
|
|
1902
1904
|
# Configure Bearer authorization: organization_api_key
|
|
1903
|
-
config.organization_api_key = '
|
|
1905
|
+
config.organization_api_key = 'YOUR_ORGANIZATION_API_KEY'
|
|
1904
1906
|
|
|
1905
1907
|
end
|
|
1906
1908
|
|
|
1907
1909
|
api_instance = OneSignal::DefaultApi.new
|
|
1908
|
-
app_id = '
|
|
1910
|
+
app_id = 'YOUR_APP_ID' # String | An app id
|
|
1909
1911
|
|
|
1910
1912
|
begin
|
|
1911
1913
|
# View an app
|
|
@@ -1976,7 +1978,7 @@ require 'onesignal'
|
|
|
1976
1978
|
# setup authorization
|
|
1977
1979
|
OneSignal.configure do |config|
|
|
1978
1980
|
# Configure Bearer authorization: organization_api_key
|
|
1979
|
-
config.organization_api_key = '
|
|
1981
|
+
config.organization_api_key = 'YOUR_ORGANIZATION_API_KEY'
|
|
1980
1982
|
|
|
1981
1983
|
end
|
|
1982
1984
|
|
|
@@ -2049,12 +2051,12 @@ require 'onesignal'
|
|
|
2049
2051
|
# setup authorization
|
|
2050
2052
|
OneSignal.configure do |config|
|
|
2051
2053
|
# Configure Bearer authorization: rest_api_key
|
|
2052
|
-
config.rest_api_key = '
|
|
2054
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
2053
2055
|
|
|
2054
2056
|
end
|
|
2055
2057
|
|
|
2056
2058
|
api_instance = OneSignal::DefaultApi.new
|
|
2057
|
-
app_id = '
|
|
2059
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
2058
2060
|
notification_id = 'b3a0c8bd-3a4c-4b22-9a73-3f1a8c2d1b88' # String |
|
|
2059
2061
|
|
|
2060
2062
|
begin
|
|
@@ -2127,7 +2129,7 @@ require 'onesignal'
|
|
|
2127
2129
|
# setup authorization
|
|
2128
2130
|
OneSignal.configure do |config|
|
|
2129
2131
|
# Configure Bearer authorization: rest_api_key
|
|
2130
|
-
config.rest_api_key = '
|
|
2132
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
2131
2133
|
|
|
2132
2134
|
end
|
|
2133
2135
|
|
|
@@ -2205,16 +2207,17 @@ require 'onesignal'
|
|
|
2205
2207
|
# setup authorization
|
|
2206
2208
|
OneSignal.configure do |config|
|
|
2207
2209
|
# Configure Bearer authorization: rest_api_key
|
|
2208
|
-
config.rest_api_key = '
|
|
2210
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
2209
2211
|
|
|
2210
2212
|
end
|
|
2211
2213
|
|
|
2212
2214
|
api_instance = OneSignal::DefaultApi.new
|
|
2213
|
-
app_id = '
|
|
2215
|
+
app_id = 'YOUR_APP_ID' # String | The app ID that you want to view notifications from
|
|
2214
2216
|
opts = {
|
|
2215
2217
|
limit: 10, # Integer | How many notifications to return. Max is 50. Default is 50.
|
|
2216
2218
|
offset: 0, # Integer | Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at.
|
|
2217
|
-
kind: 0 # Integer | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only
|
|
2219
|
+
kind: 0, # Integer | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only
|
|
2220
|
+
time_offset: '2025-01-01T00:00:00.000Z' # String | Time-offset pagination cursor for sequential pulls of all messages. Accepts either an ISO 8601 formatted timestamp (e.g. `2025-01-01T00:00:00.000Z`) or the opaque Base64 cursor token returned as `next_time_offset` in a prior response. When set, results are sorted ascending by send_after and the standard `offset` parameter cannot be used. Repeat the request with each `next_time_offset` until an empty notifications array is returned.
|
|
2218
2221
|
}
|
|
2219
2222
|
|
|
2220
2223
|
begin
|
|
@@ -2259,6 +2262,7 @@ end
|
|
|
2259
2262
|
| **limit** | **Integer** | How many notifications to return. Max is 50. Default is 50. | [optional] |
|
|
2260
2263
|
| **offset** | **Integer** | Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. | [optional] |
|
|
2261
2264
|
| **kind** | **Integer** | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only | [optional] |
|
|
2265
|
+
| **time_offset** | **String** | Time-offset pagination cursor for sequential pulls of all messages. Accepts either an ISO 8601 formatted timestamp (e.g. `2025-01-01T00:00:00.000Z`) or the opaque Base64 cursor token returned as `next_time_offset` in a prior response. When set, results are sorted ascending by send_after and the standard `offset` parameter cannot be used. Repeat the request with each `next_time_offset` until an empty notifications array is returned. | [optional] |
|
|
2262
2266
|
|
|
2263
2267
|
### Return type
|
|
2264
2268
|
|
|
@@ -2289,12 +2293,12 @@ require 'onesignal'
|
|
|
2289
2293
|
# setup authorization
|
|
2290
2294
|
OneSignal.configure do |config|
|
|
2291
2295
|
# Configure Bearer authorization: rest_api_key
|
|
2292
|
-
config.rest_api_key = '
|
|
2296
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
2293
2297
|
|
|
2294
2298
|
end
|
|
2295
2299
|
|
|
2296
2300
|
api_instance = OneSignal::DefaultApi.new
|
|
2297
|
-
app_id = '
|
|
2301
|
+
app_id = 'YOUR_APP_ID' # String | The OneSignal App ID for your app. Available in Keys & IDs.
|
|
2298
2302
|
outcome_names = 'os__session_duration.count,os__click.count' # String | Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum
|
|
2299
2303
|
opts = {
|
|
2300
2304
|
outcome_names2: 'os__session_duration.count', # String | Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name.
|
|
@@ -2377,12 +2381,12 @@ require 'onesignal'
|
|
|
2377
2381
|
# setup authorization
|
|
2378
2382
|
OneSignal.configure do |config|
|
|
2379
2383
|
# Configure Bearer authorization: rest_api_key
|
|
2380
|
-
config.rest_api_key = '
|
|
2384
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
2381
2385
|
|
|
2382
2386
|
end
|
|
2383
2387
|
|
|
2384
2388
|
api_instance = OneSignal::DefaultApi.new
|
|
2385
|
-
app_id = '
|
|
2389
|
+
app_id = 'YOUR_APP_ID' # String | The OneSignal App ID for your app. Available in Keys & IDs.
|
|
2386
2390
|
opts = {
|
|
2387
2391
|
offset: 0, # Integer | Segments are listed in ascending order of created_at date. offset will omit that number of segments from the beginning of the list. Eg offset 5, will remove the 5 earliest created Segments.
|
|
2388
2392
|
limit: 10 # Integer | The amount of Segments in the response. Maximum 300.
|
|
@@ -2459,12 +2463,12 @@ require 'onesignal'
|
|
|
2459
2463
|
# setup authorization
|
|
2460
2464
|
OneSignal.configure do |config|
|
|
2461
2465
|
# Configure Bearer authorization: rest_api_key
|
|
2462
|
-
config.rest_api_key = '
|
|
2466
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
2463
2467
|
|
|
2464
2468
|
end
|
|
2465
2469
|
|
|
2466
2470
|
api_instance = OneSignal::DefaultApi.new
|
|
2467
|
-
app_id = '
|
|
2471
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
2468
2472
|
alias_label = 'external_id' # String |
|
|
2469
2473
|
alias_id = 'YOUR_USER_EXTERNAL_ID' # String |
|
|
2470
2474
|
|
|
@@ -2539,12 +2543,12 @@ require 'onesignal'
|
|
|
2539
2543
|
# setup authorization
|
|
2540
2544
|
OneSignal.configure do |config|
|
|
2541
2545
|
# Configure Bearer authorization: organization_api_key
|
|
2542
|
-
config.organization_api_key = '
|
|
2546
|
+
config.organization_api_key = 'YOUR_ORGANIZATION_API_KEY'
|
|
2543
2547
|
|
|
2544
2548
|
end
|
|
2545
2549
|
|
|
2546
2550
|
api_instance = OneSignal::DefaultApi.new
|
|
2547
|
-
app_id = '
|
|
2551
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
2548
2552
|
token_id = '0aa1b2c3-d4e5-46f7-8899-aabbccddeeff' # String |
|
|
2549
2553
|
|
|
2550
2554
|
begin
|
|
@@ -2617,12 +2621,12 @@ require 'onesignal'
|
|
|
2617
2621
|
# setup authorization
|
|
2618
2622
|
OneSignal.configure do |config|
|
|
2619
2623
|
# Configure Bearer authorization: rest_api_key
|
|
2620
|
-
config.rest_api_key = '
|
|
2624
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
2621
2625
|
|
|
2622
2626
|
end
|
|
2623
2627
|
|
|
2624
2628
|
api_instance = OneSignal::DefaultApi.new
|
|
2625
|
-
app_id = '
|
|
2629
|
+
app_id = 'YOUR_APP_ID' # String | Your OneSignal App ID in UUID v4 format.
|
|
2626
2630
|
activity_type = 'order_status' # String | The name of the Live Activity defined in your app. This should match the attributes struct used in your app's Live Activity implementation.
|
|
2627
2631
|
start_live_activity_request = OneSignal::StartLiveActivityRequest.new({name: 'name_example', event: 'start', activity_id: 'activity_id_example', event_attributes: 3.56, event_updates: 3.56, contents: OneSignal::LanguageStringMap.new, headings: OneSignal::LanguageStringMap.new}) # StartLiveActivityRequest |
|
|
2628
2632
|
|
|
@@ -2697,12 +2701,12 @@ require 'onesignal'
|
|
|
2697
2701
|
# setup authorization
|
|
2698
2702
|
OneSignal.configure do |config|
|
|
2699
2703
|
# Configure Bearer authorization: rest_api_key
|
|
2700
|
-
config.rest_api_key = '
|
|
2704
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
2701
2705
|
|
|
2702
2706
|
end
|
|
2703
2707
|
|
|
2704
2708
|
api_instance = OneSignal::DefaultApi.new
|
|
2705
|
-
app_id = '
|
|
2709
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
2706
2710
|
subscription_id = '7e4c5b9a-1f60-4d07-9b1a-2e8c8d2cae51' # String |
|
|
2707
2711
|
transfer_subscription_request_body = OneSignal::TransferSubscriptionRequestBody.new # TransferSubscriptionRequestBody |
|
|
2708
2712
|
|
|
@@ -2777,12 +2781,12 @@ require 'onesignal'
|
|
|
2777
2781
|
# setup authorization
|
|
2778
2782
|
OneSignal.configure do |config|
|
|
2779
2783
|
# Configure Bearer authorization: rest_api_key
|
|
2780
|
-
config.rest_api_key = '
|
|
2784
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
2781
2785
|
|
|
2782
2786
|
end
|
|
2783
2787
|
|
|
2784
2788
|
api_instance = OneSignal::DefaultApi.new
|
|
2785
|
-
app_id = '
|
|
2789
|
+
app_id = 'YOUR_APP_ID' # String | The OneSignal App ID for your app. Available in Keys & IDs.
|
|
2786
2790
|
notification_id = 'b3a0c8bd-3a4c-4b22-9a73-3f1a8c2d1b88' # String | The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report.
|
|
2787
2791
|
token = 'YOUR_TOKEN_ID' # String | The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email.
|
|
2788
2792
|
|
|
@@ -2857,12 +2861,12 @@ require 'onesignal'
|
|
|
2857
2861
|
# setup authorization
|
|
2858
2862
|
OneSignal.configure do |config|
|
|
2859
2863
|
# Configure Bearer authorization: organization_api_key
|
|
2860
|
-
config.organization_api_key = '
|
|
2864
|
+
config.organization_api_key = 'YOUR_ORGANIZATION_API_KEY'
|
|
2861
2865
|
|
|
2862
2866
|
end
|
|
2863
2867
|
|
|
2864
2868
|
api_instance = OneSignal::DefaultApi.new
|
|
2865
|
-
app_id = '
|
|
2869
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
2866
2870
|
token_id = '0aa1b2c3-d4e5-46f7-8899-aabbccddeeff' # String |
|
|
2867
2871
|
update_api_key_request = OneSignal::UpdateApiKeyRequest.new # UpdateApiKeyRequest |
|
|
2868
2872
|
|
|
@@ -2937,12 +2941,12 @@ require 'onesignal'
|
|
|
2937
2941
|
# setup authorization
|
|
2938
2942
|
OneSignal.configure do |config|
|
|
2939
2943
|
# Configure Bearer authorization: organization_api_key
|
|
2940
|
-
config.organization_api_key = '
|
|
2944
|
+
config.organization_api_key = 'YOUR_ORGANIZATION_API_KEY'
|
|
2941
2945
|
|
|
2942
2946
|
end
|
|
2943
2947
|
|
|
2944
2948
|
api_instance = OneSignal::DefaultApi.new
|
|
2945
|
-
app_id = '
|
|
2949
|
+
app_id = 'YOUR_APP_ID' # String | An app id
|
|
2946
2950
|
app = OneSignal::App.new # App |
|
|
2947
2951
|
|
|
2948
2952
|
begin
|
|
@@ -3015,12 +3019,12 @@ require 'onesignal'
|
|
|
3015
3019
|
# setup authorization
|
|
3016
3020
|
OneSignal.configure do |config|
|
|
3017
3021
|
# Configure Bearer authorization: rest_api_key
|
|
3018
|
-
config.rest_api_key = '
|
|
3022
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
3019
3023
|
|
|
3020
3024
|
end
|
|
3021
3025
|
|
|
3022
3026
|
api_instance = OneSignal::DefaultApi.new
|
|
3023
|
-
app_id = '
|
|
3027
|
+
app_id = 'YOUR_APP_ID' # String | The OneSignal App ID for your app. Available in Keys & IDs.
|
|
3024
3028
|
activity_id = '12345' # String | Live Activity record ID
|
|
3025
3029
|
update_live_activity_request = OneSignal::UpdateLiveActivityRequest.new({name: 'name_example', event: 'update', event_updates: 3.56}) # UpdateLiveActivityRequest |
|
|
3026
3030
|
|
|
@@ -3095,12 +3099,12 @@ require 'onesignal'
|
|
|
3095
3099
|
# setup authorization
|
|
3096
3100
|
OneSignal.configure do |config|
|
|
3097
3101
|
# Configure Bearer authorization: rest_api_key
|
|
3098
|
-
config.rest_api_key = '
|
|
3102
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
3099
3103
|
|
|
3100
3104
|
end
|
|
3101
3105
|
|
|
3102
3106
|
api_instance = OneSignal::DefaultApi.new
|
|
3103
|
-
app_id = '
|
|
3107
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
3104
3108
|
subscription_id = '7e4c5b9a-1f60-4d07-9b1a-2e8c8d2cae51' # String |
|
|
3105
3109
|
subscription_body = OneSignal::SubscriptionBody.new # SubscriptionBody |
|
|
3106
3110
|
|
|
@@ -3174,12 +3178,12 @@ require 'onesignal'
|
|
|
3174
3178
|
# setup authorization
|
|
3175
3179
|
OneSignal.configure do |config|
|
|
3176
3180
|
# Configure Bearer authorization: rest_api_key
|
|
3177
|
-
config.rest_api_key = '
|
|
3181
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
3178
3182
|
|
|
3179
3183
|
end
|
|
3180
3184
|
|
|
3181
3185
|
api_instance = OneSignal::DefaultApi.new
|
|
3182
|
-
app_id = '
|
|
3186
|
+
app_id = 'YOUR_APP_ID' # String | Your OneSignal App ID in UUID v4 format.
|
|
3183
3187
|
token_type = 'Email' # String | The type of token to use when looking up the subscription. See Subscription Types.
|
|
3184
3188
|
token = 'user@example.com' # String | The value of the token to lookup by (e.g., email address, phone number).
|
|
3185
3189
|
subscription_body = OneSignal::SubscriptionBody.new # SubscriptionBody |
|
|
@@ -3256,13 +3260,13 @@ require 'onesignal'
|
|
|
3256
3260
|
# setup authorization
|
|
3257
3261
|
OneSignal.configure do |config|
|
|
3258
3262
|
# Configure Bearer authorization: rest_api_key
|
|
3259
|
-
config.rest_api_key = '
|
|
3263
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
3260
3264
|
|
|
3261
3265
|
end
|
|
3262
3266
|
|
|
3263
3267
|
api_instance = OneSignal::DefaultApi.new
|
|
3264
3268
|
template_id = 'e4d3c2b1-a09f-4f1e-8d7c-6b5a4f3e2d1c' # String |
|
|
3265
|
-
app_id = '
|
|
3269
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
3266
3270
|
update_template_request = OneSignal::UpdateTemplateRequest.new # UpdateTemplateRequest |
|
|
3267
3271
|
|
|
3268
3272
|
begin
|
|
@@ -3336,12 +3340,12 @@ require 'onesignal'
|
|
|
3336
3340
|
# setup authorization
|
|
3337
3341
|
OneSignal.configure do |config|
|
|
3338
3342
|
# Configure Bearer authorization: rest_api_key
|
|
3339
|
-
config.rest_api_key = '
|
|
3343
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
3340
3344
|
|
|
3341
3345
|
end
|
|
3342
3346
|
|
|
3343
3347
|
api_instance = OneSignal::DefaultApi.new
|
|
3344
|
-
app_id = '
|
|
3348
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
3345
3349
|
alias_label = 'external_id' # String |
|
|
3346
3350
|
alias_id = 'YOUR_USER_EXTERNAL_ID' # String |
|
|
3347
3351
|
update_user_request = OneSignal::UpdateUserRequest.new # UpdateUserRequest |
|
|
@@ -3418,12 +3422,12 @@ require 'onesignal'
|
|
|
3418
3422
|
# setup authorization
|
|
3419
3423
|
OneSignal.configure do |config|
|
|
3420
3424
|
# Configure Bearer authorization: organization_api_key
|
|
3421
|
-
config.organization_api_key = '
|
|
3425
|
+
config.organization_api_key = 'YOUR_ORGANIZATION_API_KEY'
|
|
3422
3426
|
|
|
3423
3427
|
end
|
|
3424
3428
|
|
|
3425
3429
|
api_instance = OneSignal::DefaultApi.new
|
|
3426
|
-
app_id = '
|
|
3430
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
3427
3431
|
|
|
3428
3432
|
begin
|
|
3429
3433
|
# View API keys
|
|
@@ -3494,13 +3498,13 @@ require 'onesignal'
|
|
|
3494
3498
|
# setup authorization
|
|
3495
3499
|
OneSignal.configure do |config|
|
|
3496
3500
|
# Configure Bearer authorization: rest_api_key
|
|
3497
|
-
config.rest_api_key = '
|
|
3501
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
3498
3502
|
|
|
3499
3503
|
end
|
|
3500
3504
|
|
|
3501
3505
|
api_instance = OneSignal::DefaultApi.new
|
|
3502
3506
|
template_id = 'e4d3c2b1-a09f-4f1e-8d7c-6b5a4f3e2d1c' # String |
|
|
3503
|
-
app_id = '
|
|
3507
|
+
app_id = 'YOUR_APP_ID' # String |
|
|
3504
3508
|
|
|
3505
3509
|
begin
|
|
3506
3510
|
# View template
|
|
@@ -3572,12 +3576,12 @@ require 'onesignal'
|
|
|
3572
3576
|
# setup authorization
|
|
3573
3577
|
OneSignal.configure do |config|
|
|
3574
3578
|
# Configure Bearer authorization: rest_api_key
|
|
3575
|
-
config.rest_api_key = '
|
|
3579
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
3576
3580
|
|
|
3577
3581
|
end
|
|
3578
3582
|
|
|
3579
3583
|
api_instance = OneSignal::DefaultApi.new
|
|
3580
|
-
app_id = '
|
|
3584
|
+
app_id = 'YOUR_APP_ID' # String | Your OneSignal App ID in UUID v4 format.
|
|
3581
3585
|
opts = {
|
|
3582
3586
|
limit: 10, # Integer | Maximum number of templates. Default and max is 50.
|
|
3583
3587
|
offset: 0, # Integer | Pagination offset.
|
data/docs/DeliveryData.md
CHANGED
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
require 'onesignal'
|
|
17
17
|
|
|
18
18
|
instance = OneSignal::DeliveryData.new(
|
|
19
|
-
successful:
|
|
20
|
-
failed:
|
|
21
|
-
errored:
|
|
22
|
-
converted:
|
|
23
|
-
received:
|
|
19
|
+
successful: nil,
|
|
20
|
+
failed: nil,
|
|
21
|
+
errored: nil,
|
|
22
|
+
converted: nil,
|
|
23
|
+
received: nil
|
|
24
24
|
)
|
|
25
25
|
```
|
|
26
26
|
|