late-sdk 0.0.64 → 0.0.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -0
  3. data/docs/AnalyticsApi.md +160 -0
  4. data/docs/GetInstagramAccountInsights404Response.md +18 -0
  5. data/docs/InstagramAccountInsightsResponse.md +32 -0
  6. data/docs/InstagramAccountInsightsResponseDateRange.md +20 -0
  7. data/docs/InstagramAccountInsightsResponseMetricsValue.md +22 -0
  8. data/docs/InstagramAccountInsightsResponseMetricsValueBreakdownsInner.md +20 -0
  9. data/docs/InstagramAccountInsightsResponseMetricsValueValuesInner.md +20 -0
  10. data/docs/InstagramDemographicsResponse.md +30 -0
  11. data/docs/InstagramDemographicsResponseDemographicsValueInner.md +20 -0
  12. data/docs/TikTokPlatformData.md +1 -1
  13. data/lib/late-sdk/api/analytics_api.rb +164 -0
  14. data/lib/late-sdk/models/get_instagram_account_insights404_response.rb +147 -0
  15. data/lib/late-sdk/models/instagram_account_insights_response.rb +249 -0
  16. data/lib/late-sdk/models/instagram_account_insights_response_date_range.rb +156 -0
  17. data/lib/late-sdk/models/instagram_account_insights_response_metrics_value.rb +172 -0
  18. data/lib/late-sdk/models/instagram_account_insights_response_metrics_value_breakdowns_inner.rb +156 -0
  19. data/lib/late-sdk/models/instagram_account_insights_response_metrics_value_values_inner.rb +156 -0
  20. data/lib/late-sdk/models/instagram_demographics_response.rb +252 -0
  21. data/lib/late-sdk/models/instagram_demographics_response_demographics_value_inner.rb +158 -0
  22. data/lib/late-sdk/models/tik_tok_platform_data.rb +1 -1
  23. data/lib/late-sdk/version.rb +1 -1
  24. data/lib/late-sdk.rb +8 -0
  25. data/openapi.yaml +363 -1
  26. data/spec/api/analytics_api_spec.rb +32 -0
  27. data/spec/models/get_instagram_account_insights404_response_spec.rb +36 -0
  28. data/spec/models/instagram_account_insights_response_date_range_spec.rb +42 -0
  29. data/spec/models/instagram_account_insights_response_metrics_value_breakdowns_inner_spec.rb +42 -0
  30. data/spec/models/instagram_account_insights_response_metrics_value_spec.rb +48 -0
  31. data/spec/models/instagram_account_insights_response_metrics_value_values_inner_spec.rb +42 -0
  32. data/spec/models/instagram_account_insights_response_spec.rb +82 -0
  33. data/spec/models/instagram_demographics_response_demographics_value_inner_spec.rb +42 -0
  34. data/spec/models/instagram_demographics_response_spec.rb +80 -0
  35. data/zernio-sdk-0.0.66.gem +0 -0
  36. metadata +35 -3
  37. data/zernio-sdk-0.0.64.gem +0 -0
@@ -0,0 +1,252 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class InstagramDemographicsResponse < ApiModelBase
18
+ attr_accessor :success
19
+
20
+ # The Zernio SocialAccount ID
21
+ attr_accessor :account_id
22
+
23
+ attr_accessor :platform
24
+
25
+ attr_accessor :metric
26
+
27
+ # The timeframe used for demographic data
28
+ attr_accessor :timeframe
29
+
30
+ # Object keyed by breakdown dimension (age, city, country, gender)
31
+ attr_accessor :demographics
32
+
33
+ attr_accessor :note
34
+
35
+ class EnumAttributeValidator
36
+ attr_reader :datatype
37
+ attr_reader :allowable_values
38
+
39
+ def initialize(datatype, allowable_values)
40
+ @allowable_values = allowable_values.map do |value|
41
+ case datatype.to_s
42
+ when /Integer/i
43
+ value.to_i
44
+ when /Float/i
45
+ value.to_f
46
+ else
47
+ value
48
+ end
49
+ end
50
+ end
51
+
52
+ def valid?(value)
53
+ !value || allowable_values.include?(value)
54
+ end
55
+ end
56
+
57
+ # Attribute mapping from ruby-style variable name to JSON key.
58
+ def self.attribute_map
59
+ {
60
+ :'success' => :'success',
61
+ :'account_id' => :'accountId',
62
+ :'platform' => :'platform',
63
+ :'metric' => :'metric',
64
+ :'timeframe' => :'timeframe',
65
+ :'demographics' => :'demographics',
66
+ :'note' => :'note'
67
+ }
68
+ end
69
+
70
+ # Returns attribute mapping this model knows about
71
+ def self.acceptable_attribute_map
72
+ attribute_map
73
+ end
74
+
75
+ # Returns all the JSON keys this model knows about
76
+ def self.acceptable_attributes
77
+ acceptable_attribute_map.values
78
+ end
79
+
80
+ # Attribute type mapping.
81
+ def self.openapi_types
82
+ {
83
+ :'success' => :'Boolean',
84
+ :'account_id' => :'String',
85
+ :'platform' => :'String',
86
+ :'metric' => :'String',
87
+ :'timeframe' => :'String',
88
+ :'demographics' => :'Hash<String, Array<InstagramDemographicsResponseDemographicsValueInner>>',
89
+ :'note' => :'String'
90
+ }
91
+ end
92
+
93
+ # List of attributes with nullable: true
94
+ def self.openapi_nullable
95
+ Set.new([
96
+ ])
97
+ end
98
+
99
+ # Initializes the object
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ def initialize(attributes = {})
102
+ if (!attributes.is_a?(Hash))
103
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::InstagramDemographicsResponse` initialize method"
104
+ end
105
+
106
+ # check to see if the attribute exists and convert string to symbol for hash key
107
+ acceptable_attribute_map = self.class.acceptable_attribute_map
108
+ attributes = attributes.each_with_object({}) { |(k, v), h|
109
+ if (!acceptable_attribute_map.key?(k.to_sym))
110
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::InstagramDemographicsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
111
+ end
112
+ h[k.to_sym] = v
113
+ }
114
+
115
+ if attributes.key?(:'success')
116
+ self.success = attributes[:'success']
117
+ end
118
+
119
+ if attributes.key?(:'account_id')
120
+ self.account_id = attributes[:'account_id']
121
+ end
122
+
123
+ if attributes.key?(:'platform')
124
+ self.platform = attributes[:'platform']
125
+ end
126
+
127
+ if attributes.key?(:'metric')
128
+ self.metric = attributes[:'metric']
129
+ end
130
+
131
+ if attributes.key?(:'timeframe')
132
+ self.timeframe = attributes[:'timeframe']
133
+ end
134
+
135
+ if attributes.key?(:'demographics')
136
+ if (value = attributes[:'demographics']).is_a?(Hash)
137
+ self.demographics = value
138
+ end
139
+ end
140
+
141
+ if attributes.key?(:'note')
142
+ self.note = attributes[:'note']
143
+ end
144
+ end
145
+
146
+ # Show invalid properties with the reasons. Usually used together with valid?
147
+ # @return Array for valid properties with the reasons
148
+ def list_invalid_properties
149
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
150
+ invalid_properties = Array.new
151
+ invalid_properties
152
+ end
153
+
154
+ # Check to see if the all the properties in the model are valid
155
+ # @return true if the model is valid
156
+ def valid?
157
+ warn '[DEPRECATED] the `valid?` method is obsolete'
158
+ metric_validator = EnumAttributeValidator.new('String', ["follower_demographics", "engaged_audience_demographics"])
159
+ return false unless metric_validator.valid?(@metric)
160
+ timeframe_validator = EnumAttributeValidator.new('String', ["this_week", "this_month"])
161
+ return false unless timeframe_validator.valid?(@timeframe)
162
+ true
163
+ end
164
+
165
+ # Custom attribute writer method checking allowed values (enum).
166
+ # @param [Object] metric Object to be assigned
167
+ def metric=(metric)
168
+ validator = EnumAttributeValidator.new('String', ["follower_demographics", "engaged_audience_demographics"])
169
+ unless validator.valid?(metric)
170
+ fail ArgumentError, "invalid value for \"metric\", must be one of #{validator.allowable_values}."
171
+ end
172
+ @metric = metric
173
+ end
174
+
175
+ # Custom attribute writer method checking allowed values (enum).
176
+ # @param [Object] timeframe Object to be assigned
177
+ def timeframe=(timeframe)
178
+ validator = EnumAttributeValidator.new('String', ["this_week", "this_month"])
179
+ unless validator.valid?(timeframe)
180
+ fail ArgumentError, "invalid value for \"timeframe\", must be one of #{validator.allowable_values}."
181
+ end
182
+ @timeframe = timeframe
183
+ end
184
+
185
+ # Checks equality by comparing each attribute.
186
+ # @param [Object] Object to be compared
187
+ def ==(o)
188
+ return true if self.equal?(o)
189
+ self.class == o.class &&
190
+ success == o.success &&
191
+ account_id == o.account_id &&
192
+ platform == o.platform &&
193
+ metric == o.metric &&
194
+ timeframe == o.timeframe &&
195
+ demographics == o.demographics &&
196
+ note == o.note
197
+ end
198
+
199
+ # @see the `==` method
200
+ # @param [Object] Object to be compared
201
+ def eql?(o)
202
+ self == o
203
+ end
204
+
205
+ # Calculates hash code according to all attributes.
206
+ # @return [Integer] Hash code
207
+ def hash
208
+ [success, account_id, platform, metric, timeframe, demographics, note].hash
209
+ end
210
+
211
+ # Builds the object from hash
212
+ # @param [Hash] attributes Model attributes in the form of hash
213
+ # @return [Object] Returns the model itself
214
+ def self.build_from_hash(attributes)
215
+ return nil unless attributes.is_a?(Hash)
216
+ attributes = attributes.transform_keys(&:to_sym)
217
+ transformed_hash = {}
218
+ openapi_types.each_pair do |key, type|
219
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
220
+ transformed_hash["#{key}"] = nil
221
+ elsif type =~ /\AArray<(.*)>/i
222
+ # check to ensure the input is an array given that the attribute
223
+ # is documented as an array but the input is not
224
+ if attributes[attribute_map[key]].is_a?(Array)
225
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
226
+ end
227
+ elsif !attributes[attribute_map[key]].nil?
228
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
229
+ end
230
+ end
231
+ new(transformed_hash)
232
+ end
233
+
234
+ # Returns the object in the form of hash
235
+ # @return [Hash] Returns the object in the form of hash
236
+ def to_hash
237
+ hash = {}
238
+ self.class.attribute_map.each_pair do |attr, param|
239
+ value = self.send(attr)
240
+ if value.nil?
241
+ is_nullable = self.class.openapi_nullable.include?(attr)
242
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
243
+ end
244
+
245
+ hash[param] = _to_hash(value)
246
+ end
247
+ hash
248
+ end
249
+
250
+ end
251
+
252
+ end
@@ -0,0 +1,158 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class InstagramDemographicsResponseDemographicsValueInner < ApiModelBase
18
+ # The dimension value (e.g., \"25-34\", \"US\", \"M\")
19
+ attr_accessor :dimension
20
+
21
+ # Count of accounts in this dimension
22
+ attr_accessor :value
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'dimension' => :'dimension',
28
+ :'value' => :'value'
29
+ }
30
+ end
31
+
32
+ # Returns attribute mapping this model knows about
33
+ def self.acceptable_attribute_map
34
+ attribute_map
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ acceptable_attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'dimension' => :'String',
46
+ :'value' => :'Float'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::InstagramDemographicsResponseDemographicsValueInner` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ acceptable_attribute_map = self.class.acceptable_attribute_map
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!acceptable_attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::InstagramDemographicsResponseDemographicsValueInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'dimension')
73
+ self.dimension = attributes[:'dimension']
74
+ end
75
+
76
+ if attributes.key?(:'value')
77
+ self.value = attributes[:'value']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ warn '[DEPRECATED] the `valid?` method is obsolete'
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ dimension == o.dimension &&
102
+ value == o.value
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [dimension, value].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
123
+ transformed_hash = {}
124
+ openapi_types.each_pair do |key, type|
125
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = nil
127
+ elsif type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[attribute_map[key]].is_a?(Array)
131
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
132
+ end
133
+ elsif !attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
135
+ end
136
+ end
137
+ new(transformed_hash)
138
+ end
139
+
140
+ # Returns the object in the form of hash
141
+ # @return [Hash] Returns the object in the form of hash
142
+ def to_hash
143
+ hash = {}
144
+ self.class.attribute_map.each_pair do |attr, param|
145
+ value = self.send(attr)
146
+ if value.nil?
147
+ is_nullable = self.class.openapi_nullable.include?(attr)
148
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
149
+ end
150
+
151
+ hash[param] = _to_hash(value)
152
+ end
153
+ hash
154
+ end
155
+
156
+ end
157
+
158
+ end
@@ -52,7 +52,7 @@ module Late
52
52
  # Optional for video posts. Timestamp in milliseconds to select which frame to use as thumbnail (defaults to 1000ms/1 second). Ignored when videoCoverImageUrl is provided.
53
53
  attr_accessor :video_cover_timestamp_ms
54
54
 
55
- # Optional for video posts. URL of a custom thumbnail image (JPG, PNG, or WebP, max 20MB). The image is prepended as a 1-second still frame to the video and used as the cover. Overrides videoCoverTimestampMs when provided.
55
+ # Optional for video posts. URL of a custom thumbnail image (JPG, PNG, or WebP, max 20MB). The image is stitched as a single frame at the start of the video and used as the cover. Overrides videoCoverTimestampMs when provided.
56
56
  attr_accessor :video_cover_image_url
57
57
 
58
58
  # Optional for photo carousels. Index of image to use as cover, 0-based (defaults to 0/first image).
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Late
14
- VERSION = '0.0.64'
14
+ VERSION = '0.0.66'
15
15
  end
data/lib/late-sdk.rb CHANGED
@@ -192,6 +192,7 @@ require 'late-sdk/models/get_inbox_post_comments200_response_comments_inner'
192
192
  require 'late-sdk/models/get_inbox_post_comments200_response_comments_inner_from'
193
193
  require 'late-sdk/models/get_inbox_post_comments200_response_meta'
194
194
  require 'late-sdk/models/get_inbox_post_comments200_response_pagination'
195
+ require 'late-sdk/models/get_instagram_account_insights404_response'
195
196
  require 'late-sdk/models/get_linked_in_aggregate_analytics200_response'
196
197
  require 'late-sdk/models/get_linked_in_aggregate_analytics400_response'
197
198
  require 'late-sdk/models/get_linked_in_aggregate_analytics402_response'
@@ -293,6 +294,13 @@ require 'late-sdk/models/initiate_telegram_connect200_response_account'
293
294
  require 'late-sdk/models/initiate_telegram_connect_request'
294
295
  require 'late-sdk/models/inline_object'
295
296
  require 'late-sdk/models/inline_object1'
297
+ require 'late-sdk/models/instagram_account_insights_response'
298
+ require 'late-sdk/models/instagram_account_insights_response_date_range'
299
+ require 'late-sdk/models/instagram_account_insights_response_metrics_value'
300
+ require 'late-sdk/models/instagram_account_insights_response_metrics_value_breakdowns_inner'
301
+ require 'late-sdk/models/instagram_account_insights_response_metrics_value_values_inner'
302
+ require 'late-sdk/models/instagram_demographics_response'
303
+ require 'late-sdk/models/instagram_demographics_response_demographics_value_inner'
296
304
  require 'late-sdk/models/instagram_platform_data'
297
305
  require 'late-sdk/models/instagram_platform_data_trial_params'
298
306
  require 'late-sdk/models/instagram_platform_data_user_tags_inner'