You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/BasicNotification.md
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -104,9 +104,12 @@
104
104
|**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]|
105
105
|**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]|
106
106
|**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]|
107
+
|**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]|
108
+
|**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]|
107
109
|**sms_from**|**String**| Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. |[optional]|
108
110
|**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]|
|**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]|
Copy file name to clipboardExpand all lines: docs/BasicNotificationAllOf.md
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -90,9 +90,12 @@
90
90
|**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]|
91
91
|**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]|
92
92
|**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]|
93
+
|**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]|
94
+
|**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]|
93
95
|**sms_from**|**String**| Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. |[optional]|
94
96
|**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]|
|**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]|
Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time.
1047
+
1048
+
### Examples
1049
+
1050
+
```ruby
1051
+
require'onesignal'
1052
+
# setup authorization
1053
+
OneSignal.configure do |config|
1054
+
# Configure Bearer authorization: app_key
1055
+
config.app_key ='YOUR_BEARER_TOKEN'
1056
+
1057
+
end
1058
+
1059
+
api_instance =OneSignal::DefaultApi.new
1060
+
notification_id ='notification_id_example'# String | The ID of the notification to export events from.
1061
+
app_id ='app_id_example'# String | The ID of the app that the notification belongs to.
1062
+
1063
+
begin
1064
+
# Export CSV of Events
1065
+
result = api_instance.export_events(notification_id, app_id)
1066
+
p result
1067
+
rescueOneSignal::ApiError => e
1068
+
puts"Error when calling DefaultApi->export_events: #{e}"
1069
+
end
1070
+
```
1071
+
1072
+
#### Using the export_events_with_http_info variant
1073
+
1074
+
This returns an Array which contains the response data, status code and headers.
Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. 🚧 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. 🚧 Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. 🚧 Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | --- | --- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | --- | --- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. |
1046
1118
@@ -1062,7 +1134,7 @@ opts = {
1062
1134
}
1063
1135
1064
1136
begin
1065
-
# CSV export
1137
+
#Export CSV of Players
1066
1138
result = api_instance.export_players(app_id, opts)
1067
1139
p result
1068
1140
rescueOneSignal::ApiError => e
@@ -1078,7 +1150,7 @@ This returns an Array which contains the response data, status code and headers.
0 commit comments