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
@@ -0,0 +1,26 @@
1
+ # OneSignal::DeliveryData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **successful** | **Integer** | | [optional] |
8
+ | **failed** | **Integer** | | [optional] |
9
+ | **errored** | **Integer** | | [optional] |
10
+ | **converted** | **Integer** | | [optional] |
11
+ | **received** | **Integer** | | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'onesignal'
17
+
18
+ instance = OneSignal::DeliveryData.new(
19
+ successful: null,
20
+ failed: null,
21
+ errored: null,
22
+ converted: null,
23
+ received: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,22 @@
1
+ # OneSignal::ExportPlayersRequestBody
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **extra_fields** | **Array<String>** | Additional fields that you wish to include. Currently supports location, country, rooted, notification_types, ip, external_user_id, web_auth, and web_p256. | [optional] |
8
+ | **last_active_since** | **Integer** | Export all devices with a last_active timestamp greater than this time. Unixtime in seconds. | [optional] |
9
+ | **segment_name** | **String** | Export al ldevices belonging to the segment. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'onesignal'
15
+
16
+ instance = OneSignal::ExportPlayersRequestBody.new(
17
+ extra_fields: null,
18
+ last_active_since: null,
19
+ segment_name: null
20
+ )
21
+ ```
22
+
data/docs/Filter.md ADDED
@@ -0,0 +1,24 @@
1
+ # OneSignal::Filter
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **field** | **String** | Name of the field to use as the first operand in the filter expression. | |
8
+ | **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] |
10
+ | **relation** | **String** | Operator of a filter expression. | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'onesignal'
16
+
17
+ instance = OneSignal::Filter.new(
18
+ field: null,
19
+ key: null,
20
+ value: null,
21
+ relation: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,26 @@
1
+ # OneSignal::FilterExpressions
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **field** | **String** | Name of the field to use as the first operand in the filter expression. | |
8
+ | **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] |
10
+ | **relation** | **String** | Operator of a filter expression. | |
11
+ | **operator** | **String** | Strictly, this must be either `\"OR\"`, or `\"AND\"`. It can be used to compose Filters as part of a Filters object. | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'onesignal'
17
+
18
+ instance = OneSignal::FilterExpressions.new(
19
+ field: null,
20
+ key: null,
21
+ value: null,
22
+ relation: null,
23
+ operator: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,40 @@
1
+ # OneSignal::FilterNotificationTarget
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **last_session** | **String** | relation = \">\" or \"<\" hours_ago = number of hours before or after the users last session. Example: \"1.1\" | [optional] |
8
+ | **first_session** | **String** | relation = \">\" or \"<\" hours_ago = number of hours before or after the users first session. Example: \"1.1\" | [optional] |
9
+ | **session_count** | **String** | relation = \">\", \"<\", \"=\" or \"!=\" value = number sessions. Example: \"1\" | [optional] |
10
+ | **session_time** | **String** | relation = \">\", \"<\", \"=\" or \"!=\" value = Time in seconds the user has been in your app. Example: \"3600\" | [optional] |
11
+ | **amount_spent** | **String** | relation = \">\", \"<\", or \"=\" value = Amount in USD a user has spent on IAP (In App Purchases). Example: \"0.99\" | [optional] |
12
+ | **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] |
13
+ | **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] |
14
+ | **language** | **String** | relation = \"=\" or \"!=\" value = 2 character language code. Example: \"en\". For a list of all language codes see Language & Localization. | [optional] |
15
+ | **app_version** | **String** | relation = \">\", \"<\", \"=\" or \"!=\" value = app version. Example: \"1.0.0\" | [optional] |
16
+ | **location** | **String** | radius = in meters lat = latitude long = longitude | [optional] |
17
+ | **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] |
18
+ | **country** | **String** | relation = \"=\" value = 2-digit Country code Example: \"field\": \"country\", \"relation\": \"=\", \"value\", \"US\" | [optional] |
19
+
20
+ ## Example
21
+
22
+ ```ruby
23
+ require 'onesignal'
24
+
25
+ instance = OneSignal::FilterNotificationTarget.new(
26
+ last_session: null,
27
+ first_session: null,
28
+ session_count: null,
29
+ session_time: null,
30
+ amount_spent: null,
31
+ bought_sku: null,
32
+ tag: null,
33
+ language: null,
34
+ app_version: null,
35
+ location: null,
36
+ email: null,
37
+ country: null
38
+ )
39
+ ```
40
+
@@ -0,0 +1,22 @@
1
+ # OneSignal::GetNotificationRequestBody
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **events** | **String** | -> \"sent\" - All the devices by player_id that were sent the specified notification_id. Notifications targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. \"clicked\" - All the devices by `player_id` that clicked the specified notification_id. | [optional] |
8
+ | **email** | **String** | The email address you would like the report sent. | [optional] |
9
+ | **app_id** | **String** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'onesignal'
15
+
16
+ instance = OneSignal::GetNotificationRequestBody.new(
17
+ events: null,
18
+ email: null,
19
+ app_id: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,24 @@
1
+ # OneSignal::InlineResponse200
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | |
8
+ | **recipients** | **Integer** | Estimated number of subscribers targetted by notification. | |
9
+ | **external_id** | **String** | | [optional] |
10
+ | **errors** | [**OneOfobjectarray**](OneOfobjectarray.md) | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'onesignal'
16
+
17
+ instance = OneSignal::InlineResponse200.new(
18
+ id: null,
19
+ recipients: null,
20
+ external_id: null,
21
+ errors: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,18 @@
1
+ # OneSignal::InlineResponse2001
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **success** | **String** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'onesignal'
13
+
14
+ instance = OneSignal::InlineResponse2001.new(
15
+ success: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # OneSignal::InlineResponse2002
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **success** | **String** | | [optional] |
8
+ | **destination_url** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'onesignal'
14
+
15
+ instance = OneSignal::InlineResponse2002.new(
16
+ success: null,
17
+ destination_url: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,18 @@
1
+ # OneSignal::InlineResponse2003
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **success** | **Boolean** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'onesignal'
13
+
14
+ instance = OneSignal::InlineResponse2003.new(
15
+ success: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # OneSignal::InlineResponse2004
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **success** | **Boolean** | | [optional] |
8
+ | **id** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'onesignal'
14
+
15
+ instance = OneSignal::InlineResponse2004.new(
16
+ success: null,
17
+ id: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,18 @@
1
+ # OneSignal::InlineResponse2005
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **csv_file_url** | **String** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'onesignal'
13
+
14
+ instance = OneSignal::InlineResponse2005.new(
15
+ csv_file_url: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # OneSignal::InlineResponse201
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **success** | **Boolean** | | [optional] |
8
+ | **id** | **String** | UUID of created segment | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'onesignal'
14
+
15
+ instance = OneSignal::InlineResponse201.new(
16
+ success: null,
17
+ id: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,18 @@
1
+ # OneSignal::InlineResponse400
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **errors** | **Array<String>** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'onesignal'
13
+
14
+ instance = OneSignal::InlineResponse400.new(
15
+ errors: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # OneSignal::InlineResponse4001
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **success** | **String** | | [optional] |
8
+ | **errors** | **Array<String>** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'onesignal'
14
+
15
+ instance = OneSignal::InlineResponse4001.new(
16
+ success: null,
17
+ errors: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,18 @@
1
+ # OneSignal::InlineResponse4002
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **erorrs** | **Array<String>** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'onesignal'
13
+
14
+ instance = OneSignal::InlineResponse4002.new(
15
+ erorrs: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # OneSignal::InlineResponse409
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **success** | **Boolean** | | [optional] |
8
+ | **errors** | **Array<String>** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'onesignal'
14
+
15
+ instance = OneSignal::InlineResponse409.new(
16
+ success: null,
17
+ errors: null
18
+ )
19
+ ```
20
+