post-for-me 0.1.0.pre.alpha.7 → 0.1.0.pre.alpha.9
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/CHANGELOG.md +38 -0
- data/README.md +1 -1
- data/lib/post_for_me/errors.rb +25 -11
- data/lib/post_for_me/file_part.rb +10 -7
- data/lib/post_for_me/internal/transport/base_client.rb +11 -7
- data/lib/post_for_me/internal/transport/pooled_net_requester.rb +7 -10
- data/lib/post_for_me/internal/type/base_page.rb +1 -1
- data/lib/post_for_me/internal/type/file_input.rb +7 -4
- data/lib/post_for_me/internal/util.rb +3 -2
- data/lib/post_for_me/models/bluesky_configuration_dto.rb +118 -3
- data/lib/post_for_me/models/create_social_post.rb +221 -2
- data/lib/post_for_me/models/facebook_configuration_dto.rb +137 -4
- data/lib/post_for_me/models/instagram_configuration_dto.rb +135 -4
- data/lib/post_for_me/models/linkedin_configuration_dto.rb +118 -3
- data/lib/post_for_me/models/pinterest_configuration_dto.rb +118 -3
- data/lib/post_for_me/models/social_account_create_auth_url_params.rb +43 -1
- data/lib/post_for_me/models/social_post.rb +221 -2
- data/lib/post_for_me/models/threads_configuration_dto.rb +118 -3
- data/lib/post_for_me/models/tiktok_configuration.rb +127 -4
- data/lib/post_for_me/models/twitter_configuration_dto.rb +211 -4
- data/lib/post_for_me/models/youtube_configuration_dto.rb +118 -3
- data/lib/post_for_me/version.rb +1 -1
- data/rbi/post_for_me/errors.rbi +29 -2
- data/rbi/post_for_me/file_part.rbi +1 -1
- data/rbi/post_for_me/internal/transport/base_client.rbi +4 -5
- data/rbi/post_for_me/internal/type/base_page.rbi +1 -1
- data/rbi/post_for_me/internal/util.rbi +1 -1
- data/rbi/post_for_me/models/bluesky_configuration_dto.rbi +243 -3
- data/rbi/post_for_me/models/create_social_post.rbi +424 -0
- data/rbi/post_for_me/models/facebook_configuration_dto.rbi +258 -3
- data/rbi/post_for_me/models/instagram_configuration_dto.rbi +267 -6
- data/rbi/post_for_me/models/linkedin_configuration_dto.rbi +245 -3
- data/rbi/post_for_me/models/pinterest_configuration_dto.rbi +246 -3
- data/rbi/post_for_me/models/social_account_create_auth_url_params.rbi +104 -0
- data/rbi/post_for_me/models/social_post.rbi +414 -0
- data/rbi/post_for_me/models/threads_configuration_dto.rbi +240 -3
- data/rbi/post_for_me/models/tiktok_configuration.rbi +237 -3
- data/rbi/post_for_me/models/twitter_configuration_dto.rbi +452 -4
- data/rbi/post_for_me/models/youtube_configuration_dto.rbi +240 -3
- data/sig/post_for_me/errors.rbs +7 -0
- data/sig/post_for_me/file_part.rbs +1 -1
- data/sig/post_for_me/models/bluesky_configuration_dto.rbs +109 -4
- data/sig/post_for_me/models/create_social_post.rbs +180 -1
- data/sig/post_for_me/models/facebook_configuration_dto.rbs +109 -4
- data/sig/post_for_me/models/instagram_configuration_dto.rbs +112 -7
- data/sig/post_for_me/models/linkedin_configuration_dto.rbs +109 -4
- data/sig/post_for_me/models/pinterest_configuration_dto.rbs +99 -4
- data/sig/post_for_me/models/social_account_create_auth_url_params.rbs +37 -0
- data/sig/post_for_me/models/social_post.rbs +180 -1
- data/sig/post_for_me/models/threads_configuration_dto.rbs +99 -4
- data/sig/post_for_me/models/tiktok_configuration.rbs +104 -4
- data/sig/post_for_me/models/twitter_configuration_dto.rbs +196 -4
- data/sig/post_for_me/models/youtube_configuration_dto.rbs +107 -4
- metadata +2 -2
|
@@ -191,6 +191,10 @@ module PostForMe
|
|
|
191
191
|
sig { returns(T.nilable(T::Boolean)) }
|
|
192
192
|
attr_accessor :allow_stitch
|
|
193
193
|
|
|
194
|
+
# Will automatically add music to photo posts on TikTok
|
|
195
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
196
|
+
attr_accessor :auto_add_music
|
|
197
|
+
|
|
194
198
|
# Pinterest board IDs
|
|
195
199
|
sig { returns(T.nilable(T::Array[String])) }
|
|
196
200
|
attr_accessor :board_ids
|
|
@@ -199,6 +203,18 @@ module PostForMe
|
|
|
199
203
|
sig { returns(T.nilable(T.anything)) }
|
|
200
204
|
attr_accessor :caption
|
|
201
205
|
|
|
206
|
+
# List of page ids or users to invite as collaborators for a Video Reel (Instagram
|
|
207
|
+
# and Facebook)
|
|
208
|
+
sig { returns(T.nilable(T::Array[T::Array[T.anything]])) }
|
|
209
|
+
attr_accessor :collaborators
|
|
210
|
+
|
|
211
|
+
# Id of the twitter community to post to
|
|
212
|
+
sig { returns(T.nilable(String)) }
|
|
213
|
+
attr_reader :community_id
|
|
214
|
+
|
|
215
|
+
sig { params(community_id: String).void }
|
|
216
|
+
attr_writer :community_id
|
|
217
|
+
|
|
202
218
|
# Disclose branded content on TikTok
|
|
203
219
|
sig { returns(T.nilable(T::Boolean)) }
|
|
204
220
|
attr_accessor :disclose_branded_content
|
|
@@ -220,6 +236,11 @@ module PostForMe
|
|
|
220
236
|
sig { returns(T.nilable(String)) }
|
|
221
237
|
attr_accessor :link
|
|
222
238
|
|
|
239
|
+
# Page id with a location that you want to tag the image or video with (Instagram
|
|
240
|
+
# and Facebook)
|
|
241
|
+
sig { returns(T.nilable(String)) }
|
|
242
|
+
attr_accessor :location
|
|
243
|
+
|
|
223
244
|
# Overrides the `media` from the post
|
|
224
245
|
sig { returns(T.nilable(T::Array[String])) }
|
|
225
246
|
attr_accessor :media
|
|
@@ -234,10 +255,49 @@ module PostForMe
|
|
|
234
255
|
end
|
|
235
256
|
attr_accessor :placement
|
|
236
257
|
|
|
258
|
+
# Poll options for the twitter
|
|
259
|
+
sig do
|
|
260
|
+
returns(
|
|
261
|
+
T.nilable(
|
|
262
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::Poll
|
|
263
|
+
)
|
|
264
|
+
)
|
|
265
|
+
end
|
|
266
|
+
attr_reader :poll
|
|
267
|
+
|
|
268
|
+
sig do
|
|
269
|
+
params(
|
|
270
|
+
poll:
|
|
271
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::Poll::OrHash
|
|
272
|
+
).void
|
|
273
|
+
end
|
|
274
|
+
attr_writer :poll
|
|
275
|
+
|
|
237
276
|
# Sets the privacy status for TikTok (private, public)
|
|
238
277
|
sig { returns(T.nilable(String)) }
|
|
239
278
|
attr_accessor :privacy_status
|
|
240
279
|
|
|
280
|
+
# Id of the tweet you want to quote
|
|
281
|
+
sig { returns(T.nilable(String)) }
|
|
282
|
+
attr_reader :quote_tweet_id
|
|
283
|
+
|
|
284
|
+
sig { params(quote_tweet_id: String).void }
|
|
285
|
+
attr_writer :quote_tweet_id
|
|
286
|
+
|
|
287
|
+
# Who can reply to the tweet
|
|
288
|
+
sig do
|
|
289
|
+
returns(
|
|
290
|
+
T.nilable(
|
|
291
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::ReplySettings::OrSymbol
|
|
292
|
+
)
|
|
293
|
+
)
|
|
294
|
+
end
|
|
295
|
+
attr_accessor :reply_settings
|
|
296
|
+
|
|
297
|
+
# If false Instagram video posts will only be shown in the Reels tab
|
|
298
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
299
|
+
attr_accessor :share_to_feed
|
|
300
|
+
|
|
241
301
|
# Overrides the `title` from the post
|
|
242
302
|
sig { returns(T.nilable(String)) }
|
|
243
303
|
attr_accessor :title
|
|
@@ -248,19 +308,31 @@ module PostForMe
|
|
|
248
308
|
allow_comment: T.nilable(T::Boolean),
|
|
249
309
|
allow_duet: T.nilable(T::Boolean),
|
|
250
310
|
allow_stitch: T.nilable(T::Boolean),
|
|
311
|
+
auto_add_music: T.nilable(T::Boolean),
|
|
251
312
|
board_ids: T.nilable(T::Array[String]),
|
|
252
313
|
caption: T.nilable(T.anything),
|
|
314
|
+
collaborators: T.nilable(T::Array[T::Array[T.anything]]),
|
|
315
|
+
community_id: String,
|
|
253
316
|
disclose_branded_content: T.nilable(T::Boolean),
|
|
254
317
|
disclose_your_brand: T.nilable(T::Boolean),
|
|
255
318
|
is_ai_generated: T.nilable(T::Boolean),
|
|
256
319
|
is_draft: T.nilable(T::Boolean),
|
|
257
320
|
link: T.nilable(String),
|
|
321
|
+
location: T.nilable(String),
|
|
258
322
|
media: T.nilable(T::Array[String]),
|
|
259
323
|
placement:
|
|
260
324
|
T.nilable(
|
|
261
325
|
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::Placement::OrSymbol
|
|
262
326
|
),
|
|
327
|
+
poll:
|
|
328
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::Poll::OrHash,
|
|
263
329
|
privacy_status: T.nilable(String),
|
|
330
|
+
quote_tweet_id: String,
|
|
331
|
+
reply_settings:
|
|
332
|
+
T.nilable(
|
|
333
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::ReplySettings::OrSymbol
|
|
334
|
+
),
|
|
335
|
+
share_to_feed: T.nilable(T::Boolean),
|
|
264
336
|
title: T.nilable(String)
|
|
265
337
|
).returns(T.attached_class)
|
|
266
338
|
end
|
|
@@ -271,10 +343,17 @@ module PostForMe
|
|
|
271
343
|
allow_duet: nil,
|
|
272
344
|
# Allow stitch on TikTok
|
|
273
345
|
allow_stitch: nil,
|
|
346
|
+
# Will automatically add music to photo posts on TikTok
|
|
347
|
+
auto_add_music: nil,
|
|
274
348
|
# Pinterest board IDs
|
|
275
349
|
board_ids: nil,
|
|
276
350
|
# Overrides the `caption` from the post
|
|
277
351
|
caption: nil,
|
|
352
|
+
# List of page ids or users to invite as collaborators for a Video Reel (Instagram
|
|
353
|
+
# and Facebook)
|
|
354
|
+
collaborators: nil,
|
|
355
|
+
# Id of the twitter community to post to
|
|
356
|
+
community_id: nil,
|
|
278
357
|
# Disclose branded content on TikTok
|
|
279
358
|
disclose_branded_content: nil,
|
|
280
359
|
# Disclose your brand on TikTok
|
|
@@ -286,12 +365,23 @@ module PostForMe
|
|
|
286
365
|
is_draft: nil,
|
|
287
366
|
# Pinterest post link
|
|
288
367
|
link: nil,
|
|
368
|
+
# Page id with a location that you want to tag the image or video with (Instagram
|
|
369
|
+
# and Facebook)
|
|
370
|
+
location: nil,
|
|
289
371
|
# Overrides the `media` from the post
|
|
290
372
|
media: nil,
|
|
291
373
|
# Post placement for Facebook/Instagram/Threads
|
|
292
374
|
placement: nil,
|
|
375
|
+
# Poll options for the twitter
|
|
376
|
+
poll: nil,
|
|
293
377
|
# Sets the privacy status for TikTok (private, public)
|
|
294
378
|
privacy_status: nil,
|
|
379
|
+
# Id of the tweet you want to quote
|
|
380
|
+
quote_tweet_id: nil,
|
|
381
|
+
# Who can reply to the tweet
|
|
382
|
+
reply_settings: nil,
|
|
383
|
+
# If false Instagram video posts will only be shown in the Reels tab
|
|
384
|
+
share_to_feed: nil,
|
|
295
385
|
# Overrides the `title` from the post
|
|
296
386
|
title: nil
|
|
297
387
|
)
|
|
@@ -303,19 +393,31 @@ module PostForMe
|
|
|
303
393
|
allow_comment: T.nilable(T::Boolean),
|
|
304
394
|
allow_duet: T.nilable(T::Boolean),
|
|
305
395
|
allow_stitch: T.nilable(T::Boolean),
|
|
396
|
+
auto_add_music: T.nilable(T::Boolean),
|
|
306
397
|
board_ids: T.nilable(T::Array[String]),
|
|
307
398
|
caption: T.nilable(T.anything),
|
|
399
|
+
collaborators: T.nilable(T::Array[T::Array[T.anything]]),
|
|
400
|
+
community_id: String,
|
|
308
401
|
disclose_branded_content: T.nilable(T::Boolean),
|
|
309
402
|
disclose_your_brand: T.nilable(T::Boolean),
|
|
310
403
|
is_ai_generated: T.nilable(T::Boolean),
|
|
311
404
|
is_draft: T.nilable(T::Boolean),
|
|
312
405
|
link: T.nilable(String),
|
|
406
|
+
location: T.nilable(String),
|
|
313
407
|
media: T.nilable(T::Array[String]),
|
|
314
408
|
placement:
|
|
315
409
|
T.nilable(
|
|
316
410
|
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::Placement::OrSymbol
|
|
317
411
|
),
|
|
412
|
+
poll:
|
|
413
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::Poll,
|
|
318
414
|
privacy_status: T.nilable(String),
|
|
415
|
+
quote_tweet_id: String,
|
|
416
|
+
reply_settings:
|
|
417
|
+
T.nilable(
|
|
418
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::ReplySettings::OrSymbol
|
|
419
|
+
),
|
|
420
|
+
share_to_feed: T.nilable(T::Boolean),
|
|
319
421
|
title: T.nilable(String)
|
|
320
422
|
}
|
|
321
423
|
)
|
|
@@ -362,6 +464,164 @@ module PostForMe
|
|
|
362
464
|
def self.values
|
|
363
465
|
end
|
|
364
466
|
end
|
|
467
|
+
|
|
468
|
+
class Poll < PostForMe::Internal::Type::BaseModel
|
|
469
|
+
OrHash =
|
|
470
|
+
T.type_alias do
|
|
471
|
+
T.any(
|
|
472
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::Poll,
|
|
473
|
+
PostForMe::Internal::AnyHash
|
|
474
|
+
)
|
|
475
|
+
end
|
|
476
|
+
|
|
477
|
+
# Duration of the poll in minutes
|
|
478
|
+
sig { returns(Float) }
|
|
479
|
+
attr_accessor :duration_minutes
|
|
480
|
+
|
|
481
|
+
# The choices of the poll, requiring 2-4 options
|
|
482
|
+
sig { returns(T::Array[String]) }
|
|
483
|
+
attr_accessor :options
|
|
484
|
+
|
|
485
|
+
# Who can reply to the tweet
|
|
486
|
+
sig do
|
|
487
|
+
returns(
|
|
488
|
+
T.nilable(
|
|
489
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::Poll::ReplySettings::OrSymbol
|
|
490
|
+
)
|
|
491
|
+
)
|
|
492
|
+
end
|
|
493
|
+
attr_reader :reply_settings
|
|
494
|
+
|
|
495
|
+
sig do
|
|
496
|
+
params(
|
|
497
|
+
reply_settings:
|
|
498
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::Poll::ReplySettings::OrSymbol
|
|
499
|
+
).void
|
|
500
|
+
end
|
|
501
|
+
attr_writer :reply_settings
|
|
502
|
+
|
|
503
|
+
# Poll options for the twitter
|
|
504
|
+
sig do
|
|
505
|
+
params(
|
|
506
|
+
duration_minutes: Float,
|
|
507
|
+
options: T::Array[String],
|
|
508
|
+
reply_settings:
|
|
509
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::Poll::ReplySettings::OrSymbol
|
|
510
|
+
).returns(T.attached_class)
|
|
511
|
+
end
|
|
512
|
+
def self.new(
|
|
513
|
+
# Duration of the poll in minutes
|
|
514
|
+
duration_minutes:,
|
|
515
|
+
# The choices of the poll, requiring 2-4 options
|
|
516
|
+
options:,
|
|
517
|
+
# Who can reply to the tweet
|
|
518
|
+
reply_settings: nil
|
|
519
|
+
)
|
|
520
|
+
end
|
|
521
|
+
|
|
522
|
+
sig do
|
|
523
|
+
override.returns(
|
|
524
|
+
{
|
|
525
|
+
duration_minutes: Float,
|
|
526
|
+
options: T::Array[String],
|
|
527
|
+
reply_settings:
|
|
528
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::Poll::ReplySettings::OrSymbol
|
|
529
|
+
}
|
|
530
|
+
)
|
|
531
|
+
end
|
|
532
|
+
def to_hash
|
|
533
|
+
end
|
|
534
|
+
|
|
535
|
+
# Who can reply to the tweet
|
|
536
|
+
module ReplySettings
|
|
537
|
+
extend PostForMe::Internal::Type::Enum
|
|
538
|
+
|
|
539
|
+
TaggedSymbol =
|
|
540
|
+
T.type_alias do
|
|
541
|
+
T.all(
|
|
542
|
+
Symbol,
|
|
543
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::Poll::ReplySettings
|
|
544
|
+
)
|
|
545
|
+
end
|
|
546
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
547
|
+
|
|
548
|
+
FOLLOWING =
|
|
549
|
+
T.let(
|
|
550
|
+
:following,
|
|
551
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::Poll::ReplySettings::TaggedSymbol
|
|
552
|
+
)
|
|
553
|
+
MENTIONED_USERS =
|
|
554
|
+
T.let(
|
|
555
|
+
:mentionedUsers,
|
|
556
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::Poll::ReplySettings::TaggedSymbol
|
|
557
|
+
)
|
|
558
|
+
SUBSCRIBERS =
|
|
559
|
+
T.let(
|
|
560
|
+
:subscribers,
|
|
561
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::Poll::ReplySettings::TaggedSymbol
|
|
562
|
+
)
|
|
563
|
+
VERIFIED =
|
|
564
|
+
T.let(
|
|
565
|
+
:verified,
|
|
566
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::Poll::ReplySettings::TaggedSymbol
|
|
567
|
+
)
|
|
568
|
+
|
|
569
|
+
sig do
|
|
570
|
+
override.returns(
|
|
571
|
+
T::Array[
|
|
572
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::Poll::ReplySettings::TaggedSymbol
|
|
573
|
+
]
|
|
574
|
+
)
|
|
575
|
+
end
|
|
576
|
+
def self.values
|
|
577
|
+
end
|
|
578
|
+
end
|
|
579
|
+
end
|
|
580
|
+
|
|
581
|
+
# Who can reply to the tweet
|
|
582
|
+
module ReplySettings
|
|
583
|
+
extend PostForMe::Internal::Type::Enum
|
|
584
|
+
|
|
585
|
+
TaggedSymbol =
|
|
586
|
+
T.type_alias do
|
|
587
|
+
T.all(
|
|
588
|
+
Symbol,
|
|
589
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::ReplySettings
|
|
590
|
+
)
|
|
591
|
+
end
|
|
592
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
593
|
+
|
|
594
|
+
FOLLOWING =
|
|
595
|
+
T.let(
|
|
596
|
+
:following,
|
|
597
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::ReplySettings::TaggedSymbol
|
|
598
|
+
)
|
|
599
|
+
MENTIONED_USERS =
|
|
600
|
+
T.let(
|
|
601
|
+
:mentionedUsers,
|
|
602
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::ReplySettings::TaggedSymbol
|
|
603
|
+
)
|
|
604
|
+
SUBSCRIBERS =
|
|
605
|
+
T.let(
|
|
606
|
+
:subscribers,
|
|
607
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::ReplySettings::TaggedSymbol
|
|
608
|
+
)
|
|
609
|
+
VERIFIED =
|
|
610
|
+
T.let(
|
|
611
|
+
:verified,
|
|
612
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::ReplySettings::TaggedSymbol
|
|
613
|
+
)
|
|
614
|
+
|
|
615
|
+
sig do
|
|
616
|
+
override.returns(
|
|
617
|
+
T::Array[
|
|
618
|
+
PostForMe::CreateSocialPost::AccountConfiguration::Configuration::ReplySettings::TaggedSymbol
|
|
619
|
+
]
|
|
620
|
+
)
|
|
621
|
+
end
|
|
622
|
+
def self.values
|
|
623
|
+
end
|
|
624
|
+
end
|
|
365
625
|
end
|
|
366
626
|
end
|
|
367
627
|
|
|
@@ -378,6 +638,12 @@ module PostForMe
|
|
|
378
638
|
sig { returns(String) }
|
|
379
639
|
attr_accessor :url
|
|
380
640
|
|
|
641
|
+
# List of tags to attach to the media
|
|
642
|
+
sig do
|
|
643
|
+
returns(T.nilable(T::Array[PostForMe::CreateSocialPost::Media::Tag]))
|
|
644
|
+
end
|
|
645
|
+
attr_accessor :tags
|
|
646
|
+
|
|
381
647
|
# Timestamp in milliseconds of frame to use as thumbnail for the media
|
|
382
648
|
sig { returns(T.nilable(T.anything)) }
|
|
383
649
|
attr_accessor :thumbnail_timestamp_ms
|
|
@@ -389,6 +655,10 @@ module PostForMe
|
|
|
389
655
|
sig do
|
|
390
656
|
params(
|
|
391
657
|
url: String,
|
|
658
|
+
tags:
|
|
659
|
+
T.nilable(
|
|
660
|
+
T::Array[PostForMe::CreateSocialPost::Media::Tag::OrHash]
|
|
661
|
+
),
|
|
392
662
|
thumbnail_timestamp_ms: T.nilable(T.anything),
|
|
393
663
|
thumbnail_url: T.nilable(T.anything)
|
|
394
664
|
).returns(T.attached_class)
|
|
@@ -396,6 +666,8 @@ module PostForMe
|
|
|
396
666
|
def self.new(
|
|
397
667
|
# Public URL of the media
|
|
398
668
|
url:,
|
|
669
|
+
# List of tags to attach to the media
|
|
670
|
+
tags: nil,
|
|
399
671
|
# Timestamp in milliseconds of frame to use as thumbnail for the media
|
|
400
672
|
thumbnail_timestamp_ms: nil,
|
|
401
673
|
# Public URL of the thumbnail for the media
|
|
@@ -407,6 +679,8 @@ module PostForMe
|
|
|
407
679
|
override.returns(
|
|
408
680
|
{
|
|
409
681
|
url: String,
|
|
682
|
+
tags:
|
|
683
|
+
T.nilable(T::Array[PostForMe::CreateSocialPost::Media::Tag]),
|
|
410
684
|
thumbnail_timestamp_ms: T.nilable(T.anything),
|
|
411
685
|
thumbnail_url: T.nilable(T.anything)
|
|
412
686
|
}
|
|
@@ -414,6 +688,156 @@ module PostForMe
|
|
|
414
688
|
end
|
|
415
689
|
def to_hash
|
|
416
690
|
end
|
|
691
|
+
|
|
692
|
+
class Tag < PostForMe::Internal::Type::BaseModel
|
|
693
|
+
OrHash =
|
|
694
|
+
T.type_alias do
|
|
695
|
+
T.any(
|
|
696
|
+
PostForMe::CreateSocialPost::Media::Tag,
|
|
697
|
+
PostForMe::Internal::AnyHash
|
|
698
|
+
)
|
|
699
|
+
end
|
|
700
|
+
|
|
701
|
+
# Facebook User ID, Instagram Username or Instagram product id to tag
|
|
702
|
+
sig { returns(String) }
|
|
703
|
+
attr_accessor :id
|
|
704
|
+
|
|
705
|
+
# The platform for the tags
|
|
706
|
+
sig do
|
|
707
|
+
returns(PostForMe::CreateSocialPost::Media::Tag::Platform::OrSymbol)
|
|
708
|
+
end
|
|
709
|
+
attr_accessor :platform
|
|
710
|
+
|
|
711
|
+
# The type of tag, user to tag accounts, product to tag products (only supported
|
|
712
|
+
# for instagram)
|
|
713
|
+
sig do
|
|
714
|
+
returns(PostForMe::CreateSocialPost::Media::Tag::Type::OrSymbol)
|
|
715
|
+
end
|
|
716
|
+
attr_accessor :type
|
|
717
|
+
|
|
718
|
+
# Percentage distance from left edge of the image, Not required for videos or
|
|
719
|
+
# stories
|
|
720
|
+
sig { returns(T.nilable(Float)) }
|
|
721
|
+
attr_reader :x
|
|
722
|
+
|
|
723
|
+
sig { params(x: Float).void }
|
|
724
|
+
attr_writer :x
|
|
725
|
+
|
|
726
|
+
# Percentage distance from top edge of the image, Not required for videos or
|
|
727
|
+
# stories
|
|
728
|
+
sig { returns(T.nilable(Float)) }
|
|
729
|
+
attr_reader :y_
|
|
730
|
+
|
|
731
|
+
sig { params(y_: Float).void }
|
|
732
|
+
attr_writer :y_
|
|
733
|
+
|
|
734
|
+
sig do
|
|
735
|
+
params(
|
|
736
|
+
id: String,
|
|
737
|
+
platform:
|
|
738
|
+
PostForMe::CreateSocialPost::Media::Tag::Platform::OrSymbol,
|
|
739
|
+
type: PostForMe::CreateSocialPost::Media::Tag::Type::OrSymbol,
|
|
740
|
+
x: Float,
|
|
741
|
+
y_: Float
|
|
742
|
+
).returns(T.attached_class)
|
|
743
|
+
end
|
|
744
|
+
def self.new(
|
|
745
|
+
# Facebook User ID, Instagram Username or Instagram product id to tag
|
|
746
|
+
id:,
|
|
747
|
+
# The platform for the tags
|
|
748
|
+
platform:,
|
|
749
|
+
# The type of tag, user to tag accounts, product to tag products (only supported
|
|
750
|
+
# for instagram)
|
|
751
|
+
type:,
|
|
752
|
+
# Percentage distance from left edge of the image, Not required for videos or
|
|
753
|
+
# stories
|
|
754
|
+
x: nil,
|
|
755
|
+
# Percentage distance from top edge of the image, Not required for videos or
|
|
756
|
+
# stories
|
|
757
|
+
y_: nil
|
|
758
|
+
)
|
|
759
|
+
end
|
|
760
|
+
|
|
761
|
+
sig do
|
|
762
|
+
override.returns(
|
|
763
|
+
{
|
|
764
|
+
id: String,
|
|
765
|
+
platform:
|
|
766
|
+
PostForMe::CreateSocialPost::Media::Tag::Platform::OrSymbol,
|
|
767
|
+
type: PostForMe::CreateSocialPost::Media::Tag::Type::OrSymbol,
|
|
768
|
+
x: Float,
|
|
769
|
+
y_: Float
|
|
770
|
+
}
|
|
771
|
+
)
|
|
772
|
+
end
|
|
773
|
+
def to_hash
|
|
774
|
+
end
|
|
775
|
+
|
|
776
|
+
# The platform for the tags
|
|
777
|
+
module Platform
|
|
778
|
+
extend PostForMe::Internal::Type::Enum
|
|
779
|
+
|
|
780
|
+
TaggedSymbol =
|
|
781
|
+
T.type_alias do
|
|
782
|
+
T.all(Symbol, PostForMe::CreateSocialPost::Media::Tag::Platform)
|
|
783
|
+
end
|
|
784
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
785
|
+
|
|
786
|
+
FACEBOOK =
|
|
787
|
+
T.let(
|
|
788
|
+
:facebook,
|
|
789
|
+
PostForMe::CreateSocialPost::Media::Tag::Platform::TaggedSymbol
|
|
790
|
+
)
|
|
791
|
+
INSTAGRAM =
|
|
792
|
+
T.let(
|
|
793
|
+
:instagram,
|
|
794
|
+
PostForMe::CreateSocialPost::Media::Tag::Platform::TaggedSymbol
|
|
795
|
+
)
|
|
796
|
+
|
|
797
|
+
sig do
|
|
798
|
+
override.returns(
|
|
799
|
+
T::Array[
|
|
800
|
+
PostForMe::CreateSocialPost::Media::Tag::Platform::TaggedSymbol
|
|
801
|
+
]
|
|
802
|
+
)
|
|
803
|
+
end
|
|
804
|
+
def self.values
|
|
805
|
+
end
|
|
806
|
+
end
|
|
807
|
+
|
|
808
|
+
# The type of tag, user to tag accounts, product to tag products (only supported
|
|
809
|
+
# for instagram)
|
|
810
|
+
module Type
|
|
811
|
+
extend PostForMe::Internal::Type::Enum
|
|
812
|
+
|
|
813
|
+
TaggedSymbol =
|
|
814
|
+
T.type_alias do
|
|
815
|
+
T.all(Symbol, PostForMe::CreateSocialPost::Media::Tag::Type)
|
|
816
|
+
end
|
|
817
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
818
|
+
|
|
819
|
+
USER =
|
|
820
|
+
T.let(
|
|
821
|
+
:user,
|
|
822
|
+
PostForMe::CreateSocialPost::Media::Tag::Type::TaggedSymbol
|
|
823
|
+
)
|
|
824
|
+
PRODUCT =
|
|
825
|
+
T.let(
|
|
826
|
+
:product,
|
|
827
|
+
PostForMe::CreateSocialPost::Media::Tag::Type::TaggedSymbol
|
|
828
|
+
)
|
|
829
|
+
|
|
830
|
+
sig do
|
|
831
|
+
override.returns(
|
|
832
|
+
T::Array[
|
|
833
|
+
PostForMe::CreateSocialPost::Media::Tag::Type::TaggedSymbol
|
|
834
|
+
]
|
|
835
|
+
)
|
|
836
|
+
end
|
|
837
|
+
def self.values
|
|
838
|
+
end
|
|
839
|
+
end
|
|
840
|
+
end
|
|
417
841
|
end
|
|
418
842
|
end
|
|
419
843
|
end
|