onesignal 1.0.0.beta1 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +31 -0
- data/LICENSE +24 -0
- data/README.md +75 -45
- data/RELEASE_INSTRUCTIONS.md +11 -0
- data/docs/DefaultApi.md +86 -86
- data/docs/InlineResponse200.md +1 -1
- data/docs/InlineResponse2001.md +1 -1
- data/docs/InlineResponse2002.md +1 -1
- data/docs/InlineResponse2005.md +4 -2
- data/docs/{InlineResponse2003.md → InlineResponse2007.md} +3 -3
- data/docs/InlineResponse2008.md +18 -0
- data/docs/InlineResponse4002.md +4 -2
- data/docs/InlineResponse4003.md +18 -0
- data/docs/InvalidIdentifierError.md +20 -0
- data/docs/Notification.md +12 -12
- data/docs/Notification200Errors.md +49 -0
- data/docs/NotificationAllOf.md +11 -11
- data/docs/NotificationSlice.md +1 -1
- data/docs/NotificationTarget.md +1 -1
- data/docs/NotificationWithMeta.md +260 -0
- data/docs/NotificationWithMetaAllOf.md +38 -0
- data/docs/OutcomesData.md +18 -0
- data/docs/Player.md +2 -2
- data/docs/PlayerNotificationTarget.md +1 -1
- data/docs/StringMap.md +1 -1
- data/lib/onesignal/api/default_api.rb +82 -55
- data/lib/onesignal/api_client.rb +9 -7
- data/lib/onesignal/api_error.rb +2 -2
- data/lib/onesignal/configuration.rb +6 -3
- data/lib/onesignal/models/app.rb +3 -2
- data/lib/onesignal/models/button.rb +3 -2
- data/lib/onesignal/models/delivery_data.rb +8 -2
- data/lib/onesignal/models/export_players_request_body.rb +3 -2
- data/lib/onesignal/models/filter.rb +3 -2
- data/lib/onesignal/models/filter_expressions.rb +3 -2
- data/lib/onesignal/models/filter_notification_target.rb +3 -2
- data/lib/onesignal/models/get_notification_request_body.rb +3 -2
- data/lib/onesignal/models/inline_response200.rb +4 -3
- data/lib/onesignal/models/inline_response2001.rb +4 -3
- data/lib/onesignal/models/inline_response2002.rb +4 -3
- data/lib/onesignal/models/inline_response2005.rb +19 -9
- data/lib/onesignal/models/{inline_response2003.rb → inline_response2007.rb} +7 -6
- data/lib/onesignal/models/{inline_response2004.rb → inline_response2008.rb} +13 -21
- data/lib/onesignal/models/inline_response201.rb +3 -2
- data/lib/onesignal/models/inline_response400.rb +3 -2
- data/lib/onesignal/models/inline_response4001.rb +3 -2
- data/lib/onesignal/models/inline_response4002.rb +20 -10
- data/lib/onesignal/models/{inline_response409.rb → inline_response4003.rb} +14 -22
- data/lib/onesignal/models/invalid_identifier_error.rb +234 -0
- data/lib/onesignal/models/notification.rb +39 -19
- data/lib/onesignal/models/notification200_errors.rb +105 -0
- data/lib/onesignal/models/notification_all_of.rb +38 -18
- data/lib/onesignal/models/notification_all_of_android_background_layout.rb +3 -2
- data/lib/onesignal/models/notification_slice.rb +4 -3
- data/lib/onesignal/models/notification_target.rb +4 -3
- data/lib/onesignal/models/notification_with_meta.rb +1526 -0
- data/lib/onesignal/models/notification_with_meta_all_of.rb +322 -0
- data/lib/onesignal/models/operator.rb +3 -2
- data/lib/onesignal/models/outcome_data.rb +3 -2
- data/lib/onesignal/models/outcomes_data.rb +221 -0
- data/lib/onesignal/models/platform_delivery_data.rb +3 -2
- data/lib/onesignal/models/player.rb +6 -8
- data/lib/onesignal/models/player_notification_target.rb +4 -3
- data/lib/onesignal/models/player_slice.rb +3 -2
- data/lib/onesignal/models/purchase.rb +3 -2
- data/lib/onesignal/models/segment.rb +3 -2
- data/lib/onesignal/models/segment_notification_target.rb +3 -2
- data/lib/onesignal/models/string_map.rb +3 -7
- data/lib/onesignal/models/update_player_tags_request_body.rb +3 -2
- data/lib/onesignal/version.rb +3 -3
- data/lib/{OneSignal.rb → onesignal.rb} +10 -5
- data/onesignal.gemspec +5 -4
- data/spec/api/default_api_spec.rb +20 -20
- data/spec/api_client_spec.rb +4 -4
- data/spec/configuration_spec.rb +2 -2
- data/spec/models/app_spec.rb +2 -2
- data/spec/models/button_spec.rb +2 -2
- data/spec/models/delivery_data_spec.rb +2 -2
- data/spec/models/export_players_request_body_spec.rb +2 -2
- data/spec/models/filter_expressions_spec.rb +2 -2
- data/spec/models/filter_notification_target_spec.rb +2 -2
- data/spec/models/filter_spec.rb +2 -2
- data/spec/models/get_notification_request_body_spec.rb +2 -2
- data/spec/models/inline_response2001_spec.rb +2 -2
- data/spec/models/inline_response2002_spec.rb +2 -2
- data/spec/models/inline_response2005_spec.rb +9 -3
- data/spec/models/{inline_response2003_spec.rb → inline_response2007_spec.rb} +8 -8
- data/spec/models/{inline_response409_spec.rb → inline_response2008_spec.rb} +9 -15
- data/spec/models/inline_response200_spec.rb +2 -2
- data/spec/models/inline_response201_spec.rb +2 -2
- data/spec/models/inline_response4001_spec.rb +2 -2
- data/spec/models/inline_response4002_spec.rb +9 -3
- data/spec/models/inline_response4003_spec.rb +34 -0
- data/spec/models/inline_response400_spec.rb +2 -2
- data/spec/models/{inline_response2004_spec.rb → invalid_identifier_error_spec.rb} +10 -10
- data/spec/models/notification200_errors_spec.rb +31 -0
- data/spec/models/notification_all_of_android_background_layout_spec.rb +2 -2
- data/spec/models/notification_all_of_spec.rb +3 -3
- data/spec/models/notification_slice_spec.rb +2 -2
- data/spec/models/notification_spec.rb +3 -3
- data/spec/models/notification_target_spec.rb +2 -2
- data/spec/models/notification_with_meta_all_of_spec.rb +94 -0
- data/spec/models/notification_with_meta_spec.rb +764 -0
- data/spec/models/operator_spec.rb +2 -2
- data/spec/models/outcome_data_spec.rb +2 -2
- data/spec/models/outcomes_data_spec.rb +34 -0
- data/spec/models/platform_delivery_data_spec.rb +2 -2
- data/spec/models/player_notification_target_spec.rb +2 -2
- data/spec/models/player_slice_spec.rb +2 -2
- data/spec/models/player_spec.rb +2 -2
- data/spec/models/purchase_spec.rb +2 -2
- data/spec/models/segment_notification_target_spec.rb +2 -2
- data/spec/models/segment_spec.rb +2 -2
- data/spec/models/string_map_spec.rb +2 -2
- data/spec/models/update_player_tags_request_body_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -2
- metadata +51 -29
- data/docs/InlineResponse2004.md +0 -20
- data/docs/InlineResponse409.md +0 -20
- data/git_push.sh +0 -58
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -136,6 +136,7 @@ module OneSignal
|
|
136
136
|
# @return [Object] Returns the model itself
|
137
137
|
def build_from_hash(attributes)
|
138
138
|
return nil unless attributes.is_a?(Hash)
|
139
|
+
attributes = attributes.transform_keys(&:to_sym)
|
139
140
|
self.class.openapi_types.each_pair do |key, type|
|
140
141
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
141
142
|
self.send("#{key}=", nil)
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -143,6 +143,7 @@ module OneSignal
|
|
143
143
|
# @return [Object] Returns the model itself
|
144
144
|
def build_from_hash(attributes)
|
145
145
|
return nil unless attributes.is_a?(Hash)
|
146
|
+
attributes = attributes.transform_keys(&:to_sym)
|
146
147
|
self.class.openapi_types.each_pair do |key, type|
|
147
148
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
148
149
|
self.send("#{key}=", nil)
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -140,6 +140,7 @@ module OneSignal
|
|
140
140
|
# @return [Object] Returns the model itself
|
141
141
|
def build_from_hash(attributes)
|
142
142
|
return nil unless attributes.is_a?(Hash)
|
143
|
+
attributes = attributes.transform_keys(&:to_sym)
|
143
144
|
self.class.openapi_types.each_pair do |key, type|
|
144
145
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
145
146
|
self.send("#{key}=", nil)
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -122,6 +122,7 @@ module OneSignal
|
|
122
122
|
# @return [Object] Returns the model itself
|
123
123
|
def build_from_hash(attributes)
|
124
124
|
return nil unless attributes.is_a?(Hash)
|
125
|
+
attributes = attributes.transform_keys(&:to_sym)
|
125
126
|
self.class.openapi_types.each_pair do |key, type|
|
126
127
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
127
128
|
self.send("#{key}=", nil)
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -445,17 +445,12 @@ module OneSignal
|
|
445
445
|
# @return Array for valid properties with the reasons
|
446
446
|
def list_invalid_properties
|
447
447
|
invalid_properties = Array.new
|
448
|
-
if @en.nil?
|
449
|
-
invalid_properties.push('invalid value for "en", en cannot be nil.')
|
450
|
-
end
|
451
|
-
|
452
448
|
invalid_properties
|
453
449
|
end
|
454
450
|
|
455
451
|
# Check to see if the all the properties in the model are valid
|
456
452
|
# @return true if the model is valid
|
457
453
|
def valid?
|
458
|
-
return false if @en.nil?
|
459
454
|
true
|
460
455
|
end
|
461
456
|
|
@@ -533,6 +528,7 @@ module OneSignal
|
|
533
528
|
# @return [Object] Returns the model itself
|
534
529
|
def build_from_hash(attributes)
|
535
530
|
return nil unless attributes.is_a?(Hash)
|
531
|
+
attributes = attributes.transform_keys(&:to_sym)
|
536
532
|
self.class.openapi_types.each_pair do |key, type|
|
537
533
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
538
534
|
self.send("#{key}=", nil)
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -108,6 +108,7 @@ module OneSignal
|
|
108
108
|
# @return [Object] Returns the model itself
|
109
109
|
def build_from_hash(attributes)
|
110
110
|
return nil unless attributes.is_a?(Hash)
|
111
|
+
attributes = attributes.transform_keys(&:to_sym)
|
111
112
|
self.class.openapi_types.each_pair do |key, type|
|
112
113
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
113
114
|
self.send("#{key}=", nil)
|
data/lib/onesignal/version.rb
CHANGED
@@ -3,13 +3,13 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
module OneSignal
|
14
|
-
VERSION = '1.0.
|
14
|
+
VERSION = '1.0.1'
|
15
15
|
end
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -28,21 +28,26 @@ require 'onesignal/models/get_notification_request_body'
|
|
28
28
|
require 'onesignal/models/inline_response200'
|
29
29
|
require 'onesignal/models/inline_response2001'
|
30
30
|
require 'onesignal/models/inline_response2002'
|
31
|
-
require 'onesignal/models/inline_response2003'
|
32
|
-
require 'onesignal/models/inline_response2004'
|
33
31
|
require 'onesignal/models/inline_response2005'
|
32
|
+
require 'onesignal/models/inline_response2007'
|
33
|
+
require 'onesignal/models/inline_response2008'
|
34
34
|
require 'onesignal/models/inline_response201'
|
35
35
|
require 'onesignal/models/inline_response400'
|
36
36
|
require 'onesignal/models/inline_response4001'
|
37
37
|
require 'onesignal/models/inline_response4002'
|
38
|
-
require 'onesignal/models/
|
38
|
+
require 'onesignal/models/inline_response4003'
|
39
|
+
require 'onesignal/models/invalid_identifier_error'
|
39
40
|
require 'onesignal/models/notification'
|
41
|
+
require 'onesignal/models/notification200_errors'
|
40
42
|
require 'onesignal/models/notification_all_of'
|
41
43
|
require 'onesignal/models/notification_all_of_android_background_layout'
|
42
44
|
require 'onesignal/models/notification_slice'
|
43
45
|
require 'onesignal/models/notification_target'
|
46
|
+
require 'onesignal/models/notification_with_meta'
|
47
|
+
require 'onesignal/models/notification_with_meta_all_of'
|
44
48
|
require 'onesignal/models/operator'
|
45
49
|
require 'onesignal/models/outcome_data'
|
50
|
+
require 'onesignal/models/outcomes_data'
|
46
51
|
require 'onesignal/models/platform_delivery_data'
|
47
52
|
require 'onesignal/models/player'
|
48
53
|
require 'onesignal/models/player_notification_target'
|
data/onesignal.gemspec
CHANGED
@@ -5,25 +5,26 @@
|
|
5
5
|
|
6
6
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
7
7
|
|
8
|
-
The version of the OpenAPI document: 1.0.
|
8
|
+
The version of the OpenAPI document: 1.0.1
|
9
9
|
Contact: devrel@onesignal.com
|
10
10
|
Generated by: https://openapi-generator.tech
|
11
|
-
OpenAPI Generator version:
|
11
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
12
12
|
|
13
13
|
=end
|
14
14
|
|
15
15
|
$:.push File.expand_path("../lib", __FILE__)
|
16
|
+
require "onesignal/version"
|
16
17
|
|
17
18
|
Gem::Specification.new do |s|
|
18
19
|
s.name = "onesignal"
|
19
|
-
s.version =
|
20
|
+
s.version = OneSignal::VERSION
|
20
21
|
s.platform = Gem::Platform::RUBY
|
21
22
|
s.authors = ["OneSignal"]
|
22
23
|
s.email = ["devrel@onesignal.com"]
|
23
24
|
s.homepage = "https://onesignal.com/"
|
24
25
|
s.summary = "OneSignal"
|
25
26
|
s.description = "OneSignal"
|
26
|
-
s.license = "MIT"
|
27
|
+
s.license = "Modified MIT"
|
27
28
|
s.required_ruby_version = ">= 2.4"
|
28
29
|
|
29
30
|
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -71,10 +71,10 @@ describe 'DefaultApi' do
|
|
71
71
|
|
72
72
|
# unit tests for create_player
|
73
73
|
# Add a device
|
74
|
-
# Register a new device to one of your OneSignal apps
|
74
|
+
# Register a new device to one of your OneSignal apps 🚧 Don't use this This API endpoint is designed to be used from our open source Mobile and Web Push SDKs. It is not designed for developers to use it directly, unless instructed to do so by OneSignal support. If you use this method instead of our SDKs, many OneSignal features such as conversion tracking, timezone tracking, language detection, and rich-push won't work out of the box. It will also make it harder to identify possible setup issues. This method is used to register a new device with OneSignal. If a device is already registered with the specified identifier, then this will update the existing device record instead of creating a new one. The returned player is a player / user ID. Use the returned ID to send push notifications to this specific user later, or to include this player when sending to a set of users. 🚧 iOS Must set test_type to 1 when building your iOS app as development. Omit this field in your production app builds.
|
75
75
|
# @param player
|
76
76
|
# @param [Hash] opts the optional parameters
|
77
|
-
# @return [
|
77
|
+
# @return [InlineResponse2005]
|
78
78
|
describe 'create_player test' do
|
79
79
|
it 'should work' do
|
80
80
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -83,7 +83,7 @@ describe 'DefaultApi' do
|
|
83
83
|
|
84
84
|
# unit tests for create_segments
|
85
85
|
# Create Segments
|
86
|
-
# Create segments visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's.
|
86
|
+
# Create segments visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. 🚧 Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segments endpoint and re-create it with this endpoint to edit.
|
87
87
|
# @param app_id The OneSignal App ID for your app. Available in Keys & IDs.
|
88
88
|
# @param [Hash] opts the optional parameters
|
89
89
|
# @option opts [Segment] :segment
|
@@ -100,7 +100,7 @@ describe 'DefaultApi' do
|
|
100
100
|
# @param app_id The OneSignal App ID for your app. Available in Keys & IDs.
|
101
101
|
# @param player_id The OneSignal player_id
|
102
102
|
# @param [Hash] opts the optional parameters
|
103
|
-
# @return [
|
103
|
+
# @return [InlineResponse2007]
|
104
104
|
describe 'delete_player test' do
|
105
105
|
it 'should work' do
|
106
106
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -113,7 +113,7 @@ describe 'DefaultApi' do
|
|
113
113
|
# @param app_id The OneSignal App ID for your app. Available in Keys & IDs.
|
114
114
|
# @param segment_id The segment_id can be found in the URL of the segment when viewing it in the dashboard.
|
115
115
|
# @param [Hash] opts the optional parameters
|
116
|
-
# @return [
|
116
|
+
# @return [InlineResponse2001]
|
117
117
|
describe 'delete_segments test' do
|
118
118
|
it 'should work' do
|
119
119
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -122,11 +122,11 @@ describe 'DefaultApi' do
|
|
122
122
|
|
123
123
|
# unit tests for export_players
|
124
124
|
# CSV export
|
125
|
-
# 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.
|
125
|
+
# 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. |
|
126
126
|
# @param app_id The app ID that you want to export devices from
|
127
127
|
# @param [Hash] opts the optional parameters
|
128
128
|
# @option opts [ExportPlayersRequestBody] :export_players_request_body
|
129
|
-
# @return [
|
129
|
+
# @return [InlineResponse2008]
|
130
130
|
describe 'export_players test' do
|
131
131
|
it 'should work' do
|
132
132
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -149,7 +149,7 @@ describe 'DefaultApi' do
|
|
149
149
|
# View apps
|
150
150
|
# View the details of all of your current OneSignal apps
|
151
151
|
# @param [Hash] opts the optional parameters
|
152
|
-
# @return [
|
152
|
+
# @return [Array<App>]
|
153
153
|
describe 'get_apps test' do
|
154
154
|
it 'should work' do
|
155
155
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -162,7 +162,7 @@ describe 'DefaultApi' do
|
|
162
162
|
# @param app_id
|
163
163
|
# @param notification_id
|
164
164
|
# @param [Hash] opts the optional parameters
|
165
|
-
# @return [
|
165
|
+
# @return [NotificationWithMeta]
|
166
166
|
describe 'get_notification test' do
|
167
167
|
it 'should work' do
|
168
168
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -171,7 +171,7 @@ describe 'DefaultApi' do
|
|
171
171
|
|
172
172
|
# unit tests for get_notification_history
|
173
173
|
# Notification History
|
174
|
-
# -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address.
|
174
|
+
# -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. &#x1F6A7; Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs.
|
175
175
|
# @param notification_id The \"id\" of the message found in the Notification object
|
176
176
|
# @param get_notification_request_body
|
177
177
|
# @param [Hash] opts the optional parameters
|
@@ -187,7 +187,7 @@ describe 'DefaultApi' do
|
|
187
187
|
# View the details of multiple notifications
|
188
188
|
# @param app_id The app ID that you want to view notifications from
|
189
189
|
# @param [Hash] opts the optional parameters
|
190
|
-
# @option opts [
|
190
|
+
# @option opts [Integer] :limit How many notifications to return. Max is 50. Default is 50.
|
191
191
|
# @option opts [Integer] :offset Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at.
|
192
192
|
# @option opts [Integer] :kind Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only
|
193
193
|
# @return [NotificationSlice]
|
@@ -199,15 +199,15 @@ describe 'DefaultApi' do
|
|
199
199
|
|
200
200
|
# unit tests for get_outcomes
|
201
201
|
# View Outcomes
|
202
|
-
# View the details of all the outcomes associated with your app
|
202
|
+
# View the details of all the outcomes associated with your app &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it.
|
203
203
|
# @param app_id The OneSignal App ID for your app. Available in Keys & IDs.
|
204
|
-
# @param outcome_names Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the
|
204
|
+
# @param outcome_names Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum
|
205
205
|
# @param [Hash] opts the optional parameters
|
206
|
-
# @option opts [String] :outcome_names2 Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where
|
206
|
+
# @option opts [String] :outcome_names2 Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name.
|
207
207
|
# @option opts [String] :outcome_time_range Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted.
|
208
208
|
# @option opts [String] :outcome_platforms Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted.
|
209
209
|
# @option opts [String] :outcome_attribution Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted.
|
210
|
-
# @return [
|
210
|
+
# @return [OutcomesData]
|
211
211
|
describe 'get_outcomes test' do
|
212
212
|
it 'should work' do
|
213
213
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -233,7 +233,7 @@ describe 'DefaultApi' do
|
|
233
233
|
# View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant.
|
234
234
|
# @param app_id The app ID that you want to view players from
|
235
235
|
# @param [Hash] opts the optional parameters
|
236
|
-
# @option opts [
|
236
|
+
# @option opts [Integer] :limit How many devices to return. Max is 300. Default is 300
|
237
237
|
# @option opts [Integer] :offset Result offset. Default is 0. Results are sorted by id;
|
238
238
|
# @return [PlayerSlice]
|
239
239
|
describe 'get_players test' do
|
@@ -270,12 +270,12 @@ describe 'DefaultApi' do
|
|
270
270
|
|
271
271
|
# unit tests for update_player_tags
|
272
272
|
# Edit tags with external user id
|
273
|
-
# Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs.
|
273
|
+
# Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs. &#128216; Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" }
|
274
274
|
# @param app_id The OneSignal App ID the user record is found under.
|
275
275
|
# @param external_user_id The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated.
|
276
276
|
# @param [Hash] opts the optional parameters
|
277
277
|
# @option opts [UpdatePlayerTagsRequestBody] :update_player_tags_request_body
|
278
|
-
# @return [
|
278
|
+
# @return [InlineResponse2001]
|
279
279
|
describe 'update_player_tags test' do
|
280
280
|
it 'should work' do
|
281
281
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
data/spec/api_client_spec.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -197,8 +197,8 @@ describe OneSignal::ApiClient do
|
|
197
197
|
let(:api_client) { OneSignal::ApiClient.new }
|
198
198
|
|
199
199
|
it 'works' do
|
200
|
-
expect(api_client.select_header_content_type(nil)).to
|
201
|
-
expect(api_client.select_header_content_type([])).to
|
200
|
+
expect(api_client.select_header_content_type(nil)).to be_nil
|
201
|
+
expect(api_client.select_header_content_type([])).to be_nil
|
202
202
|
|
203
203
|
expect(api_client.select_header_content_type(['application/json'])).to eq('application/json')
|
204
204
|
expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
|
data/spec/configuration_spec.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
data/spec/models/app_spec.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
data/spec/models/button_spec.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
data/spec/models/filter_spec.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -25,7 +25,13 @@ describe OneSignal::InlineResponse2005 do
|
|
25
25
|
expect(instance).to be_instance_of(OneSignal::InlineResponse2005)
|
26
26
|
end
|
27
27
|
end
|
28
|
-
describe 'test attribute "
|
28
|
+
describe 'test attribute "success"' do
|
29
|
+
it 'should work' do
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe 'test attribute "id"' do
|
29
35
|
it 'should work' do
|
30
36
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
37
|
end
|