zernio-sdk 0.0.824 → 0.0.825
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.
- checksums.yaml +4 -4
- data/docs/InstagramPlatformData.md +9 -1
- data/lib/zernio-sdk/models/instagram_platform_data.rb +90 -4
- data/lib/zernio-sdk/version.rb +1 -1
- data/openapi.yaml +21 -0
- data/spec/models/instagram_platform_data_spec.rb +24 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e45c3b1ad4a7289f771b285143d405d2ea20352ba73ba89ab6ff71751cf5c5b2
|
|
4
|
+
data.tar.gz: 5bf1d0ecd41260e109ade8714f5bc7755f58fde55930766b7c6006372bc90f33
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 49e9ccd7eef5f092f680ef20c7228bebf950127442d1690f9d1b013b9a2e0c15566409477783a12e66d4be8ead24a11b4309f8fde16d5ff0548012b10444cf89
|
|
7
|
+
data.tar.gz: 5050299eaae0d8283644c46a67aae97bd25d2d0539dfac7906303e3495fb52e105e918c82af988cb1a1ce77edd91189d92f6040fbe0088c0153dbcba4aadd7ff
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
| **instagram_thumbnail** | **String** | Custom cover image URL for Instagram Reels (JPG or PNG, publicly accessible). Overrides thumbOffset when provided. Also accepted as reelCover (alias). | [optional] |
|
|
18
18
|
| **reel_cover** | **String** | Alias for instagramThumbnail. If both are provided, instagramThumbnail takes priority. | [optional] |
|
|
19
19
|
| **is_ai_generated** | **Boolean** | When true, the post is labeled by Instagram as containing AI-generated media. Per Meta, this self-disclosure label is for AI-generated media, not AI-written captions. Applies to feed posts, Reels, Stories, and carousels. | [optional][default to false] |
|
|
20
|
+
| **is_paid_partnership** | **Boolean** | When true, Instagram shows the \"Paid partnership\" label on the post. Applies to feed posts, Reels, and carousels; not supported on Stories (400). Requires an Instagram account connected via Facebook Login; classic Instagram Login accounts get a 400 (instagram_paid_partnership_requires_facebook_login). Implied when brandedContentSponsors is set. | [optional][default to false] |
|
|
21
|
+
| **branded_content_sponsors** | **Array<String>** | Up to 2 brands to tag as sponsors, each an Instagram username (leading @ optional) or a numeric Instagram user ID. Usernames are resolved at publish time via the Business Discovery API on the publishing account; a sponsor that cannot be resolved (private, personal, or nonexistent account) fails the post with a user error naming it. Sponsors must be professional (Business or Creator) accounts. A brand that has pre-approved the creator shows as \"Paid partnership with @brand\" immediately; otherwise the plain label shows and the brand receives an approval request. Sets isPaidPartnership. Same login and content-type rules as isPaidPartnership. | [optional] |
|
|
22
|
+
| **comments_enabled** | **Boolean** | When false, comments are turned off on the post right after it is published (Meta exposes this as comment_enabled on the media object). Applies to feed posts, Reels, and carousels; ignored for Stories, which have no comments. Works with both Instagram connection methods. Best-effort: if the toggle fails after a successful publish, the post still succeeds and stays live with comments on. | [optional][default to true] |
|
|
23
|
+
| **location_id** | **String** | Tags the post with a location. The ID of a Facebook Page that has location data (digits only); it is sent to Instagram as location_id. Applies to feed posts, Reels, and the carousel as a whole; Stories and individual carousel slides are unsupported (a Story with locationId is rejected with a 400). A Page without location data or that does not exist fails the post with a user error at publish time. | [optional] |
|
|
20
24
|
|
|
21
25
|
## Example
|
|
22
26
|
|
|
@@ -36,7 +40,11 @@ instance = Zernio::InstagramPlatformData.new(
|
|
|
36
40
|
thumb_offset: 5000,
|
|
37
41
|
instagram_thumbnail: null,
|
|
38
42
|
reel_cover: null,
|
|
39
|
-
is_ai_generated: null
|
|
43
|
+
is_ai_generated: null,
|
|
44
|
+
is_paid_partnership: true,
|
|
45
|
+
branded_content_sponsors: [nike, 17841400000000000],
|
|
46
|
+
comments_enabled: false,
|
|
47
|
+
location_id: 105890561436614
|
|
40
48
|
)
|
|
41
49
|
```
|
|
42
50
|
|
|
@@ -53,6 +53,18 @@ module Zernio
|
|
|
53
53
|
# When true, the post is labeled by Instagram as containing AI-generated media. Per Meta, this self-disclosure label is for AI-generated media, not AI-written captions. Applies to feed posts, Reels, Stories, and carousels.
|
|
54
54
|
attr_accessor :is_ai_generated
|
|
55
55
|
|
|
56
|
+
# When true, Instagram shows the \"Paid partnership\" label on the post. Applies to feed posts, Reels, and carousels; not supported on Stories (400). Requires an Instagram account connected via Facebook Login; classic Instagram Login accounts get a 400 (instagram_paid_partnership_requires_facebook_login). Implied when brandedContentSponsors is set.
|
|
57
|
+
attr_accessor :is_paid_partnership
|
|
58
|
+
|
|
59
|
+
# Up to 2 brands to tag as sponsors, each an Instagram username (leading @ optional) or a numeric Instagram user ID. Usernames are resolved at publish time via the Business Discovery API on the publishing account; a sponsor that cannot be resolved (private, personal, or nonexistent account) fails the post with a user error naming it. Sponsors must be professional (Business or Creator) accounts. A brand that has pre-approved the creator shows as \"Paid partnership with @brand\" immediately; otherwise the plain label shows and the brand receives an approval request. Sets isPaidPartnership. Same login and content-type rules as isPaidPartnership.
|
|
60
|
+
attr_accessor :branded_content_sponsors
|
|
61
|
+
|
|
62
|
+
# When false, comments are turned off on the post right after it is published (Meta exposes this as comment_enabled on the media object). Applies to feed posts, Reels, and carousels; ignored for Stories, which have no comments. Works with both Instagram connection methods. Best-effort: if the toggle fails after a successful publish, the post still succeeds and stays live with comments on.
|
|
63
|
+
attr_accessor :comments_enabled
|
|
64
|
+
|
|
65
|
+
# Tags the post with a location. The ID of a Facebook Page that has location data (digits only); it is sent to Instagram as location_id. Applies to feed posts, Reels, and the carousel as a whole; Stories and individual carousel slides are unsupported (a Story with locationId is rejected with a 400). A Page without location data or that does not exist fails the post with a user error at publish time.
|
|
66
|
+
attr_accessor :location_id
|
|
67
|
+
|
|
56
68
|
class EnumAttributeValidator
|
|
57
69
|
attr_reader :datatype
|
|
58
70
|
attr_reader :allowable_values
|
|
@@ -90,7 +102,11 @@ module Zernio
|
|
|
90
102
|
:'thumb_offset' => :'thumbOffset',
|
|
91
103
|
:'instagram_thumbnail' => :'instagramThumbnail',
|
|
92
104
|
:'reel_cover' => :'reelCover',
|
|
93
|
-
:'is_ai_generated' => :'isAiGenerated'
|
|
105
|
+
:'is_ai_generated' => :'isAiGenerated',
|
|
106
|
+
:'is_paid_partnership' => :'isPaidPartnership',
|
|
107
|
+
:'branded_content_sponsors' => :'brandedContentSponsors',
|
|
108
|
+
:'comments_enabled' => :'commentsEnabled',
|
|
109
|
+
:'location_id' => :'locationId'
|
|
94
110
|
}
|
|
95
111
|
end
|
|
96
112
|
|
|
@@ -119,7 +135,11 @@ module Zernio
|
|
|
119
135
|
:'thumb_offset' => :'Integer',
|
|
120
136
|
:'instagram_thumbnail' => :'String',
|
|
121
137
|
:'reel_cover' => :'String',
|
|
122
|
-
:'is_ai_generated' => :'Boolean'
|
|
138
|
+
:'is_ai_generated' => :'Boolean',
|
|
139
|
+
:'is_paid_partnership' => :'Boolean',
|
|
140
|
+
:'branded_content_sponsors' => :'Array<String>',
|
|
141
|
+
:'comments_enabled' => :'Boolean',
|
|
142
|
+
:'location_id' => :'String'
|
|
123
143
|
}
|
|
124
144
|
end
|
|
125
145
|
|
|
@@ -206,6 +226,28 @@ module Zernio
|
|
|
206
226
|
else
|
|
207
227
|
self.is_ai_generated = false
|
|
208
228
|
end
|
|
229
|
+
|
|
230
|
+
if attributes.key?(:'is_paid_partnership')
|
|
231
|
+
self.is_paid_partnership = attributes[:'is_paid_partnership']
|
|
232
|
+
else
|
|
233
|
+
self.is_paid_partnership = false
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
if attributes.key?(:'branded_content_sponsors')
|
|
237
|
+
if (value = attributes[:'branded_content_sponsors']).is_a?(Array)
|
|
238
|
+
self.branded_content_sponsors = value
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
if attributes.key?(:'comments_enabled')
|
|
243
|
+
self.comments_enabled = attributes[:'comments_enabled']
|
|
244
|
+
else
|
|
245
|
+
self.comments_enabled = true
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
if attributes.key?(:'location_id')
|
|
249
|
+
self.location_id = attributes[:'location_id']
|
|
250
|
+
end
|
|
209
251
|
end
|
|
210
252
|
|
|
211
253
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -217,6 +259,15 @@ module Zernio
|
|
|
217
259
|
invalid_properties.push('invalid value for "thumb_offset", must be greater than or equal to 0.')
|
|
218
260
|
end
|
|
219
261
|
|
|
262
|
+
if !@branded_content_sponsors.nil? && @branded_content_sponsors.length > 2
|
|
263
|
+
invalid_properties.push('invalid value for "branded_content_sponsors", number of items must be less than or equal to 2.')
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
pattern = Regexp.new(/^[0-9]+$/)
|
|
267
|
+
if !@location_id.nil? && @location_id !~ pattern
|
|
268
|
+
invalid_properties.push("invalid value for \"location_id\", must conform to the pattern #{pattern}.")
|
|
269
|
+
end
|
|
270
|
+
|
|
220
271
|
invalid_properties
|
|
221
272
|
end
|
|
222
273
|
|
|
@@ -227,6 +278,8 @@ module Zernio
|
|
|
227
278
|
content_type_validator = EnumAttributeValidator.new('String', ["story"])
|
|
228
279
|
return false unless content_type_validator.valid?(@content_type)
|
|
229
280
|
return false if !@thumb_offset.nil? && @thumb_offset < 0
|
|
281
|
+
return false if !@branded_content_sponsors.nil? && @branded_content_sponsors.length > 2
|
|
282
|
+
return false if !@location_id.nil? && @location_id !~ Regexp.new(/^[0-9]+$/)
|
|
230
283
|
true
|
|
231
284
|
end
|
|
232
285
|
|
|
@@ -254,6 +307,35 @@ module Zernio
|
|
|
254
307
|
@thumb_offset = thumb_offset
|
|
255
308
|
end
|
|
256
309
|
|
|
310
|
+
# Custom attribute writer method with validation
|
|
311
|
+
# @param [Object] branded_content_sponsors Value to be assigned
|
|
312
|
+
def branded_content_sponsors=(branded_content_sponsors)
|
|
313
|
+
if branded_content_sponsors.nil?
|
|
314
|
+
fail ArgumentError, 'branded_content_sponsors cannot be nil'
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
if branded_content_sponsors.length > 2
|
|
318
|
+
fail ArgumentError, 'invalid value for "branded_content_sponsors", number of items must be less than or equal to 2.'
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
@branded_content_sponsors = branded_content_sponsors
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Custom attribute writer method with validation
|
|
325
|
+
# @param [Object] location_id Value to be assigned
|
|
326
|
+
def location_id=(location_id)
|
|
327
|
+
if location_id.nil?
|
|
328
|
+
fail ArgumentError, 'location_id cannot be nil'
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
pattern = Regexp.new(/^[0-9]+$/)
|
|
332
|
+
if location_id !~ pattern
|
|
333
|
+
fail ArgumentError, "invalid value for \"location_id\", must conform to the pattern #{pattern}."
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
@location_id = location_id
|
|
337
|
+
end
|
|
338
|
+
|
|
257
339
|
# Checks equality by comparing each attribute.
|
|
258
340
|
# @param [Object] Object to be compared
|
|
259
341
|
def ==(o)
|
|
@@ -271,7 +353,11 @@ module Zernio
|
|
|
271
353
|
thumb_offset == o.thumb_offset &&
|
|
272
354
|
instagram_thumbnail == o.instagram_thumbnail &&
|
|
273
355
|
reel_cover == o.reel_cover &&
|
|
274
|
-
is_ai_generated == o.is_ai_generated
|
|
356
|
+
is_ai_generated == o.is_ai_generated &&
|
|
357
|
+
is_paid_partnership == o.is_paid_partnership &&
|
|
358
|
+
branded_content_sponsors == o.branded_content_sponsors &&
|
|
359
|
+
comments_enabled == o.comments_enabled &&
|
|
360
|
+
location_id == o.location_id
|
|
275
361
|
end
|
|
276
362
|
|
|
277
363
|
# @see the `==` method
|
|
@@ -283,7 +369,7 @@ module Zernio
|
|
|
283
369
|
# Calculates hash code according to all attributes.
|
|
284
370
|
# @return [Integer] Hash code
|
|
285
371
|
def hash
|
|
286
|
-
[content_type, share_to_feed, collaborators, first_comment, trial_params, user_tags, audio_name, audio_configuration, mute_audio, thumb_offset, instagram_thumbnail, reel_cover, is_ai_generated].hash
|
|
372
|
+
[content_type, share_to_feed, collaborators, first_comment, trial_params, user_tags, audio_name, audio_configuration, mute_audio, thumb_offset, instagram_thumbnail, reel_cover, is_ai_generated, is_paid_partnership, branded_content_sponsors, comments_enabled, location_id].hash
|
|
287
373
|
end
|
|
288
374
|
|
|
289
375
|
# Builds the object from hash
|
data/lib/zernio-sdk/version.rb
CHANGED
data/openapi.yaml
CHANGED
|
@@ -5855,6 +5855,27 @@ components:
|
|
|
5855
5855
|
type: boolean
|
|
5856
5856
|
default: false
|
|
5857
5857
|
description: When true, the post is labeled by Instagram as containing AI-generated media. Per Meta, this self-disclosure label is for AI-generated media, not AI-written captions. Applies to feed posts, Reels, Stories, and carousels.
|
|
5858
|
+
isPaidPartnership:
|
|
5859
|
+
type: boolean
|
|
5860
|
+
default: false
|
|
5861
|
+
description: 'When true, Instagram shows the "Paid partnership" label on the post. Applies to feed posts, Reels, and carousels; not supported on Stories (400). Requires an Instagram account connected via Facebook Login; classic Instagram Login accounts get a 400 (instagram_paid_partnership_requires_facebook_login). Implied when brandedContentSponsors is set.'
|
|
5862
|
+
example: true
|
|
5863
|
+
brandedContentSponsors:
|
|
5864
|
+
type: array
|
|
5865
|
+
maxItems: 2
|
|
5866
|
+
items: { type: string }
|
|
5867
|
+
description: 'Up to 2 brands to tag as sponsors, each an Instagram username (leading @ optional) or a numeric Instagram user ID. Usernames are resolved at publish time via the Business Discovery API on the publishing account; a sponsor that cannot be resolved (private, personal, or nonexistent account) fails the post with a user error naming it. Sponsors must be professional (Business or Creator) accounts. A brand that has pre-approved the creator shows as "Paid partnership with @brand" immediately; otherwise the plain label shows and the brand receives an approval request. Sets isPaidPartnership. Same login and content-type rules as isPaidPartnership.'
|
|
5868
|
+
example: ['nike', '17841400000000000']
|
|
5869
|
+
commentsEnabled:
|
|
5870
|
+
type: boolean
|
|
5871
|
+
default: true
|
|
5872
|
+
description: 'When false, comments are turned off on the post right after it is published (Meta exposes this as comment_enabled on the media object). Applies to feed posts, Reels, and carousels; ignored for Stories, which have no comments. Works with both Instagram connection methods. Best-effort: if the toggle fails after a successful publish, the post still succeeds and stays live with comments on.'
|
|
5873
|
+
example: false
|
|
5874
|
+
locationId:
|
|
5875
|
+
type: string
|
|
5876
|
+
pattern: '^[0-9]+$'
|
|
5877
|
+
description: 'Tags the post with a location. The ID of a Facebook Page that has location data (digits only); it is sent to Instagram as location_id. Applies to feed posts, Reels, and the carousel as a whole; Stories and individual carousel slides are unsupported (a Story with locationId is rejected with a 400). A Page without location data or that does not exist fails the post with a user error at publish time.'
|
|
5878
|
+
example: '105890561436614'
|
|
5858
5879
|
description: Feed aspect ratio 0.5625-1.91, carousels up to 10 items, stories require media (no captions). User tag coordinates 0.0-1.0 from top-left. Images over 8 MB and videos over platform limits are auto-compressed.
|
|
5859
5880
|
|
|
5860
5881
|
InstagramAudioAsset:
|
|
@@ -109,4 +109,28 @@ describe Zernio::InstagramPlatformData do
|
|
|
109
109
|
end
|
|
110
110
|
end
|
|
111
111
|
|
|
112
|
+
describe 'test attribute "is_paid_partnership"' do
|
|
113
|
+
it 'should work' do
|
|
114
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
describe 'test attribute "branded_content_sponsors"' do
|
|
119
|
+
it 'should work' do
|
|
120
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
describe 'test attribute "comments_enabled"' do
|
|
125
|
+
it 'should work' do
|
|
126
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
describe 'test attribute "location_id"' do
|
|
131
|
+
it 'should work' do
|
|
132
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
112
136
|
end
|