onesignal 5.3.0.pre.beta1 → 5.4.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/CHANGELOG.md +14 -0
- data/README.md +57 -186
- data/docs/BasicNotification.md +13 -1
- data/docs/BasicNotificationAllOf.md +13 -1
- data/docs/CreateTemplateRequest.md +4 -0
- data/docs/DefaultApi.md +44 -44
- data/docs/Notification.md +12 -0
- data/docs/NotificationWithMeta.md +12 -0
- data/docs/UpdateTemplateRequest.md +4 -0
- data/lib/onesignal/api/default_api.rb +1 -1
- data/lib/onesignal/api_client.rb +2 -2
- data/lib/onesignal/api_error.rb +1 -1
- data/lib/onesignal/configuration.rb +4 -5
- 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 +86 -6
- data/lib/onesignal/models/basic_notification_all_of.rb +86 -6
- 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 +1 -1
- 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 +20 -2
- 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 +82 -2
- 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 +1 -1
- data/lib/onesignal/models/notification_target.rb +1 -1
- data/lib/onesignal/models/notification_with_meta.rb +82 -2
- 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 +20 -2
- 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 +1 -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 +41 -1
- data/spec/models/basic_notification_spec.rb +41 -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 +13 -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 +1 -1
- data/spec/models/notification_spec.rb +41 -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 +41 -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 +13 -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
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9b822e8ac691cee158cc2ea0d95286eaae7d13eba0c01a3920a499948d1bc238
|
|
4
|
+
data.tar.gz: 0ee3fb8b53514f2f03c125d0088556f058fd299df668d2b708066b5ad7842004
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 81302a5cd1d63aec33b5014e637c716916506e593d442bed11d97f87fb59bcef9e8636a1609106de791cf5ebbf180202b3ac297dff8f6fac0abcc2f177592632
|
|
7
|
+
data.tar.gz: '08301126ffffc8eeed569ea66ccf7b4a881c366c3e80d9d7c21fe2b3c982bff076aced450e146d4ab2cdad3ddf04ae386c708ac761146aee38b7da726b31710f'
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [5.4.0](https://github.com/OneSignal/onesignal-ruby-api/compare/v5.3.0...v5.4.0) (2026-04-17)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add v5.4.0 package updates ([#67](https://github.com/OneSignal/onesignal-ruby-api/issues/67)) ([5a85c14](https://github.com/OneSignal/onesignal-ruby-api/commit/5a85c14dbe8c88e053221903505545fc9191a99d))
|
|
8
|
+
|
|
9
|
+
## [5.3.0](https://github.com/OneSignal/onesignal-ruby-api/compare/v5.2.0...v5.3.0) (2026-03-24)
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* add Huawei and email_reply_to_address parameters to Notification ([#61](https://github.com/OneSignal/onesignal-ruby-api/issues/61)) ([9777640](https://github.com/OneSignal/onesignal-ruby-api/commit/97776405f6125f480f1ff7db04f8e497fae8c4ad))
|
|
14
|
+
|
|
1
15
|
# Change Log
|
|
2
16
|
All notable changes to this project will be documented in this file.
|
|
3
17
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
data/README.md
CHANGED
|
@@ -1,215 +1,86 @@
|
|
|
1
1
|
# onesignal
|
|
2
2
|
|
|
3
|
-
OneSignal - the Ruby gem for
|
|
3
|
+
OneSignal - the Ruby gem for OneSignal
|
|
4
4
|
|
|
5
5
|
A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- API version: 5.3.0
|
|
10
|
-
- Package version: 5.3.0-beta1
|
|
11
|
-
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
12
|
-
For more information, please visit [https://onesignal.com](https://onesignal.com)
|
|
7
|
+
- API version: 5.4.0
|
|
8
|
+
- Package version: 5.4.0
|
|
13
9
|
|
|
14
10
|
## Installation
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
To build the Ruby code into a gem:
|
|
19
|
-
|
|
20
|
-
```shell
|
|
21
|
-
gem build onesignal.gemspec
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Then either install the gem locally:
|
|
12
|
+
Add to your `Gemfile`:
|
|
25
13
|
|
|
26
|
-
```
|
|
27
|
-
gem
|
|
14
|
+
```ruby
|
|
15
|
+
gem 'onesignal', '~> 5.4.0'
|
|
28
16
|
```
|
|
29
17
|
|
|
30
|
-
|
|
18
|
+
Then run `bundle install`.
|
|
31
19
|
|
|
32
|
-
|
|
20
|
+
## Configuration
|
|
33
21
|
|
|
34
|
-
|
|
22
|
+
Every SDK requires authentication via API keys. Two key types are available:
|
|
35
23
|
|
|
36
|
-
|
|
24
|
+
- **REST API Key** — required for most endpoints (sending notifications, managing users, etc.). Found in your app's **Settings > Keys & IDs**.
|
|
25
|
+
- **Organization API Key** — only required for organization-level endpoints like creating or listing apps. Found in **Organization Settings**.
|
|
37
26
|
|
|
38
|
-
|
|
27
|
+
> **Warning:** Store your API keys in environment variables or a secrets manager. Never commit them to source control.
|
|
39
28
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
gem 'onesignal', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
|
43
|
-
|
|
44
|
-
### Include the Ruby code directly
|
|
29
|
+
```ruby
|
|
30
|
+
require 'onesignal'
|
|
45
31
|
|
|
46
|
-
|
|
32
|
+
OneSignal.configure do |config|
|
|
33
|
+
config.rest_api_key = 'YOUR_REST_API_KEY'
|
|
34
|
+
config.organization_api_key = 'YOUR_ORGANIZATION_API_KEY'
|
|
35
|
+
end
|
|
47
36
|
|
|
48
|
-
|
|
49
|
-
ruby -Ilib script.rb
|
|
37
|
+
client = OneSignal::DefaultApi.new
|
|
50
38
|
```
|
|
51
39
|
|
|
52
|
-
##
|
|
53
|
-
|
|
54
|
-
Please follow the [installation](#installation) procedure and then run the following code:
|
|
40
|
+
## Send a push notification
|
|
55
41
|
|
|
56
42
|
```ruby
|
|
57
|
-
|
|
58
|
-
|
|
43
|
+
notification = OneSignal::Notification.new({
|
|
44
|
+
app_id: 'YOUR_APP_ID',
|
|
45
|
+
contents: { en: 'Hello from OneSignal!' },
|
|
46
|
+
headings: { en: 'Push Notification' },
|
|
47
|
+
included_segments: ['Subscribed Users']
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
response = client.create_notification(notification)
|
|
51
|
+
puts "Notification ID: #{response.id}"
|
|
52
|
+
```
|
|
59
53
|
|
|
60
|
-
|
|
61
|
-
OneSignal.configure do |config|
|
|
62
|
-
# Configure Bearer authorization: organization_api_key
|
|
63
|
-
config.organization_api_key = 'ORGANIZATION_API_KEY' # Organization key is only required for creating new apps and other top-level endpoints
|
|
64
|
-
# Configure Bearer authorization: rest_api_key
|
|
65
|
-
config.rest_api_key = 'REST_API_KEY' # App REST API key required for most endpoints
|
|
66
|
-
end
|
|
54
|
+
## Send an email
|
|
67
55
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
56
|
+
```ruby
|
|
57
|
+
notification = OneSignal::Notification.new({
|
|
58
|
+
app_id: 'YOUR_APP_ID',
|
|
59
|
+
email_subject: 'Important Update',
|
|
60
|
+
email_body: '<h1>Hello!</h1><p>This is an HTML email.</p>',
|
|
61
|
+
included_segments: ['Subscribed Users'],
|
|
62
|
+
channel_for_external_user_ids: 'email'
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
response = client.create_notification(notification)
|
|
66
|
+
```
|
|
71
67
|
|
|
72
|
-
|
|
73
|
-
#Stop a scheduled or currently outgoing notification
|
|
74
|
-
result = api_instance.cancel_notification(app_id, notification_id)
|
|
75
|
-
p result
|
|
76
|
-
rescue OneSignal::ApiError => e
|
|
77
|
-
puts "Exception when calling DefaultApi->cancel_notification: #{e}"
|
|
78
|
-
end
|
|
68
|
+
## Send an SMS
|
|
79
69
|
|
|
70
|
+
```ruby
|
|
71
|
+
notification = OneSignal::Notification.new({
|
|
72
|
+
app_id: 'YOUR_APP_ID',
|
|
73
|
+
contents: { en: 'Your SMS message content here' },
|
|
74
|
+
included_segments: ['Subscribed Users'],
|
|
75
|
+
channel_for_external_user_ids: 'sms',
|
|
76
|
+
sms_from: '+15551234567'
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
response = client.create_notification(notification)
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
##
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
Class | Method | HTTP request | Description
|
|
87
|
-
------------ | ------------- | ------------- | -------------
|
|
88
|
-
*OneSignal::DefaultApi* | [**cancel_notification**](docs/DefaultApi.md#cancel_notification) | **DELETE** /notifications/{notification_id} | Stop a scheduled or currently outgoing notification
|
|
89
|
-
*OneSignal::DefaultApi* | [**copy_template_to_app**](docs/DefaultApi.md#copy_template_to_app) | **POST** /templates/{template_id}/copy_to_app | Copy template to another app
|
|
90
|
-
*OneSignal::DefaultApi* | [**create_alias**](docs/DefaultApi.md#create_alias) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
|
|
91
|
-
*OneSignal::DefaultApi* | [**create_alias_by_subscription**](docs/DefaultApi.md#create_alias_by_subscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
|
|
92
|
-
*OneSignal::DefaultApi* | [**create_api_key**](docs/DefaultApi.md#create_api_key) | **POST** /apps/{app_id}/auth/tokens | Create API key
|
|
93
|
-
*OneSignal::DefaultApi* | [**create_app**](docs/DefaultApi.md#create_app) | **POST** /apps | Create an app
|
|
94
|
-
*OneSignal::DefaultApi* | [**create_custom_events**](docs/DefaultApi.md#create_custom_events) | **POST** /apps/{app_id}/integrations/custom_events | Create custom events
|
|
95
|
-
*OneSignal::DefaultApi* | [**create_notification**](docs/DefaultApi.md#create_notification) | **POST** /notifications | Create notification
|
|
96
|
-
*OneSignal::DefaultApi* | [**create_segment**](docs/DefaultApi.md#create_segment) | **POST** /apps/{app_id}/segments | Create Segment
|
|
97
|
-
*OneSignal::DefaultApi* | [**create_subscription**](docs/DefaultApi.md#create_subscription) | **POST** /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions |
|
|
98
|
-
*OneSignal::DefaultApi* | [**create_template**](docs/DefaultApi.md#create_template) | **POST** /templates | Create template
|
|
99
|
-
*OneSignal::DefaultApi* | [**create_user**](docs/DefaultApi.md#create_user) | **POST** /apps/{app_id}/users |
|
|
100
|
-
*OneSignal::DefaultApi* | [**delete_alias**](docs/DefaultApi.md#delete_alias) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete} |
|
|
101
|
-
*OneSignal::DefaultApi* | [**delete_api_key**](docs/DefaultApi.md#delete_api_key) | **DELETE** /apps/{app_id}/auth/tokens/{token_id} | Delete API key
|
|
102
|
-
*OneSignal::DefaultApi* | [**delete_segment**](docs/DefaultApi.md#delete_segment) | **DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segment
|
|
103
|
-
*OneSignal::DefaultApi* | [**delete_subscription**](docs/DefaultApi.md#delete_subscription) | **DELETE** /apps/{app_id}/subscriptions/{subscription_id} |
|
|
104
|
-
*OneSignal::DefaultApi* | [**delete_template**](docs/DefaultApi.md#delete_template) | **DELETE** /templates/{template_id} | Delete template
|
|
105
|
-
*OneSignal::DefaultApi* | [**delete_user**](docs/DefaultApi.md#delete_user) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
|
|
106
|
-
*OneSignal::DefaultApi* | [**export_events**](docs/DefaultApi.md#export_events) | **POST** /notifications/{notification_id}/export_events?app_id={app_id} | Export CSV of Events
|
|
107
|
-
*OneSignal::DefaultApi* | [**export_subscriptions**](docs/DefaultApi.md#export_subscriptions) | **POST** /players/csv_export?app_id={app_id} | Export CSV of Subscriptions
|
|
108
|
-
*OneSignal::DefaultApi* | [**get_aliases**](docs/DefaultApi.md#get_aliases) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
|
|
109
|
-
*OneSignal::DefaultApi* | [**get_aliases_by_subscription**](docs/DefaultApi.md#get_aliases_by_subscription) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
|
|
110
|
-
*OneSignal::DefaultApi* | [**get_app**](docs/DefaultApi.md#get_app) | **GET** /apps/{app_id} | View an app
|
|
111
|
-
*OneSignal::DefaultApi* | [**get_apps**](docs/DefaultApi.md#get_apps) | **GET** /apps | View apps
|
|
112
|
-
*OneSignal::DefaultApi* | [**get_notification**](docs/DefaultApi.md#get_notification) | **GET** /notifications/{notification_id} | View notification
|
|
113
|
-
*OneSignal::DefaultApi* | [**get_notification_history**](docs/DefaultApi.md#get_notification_history) | **POST** /notifications/{notification_id}/history | Notification History
|
|
114
|
-
*OneSignal::DefaultApi* | [**get_notifications**](docs/DefaultApi.md#get_notifications) | **GET** /notifications | View notifications
|
|
115
|
-
*OneSignal::DefaultApi* | [**get_outcomes**](docs/DefaultApi.md#get_outcomes) | **GET** /apps/{app_id}/outcomes | View Outcomes
|
|
116
|
-
*OneSignal::DefaultApi* | [**get_segments**](docs/DefaultApi.md#get_segments) | **GET** /apps/{app_id}/segments | Get Segments
|
|
117
|
-
*OneSignal::DefaultApi* | [**get_user**](docs/DefaultApi.md#get_user) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
|
|
118
|
-
*OneSignal::DefaultApi* | [**rotate_api_key**](docs/DefaultApi.md#rotate_api_key) | **POST** /apps/{app_id}/auth/tokens/{token_id}/rotate | Rotate API key
|
|
119
|
-
*OneSignal::DefaultApi* | [**start_live_activity**](docs/DefaultApi.md#start_live_activity) | **POST** /apps/{app_id}/activities/activity/{activity_type} | Start Live Activity
|
|
120
|
-
*OneSignal::DefaultApi* | [**transfer_subscription**](docs/DefaultApi.md#transfer_subscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/owner |
|
|
121
|
-
*OneSignal::DefaultApi* | [**unsubscribe_email_with_token**](docs/DefaultApi.md#unsubscribe_email_with_token) | **POST** /apps/{app_id}/notifications/{notification_id}/unsubscribe | Unsubscribe with token
|
|
122
|
-
*OneSignal::DefaultApi* | [**update_api_key**](docs/DefaultApi.md#update_api_key) | **PATCH** /apps/{app_id}/auth/tokens/{token_id} | Update API key
|
|
123
|
-
*OneSignal::DefaultApi* | [**update_app**](docs/DefaultApi.md#update_app) | **PUT** /apps/{app_id} | Update an app
|
|
124
|
-
*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
|
|
125
|
-
*OneSignal::DefaultApi* | [**update_subscription**](docs/DefaultApi.md#update_subscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id} |
|
|
126
|
-
*OneSignal::DefaultApi* | [**update_subscription_by_token**](docs/DefaultApi.md#update_subscription_by_token) | **PATCH** /apps/{app_id}/subscriptions_by_token/{token_type}/{token} | Update subscription by token
|
|
127
|
-
*OneSignal::DefaultApi* | [**update_template**](docs/DefaultApi.md#update_template) | **PATCH** /templates/{template_id} | Update template
|
|
128
|
-
*OneSignal::DefaultApi* | [**update_user**](docs/DefaultApi.md#update_user) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
|
|
129
|
-
*OneSignal::DefaultApi* | [**view_api_keys**](docs/DefaultApi.md#view_api_keys) | **GET** /apps/{app_id}/auth/tokens | View API keys
|
|
130
|
-
*OneSignal::DefaultApi* | [**view_template**](docs/DefaultApi.md#view_template) | **GET** /templates/{template_id} | View template
|
|
131
|
-
*OneSignal::DefaultApi* | [**view_templates**](docs/DefaultApi.md#view_templates) | **GET** /templates | View templates
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
## Documentation for Models
|
|
135
|
-
|
|
136
|
-
- [OneSignal::ApiKeyToken](docs/ApiKeyToken.md)
|
|
137
|
-
- [OneSignal::ApiKeyTokensListResponse](docs/ApiKeyTokensListResponse.md)
|
|
138
|
-
- [OneSignal::App](docs/App.md)
|
|
139
|
-
- [OneSignal::BasicNotification](docs/BasicNotification.md)
|
|
140
|
-
- [OneSignal::BasicNotificationAllOf](docs/BasicNotificationAllOf.md)
|
|
141
|
-
- [OneSignal::BasicNotificationAllOfAndroidBackgroundLayout](docs/BasicNotificationAllOfAndroidBackgroundLayout.md)
|
|
142
|
-
- [OneSignal::Button](docs/Button.md)
|
|
143
|
-
- [OneSignal::CopyTemplateRequest](docs/CopyTemplateRequest.md)
|
|
144
|
-
- [OneSignal::CreateApiKeyRequest](docs/CreateApiKeyRequest.md)
|
|
145
|
-
- [OneSignal::CreateApiKeyResponse](docs/CreateApiKeyResponse.md)
|
|
146
|
-
- [OneSignal::CreateNotificationSuccessResponse](docs/CreateNotificationSuccessResponse.md)
|
|
147
|
-
- [OneSignal::CreateSegmentConflictResponse](docs/CreateSegmentConflictResponse.md)
|
|
148
|
-
- [OneSignal::CreateSegmentSuccessResponse](docs/CreateSegmentSuccessResponse.md)
|
|
149
|
-
- [OneSignal::CreateTemplateRequest](docs/CreateTemplateRequest.md)
|
|
150
|
-
- [OneSignal::CreateUserConflictResponse](docs/CreateUserConflictResponse.md)
|
|
151
|
-
- [OneSignal::CreateUserConflictResponseErrorsInner](docs/CreateUserConflictResponseErrorsInner.md)
|
|
152
|
-
- [OneSignal::CreateUserConflictResponseErrorsItemsMeta](docs/CreateUserConflictResponseErrorsItemsMeta.md)
|
|
153
|
-
- [OneSignal::CustomEvent](docs/CustomEvent.md)
|
|
154
|
-
- [OneSignal::CustomEventsRequest](docs/CustomEventsRequest.md)
|
|
155
|
-
- [OneSignal::DeliveryData](docs/DeliveryData.md)
|
|
156
|
-
- [OneSignal::ExportEventsSuccessResponse](docs/ExportEventsSuccessResponse.md)
|
|
157
|
-
- [OneSignal::ExportSubscriptionsRequestBody](docs/ExportSubscriptionsRequestBody.md)
|
|
158
|
-
- [OneSignal::ExportSubscriptionsSuccessResponse](docs/ExportSubscriptionsSuccessResponse.md)
|
|
159
|
-
- [OneSignal::Filter](docs/Filter.md)
|
|
160
|
-
- [OneSignal::FilterExpression](docs/FilterExpression.md)
|
|
161
|
-
- [OneSignal::GenericError](docs/GenericError.md)
|
|
162
|
-
- [OneSignal::GenericSuccessBoolResponse](docs/GenericSuccessBoolResponse.md)
|
|
163
|
-
- [OneSignal::GetNotificationHistoryRequestBody](docs/GetNotificationHistoryRequestBody.md)
|
|
164
|
-
- [OneSignal::GetSegmentsSuccessResponse](docs/GetSegmentsSuccessResponse.md)
|
|
165
|
-
- [OneSignal::LanguageStringMap](docs/LanguageStringMap.md)
|
|
166
|
-
- [OneSignal::Notification](docs/Notification.md)
|
|
167
|
-
- [OneSignal::NotificationAllOf](docs/NotificationAllOf.md)
|
|
168
|
-
- [OneSignal::NotificationHistorySuccessResponse](docs/NotificationHistorySuccessResponse.md)
|
|
169
|
-
- [OneSignal::NotificationSlice](docs/NotificationSlice.md)
|
|
170
|
-
- [OneSignal::NotificationTarget](docs/NotificationTarget.md)
|
|
171
|
-
- [OneSignal::NotificationWithMeta](docs/NotificationWithMeta.md)
|
|
172
|
-
- [OneSignal::NotificationWithMetaAllOf](docs/NotificationWithMetaAllOf.md)
|
|
173
|
-
- [OneSignal::Operator](docs/Operator.md)
|
|
174
|
-
- [OneSignal::OutcomeData](docs/OutcomeData.md)
|
|
175
|
-
- [OneSignal::OutcomesData](docs/OutcomesData.md)
|
|
176
|
-
- [OneSignal::PlatformDeliveryData](docs/PlatformDeliveryData.md)
|
|
177
|
-
- [OneSignal::PlatformDeliveryDataEmailAllOf](docs/PlatformDeliveryDataEmailAllOf.md)
|
|
178
|
-
- [OneSignal::PlatformDeliveryDataSmsAllOf](docs/PlatformDeliveryDataSmsAllOf.md)
|
|
179
|
-
- [OneSignal::PropertiesBody](docs/PropertiesBody.md)
|
|
180
|
-
- [OneSignal::PropertiesDeltas](docs/PropertiesDeltas.md)
|
|
181
|
-
- [OneSignal::PropertiesObject](docs/PropertiesObject.md)
|
|
182
|
-
- [OneSignal::Purchase](docs/Purchase.md)
|
|
183
|
-
- [OneSignal::RateLimitError](docs/RateLimitError.md)
|
|
184
|
-
- [OneSignal::Segment](docs/Segment.md)
|
|
185
|
-
- [OneSignal::SegmentData](docs/SegmentData.md)
|
|
186
|
-
- [OneSignal::SegmentNotificationTarget](docs/SegmentNotificationTarget.md)
|
|
187
|
-
- [OneSignal::StartLiveActivityRequest](docs/StartLiveActivityRequest.md)
|
|
188
|
-
- [OneSignal::StartLiveActivitySuccessResponse](docs/StartLiveActivitySuccessResponse.md)
|
|
189
|
-
- [OneSignal::Subscription](docs/Subscription.md)
|
|
190
|
-
- [OneSignal::SubscriptionBody](docs/SubscriptionBody.md)
|
|
191
|
-
- [OneSignal::SubscriptionNotificationTarget](docs/SubscriptionNotificationTarget.md)
|
|
192
|
-
- [OneSignal::TemplateResource](docs/TemplateResource.md)
|
|
193
|
-
- [OneSignal::TemplatesListResponse](docs/TemplatesListResponse.md)
|
|
194
|
-
- [OneSignal::TransferSubscriptionRequestBody](docs/TransferSubscriptionRequestBody.md)
|
|
195
|
-
- [OneSignal::UpdateApiKeyRequest](docs/UpdateApiKeyRequest.md)
|
|
196
|
-
- [OneSignal::UpdateLiveActivityRequest](docs/UpdateLiveActivityRequest.md)
|
|
197
|
-
- [OneSignal::UpdateLiveActivitySuccessResponse](docs/UpdateLiveActivitySuccessResponse.md)
|
|
198
|
-
- [OneSignal::UpdateTemplateRequest](docs/UpdateTemplateRequest.md)
|
|
199
|
-
- [OneSignal::UpdateUserRequest](docs/UpdateUserRequest.md)
|
|
200
|
-
- [OneSignal::User](docs/User.md)
|
|
201
|
-
- [OneSignal::UserIdentityBody](docs/UserIdentityBody.md)
|
|
202
|
-
- [OneSignal::WebButton](docs/WebButton.md)
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
## Documentation for Authorization
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
### organization_api_key
|
|
209
|
-
|
|
210
|
-
- **Type**: Bearer authentication
|
|
211
|
-
|
|
212
|
-
### rest_api_key
|
|
213
|
-
|
|
214
|
-
- **Type**: Bearer authentication
|
|
82
|
+
## Full API reference
|
|
83
|
+
|
|
84
|
+
The complete list of API endpoints and their parameters is available in the [DefaultApi documentation](https://github.com/OneSignal/onesignal-ruby-api/blob/master/docs/DefaultApi.md).
|
|
215
85
|
|
|
86
|
+
For the underlying REST API, see the [OneSignal API reference](https://documentation.onesignal.com/reference).
|
data/docs/BasicNotification.md
CHANGED
|
@@ -105,6 +105,7 @@
|
|
|
105
105
|
| **email_body** | **String** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] |
|
|
106
106
|
| **email_from_name** | **String** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] |
|
|
107
107
|
| **email_from_address** | **String** | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional] |
|
|
108
|
+
| **email_reply_to_address** | **String** | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional] |
|
|
108
109
|
| **email_preheader** | **String** | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional] |
|
|
109
110
|
| **disable_email_click_tracking** | **Boolean** | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional] |
|
|
110
111
|
| **include_unsubscribed** | **Boolean** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] |
|
|
@@ -112,6 +113,11 @@
|
|
|
112
113
|
| **sms_media_urls** | **Array<String>** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] |
|
|
113
114
|
| **filters** | [**Array<FilterExpression>**](FilterExpression.md) | | [optional] |
|
|
114
115
|
| **custom_data** | **Object** | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional] |
|
|
116
|
+
| **huawei_badge_class** | **String** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] |
|
|
117
|
+
| **huawei_badge_add_num** | **Integer** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] |
|
|
118
|
+
| **huawei_badge_set_num** | **Integer** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] |
|
|
119
|
+
| **huawei_category** | **String** | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] |
|
|
120
|
+
| **huawei_bi_tag** | **String** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional] |
|
|
115
121
|
|
|
116
122
|
## Example
|
|
117
123
|
|
|
@@ -220,13 +226,19 @@ instance = OneSignal::BasicNotification.new(
|
|
|
220
226
|
email_body: null,
|
|
221
227
|
email_from_name: null,
|
|
222
228
|
email_from_address: null,
|
|
229
|
+
email_reply_to_address: null,
|
|
223
230
|
email_preheader: null,
|
|
224
231
|
disable_email_click_tracking: null,
|
|
225
232
|
include_unsubscribed: null,
|
|
226
233
|
sms_from: null,
|
|
227
234
|
sms_media_urls: null,
|
|
228
235
|
filters: null,
|
|
229
|
-
custom_data: null
|
|
236
|
+
custom_data: null,
|
|
237
|
+
huawei_badge_class: null,
|
|
238
|
+
huawei_badge_add_num: null,
|
|
239
|
+
huawei_badge_set_num: null,
|
|
240
|
+
huawei_category: null,
|
|
241
|
+
huawei_bi_tag: null
|
|
230
242
|
)
|
|
231
243
|
```
|
|
232
244
|
|
|
@@ -92,6 +92,7 @@
|
|
|
92
92
|
| **email_body** | **String** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] |
|
|
93
93
|
| **email_from_name** | **String** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] |
|
|
94
94
|
| **email_from_address** | **String** | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional] |
|
|
95
|
+
| **email_reply_to_address** | **String** | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional] |
|
|
95
96
|
| **email_preheader** | **String** | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional] |
|
|
96
97
|
| **disable_email_click_tracking** | **Boolean** | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional] |
|
|
97
98
|
| **include_unsubscribed** | **Boolean** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] |
|
|
@@ -99,6 +100,11 @@
|
|
|
99
100
|
| **sms_media_urls** | **Array<String>** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] |
|
|
100
101
|
| **filters** | [**Array<FilterExpression>**](FilterExpression.md) | | [optional] |
|
|
101
102
|
| **custom_data** | **Object** | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional] |
|
|
103
|
+
| **huawei_badge_class** | **String** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] |
|
|
104
|
+
| **huawei_badge_add_num** | **Integer** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] |
|
|
105
|
+
| **huawei_badge_set_num** | **Integer** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] |
|
|
106
|
+
| **huawei_category** | **String** | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] |
|
|
107
|
+
| **huawei_bi_tag** | **String** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional] |
|
|
102
108
|
|
|
103
109
|
## Example
|
|
104
110
|
|
|
@@ -194,13 +200,19 @@ instance = OneSignal::BasicNotificationAllOf.new(
|
|
|
194
200
|
email_body: null,
|
|
195
201
|
email_from_name: null,
|
|
196
202
|
email_from_address: null,
|
|
203
|
+
email_reply_to_address: null,
|
|
197
204
|
email_preheader: null,
|
|
198
205
|
disable_email_click_tracking: null,
|
|
199
206
|
include_unsubscribed: null,
|
|
200
207
|
sms_from: null,
|
|
201
208
|
sms_media_urls: null,
|
|
202
209
|
filters: null,
|
|
203
|
-
custom_data: null
|
|
210
|
+
custom_data: null,
|
|
211
|
+
huawei_badge_class: null,
|
|
212
|
+
huawei_badge_add_num: null,
|
|
213
|
+
huawei_badge_set_num: null,
|
|
214
|
+
huawei_category: null,
|
|
215
|
+
huawei_bi_tag: null
|
|
204
216
|
)
|
|
205
217
|
```
|
|
206
218
|
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
| **app_id** | **String** | Your OneSignal App ID in UUID v4 format. | |
|
|
8
8
|
| **name** | **String** | Name of the template. | |
|
|
9
9
|
| **contents** | [**LanguageStringMap**](LanguageStringMap.md) | | |
|
|
10
|
+
| **headings** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] |
|
|
11
|
+
| **subtitle** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] |
|
|
10
12
|
| **is_email** | **Boolean** | Set true for an Email template. | [optional] |
|
|
11
13
|
| **email_subject** | **String** | Subject of the email. | [optional] |
|
|
12
14
|
| **email_body** | **String** | Body of the email (HTML supported). | [optional] |
|
|
@@ -22,6 +24,8 @@ instance = OneSignal::CreateTemplateRequest.new(
|
|
|
22
24
|
app_id: null,
|
|
23
25
|
name: null,
|
|
24
26
|
contents: null,
|
|
27
|
+
headings: null,
|
|
28
|
+
subtitle: null,
|
|
25
29
|
is_email: null,
|
|
26
30
|
email_subject: null,
|
|
27
31
|
email_body: null,
|