onesignal 0.3.0 → 1.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +6 -1
  3. data/README.md +126 -111
  4. data/Rakefile +8 -8
  5. data/docs/App.md +76 -0
  6. data/docs/Button.md +22 -0
  7. data/docs/DefaultApi.md +1394 -0
  8. data/docs/DeliveryData.md +26 -0
  9. data/docs/ExportPlayersRequestBody.md +22 -0
  10. data/docs/Filter.md +24 -0
  11. data/docs/FilterExpressions.md +26 -0
  12. data/docs/FilterNotificationTarget.md +40 -0
  13. data/docs/GetNotificationRequestBody.md +22 -0
  14. data/docs/InlineResponse200.md +24 -0
  15. data/docs/InlineResponse2001.md +18 -0
  16. data/docs/InlineResponse2002.md +20 -0
  17. data/docs/InlineResponse2003.md +18 -0
  18. data/docs/InlineResponse2004.md +20 -0
  19. data/docs/InlineResponse2005.md +18 -0
  20. data/docs/InlineResponse201.md +20 -0
  21. data/docs/InlineResponse400.md +18 -0
  22. data/docs/InlineResponse4001.md +20 -0
  23. data/docs/InlineResponse4002.md +18 -0
  24. data/docs/InlineResponse409.md +20 -0
  25. data/docs/Notification.md +240 -0
  26. data/docs/NotificationAllOf.md +192 -0
  27. data/docs/NotificationAllOfAndroidBackgroundLayout.md +22 -0
  28. data/docs/NotificationSlice.md +24 -0
  29. data/docs/NotificationTarget.md +64 -0
  30. data/docs/Operator.md +18 -0
  31. data/docs/OutcomeData.md +22 -0
  32. data/docs/PlatformDeliveryData.md +28 -0
  33. data/docs/Player.md +70 -0
  34. data/docs/PlayerNotificationTarget.md +36 -0
  35. data/docs/PlayerSlice.md +24 -0
  36. data/docs/Purchase.md +22 -0
  37. data/docs/Segment.md +22 -0
  38. data/docs/SegmentNotificationTarget.md +20 -0
  39. data/docs/StringMap.md +102 -0
  40. data/docs/UpdatePlayerTagsRequestBody.md +18 -0
  41. data/git_push.sh +58 -0
  42. data/lib/OneSignal.rb +75 -0
  43. data/lib/onesignal/api/default_api.rb +1338 -0
  44. data/lib/onesignal/api_client.rb +391 -0
  45. data/lib/onesignal/api_error.rb +57 -0
  46. data/lib/onesignal/configuration.rb +242 -0
  47. data/lib/onesignal/models/app.rb +519 -13
  48. data/lib/onesignal/models/button.rb +241 -0
  49. data/lib/onesignal/models/delivery_data.rb +254 -0
  50. data/lib/onesignal/models/export_players_request_body.rb +241 -0
  51. data/lib/onesignal/models/filter.rb +293 -0
  52. data/lib/onesignal/models/filter_expressions.rb +335 -0
  53. data/lib/onesignal/models/filter_notification_target.rb +329 -0
  54. data/lib/onesignal/models/get_notification_request_body.rb +272 -0
  55. data/lib/onesignal/models/inline_response200.rb +256 -0
  56. data/lib/onesignal/models/inline_response2001.rb +218 -0
  57. data/lib/onesignal/models/inline_response2002.rb +227 -0
  58. data/lib/onesignal/models/inline_response2003.rb +218 -0
  59. data/lib/onesignal/models/inline_response2004.rb +227 -0
  60. data/lib/onesignal/models/inline_response2005.rb +218 -0
  61. data/lib/onesignal/models/inline_response201.rb +228 -0
  62. data/lib/onesignal/models/inline_response400.rb +220 -0
  63. data/lib/onesignal/models/inline_response4001.rb +229 -0
  64. data/lib/onesignal/models/inline_response4002.rb +220 -0
  65. data/lib/onesignal/models/inline_response409.rb +229 -0
  66. data/lib/onesignal/models/notification.rb +1395 -5
  67. data/lib/onesignal/models/notification_all_of.rb +1124 -0
  68. data/lib/onesignal/models/notification_all_of_android_background_layout.rb +240 -0
  69. data/lib/onesignal/models/notification_slice.rb +247 -0
  70. data/lib/onesignal/models/notification_target.rb +494 -0
  71. data/lib/onesignal/models/operator.rb +253 -0
  72. data/lib/onesignal/models/outcome_data.rb +285 -0
  73. data/lib/onesignal/models/platform_delivery_data.rb +264 -0
  74. data/lib/onesignal/models/player.rb +483 -9
  75. data/lib/onesignal/models/player_notification_target.rb +329 -0
  76. data/lib/onesignal/models/player_slice.rb +247 -0
  77. data/lib/onesignal/models/purchase.rb +254 -0
  78. data/lib/onesignal/models/segment.rb +251 -0
  79. data/lib/onesignal/models/segment_notification_target.rb +233 -0
  80. data/lib/onesignal/models/string_map.rb +644 -0
  81. data/lib/onesignal/models/update_player_tags_request_body.rb +219 -0
  82. data/lib/onesignal/version.rb +13 -1
  83. data/onesignal.gemspec +36 -27
  84. data/spec/api/default_api_spec.rb +285 -0
  85. data/spec/api_client_spec.rb +226 -0
  86. data/spec/configuration_spec.rb +42 -0
  87. data/spec/models/app_spec.rb +212 -0
  88. data/spec/models/button_spec.rb +46 -0
  89. data/spec/models/delivery_data_spec.rb +58 -0
  90. data/spec/models/export_players_request_body_spec.rb +46 -0
  91. data/spec/models/filter_expressions_spec.rb +66 -0
  92. data/spec/models/filter_notification_target_spec.rb +100 -0
  93. data/spec/models/filter_spec.rb +56 -0
  94. data/spec/models/get_notification_request_body_spec.rb +50 -0
  95. data/spec/models/inline_response2001_spec.rb +34 -0
  96. data/spec/models/inline_response2002_spec.rb +40 -0
  97. data/spec/models/inline_response2003_spec.rb +34 -0
  98. data/spec/models/inline_response2004_spec.rb +40 -0
  99. data/spec/models/inline_response2005_spec.rb +34 -0
  100. data/spec/models/inline_response200_spec.rb +52 -0
  101. data/spec/models/inline_response201_spec.rb +40 -0
  102. data/spec/models/inline_response4001_spec.rb +40 -0
  103. data/spec/models/inline_response4002_spec.rb +34 -0
  104. data/spec/models/inline_response400_spec.rb +34 -0
  105. data/spec/models/inline_response409_spec.rb +40 -0
  106. data/spec/models/notification_all_of_android_background_layout_spec.rb +46 -0
  107. data/spec/models/notification_all_of_spec.rb +560 -0
  108. data/spec/models/notification_slice_spec.rb +52 -0
  109. data/spec/models/notification_spec.rb +704 -0
  110. data/spec/models/notification_target_spec.rb +172 -0
  111. data/spec/models/operator_spec.rb +38 -0
  112. data/spec/models/outcome_data_spec.rb +50 -0
  113. data/spec/models/platform_delivery_data_spec.rb +64 -0
  114. data/spec/models/player_notification_target_spec.rb +88 -0
  115. data/spec/models/player_slice_spec.rb +52 -0
  116. data/spec/models/player_spec.rb +190 -0
  117. data/spec/models/purchase_spec.rb +46 -0
  118. data/spec/models/segment_notification_target_spec.rb +40 -0
  119. data/spec/models/segment_spec.rb +46 -0
  120. data/spec/models/string_map_spec.rb +286 -0
  121. data/spec/models/update_player_tags_request_body_spec.rb +34 -0
  122. data/spec/spec_helper.rb +111 -0
  123. metadata +182 -65
  124. data/.gitignore +0 -10
  125. data/.rubocop.yml +0 -17
  126. data/.travis.yml +0 -16
  127. data/CHANGELOG.md +0 -22
  128. data/CODE_OF_CONDUCT.md +0 -49
  129. data/LICENSE +0 -21
  130. data/bin/console +0 -14
  131. data/bin/setup +0 -8
  132. data/lib/onesignal/app_id_missing_error.rb +0 -7
  133. data/lib/onesignal/client.rb +0 -44
  134. data/lib/onesignal/models/base_model.rb +0 -40
  135. data/lib/onesignal/request.rb +0 -94
  136. data/lib/onesignal/request_error.rb +0 -21
  137. data/lib/onesignal/resources/app_resource.rb +0 -27
  138. data/lib/onesignal/resources/base_resource.rb +0 -35
  139. data/lib/onesignal/resources/notification_resource.rb +0 -33
  140. data/lib/onesignal/resources/player_resource.rb +0 -53
  141. data/lib/onesignal.rb +0 -23
data/docs/Operator.md ADDED
@@ -0,0 +1,18 @@
1
+ # OneSignal::Operator
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **operator** | **String** | Strictly, this must be either `\"OR\"`, or `\"AND\"`. It can be used to compose Filters as part of a Filters object. | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'onesignal'
13
+
14
+ instance = OneSignal::Operator.new(
15
+ operator: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,22 @@
1
+ # OneSignal::OutcomeData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | |
8
+ | **value** | **Integer** | | |
9
+ | **aggregation** | **String** | | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'onesignal'
15
+
16
+ instance = OneSignal::OutcomeData.new(
17
+ id: null,
18
+ value: null,
19
+ aggregation: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,28 @@
1
+ # OneSignal::PlatformDeliveryData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **edge_web_push** | [**DeliveryData**](DeliveryData.md) | | [optional] |
8
+ | **chrome_web_push** | [**DeliveryData**](DeliveryData.md) | | [optional] |
9
+ | **firefox_web_push** | [**DeliveryData**](DeliveryData.md) | | [optional] |
10
+ | **safari_web_push** | [**DeliveryData**](DeliveryData.md) | | [optional] |
11
+ | **android** | [**DeliveryData**](DeliveryData.md) | | [optional] |
12
+ | **ios** | [**DeliveryData**](DeliveryData.md) | | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'onesignal'
18
+
19
+ instance = OneSignal::PlatformDeliveryData.new(
20
+ edge_web_push: null,
21
+ chrome_web_push: null,
22
+ firefox_web_push: null,
23
+ safari_web_push: null,
24
+ android: null,
25
+ ios: null
26
+ )
27
+ ```
28
+
data/docs/Player.md ADDED
@@ -0,0 +1,70 @@
1
+ # OneSignal::Player
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | The device's OneSignal ID | [readonly] |
8
+ | **invalid_identifier** | **Boolean** | If true, this is the equivalent of a user being Unsubscribed | [optional][readonly] |
9
+ | **app_id** | **String** | | |
10
+ | **device_type** | **Integer** | Required The device's platform: 0 = iOS 1 = Android 2 = Amazon 3 = WindowsPhone (MPNS) 4 = Chrome Apps / Extensions 5 = Chrome Web Push 6 = Windows (WNS) 7 = Safari 8 = Firefox 9 = MacOS 10 = Alexa 11 = Email 13 = For Huawei App Gallery Builds SDK Setup. Not for Huawei Devices using FCM 14 = SMS | |
11
+ | **external_user_id** | **String** | a custom user ID | [optional] |
12
+ | **external_user_id_auth_hash** | **String** | Only required if you have enabled Identity Verification and device_type is NOT 11 email. | [optional] |
13
+ | **email_auth_hash** | **String** | Email - Only required if you have enabled Identity Verification and device_type is email (11). | [optional] |
14
+ | **identifier** | **String** | Recommended: For Push Notifications, this is the Push Token Identifier from Google or Apple. For Apple Push identifiers, you must strip all non alphanumeric characters. Examples: iOS: 7abcd558f29d0b1f048083e2834ad8ea4b3d87d8ad9c088b33c132706ff445f0 Android: APA91bHbYHk7aq-Uam_2pyJ2qbZvqllyyh2wjfPRaw5gLEX2SUlQBRvOc6sck1sa7H7nGeLNlDco8lXj83HWWwzV... For Email Addresses, set the full email address email@email.com and make sure to set device_type to 11. | [optional] |
15
+ | **language** | **String** | Language code. Typically lower case two letters, except for Chinese where it must be one of zh-Hans or zh-Hant. Example: en | [optional] |
16
+ | **timezone** | **Integer** | Number of seconds away from UTC. Example: -28800 | [optional] |
17
+ | **game_version** | **String** | Version of your app. Example: 1.1 | [optional] |
18
+ | **device_model** | **String** | Device make and model. Example: iPhone5,1 | [optional] |
19
+ | **device_os** | **String** | Device operating system version. Example: 7.0.4 | [optional] |
20
+ | **ad_id** | **String** | The ad id for the device's platform: Android = Advertising Id iOS = identifierForVendor WP8.0 = DeviceUniqueId WP8.1 = AdvertisingId | [optional] |
21
+ | **sdk** | **String** | Name and version of the sdk/plugin that's calling this API method (if any) | [optional] |
22
+ | **session_count** | **Integer** | Number of times the user has played the game, defaults to 1 | [optional] |
23
+ | **tags** | **Object** | Custom tags for the player. Only support string and integer key value pairs. Does not support arrays or other nested objects. Setting a tag value to null or an empty string will remove the tag. Example: {\"foo\":\"bar\",\"this\":\"that\"} Limitations: - 100 tags per call - Android SDK users: tags cannot be removed or changed via API if set through SDK sendTag methods. Recommended to only tag devices with 1 kilobyte of data Please consider using your own Database to save more than 1 kilobyte of data. See: Internal Database & CRM | [optional] |
24
+ | **amount_spent** | **String** | Amount the user has spent in USD, up to two decimal places | [optional] |
25
+ | **created_at** | **Integer** | Unixtime when the player joined the game | [optional] |
26
+ | **playtime** | **Integer** | Seconds player was running your app. | [optional] |
27
+ | **badge_count** | **Integer** | Current iOS badge count displayed on the app icon NOTE: Not supported for apps created after June 2018, since badge count for apps created after this date are handled on the client. | [optional] |
28
+ | **last_active** | **Integer** | Unixtime when the player was last active | [optional] |
29
+ | **notification_types** | **Integer** | 1 = subscribed -2 = unsubscribed iOS - These values are set each time the user opens the app from the SDK. Use the SDK function set Subscription instead. Android - You may set this but you can no longer use the SDK method setSubscription later in your app as it will create synchronization issues. | [optional] |
30
+ | **test_type** | **Integer** | This is used in deciding whether to use your iOS Sandbox or Production push certificate when sending a push when both have been uploaded. Set to the iOS provisioning profile that was used to build your app. 1 = Development 2 = Ad-Hoc Omit this field for App Store builds. | [optional] |
31
+ | **long** | **Float** | Longitude of the device, used for geotagging to segment on. | [optional] |
32
+ | **lat** | **Float** | Latitude of the device, used for geotagging to segment on. | [optional] |
33
+ | **country** | **String** | Country code in the ISO 3166-1 Alpha 2 format | [optional] |
34
+
35
+ ## Example
36
+
37
+ ```ruby
38
+ require 'onesignal'
39
+
40
+ instance = OneSignal::Player.new(
41
+ id: null,
42
+ invalid_identifier: null,
43
+ app_id: null,
44
+ device_type: null,
45
+ external_user_id: null,
46
+ external_user_id_auth_hash: null,
47
+ email_auth_hash: null,
48
+ identifier: null,
49
+ language: null,
50
+ timezone: null,
51
+ game_version: null,
52
+ device_model: null,
53
+ device_os: null,
54
+ ad_id: null,
55
+ sdk: null,
56
+ session_count: null,
57
+ tags: null,
58
+ amount_spent: null,
59
+ created_at: null,
60
+ playtime: null,
61
+ badge_count: null,
62
+ last_active: null,
63
+ notification_types: null,
64
+ test_type: null,
65
+ long: null,
66
+ lat: null,
67
+ country: null
68
+ )
69
+ ```
70
+
@@ -0,0 +1,36 @@
1
+ # OneSignal::PlayerNotificationTarget
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **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] |
8
+ | **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] |
9
+ | **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] |
10
+ | **include_phone_numbers** | **Array<String>** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] |
11
+ | **include_ios_tokens** | **Array<String>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] |
12
+ | **include_wp_wns_uris** | **Array<String>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] |
13
+ | **include_amazon_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call | [optional] |
14
+ | **include_chrome_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] |
15
+ | **include_chrome_web_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] |
16
+ | **include_android_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] |
17
+
18
+ ## Example
19
+
20
+ ```ruby
21
+ require 'onesignal'
22
+
23
+ instance = OneSignal::PlayerNotificationTarget.new(
24
+ include_player_ids: null,
25
+ include_external_user_ids: null,
26
+ include_email_tokens: null,
27
+ include_phone_numbers: null,
28
+ include_ios_tokens: null,
29
+ include_wp_wns_uris: null,
30
+ include_amazon_reg_ids: null,
31
+ include_chrome_reg_ids: null,
32
+ include_chrome_web_reg_ids: null,
33
+ include_android_reg_ids: null
34
+ )
35
+ ```
36
+
@@ -0,0 +1,24 @@
1
+ # OneSignal::PlayerSlice
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **total_count** | **Integer** | | [optional] |
8
+ | **offset** | **Integer** | | [optional] |
9
+ | **limit** | **Integer** | | [optional] |
10
+ | **players** | [**Array<Player>**](Player.md) | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'onesignal'
16
+
17
+ instance = OneSignal::PlayerSlice.new(
18
+ total_count: null,
19
+ offset: null,
20
+ limit: null,
21
+ players: null
22
+ )
23
+ ```
24
+
data/docs/Purchase.md ADDED
@@ -0,0 +1,22 @@
1
+ # OneSignal::Purchase
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **sku** | **String** | The unique identifier of the purchased item. | |
8
+ | **amount** | **Float** | The amount, in USD, spent purchasing the item. | |
9
+ | **iso** | **String** | The 3-letter ISO 4217 currency code. Required for correct storage and conversion of amount. | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'onesignal'
15
+
16
+ instance = OneSignal::Purchase.new(
17
+ sku: null,
18
+ amount: null,
19
+ iso: null
20
+ )
21
+ ```
22
+
data/docs/Segment.md ADDED
@@ -0,0 +1,22 @@
1
+ # OneSignal::Segment
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | UUID of the segment. If left empty, it will be assigned automaticaly. | [optional] |
8
+ | **name** | **String** | Name of the segment. You'll see this name on the Web UI. | |
9
+ | **filters** | [**Array<FilterExpressions>**](FilterExpressions.md) | Filter or operators the segment will have. For a list of available filters with details, please see Send to Users Based on Filters. | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'onesignal'
15
+
16
+ instance = OneSignal::Segment.new(
17
+ id: null,
18
+ name: null,
19
+ filters: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,20 @@
1
+ # OneSignal::SegmentNotificationTarget
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **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] |
8
+ | **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
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'onesignal'
14
+
15
+ instance = OneSignal::SegmentNotificationTarget.new(
16
+ included_segments: null,
17
+ excluded_segments: null
18
+ )
19
+ ```
20
+
data/docs/StringMap.md ADDED
@@ -0,0 +1,102 @@
1
+ # OneSignal::StringMap
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **en** | **String** | Text in English. Will be used as a fallback | |
8
+ | **ar** | **String** | Text in Arabic. | [optional] |
9
+ | **bs** | **String** | Text in Bosnian. | [optional] |
10
+ | **bg** | **String** | Text in Bulgarian. | [optional] |
11
+ | **ca** | **String** | Text in Catalan. | [optional] |
12
+ | **zh_hans** | **String** | Text in Chinese (Simplified). | [optional] |
13
+ | **zh_hant** | **String** | Text in Chinese (Traditional). | [optional] |
14
+ | **zh** | **String** | Alias for zh-Hans. | [optional] |
15
+ | **hr** | **String** | Text in Croatian. | [optional] |
16
+ | **cs** | **String** | Text in Czech. | [optional] |
17
+ | **da** | **String** | Text in Danish. | [optional] |
18
+ | **nl** | **String** | Text in Dutch. | [optional] |
19
+ | **et** | **String** | Text in Estonian. | [optional] |
20
+ | **fi** | **String** | Text in Finnish. | [optional] |
21
+ | **fr** | **String** | Text in French. | [optional] |
22
+ | **ka** | **String** | Text in Georgian. | [optional] |
23
+ | **de** | **String** | Text in German. | [optional] |
24
+ | **el** | **String** | Text in Greek. | [optional] |
25
+ | **hi** | **String** | Text in Hindi. | [optional] |
26
+ | **he** | **String** | Text in Hebrew. | [optional] |
27
+ | **hu** | **String** | Text in Hungarian. | [optional] |
28
+ | **id** | **String** | Text in Indonesian. | [optional] |
29
+ | **it** | **String** | Text in Italian. | [optional] |
30
+ | **ja** | **String** | Text in Japanese. | [optional] |
31
+ | **ko** | **String** | Text in Korean. | [optional] |
32
+ | **lv** | **String** | Text in Latvian. | [optional] |
33
+ | **lt** | **String** | Text in Lithuanian. | [optional] |
34
+ | **ms** | **String** | Text in Malay. | [optional] |
35
+ | **nb** | **String** | Text in Norwegian. | [optional] |
36
+ | **pl** | **String** | Text in Polish. | [optional] |
37
+ | **fa** | **String** | Text in Persian. | [optional] |
38
+ | **pt** | **String** | Text in Portugese. | [optional] |
39
+ | **pa** | **String** | Text in Punjabi. | [optional] |
40
+ | **ro** | **String** | Text in Romanian. | [optional] |
41
+ | **ru** | **String** | Text in Russian. | [optional] |
42
+ | **sr** | **String** | Text in Serbian. | [optional] |
43
+ | **sk** | **String** | Text in Slovak. | [optional] |
44
+ | **es** | **String** | Text in Spanish. | [optional] |
45
+ | **sv** | **String** | Text in Swedish. | [optional] |
46
+ | **th** | **String** | Text in Thai. | [optional] |
47
+ | **tr** | **String** | Text in Turkish. | [optional] |
48
+ | **uk** | **String** | Text in Ukrainian. | [optional] |
49
+ | **vi** | **String** | Text in Vietnamese. | [optional] |
50
+
51
+ ## Example
52
+
53
+ ```ruby
54
+ require 'onesignal'
55
+
56
+ instance = OneSignal::StringMap.new(
57
+ en: null,
58
+ ar: null,
59
+ bs: null,
60
+ bg: null,
61
+ ca: null,
62
+ zh_hans: null,
63
+ zh_hant: null,
64
+ zh: null,
65
+ hr: null,
66
+ cs: null,
67
+ da: null,
68
+ nl: null,
69
+ et: null,
70
+ fi: null,
71
+ fr: null,
72
+ ka: null,
73
+ de: null,
74
+ el: null,
75
+ hi: null,
76
+ he: null,
77
+ hu: null,
78
+ id: null,
79
+ it: null,
80
+ ja: null,
81
+ ko: null,
82
+ lv: null,
83
+ lt: null,
84
+ ms: null,
85
+ nb: null,
86
+ pl: null,
87
+ fa: null,
88
+ pt: null,
89
+ pa: null,
90
+ ro: null,
91
+ ru: null,
92
+ sr: null,
93
+ sk: null,
94
+ es: null,
95
+ sv: null,
96
+ th: null,
97
+ tr: null,
98
+ uk: null,
99
+ vi: null
100
+ )
101
+ ```
102
+
@@ -0,0 +1,18 @@
1
+ # OneSignal::UpdatePlayerTagsRequestBody
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **tags** | **Object** | Custom tags for the device record. Only support string key value pairs. Does not support arrays or other nested objects. Example `{\"foo\":\"bar\",\"this\":\"that\"}`. Limitations: - 100 tags per call - Android SDK users: tags cannot be removed or changed via API if set through SDK sendTag methods. Recommended to only tag devices with 1 kilobyte of ata Please consider using your own Database to save more than 1 kilobyte of data. See: Internal Database & CRM | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'onesignal'
13
+
14
+ instance = OneSignal::UpdatePlayerTagsRequestBody.new(
15
+ tags: null
16
+ )
17
+ ```
18
+
data/git_push.sh ADDED
@@ -0,0 +1,58 @@
1
+ #!/bin/sh
2
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3
+ #
4
+ # Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
5
+
6
+ git_user_id=$1
7
+ git_repo_id=$2
8
+ release_note=$3
9
+ git_host=$4
10
+
11
+ if [ "$git_host" = "" ]; then
12
+ git_host="github.com"
13
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14
+ fi
15
+
16
+ if [ "$git_user_id" = "" ]; then
17
+ git_user_id="GIT_USER_ID"
18
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19
+ fi
20
+
21
+ if [ "$git_repo_id" = "" ]; then
22
+ git_repo_id="GIT_REPO_ID"
23
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24
+ fi
25
+
26
+ if [ "$release_note" = "" ]; then
27
+ release_note="Minor update"
28
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
29
+ fi
30
+
31
+ # Initialize the local directory as a Git repository
32
+ git init
33
+
34
+ # Adds the files in the local repository and stages them for commit.
35
+ git add .
36
+
37
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
38
+ git commit -m "$release_note"
39
+
40
+ # Sets the new remote
41
+ git_remote=`git remote`
42
+ if [ "$git_remote" = "" ]; then # git remote not defined
43
+
44
+ if [ "$GIT_TOKEN" = "" ]; then
45
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47
+ else
48
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
49
+ fi
50
+
51
+ fi
52
+
53
+ git pull origin master
54
+
55
+ # Pushes (Forces) the changes in the local repository up to the remote repository
56
+ echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57
+ git push origin master 2>&1 | grep -v 'To https'
58
+
data/lib/OneSignal.rb ADDED
@@ -0,0 +1,75 @@
1
+ =begin
2
+ #OneSignal
3
+
4
+ #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: devrel@onesignal.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ # Common files
14
+ require 'onesignal/api_client'
15
+ require 'onesignal/api_error'
16
+ require 'onesignal/version'
17
+ require 'onesignal/configuration'
18
+
19
+ # Models
20
+ require 'onesignal/models/app'
21
+ require 'onesignal/models/button'
22
+ require 'onesignal/models/delivery_data'
23
+ require 'onesignal/models/export_players_request_body'
24
+ require 'onesignal/models/filter'
25
+ require 'onesignal/models/filter_expressions'
26
+ require 'onesignal/models/filter_notification_target'
27
+ require 'onesignal/models/get_notification_request_body'
28
+ require 'onesignal/models/inline_response200'
29
+ require 'onesignal/models/inline_response2001'
30
+ require 'onesignal/models/inline_response2002'
31
+ require 'onesignal/models/inline_response2003'
32
+ require 'onesignal/models/inline_response2004'
33
+ require 'onesignal/models/inline_response2005'
34
+ require 'onesignal/models/inline_response201'
35
+ require 'onesignal/models/inline_response400'
36
+ require 'onesignal/models/inline_response4001'
37
+ require 'onesignal/models/inline_response4002'
38
+ require 'onesignal/models/inline_response409'
39
+ require 'onesignal/models/notification'
40
+ require 'onesignal/models/notification_all_of'
41
+ require 'onesignal/models/notification_all_of_android_background_layout'
42
+ require 'onesignal/models/notification_slice'
43
+ require 'onesignal/models/notification_target'
44
+ require 'onesignal/models/operator'
45
+ require 'onesignal/models/outcome_data'
46
+ require 'onesignal/models/platform_delivery_data'
47
+ require 'onesignal/models/player'
48
+ require 'onesignal/models/player_notification_target'
49
+ require 'onesignal/models/player_slice'
50
+ require 'onesignal/models/purchase'
51
+ require 'onesignal/models/segment'
52
+ require 'onesignal/models/segment_notification_target'
53
+ require 'onesignal/models/string_map'
54
+ require 'onesignal/models/update_player_tags_request_body'
55
+
56
+ # APIs
57
+ require 'onesignal/api/default_api'
58
+
59
+ module OneSignal
60
+ class << self
61
+ # Customize default settings for the SDK using block.
62
+ # OneSignal.configure do |config|
63
+ # config.username = "xxx"
64
+ # config.password = "xxx"
65
+ # end
66
+ # If no block given, return the default Configuration object.
67
+ def configure
68
+ if block_given?
69
+ yield(Configuration.default)
70
+ else
71
+ Configuration.default
72
+ end
73
+ end
74
+ end
75
+ end