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