post-for-me 0.1.0.pre.alpha.8 → 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.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +30 -0
  3. data/README.md +1 -1
  4. data/lib/post_for_me/errors.rb +25 -11
  5. data/lib/post_for_me/file_part.rb +10 -7
  6. data/lib/post_for_me/internal/transport/base_client.rb +11 -7
  7. data/lib/post_for_me/internal/transport/pooled_net_requester.rb +7 -10
  8. data/lib/post_for_me/internal/type/base_page.rb +1 -1
  9. data/lib/post_for_me/internal/type/file_input.rb +7 -4
  10. data/lib/post_for_me/internal/util.rb +3 -2
  11. data/lib/post_for_me/models/bluesky_configuration_dto.rb +87 -1
  12. data/lib/post_for_me/models/create_social_post.rb +221 -2
  13. data/lib/post_for_me/models/facebook_configuration_dto.rb +106 -2
  14. data/lib/post_for_me/models/instagram_configuration_dto.rb +104 -2
  15. data/lib/post_for_me/models/linkedin_configuration_dto.rb +87 -1
  16. data/lib/post_for_me/models/pinterest_configuration_dto.rb +87 -1
  17. data/lib/post_for_me/models/social_account_create_auth_url_params.rb +43 -1
  18. data/lib/post_for_me/models/social_post.rb +221 -2
  19. data/lib/post_for_me/models/threads_configuration_dto.rb +87 -1
  20. data/lib/post_for_me/models/tiktok_configuration.rb +96 -2
  21. data/lib/post_for_me/models/twitter_configuration_dto.rb +180 -2
  22. data/lib/post_for_me/models/youtube_configuration_dto.rb +87 -1
  23. data/lib/post_for_me/version.rb +1 -1
  24. data/rbi/post_for_me/errors.rbi +29 -2
  25. data/rbi/post_for_me/file_part.rbi +1 -1
  26. data/rbi/post_for_me/internal/transport/base_client.rbi +4 -5
  27. data/rbi/post_for_me/internal/type/base_page.rbi +1 -1
  28. data/rbi/post_for_me/internal/util.rbi +1 -1
  29. data/rbi/post_for_me/models/bluesky_configuration_dto.rbi +180 -0
  30. data/rbi/post_for_me/models/create_social_post.rbi +424 -0
  31. data/rbi/post_for_me/models/facebook_configuration_dto.rbi +198 -0
  32. data/rbi/post_for_me/models/instagram_configuration_dto.rbi +205 -3
  33. data/rbi/post_for_me/models/linkedin_configuration_dto.rbi +182 -0
  34. data/rbi/post_for_me/models/pinterest_configuration_dto.rbi +184 -0
  35. data/rbi/post_for_me/models/social_account_create_auth_url_params.rbi +104 -0
  36. data/rbi/post_for_me/models/social_post.rbi +414 -0
  37. data/rbi/post_for_me/models/threads_configuration_dto.rbi +180 -0
  38. data/rbi/post_for_me/models/tiktok_configuration.rbi +180 -0
  39. data/rbi/post_for_me/models/twitter_configuration_dto.rbi +390 -2
  40. data/rbi/post_for_me/models/youtube_configuration_dto.rbi +180 -0
  41. data/sig/post_for_me/errors.rbs +7 -0
  42. data/sig/post_for_me/file_part.rbs +1 -1
  43. data/sig/post_for_me/models/bluesky_configuration_dto.rbs +73 -1
  44. data/sig/post_for_me/models/create_social_post.rbs +180 -1
  45. data/sig/post_for_me/models/facebook_configuration_dto.rbs +83 -1
  46. data/sig/post_for_me/models/instagram_configuration_dto.rbs +86 -4
  47. data/sig/post_for_me/models/linkedin_configuration_dto.rbs +73 -1
  48. data/sig/post_for_me/models/pinterest_configuration_dto.rbs +73 -1
  49. data/sig/post_for_me/models/social_account_create_auth_url_params.rbs +37 -0
  50. data/sig/post_for_me/models/social_post.rbs +180 -1
  51. data/sig/post_for_me/models/threads_configuration_dto.rbs +73 -1
  52. data/sig/post_for_me/models/tiktok_configuration.rbs +78 -1
  53. data/sig/post_for_me/models/twitter_configuration_dto.rbs +163 -4
  54. data/sig/post_for_me/models/youtube_configuration_dto.rbs +73 -1
  55. metadata +2 -2
@@ -29,6 +29,14 @@ module PostForMe
29
29
  # @return [String]
30
30
  required :url, String
31
31
 
32
+ # @!attribute tags
33
+ # List of tags to attach to the media
34
+ #
35
+ # @return [Array<PostForMe::Models::LinkedinConfigurationDto::Media::Tag>, nil]
36
+ optional :tags,
37
+ -> { PostForMe::Internal::Type::ArrayOf[PostForMe::LinkedinConfigurationDto::Media::Tag] },
38
+ nil?: true
39
+
32
40
  # @!attribute thumbnail_timestamp_ms
33
41
  # Timestamp in milliseconds of frame to use as thumbnail for the media
34
42
  #
@@ -41,12 +49,90 @@ module PostForMe
41
49
  # @return [Object, nil]
42
50
  optional :thumbnail_url, PostForMe::Internal::Type::Unknown, nil?: true
43
51
 
44
- # @!method initialize(url:, thumbnail_timestamp_ms: nil, thumbnail_url: nil)
52
+ # @!method initialize(url:, tags: nil, thumbnail_timestamp_ms: nil, thumbnail_url: nil)
45
53
  # @param url [String] Public URL of the media
46
54
  #
55
+ # @param tags [Array<PostForMe::Models::LinkedinConfigurationDto::Media::Tag>, nil] List of tags to attach to the media
56
+ #
47
57
  # @param thumbnail_timestamp_ms [Object, nil] Timestamp in milliseconds of frame to use as thumbnail for the media
48
58
  #
49
59
  # @param thumbnail_url [Object, nil] Public URL of the thumbnail for the media
60
+
61
+ class Tag < PostForMe::Internal::Type::BaseModel
62
+ # @!attribute id
63
+ # Facebook User ID, Instagram Username or Instagram product id to tag
64
+ #
65
+ # @return [String]
66
+ required :id, String
67
+
68
+ # @!attribute platform
69
+ # The platform for the tags
70
+ #
71
+ # @return [Symbol, PostForMe::Models::LinkedinConfigurationDto::Media::Tag::Platform]
72
+ required :platform, enum: -> { PostForMe::LinkedinConfigurationDto::Media::Tag::Platform }
73
+
74
+ # @!attribute type
75
+ # The type of tag, user to tag accounts, product to tag products (only supported
76
+ # for instagram)
77
+ #
78
+ # @return [Symbol, PostForMe::Models::LinkedinConfigurationDto::Media::Tag::Type]
79
+ required :type, enum: -> { PostForMe::LinkedinConfigurationDto::Media::Tag::Type }
80
+
81
+ # @!attribute x
82
+ # Percentage distance from left edge of the image, Not required for videos or
83
+ # stories
84
+ #
85
+ # @return [Float, nil]
86
+ optional :x, Float
87
+
88
+ # @!attribute y_
89
+ # Percentage distance from top edge of the image, Not required for videos or
90
+ # stories
91
+ #
92
+ # @return [Float, nil]
93
+ optional :y_, Float, api_name: :y
94
+
95
+ # @!method initialize(id:, platform:, type:, x: nil, y_: nil)
96
+ # Some parameter documentations has been truncated, see
97
+ # {PostForMe::Models::LinkedinConfigurationDto::Media::Tag} for more details.
98
+ #
99
+ # @param id [String] Facebook User ID, Instagram Username or Instagram product id to tag
100
+ #
101
+ # @param platform [Symbol, PostForMe::Models::LinkedinConfigurationDto::Media::Tag::Platform] The platform for the tags
102
+ #
103
+ # @param type [Symbol, PostForMe::Models::LinkedinConfigurationDto::Media::Tag::Type] The type of tag, user to tag accounts, product to tag products (only supported f
104
+ #
105
+ # @param x [Float] Percentage distance from left edge of the image, Not required for videos or stor
106
+ #
107
+ # @param y_ [Float] Percentage distance from top edge of the image, Not required for videos or stori
108
+
109
+ # The platform for the tags
110
+ #
111
+ # @see PostForMe::Models::LinkedinConfigurationDto::Media::Tag#platform
112
+ module Platform
113
+ extend PostForMe::Internal::Type::Enum
114
+
115
+ FACEBOOK = :facebook
116
+ INSTAGRAM = :instagram
117
+
118
+ # @!method self.values
119
+ # @return [Array<Symbol>]
120
+ end
121
+
122
+ # The type of tag, user to tag accounts, product to tag products (only supported
123
+ # for instagram)
124
+ #
125
+ # @see PostForMe::Models::LinkedinConfigurationDto::Media::Tag#type
126
+ module Type
127
+ extend PostForMe::Internal::Type::Enum
128
+
129
+ USER = :user
130
+ PRODUCT = :product
131
+
132
+ # @!method self.values
133
+ # @return [Array<Symbol>]
134
+ end
135
+ end
50
136
  end
51
137
  end
52
138
  end
@@ -45,6 +45,14 @@ module PostForMe
45
45
  # @return [String]
46
46
  required :url, String
47
47
 
48
+ # @!attribute tags
49
+ # List of tags to attach to the media
50
+ #
51
+ # @return [Array<PostForMe::Models::PinterestConfigurationDto::Media::Tag>, nil]
52
+ optional :tags,
53
+ -> { PostForMe::Internal::Type::ArrayOf[PostForMe::PinterestConfigurationDto::Media::Tag] },
54
+ nil?: true
55
+
48
56
  # @!attribute thumbnail_timestamp_ms
49
57
  # Timestamp in milliseconds of frame to use as thumbnail for the media
50
58
  #
@@ -57,12 +65,90 @@ module PostForMe
57
65
  # @return [Object, nil]
58
66
  optional :thumbnail_url, PostForMe::Internal::Type::Unknown, nil?: true
59
67
 
60
- # @!method initialize(url:, thumbnail_timestamp_ms: nil, thumbnail_url: nil)
68
+ # @!method initialize(url:, tags: nil, thumbnail_timestamp_ms: nil, thumbnail_url: nil)
61
69
  # @param url [String] Public URL of the media
62
70
  #
71
+ # @param tags [Array<PostForMe::Models::PinterestConfigurationDto::Media::Tag>, nil] List of tags to attach to the media
72
+ #
63
73
  # @param thumbnail_timestamp_ms [Object, nil] Timestamp in milliseconds of frame to use as thumbnail for the media
64
74
  #
65
75
  # @param thumbnail_url [Object, nil] Public URL of the thumbnail for the media
76
+
77
+ class Tag < PostForMe::Internal::Type::BaseModel
78
+ # @!attribute id
79
+ # Facebook User ID, Instagram Username or Instagram product id to tag
80
+ #
81
+ # @return [String]
82
+ required :id, String
83
+
84
+ # @!attribute platform
85
+ # The platform for the tags
86
+ #
87
+ # @return [Symbol, PostForMe::Models::PinterestConfigurationDto::Media::Tag::Platform]
88
+ required :platform, enum: -> { PostForMe::PinterestConfigurationDto::Media::Tag::Platform }
89
+
90
+ # @!attribute type
91
+ # The type of tag, user to tag accounts, product to tag products (only supported
92
+ # for instagram)
93
+ #
94
+ # @return [Symbol, PostForMe::Models::PinterestConfigurationDto::Media::Tag::Type]
95
+ required :type, enum: -> { PostForMe::PinterestConfigurationDto::Media::Tag::Type }
96
+
97
+ # @!attribute x
98
+ # Percentage distance from left edge of the image, Not required for videos or
99
+ # stories
100
+ #
101
+ # @return [Float, nil]
102
+ optional :x, Float
103
+
104
+ # @!attribute y_
105
+ # Percentage distance from top edge of the image, Not required for videos or
106
+ # stories
107
+ #
108
+ # @return [Float, nil]
109
+ optional :y_, Float, api_name: :y
110
+
111
+ # @!method initialize(id:, platform:, type:, x: nil, y_: nil)
112
+ # Some parameter documentations has been truncated, see
113
+ # {PostForMe::Models::PinterestConfigurationDto::Media::Tag} for more details.
114
+ #
115
+ # @param id [String] Facebook User ID, Instagram Username or Instagram product id to tag
116
+ #
117
+ # @param platform [Symbol, PostForMe::Models::PinterestConfigurationDto::Media::Tag::Platform] The platform for the tags
118
+ #
119
+ # @param type [Symbol, PostForMe::Models::PinterestConfigurationDto::Media::Tag::Type] The type of tag, user to tag accounts, product to tag products (only supported f
120
+ #
121
+ # @param x [Float] Percentage distance from left edge of the image, Not required for videos or stor
122
+ #
123
+ # @param y_ [Float] Percentage distance from top edge of the image, Not required for videos or stori
124
+
125
+ # The platform for the tags
126
+ #
127
+ # @see PostForMe::Models::PinterestConfigurationDto::Media::Tag#platform
128
+ module Platform
129
+ extend PostForMe::Internal::Type::Enum
130
+
131
+ FACEBOOK = :facebook
132
+ INSTAGRAM = :instagram
133
+
134
+ # @!method self.values
135
+ # @return [Array<Symbol>]
136
+ end
137
+
138
+ # The type of tag, user to tag accounts, product to tag products (only supported
139
+ # for instagram)
140
+ #
141
+ # @see PostForMe::Models::PinterestConfigurationDto::Media::Tag#type
142
+ module Type
143
+ extend PostForMe::Internal::Type::Enum
144
+
145
+ USER = :user
146
+ PRODUCT = :product
147
+
148
+ # @!method self.values
149
+ # @return [Array<Symbol>]
150
+ end
151
+ end
66
152
  end
67
153
  end
68
154
  end
@@ -41,17 +41,25 @@ module PostForMe
41
41
  # @return [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Bluesky, nil]
42
42
  optional :bluesky, -> { PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Bluesky }
43
43
 
44
+ # @!attribute instagram
45
+ # Additional data for connecting instagram accounts
46
+ #
47
+ # @return [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Instagram, nil]
48
+ optional :instagram, -> { PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Instagram }
49
+
44
50
  # @!attribute linkedin
45
51
  # Additional data for connecting linkedin accounts
46
52
  #
47
53
  # @return [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Linkedin, nil]
48
54
  optional :linkedin, -> { PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Linkedin }
49
55
 
50
- # @!method initialize(bluesky: nil, linkedin: nil)
56
+ # @!method initialize(bluesky: nil, instagram: nil, linkedin: nil)
51
57
  # Additional data needed for the provider
52
58
  #
53
59
  # @param bluesky [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Bluesky] Additional data needed for connecting bluesky accounts
54
60
  #
61
+ # @param instagram [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Instagram] Additional data for connecting instagram accounts
62
+ #
55
63
  # @param linkedin [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Linkedin] Additional data for connecting linkedin accounts
56
64
 
57
65
  # @see PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData#bluesky
@@ -76,6 +84,40 @@ module PostForMe
76
84
  # @param handle [String] The handle of the account
77
85
  end
78
86
 
87
+ # @see PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData#instagram
88
+ class Instagram < PostForMe::Internal::Type::BaseModel
89
+ # @!attribute connection_type
90
+ # The type of connection; instagram for using login with instagram, facebook for
91
+ # using login with facebook.
92
+ #
93
+ # @return [Symbol, PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Instagram::ConnectionType]
94
+ required :connection_type,
95
+ enum: -> { PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Instagram::ConnectionType }
96
+
97
+ # @!method initialize(connection_type:)
98
+ # Some parameter documentations has been truncated, see
99
+ # {PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Instagram}
100
+ # for more details.
101
+ #
102
+ # Additional data for connecting instagram accounts
103
+ #
104
+ # @param connection_type [Symbol, PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Instagram::ConnectionType] The type of connection; instagram for using login with instagram, facebook for u
105
+
106
+ # The type of connection; instagram for using login with instagram, facebook for
107
+ # using login with facebook.
108
+ #
109
+ # @see PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Instagram#connection_type
110
+ module ConnectionType
111
+ extend PostForMe::Internal::Type::Enum
112
+
113
+ INSTAGRAM = :instagram
114
+ FACEBOOK = :facebook
115
+
116
+ # @!method self.values
117
+ # @return [Array<Symbol>]
118
+ end
119
+ end
120
+
79
121
  # @see PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData#linkedin
80
122
  class Linkedin < PostForMe::Internal::Type::BaseModel
81
123
  # @!attribute connection_type
@@ -133,6 +133,12 @@ module PostForMe
133
133
  # @return [Boolean, nil]
134
134
  optional :allow_stitch, PostForMe::Internal::Type::Boolean, nil?: true
135
135
 
136
+ # @!attribute auto_add_music
137
+ # Will automatically add music to photo posts on TikTok
138
+ #
139
+ # @return [Boolean, nil]
140
+ optional :auto_add_music, PostForMe::Internal::Type::Boolean, nil?: true
141
+
136
142
  # @!attribute board_ids
137
143
  # Pinterest board IDs
138
144
  #
@@ -145,6 +151,21 @@ module PostForMe
145
151
  # @return [Object, nil]
146
152
  optional :caption, PostForMe::Internal::Type::Unknown, nil?: true
147
153
 
154
+ # @!attribute collaborators
155
+ # List of page ids or users to invite as collaborators for a Video Reel (Instagram
156
+ # and Facebook)
157
+ #
158
+ # @return [Array<Array<Object>>, nil]
159
+ optional :collaborators,
160
+ PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::Unknown]],
161
+ nil?: true
162
+
163
+ # @!attribute community_id
164
+ # Id of the twitter community to post to
165
+ #
166
+ # @return [String, nil]
167
+ optional :community_id, String
168
+
148
169
  # @!attribute disclose_branded_content
149
170
  # Disclose branded content on TikTok
150
171
  #
@@ -176,6 +197,13 @@ module PostForMe
176
197
  # @return [String, nil]
177
198
  optional :link, String, nil?: true
178
199
 
200
+ # @!attribute location
201
+ # Page id with a location that you want to tag the image or video with (Instagram
202
+ # and Facebook)
203
+ #
204
+ # @return [String, nil]
205
+ optional :location, String, nil?: true
206
+
179
207
  # @!attribute media
180
208
  # Overrides the `media` from the post
181
209
  #
@@ -190,19 +218,45 @@ module PostForMe
190
218
  enum: -> { PostForMe::SocialPost::AccountConfiguration::Configuration::Placement },
191
219
  nil?: true
192
220
 
221
+ # @!attribute poll
222
+ # Poll options for the twitter
223
+ #
224
+ # @return [PostForMe::Models::SocialPost::AccountConfiguration::Configuration::Poll, nil]
225
+ optional :poll, -> { PostForMe::SocialPost::AccountConfiguration::Configuration::Poll }
226
+
193
227
  # @!attribute privacy_status
194
228
  # Sets the privacy status for TikTok (private, public)
195
229
  #
196
230
  # @return [String, nil]
197
231
  optional :privacy_status, String, nil?: true
198
232
 
233
+ # @!attribute quote_tweet_id
234
+ # Id of the tweet you want to quote
235
+ #
236
+ # @return [String, nil]
237
+ optional :quote_tweet_id, String
238
+
239
+ # @!attribute reply_settings
240
+ # Who can reply to the tweet
241
+ #
242
+ # @return [Symbol, PostForMe::Models::SocialPost::AccountConfiguration::Configuration::ReplySettings, nil]
243
+ optional :reply_settings,
244
+ enum: -> { PostForMe::SocialPost::AccountConfiguration::Configuration::ReplySettings },
245
+ nil?: true
246
+
247
+ # @!attribute share_to_feed
248
+ # If false Instagram video posts will only be shown in the Reels tab
249
+ #
250
+ # @return [Boolean, nil]
251
+ optional :share_to_feed, PostForMe::Internal::Type::Boolean, nil?: true
252
+
199
253
  # @!attribute title
200
254
  # Overrides the `title` from the post
201
255
  #
202
256
  # @return [String, nil]
203
257
  optional :title, String, nil?: true
204
258
 
205
- # @!method initialize(allow_comment: nil, allow_duet: nil, allow_stitch: nil, board_ids: nil, caption: nil, disclose_branded_content: nil, disclose_your_brand: nil, is_ai_generated: nil, is_draft: nil, link: nil, media: nil, placement: nil, privacy_status: nil, title: nil)
259
+ # @!method initialize(allow_comment: nil, allow_duet: nil, allow_stitch: nil, auto_add_music: nil, board_ids: nil, caption: nil, collaborators: nil, community_id: nil, disclose_branded_content: nil, disclose_your_brand: nil, is_ai_generated: nil, is_draft: nil, link: nil, location: nil, media: nil, placement: nil, poll: nil, privacy_status: nil, quote_tweet_id: nil, reply_settings: nil, share_to_feed: nil, title: nil)
206
260
  # Some parameter documentations has been truncated, see
207
261
  # {PostForMe::Models::SocialPost::AccountConfiguration::Configuration} for more
208
262
  # details.
@@ -215,10 +269,16 @@ module PostForMe
215
269
  #
216
270
  # @param allow_stitch [Boolean, nil] Allow stitch on TikTok
217
271
  #
272
+ # @param auto_add_music [Boolean, nil] Will automatically add music to photo posts on TikTok
273
+ #
218
274
  # @param board_ids [Array<String>, nil] Pinterest board IDs
219
275
  #
220
276
  # @param caption [Object, nil] Overrides the `caption` from the post
221
277
  #
278
+ # @param collaborators [Array<Array<Object>>, nil] List of page ids or users to invite as collaborators for a Video Reel (Instagram
279
+ #
280
+ # @param community_id [String] Id of the twitter community to post to
281
+ #
222
282
  # @param disclose_branded_content [Boolean, nil] Disclose branded content on TikTok
223
283
  #
224
284
  # @param disclose_your_brand [Boolean, nil] Disclose your brand on TikTok
@@ -229,12 +289,22 @@ module PostForMe
229
289
  #
230
290
  # @param link [String, nil] Pinterest post link
231
291
  #
292
+ # @param location [String, nil] Page id with a location that you want to tag the image or video with (Instagram
293
+ #
232
294
  # @param media [Array<String>, nil] Overrides the `media` from the post
233
295
  #
234
296
  # @param placement [Symbol, PostForMe::Models::SocialPost::AccountConfiguration::Configuration::Placement, nil] Post placement for Facebook/Instagram/Threads
235
297
  #
298
+ # @param poll [PostForMe::Models::SocialPost::AccountConfiguration::Configuration::Poll] Poll options for the twitter
299
+ #
236
300
  # @param privacy_status [String, nil] Sets the privacy status for TikTok (private, public)
237
301
  #
302
+ # @param quote_tweet_id [String] Id of the tweet you want to quote
303
+ #
304
+ # @param reply_settings [Symbol, PostForMe::Models::SocialPost::AccountConfiguration::Configuration::ReplySettings, nil] Who can reply to the tweet
305
+ #
306
+ # @param share_to_feed [Boolean, nil] If false Instagram video posts will only be shown in the Reels tab
307
+ #
238
308
  # @param title [String, nil] Overrides the `title` from the post
239
309
 
240
310
  # Post placement for Facebook/Instagram/Threads
@@ -250,6 +320,67 @@ module PostForMe
250
320
  # @!method self.values
251
321
  # @return [Array<Symbol>]
252
322
  end
323
+
324
+ # @see PostForMe::Models::SocialPost::AccountConfiguration::Configuration#poll
325
+ class Poll < PostForMe::Internal::Type::BaseModel
326
+ # @!attribute duration_minutes
327
+ # Duration of the poll in minutes
328
+ #
329
+ # @return [Float]
330
+ required :duration_minutes, Float
331
+
332
+ # @!attribute options
333
+ # The choices of the poll, requiring 2-4 options
334
+ #
335
+ # @return [Array<String>]
336
+ required :options, PostForMe::Internal::Type::ArrayOf[String]
337
+
338
+ # @!attribute reply_settings
339
+ # Who can reply to the tweet
340
+ #
341
+ # @return [Symbol, PostForMe::Models::SocialPost::AccountConfiguration::Configuration::Poll::ReplySettings, nil]
342
+ optional :reply_settings,
343
+ enum: -> { PostForMe::SocialPost::AccountConfiguration::Configuration::Poll::ReplySettings }
344
+
345
+ # @!method initialize(duration_minutes:, options:, reply_settings: nil)
346
+ # Poll options for the twitter
347
+ #
348
+ # @param duration_minutes [Float] Duration of the poll in minutes
349
+ #
350
+ # @param options [Array<String>] The choices of the poll, requiring 2-4 options
351
+ #
352
+ # @param reply_settings [Symbol, PostForMe::Models::SocialPost::AccountConfiguration::Configuration::Poll::ReplySettings] Who can reply to the tweet
353
+
354
+ # Who can reply to the tweet
355
+ #
356
+ # @see PostForMe::Models::SocialPost::AccountConfiguration::Configuration::Poll#reply_settings
357
+ module ReplySettings
358
+ extend PostForMe::Internal::Type::Enum
359
+
360
+ FOLLOWING = :following
361
+ MENTIONED_USERS = :mentionedUsers
362
+ SUBSCRIBERS = :subscribers
363
+ VERIFIED = :verified
364
+
365
+ # @!method self.values
366
+ # @return [Array<Symbol>]
367
+ end
368
+ end
369
+
370
+ # Who can reply to the tweet
371
+ #
372
+ # @see PostForMe::Models::SocialPost::AccountConfiguration::Configuration#reply_settings
373
+ module ReplySettings
374
+ extend PostForMe::Internal::Type::Enum
375
+
376
+ FOLLOWING = :following
377
+ MENTIONED_USERS = :mentionedUsers
378
+ SUBSCRIBERS = :subscribers
379
+ VERIFIED = :verified
380
+
381
+ # @!method self.values
382
+ # @return [Array<Symbol>]
383
+ end
253
384
  end
254
385
  end
255
386
 
@@ -260,6 +391,16 @@ module PostForMe
260
391
  # @return [String]
261
392
  required :url, String
262
393
 
394
+ # @!attribute tags
395
+ # List of tags to attach to the media
396
+ #
397
+ # @return [Array<PostForMe::Models::SocialPost::Media::Tag>, nil]
398
+ optional :tags,
399
+ -> {
400
+ PostForMe::Internal::Type::ArrayOf[PostForMe::SocialPost::Media::Tag]
401
+ },
402
+ nil?: true
403
+
263
404
  # @!attribute thumbnail_timestamp_ms
264
405
  # Timestamp in milliseconds of frame to use as thumbnail for the media
265
406
  #
@@ -272,12 +413,90 @@ module PostForMe
272
413
  # @return [Object, nil]
273
414
  optional :thumbnail_url, PostForMe::Internal::Type::Unknown, nil?: true
274
415
 
275
- # @!method initialize(url:, thumbnail_timestamp_ms: nil, thumbnail_url: nil)
416
+ # @!method initialize(url:, tags: nil, thumbnail_timestamp_ms: nil, thumbnail_url: nil)
276
417
  # @param url [String] Public URL of the media
277
418
  #
419
+ # @param tags [Array<PostForMe::Models::SocialPost::Media::Tag>, nil] List of tags to attach to the media
420
+ #
278
421
  # @param thumbnail_timestamp_ms [Object, nil] Timestamp in milliseconds of frame to use as thumbnail for the media
279
422
  #
280
423
  # @param thumbnail_url [Object, nil] Public URL of the thumbnail for the media
424
+
425
+ class Tag < PostForMe::Internal::Type::BaseModel
426
+ # @!attribute id
427
+ # Facebook User ID, Instagram Username or Instagram product id to tag
428
+ #
429
+ # @return [String]
430
+ required :id, String
431
+
432
+ # @!attribute platform
433
+ # The platform for the tags
434
+ #
435
+ # @return [Symbol, PostForMe::Models::SocialPost::Media::Tag::Platform]
436
+ required :platform, enum: -> { PostForMe::SocialPost::Media::Tag::Platform }
437
+
438
+ # @!attribute type
439
+ # The type of tag, user to tag accounts, product to tag products (only supported
440
+ # for instagram)
441
+ #
442
+ # @return [Symbol, PostForMe::Models::SocialPost::Media::Tag::Type]
443
+ required :type, enum: -> { PostForMe::SocialPost::Media::Tag::Type }
444
+
445
+ # @!attribute x
446
+ # Percentage distance from left edge of the image, Not required for videos or
447
+ # stories
448
+ #
449
+ # @return [Float, nil]
450
+ optional :x, Float
451
+
452
+ # @!attribute y_
453
+ # Percentage distance from top edge of the image, Not required for videos or
454
+ # stories
455
+ #
456
+ # @return [Float, nil]
457
+ optional :y_, Float, api_name: :y
458
+
459
+ # @!method initialize(id:, platform:, type:, x: nil, y_: nil)
460
+ # Some parameter documentations has been truncated, see
461
+ # {PostForMe::Models::SocialPost::Media::Tag} for more details.
462
+ #
463
+ # @param id [String] Facebook User ID, Instagram Username or Instagram product id to tag
464
+ #
465
+ # @param platform [Symbol, PostForMe::Models::SocialPost::Media::Tag::Platform] The platform for the tags
466
+ #
467
+ # @param type [Symbol, PostForMe::Models::SocialPost::Media::Tag::Type] The type of tag, user to tag accounts, product to tag products (only supported f
468
+ #
469
+ # @param x [Float] Percentage distance from left edge of the image, Not required for videos or stor
470
+ #
471
+ # @param y_ [Float] Percentage distance from top edge of the image, Not required for videos or stori
472
+
473
+ # The platform for the tags
474
+ #
475
+ # @see PostForMe::Models::SocialPost::Media::Tag#platform
476
+ module Platform
477
+ extend PostForMe::Internal::Type::Enum
478
+
479
+ FACEBOOK = :facebook
480
+ INSTAGRAM = :instagram
481
+
482
+ # @!method self.values
483
+ # @return [Array<Symbol>]
484
+ end
485
+
486
+ # The type of tag, user to tag accounts, product to tag products (only supported
487
+ # for instagram)
488
+ #
489
+ # @see PostForMe::Models::SocialPost::Media::Tag#type
490
+ module Type
491
+ extend PostForMe::Internal::Type::Enum
492
+
493
+ USER = :user
494
+ PRODUCT = :product
495
+
496
+ # @!method self.values
497
+ # @return [Array<Symbol>]
498
+ end
499
+ end
281
500
  end
282
501
 
283
502
  # Current status of the post: draft, processed, scheduled, or processing