Skip to content

Commit a5c03a3

Browse files
author
OneSignal
committed
Update Ruby API
1 parent 06f2165 commit a5c03a3

23 files changed

Lines changed: 102 additions & 893 deletions

docs/App.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
| Name | Type | Description | Notes |
66
| ---- | ---- | ----------- | ----- |
7-
| **id** | **String** | | [readonly] |
7+
| **id** | **String** | | [optional][readonly] |
88
| **name** | **String** | The name of your app, as displayed on your apps list on the dashboard. This can be renamed. | [optional] |
99
| **players** | **Integer** | | [optional][readonly] |
1010
| **messageable_players** | **Integer** | | [optional][readonly] |

docs/BasicNotification.md

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,6 @@
66
| ---- | ---- | ----------- | ----- |
77
| **included_segments** | **Array<String>** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] |
88
| **excluded_segments** | **Array<String>** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] |
9-
| **last_session** | **String** | relation = \">\" or \"<\" hours_ago = number of hours before or after the users last session. Example: \"1.1\" | [optional] |
10-
| **first_session** | **String** | relation = \">\" or \"<\" hours_ago = number of hours before or after the users first session. Example: \"1.1\" | [optional] |
11-
| **session_count** | **String** | relation = \">\", \"<\", \"=\" or \"!=\" value = number sessions. Example: \"1\" | [optional] |
12-
| **session_time** | **String** | relation = \">\", \"<\", \"=\" or \"!=\" value = Time in seconds the user has been in your app. Example: \"3600\" | [optional] |
13-
| **amount_spent** | **String** | relation = \">\", \"<\", or \"=\" value = Amount in USD a user has spent on IAP (In App Purchases). Example: \"0.99\" | [optional] |
14-
| **bought_sku** | **String** | relation = \">\", \"<\" or \"=\" key = SKU purchased in your app as an IAP (In App Purchases). Example: \"com.domain.100coinpack\" value = value of SKU to compare to. Example: \"0.99\" | [optional] |
15-
| **tag** | **String** | relation = \">\", \"<\", \"=\", \"!=\", \"exists\", \"not_exists\", \"time_elapsed_gt\" (paid plan only) or \"time_elapsed_lt\" (paid plan only) See Time Operators key = Tag key to compare. value = Tag value to compare. Not required for \"exists\" or \"not_exists\". Example: See Formatting Filters | [optional] |
16-
| **language** | **String** | relation = \"=\" or \"!=\" value = 2 character language code. Example: \"en\". For a list of all language codes see Language & Localization. | [optional] |
17-
| **app_version** | **String** | relation = \">\", \"<\", \"=\" or \"!=\" value = app version. Example: \"1.0.0\" | [optional] |
18-
| **location** | **String** | radius = in meters lat = latitude long = longitude | [optional] |
19-
| **email** | **String** | value = email address Only for sending Push Notifications Use this for targeting push subscribers associated with an email set with all SDK setEmail methods To send emails to specific email addresses use include_email_tokens parameter | [optional] |
20-
| **country** | **String** | relation = \"=\" value = 2-digit Country code Example: \"field\": \"country\", \"relation\": \"=\", \"value\", \"US\" | [optional] |
219
| **include_player_ids** | **Array<String>** | Specific playerids to send your notification to. _Does not require API Auth Key. Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] |
2210
| **include_external_user_ids** | **Array<String>** | Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call. Note: If targeting push, email, or sms subscribers with same ids, use with channel_for_external_user_ids to indicate you are sending a push or email or sms. | [optional] |
2311
| **include_email_tokens** | **Array<String>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] |
@@ -116,6 +104,7 @@
116104
| **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] |
117105
| **sms_from** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
118106
| **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] |
107+
| **filters** | [**Array<Filter>**](Filter.md) | | [optional] |
119108

120109
## Example
121110

@@ -125,18 +114,6 @@ require 'onesignal'
125114
instance = OneSignal::BasicNotification.new(
126115
included_segments: null,
127116
excluded_segments: null,
128-
last_session: null,
129-
first_session: null,
130-
session_count: null,
131-
session_time: null,
132-
amount_spent: null,
133-
bought_sku: null,
134-
tag: null,
135-
language: null,
136-
app_version: null,
137-
location: null,
138-
email: null,
139-
country: null,
140117
include_player_ids: null,
141118
include_external_user_ids: null,
142119
include_email_tokens: null,
@@ -234,7 +211,8 @@ instance = OneSignal::BasicNotification.new(
234211
email_from_name: null,
235212
email_from_address: null,
236213
sms_from: null,
237-
sms_media_urls: null
214+
sms_media_urls: null,
215+
filters: null
238216
)
239217
```
240218

docs/BasicNotificationAllOf.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
| **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] |
9393
| **sms_from** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
9494
| **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] |
95+
| **filters** | [**Array<Filter>**](Filter.md) | | [optional] |
9596

9697
## Example
9798

@@ -186,7 +187,8 @@ instance = OneSignal::BasicNotificationAllOf.new(
186187
email_from_name: null,
187188
email_from_address: null,
188189
sms_from: null,
189-
sms_media_urls: null
190+
sms_media_urls: null,
191+
filters: null
190192
)
191193
```
192194

docs/DefaultApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ OneSignal.configure do |config|
116116
end
117117

118118
api_instance = OneSignal::DefaultApi.new
119-
app = OneSignal::App.new({id: 'id_example'}) # App |
119+
app = OneSignal::App.new # App |
120120

121121
begin
122122
# Create an app
@@ -1197,7 +1197,7 @@ end
11971197

11981198
api_instance = OneSignal::DefaultApi.new
11991199
app_id = 'app_id_example' # String | An app id
1200-
app = OneSignal::App.new({id: 'id_example'}) # App |
1200+
app = OneSignal::App.new # App |
12011201

12021202
begin
12031203
# Update an app

docs/Filter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
| ---- | ---- | ----------- | ----- |
77
| **field** | **String** | Name of the field to use as the first operand in the filter expression. | |
88
| **key** | **String** | If `field` is `tag`, this field is *required* to specify `key` inside the tags. | [optional] |
9-
| **value** | **String** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional] |
9+
| **value** | **String** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional] |
1010
| **relation** | **String** | Operator of a filter expression. | |
1111

1212
## Example

docs/FilterExpressions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
| ---- | ---- | ----------- | ----- |
77
| **field** | **String** | Name of the field to use as the first operand in the filter expression. | |
88
| **key** | **String** | If `field` is `tag`, this field is *required* to specify `key` inside the tags. | [optional] |
9-
| **value** | **String** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional] |
9+
| **value** | **String** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional] |
1010
| **relation** | **String** | Operator of a filter expression. | |
1111
| **operator** | **String** | Strictly, this must be either `\"OR\"`, or `\"AND\"`. It can be used to compose Filters as part of a Filters object. | [optional] |
1212

docs/Notification.md

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,6 @@
66
| ---- | ---- | ----------- | ----- |
77
| **included_segments** | **Array<String>** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] |
88
| **excluded_segments** | **Array<String>** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] |
9-
| **last_session** | **String** | relation = \">\" or \"<\" hours_ago = number of hours before or after the users last session. Example: \"1.1\" | [optional] |
10-
| **first_session** | **String** | relation = \">\" or \"<\" hours_ago = number of hours before or after the users first session. Example: \"1.1\" | [optional] |
11-
| **session_count** | **String** | relation = \">\", \"<\", \"=\" or \"!=\" value = number sessions. Example: \"1\" | [optional] |
12-
| **session_time** | **String** | relation = \">\", \"<\", \"=\" or \"!=\" value = Time in seconds the user has been in your app. Example: \"3600\" | [optional] |
13-
| **amount_spent** | **String** | relation = \">\", \"<\", or \"=\" value = Amount in USD a user has spent on IAP (In App Purchases). Example: \"0.99\" | [optional] |
14-
| **bought_sku** | **String** | relation = \">\", \"<\" or \"=\" key = SKU purchased in your app as an IAP (In App Purchases). Example: \"com.domain.100coinpack\" value = value of SKU to compare to. Example: \"0.99\" | [optional] |
15-
| **tag** | **String** | relation = \">\", \"<\", \"=\", \"!=\", \"exists\", \"not_exists\", \"time_elapsed_gt\" (paid plan only) or \"time_elapsed_lt\" (paid plan only) See Time Operators key = Tag key to compare. value = Tag value to compare. Not required for \"exists\" or \"not_exists\". Example: See Formatting Filters | [optional] |
16-
| **language** | **String** | relation = \"=\" or \"!=\" value = 2 character language code. Example: \"en\". For a list of all language codes see Language & Localization. | [optional] |
17-
| **app_version** | **String** | relation = \">\", \"<\", \"=\" or \"!=\" value = app version. Example: \"1.0.0\" | [optional] |
18-
| **location** | **String** | radius = in meters lat = latitude long = longitude | [optional] |
19-
| **email** | **String** | value = email address Only for sending Push Notifications Use this for targeting push subscribers associated with an email set with all SDK setEmail methods To send emails to specific email addresses use include_email_tokens parameter | [optional] |
20-
| **country** | **String** | relation = \"=\" value = 2-digit Country code Example: \"field\": \"country\", \"relation\": \"=\", \"value\", \"US\" | [optional] |
219
| **include_player_ids** | **Array<String>** | Specific playerids to send your notification to. _Does not require API Auth Key. Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] |
2210
| **include_external_user_ids** | **Array<String>** | Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call. Note: If targeting push, email, or sms subscribers with same ids, use with channel_for_external_user_ids to indicate you are sending a push or email or sms. | [optional] |
2311
| **include_email_tokens** | **Array<String>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] |
@@ -116,6 +104,7 @@
116104
| **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] |
117105
| **sms_from** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
118106
| **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] |
107+
| **filters** | [**Array<Filter>**](Filter.md) | | [optional] |
119108
| **send_after** | **Time** | Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. | [optional] |
120109

121110
## Example
@@ -126,18 +115,6 @@ require 'onesignal'
126115
instance = OneSignal::Notification.new(
127116
included_segments: null,
128117
excluded_segments: null,
129-
last_session: null,
130-
first_session: null,
131-
session_count: null,
132-
session_time: null,
133-
amount_spent: null,
134-
bought_sku: null,
135-
tag: null,
136-
language: null,
137-
app_version: null,
138-
location: null,
139-
email: null,
140-
country: null,
141118
include_player_ids: null,
142119
include_external_user_ids: null,
143120
include_email_tokens: null,
@@ -236,6 +213,7 @@ instance = OneSignal::Notification.new(
236213
email_from_address: null,
237214
sms_from: null,
238215
sms_media_urls: null,
216+
filters: null,
239217
send_after: null
240218
)
241219
```

0 commit comments

Comments
 (0)