post-for-me 0.1.0.pre.alpha.8 → 0.1.0.pre.alpha.10

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 (67) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +52 -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 +18 -8
  7. data/lib/post_for_me/internal/transport/pooled_net_requester.rb +40 -33
  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 +8 -7
  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.rb +9 -1
  18. data/lib/post_for_me/models/social_account_create_auth_url_params.rb +43 -1
  19. data/lib/post_for_me/models/social_account_disconnect_response.rb +9 -1
  20. data/lib/post_for_me/models/social_post.rb +221 -2
  21. data/lib/post_for_me/models/threads_configuration_dto.rb +87 -1
  22. data/lib/post_for_me/models/tiktok_configuration.rb +96 -2
  23. data/lib/post_for_me/models/twitter_configuration_dto.rb +180 -2
  24. data/lib/post_for_me/models/youtube_configuration_dto.rb +87 -1
  25. data/lib/post_for_me/version.rb +1 -1
  26. data/lib/post_for_me.rb +1 -0
  27. data/manifest.yaml +1 -0
  28. data/rbi/post_for_me/errors.rbi +29 -2
  29. data/rbi/post_for_me/file_part.rbi +1 -1
  30. data/rbi/post_for_me/internal/transport/base_client.rbi +9 -5
  31. data/rbi/post_for_me/internal/transport/pooled_net_requester.rbi +6 -2
  32. data/rbi/post_for_me/internal/type/base_model.rbi +8 -4
  33. data/rbi/post_for_me/internal/type/base_page.rbi +1 -1
  34. data/rbi/post_for_me/internal/util.rbi +1 -1
  35. data/rbi/post_for_me/models/bluesky_configuration_dto.rbi +180 -0
  36. data/rbi/post_for_me/models/create_social_post.rbi +424 -0
  37. data/rbi/post_for_me/models/facebook_configuration_dto.rbi +198 -0
  38. data/rbi/post_for_me/models/instagram_configuration_dto.rbi +205 -3
  39. data/rbi/post_for_me/models/linkedin_configuration_dto.rbi +182 -0
  40. data/rbi/post_for_me/models/pinterest_configuration_dto.rbi +184 -0
  41. data/rbi/post_for_me/models/social_account.rbi +8 -0
  42. data/rbi/post_for_me/models/social_account_create_auth_url_params.rbi +104 -0
  43. data/rbi/post_for_me/models/social_account_disconnect_response.rbi +8 -0
  44. data/rbi/post_for_me/models/social_post.rbi +414 -0
  45. data/rbi/post_for_me/models/threads_configuration_dto.rbi +180 -0
  46. data/rbi/post_for_me/models/tiktok_configuration.rbi +180 -0
  47. data/rbi/post_for_me/models/twitter_configuration_dto.rbi +390 -2
  48. data/rbi/post_for_me/models/youtube_configuration_dto.rbi +180 -0
  49. data/sig/post_for_me/errors.rbs +7 -0
  50. data/sig/post_for_me/file_part.rbs +1 -1
  51. data/sig/post_for_me/internal/transport/base_client.rbs +2 -0
  52. data/sig/post_for_me/internal/transport/pooled_net_requester.rbs +4 -1
  53. data/sig/post_for_me/models/bluesky_configuration_dto.rbs +73 -1
  54. data/sig/post_for_me/models/create_social_post.rbs +180 -1
  55. data/sig/post_for_me/models/facebook_configuration_dto.rbs +83 -1
  56. data/sig/post_for_me/models/instagram_configuration_dto.rbs +86 -4
  57. data/sig/post_for_me/models/linkedin_configuration_dto.rbs +73 -1
  58. data/sig/post_for_me/models/pinterest_configuration_dto.rbs +73 -1
  59. data/sig/post_for_me/models/social_account.rbs +5 -0
  60. data/sig/post_for_me/models/social_account_create_auth_url_params.rbs +37 -0
  61. data/sig/post_for_me/models/social_account_disconnect_response.rbs +5 -0
  62. data/sig/post_for_me/models/social_post.rbs +180 -1
  63. data/sig/post_for_me/models/threads_configuration_dto.rbs +73 -1
  64. data/sig/post_for_me/models/tiktok_configuration.rbs +78 -1
  65. data/sig/post_for_me/models/twitter_configuration_dto.rbs +163 -4
  66. data/sig/post_for_me/models/youtube_configuration_dto.rbs +73 -1
  67. metadata +2 -2
@@ -77,6 +77,14 @@ module PostForMe
77
77
  sig { returns(String) }
78
78
  attr_accessor :url
79
79
 
80
+ # List of tags to attach to the media
81
+ sig do
82
+ returns(
83
+ T.nilable(T::Array[PostForMe::ThreadsConfigurationDto::Media::Tag])
84
+ )
85
+ end
86
+ attr_accessor :tags
87
+
80
88
  # Timestamp in milliseconds of frame to use as thumbnail for the media
81
89
  sig { returns(T.nilable(T.anything)) }
82
90
  attr_accessor :thumbnail_timestamp_ms
@@ -88,6 +96,10 @@ module PostForMe
88
96
  sig do
89
97
  params(
90
98
  url: String,
99
+ tags:
100
+ T.nilable(
101
+ T::Array[PostForMe::ThreadsConfigurationDto::Media::Tag::OrHash]
102
+ ),
91
103
  thumbnail_timestamp_ms: T.nilable(T.anything),
92
104
  thumbnail_url: T.nilable(T.anything)
93
105
  ).returns(T.attached_class)
@@ -95,6 +107,8 @@ module PostForMe
95
107
  def self.new(
96
108
  # Public URL of the media
97
109
  url:,
110
+ # List of tags to attach to the media
111
+ tags: nil,
98
112
  # Timestamp in milliseconds of frame to use as thumbnail for the media
99
113
  thumbnail_timestamp_ms: nil,
100
114
  # Public URL of the thumbnail for the media
@@ -106,6 +120,10 @@ module PostForMe
106
120
  override.returns(
107
121
  {
108
122
  url: String,
123
+ tags:
124
+ T.nilable(
125
+ T::Array[PostForMe::ThreadsConfigurationDto::Media::Tag]
126
+ ),
109
127
  thumbnail_timestamp_ms: T.nilable(T.anything),
110
128
  thumbnail_url: T.nilable(T.anything)
111
129
  }
@@ -113,6 +131,168 @@ module PostForMe
113
131
  end
114
132
  def to_hash
115
133
  end
134
+
135
+ class Tag < PostForMe::Internal::Type::BaseModel
136
+ OrHash =
137
+ T.type_alias do
138
+ T.any(
139
+ PostForMe::ThreadsConfigurationDto::Media::Tag,
140
+ PostForMe::Internal::AnyHash
141
+ )
142
+ end
143
+
144
+ # Facebook User ID, Instagram Username or Instagram product id to tag
145
+ sig { returns(String) }
146
+ attr_accessor :id
147
+
148
+ # The platform for the tags
149
+ sig do
150
+ returns(
151
+ PostForMe::ThreadsConfigurationDto::Media::Tag::Platform::OrSymbol
152
+ )
153
+ end
154
+ attr_accessor :platform
155
+
156
+ # The type of tag, user to tag accounts, product to tag products (only supported
157
+ # for instagram)
158
+ sig do
159
+ returns(
160
+ PostForMe::ThreadsConfigurationDto::Media::Tag::Type::OrSymbol
161
+ )
162
+ end
163
+ attr_accessor :type
164
+
165
+ # Percentage distance from left edge of the image, Not required for videos or
166
+ # stories
167
+ sig { returns(T.nilable(Float)) }
168
+ attr_reader :x
169
+
170
+ sig { params(x: Float).void }
171
+ attr_writer :x
172
+
173
+ # Percentage distance from top edge of the image, Not required for videos or
174
+ # stories
175
+ sig { returns(T.nilable(Float)) }
176
+ attr_reader :y_
177
+
178
+ sig { params(y_: Float).void }
179
+ attr_writer :y_
180
+
181
+ sig do
182
+ params(
183
+ id: String,
184
+ platform:
185
+ PostForMe::ThreadsConfigurationDto::Media::Tag::Platform::OrSymbol,
186
+ type:
187
+ PostForMe::ThreadsConfigurationDto::Media::Tag::Type::OrSymbol,
188
+ x: Float,
189
+ y_: Float
190
+ ).returns(T.attached_class)
191
+ end
192
+ def self.new(
193
+ # Facebook User ID, Instagram Username or Instagram product id to tag
194
+ id:,
195
+ # The platform for the tags
196
+ platform:,
197
+ # The type of tag, user to tag accounts, product to tag products (only supported
198
+ # for instagram)
199
+ type:,
200
+ # Percentage distance from left edge of the image, Not required for videos or
201
+ # stories
202
+ x: nil,
203
+ # Percentage distance from top edge of the image, Not required for videos or
204
+ # stories
205
+ y_: nil
206
+ )
207
+ end
208
+
209
+ sig do
210
+ override.returns(
211
+ {
212
+ id: String,
213
+ platform:
214
+ PostForMe::ThreadsConfigurationDto::Media::Tag::Platform::OrSymbol,
215
+ type:
216
+ PostForMe::ThreadsConfigurationDto::Media::Tag::Type::OrSymbol,
217
+ x: Float,
218
+ y_: Float
219
+ }
220
+ )
221
+ end
222
+ def to_hash
223
+ end
224
+
225
+ # The platform for the tags
226
+ module Platform
227
+ extend PostForMe::Internal::Type::Enum
228
+
229
+ TaggedSymbol =
230
+ T.type_alias do
231
+ T.all(
232
+ Symbol,
233
+ PostForMe::ThreadsConfigurationDto::Media::Tag::Platform
234
+ )
235
+ end
236
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
237
+
238
+ FACEBOOK =
239
+ T.let(
240
+ :facebook,
241
+ PostForMe::ThreadsConfigurationDto::Media::Tag::Platform::TaggedSymbol
242
+ )
243
+ INSTAGRAM =
244
+ T.let(
245
+ :instagram,
246
+ PostForMe::ThreadsConfigurationDto::Media::Tag::Platform::TaggedSymbol
247
+ )
248
+
249
+ sig do
250
+ override.returns(
251
+ T::Array[
252
+ PostForMe::ThreadsConfigurationDto::Media::Tag::Platform::TaggedSymbol
253
+ ]
254
+ )
255
+ end
256
+ def self.values
257
+ end
258
+ end
259
+
260
+ # The type of tag, user to tag accounts, product to tag products (only supported
261
+ # for instagram)
262
+ module Type
263
+ extend PostForMe::Internal::Type::Enum
264
+
265
+ TaggedSymbol =
266
+ T.type_alias do
267
+ T.all(
268
+ Symbol,
269
+ PostForMe::ThreadsConfigurationDto::Media::Tag::Type
270
+ )
271
+ end
272
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
273
+
274
+ USER =
275
+ T.let(
276
+ :user,
277
+ PostForMe::ThreadsConfigurationDto::Media::Tag::Type::TaggedSymbol
278
+ )
279
+ PRODUCT =
280
+ T.let(
281
+ :product,
282
+ PostForMe::ThreadsConfigurationDto::Media::Tag::Type::TaggedSymbol
283
+ )
284
+
285
+ sig do
286
+ override.returns(
287
+ T::Array[
288
+ PostForMe::ThreadsConfigurationDto::Media::Tag::Type::TaggedSymbol
289
+ ]
290
+ )
291
+ end
292
+ def self.values
293
+ end
294
+ end
295
+ end
116
296
  end
117
297
 
118
298
  # Threads post placement
@@ -20,6 +20,10 @@ module PostForMe
20
20
  sig { returns(T.nilable(T::Boolean)) }
21
21
  attr_accessor :allow_stitch
22
22
 
23
+ # Will automatically add music to photo posts
24
+ sig { returns(T.nilable(T::Boolean)) }
25
+ attr_accessor :auto_add_music
26
+
23
27
  # Overrides the `caption` from the post
24
28
  sig { returns(T.nilable(T.anything)) }
25
29
  attr_accessor :caption
@@ -60,6 +64,7 @@ module PostForMe
60
64
  allow_comment: T.nilable(T::Boolean),
61
65
  allow_duet: T.nilable(T::Boolean),
62
66
  allow_stitch: T.nilable(T::Boolean),
67
+ auto_add_music: T.nilable(T::Boolean),
63
68
  caption: T.nilable(T.anything),
64
69
  disclose_branded_content: T.nilable(T::Boolean),
65
70
  disclose_your_brand: T.nilable(T::Boolean),
@@ -78,6 +83,8 @@ module PostForMe
78
83
  allow_duet: nil,
79
84
  # Allow stitch on TikTok
80
85
  allow_stitch: nil,
86
+ # Will automatically add music to photo posts
87
+ auto_add_music: nil,
81
88
  # Overrides the `caption` from the post
82
89
  caption: nil,
83
90
  # Disclose branded content on TikTok
@@ -104,6 +111,7 @@ module PostForMe
104
111
  allow_comment: T.nilable(T::Boolean),
105
112
  allow_duet: T.nilable(T::Boolean),
106
113
  allow_stitch: T.nilable(T::Boolean),
114
+ auto_add_music: T.nilable(T::Boolean),
107
115
  caption: T.nilable(T.anything),
108
116
  disclose_branded_content: T.nilable(T::Boolean),
109
117
  disclose_your_brand: T.nilable(T::Boolean),
@@ -131,6 +139,14 @@ module PostForMe
131
139
  sig { returns(String) }
132
140
  attr_accessor :url
133
141
 
142
+ # List of tags to attach to the media
143
+ sig do
144
+ returns(
145
+ T.nilable(T::Array[PostForMe::TiktokConfiguration::Media::Tag])
146
+ )
147
+ end
148
+ attr_accessor :tags
149
+
134
150
  # Timestamp in milliseconds of frame to use as thumbnail for the media
135
151
  sig { returns(T.nilable(T.anything)) }
136
152
  attr_accessor :thumbnail_timestamp_ms
@@ -142,6 +158,10 @@ module PostForMe
142
158
  sig do
143
159
  params(
144
160
  url: String,
161
+ tags:
162
+ T.nilable(
163
+ T::Array[PostForMe::TiktokConfiguration::Media::Tag::OrHash]
164
+ ),
145
165
  thumbnail_timestamp_ms: T.nilable(T.anything),
146
166
  thumbnail_url: T.nilable(T.anything)
147
167
  ).returns(T.attached_class)
@@ -149,6 +169,8 @@ module PostForMe
149
169
  def self.new(
150
170
  # Public URL of the media
151
171
  url:,
172
+ # List of tags to attach to the media
173
+ tags: nil,
152
174
  # Timestamp in milliseconds of frame to use as thumbnail for the media
153
175
  thumbnail_timestamp_ms: nil,
154
176
  # Public URL of the thumbnail for the media
@@ -160,6 +182,8 @@ module PostForMe
160
182
  override.returns(
161
183
  {
162
184
  url: String,
185
+ tags:
186
+ T.nilable(T::Array[PostForMe::TiktokConfiguration::Media::Tag]),
163
187
  thumbnail_timestamp_ms: T.nilable(T.anything),
164
188
  thumbnail_url: T.nilable(T.anything)
165
189
  }
@@ -167,6 +191,162 @@ module PostForMe
167
191
  end
168
192
  def to_hash
169
193
  end
194
+
195
+ class Tag < PostForMe::Internal::Type::BaseModel
196
+ OrHash =
197
+ T.type_alias do
198
+ T.any(
199
+ PostForMe::TiktokConfiguration::Media::Tag,
200
+ PostForMe::Internal::AnyHash
201
+ )
202
+ end
203
+
204
+ # Facebook User ID, Instagram Username or Instagram product id to tag
205
+ sig { returns(String) }
206
+ attr_accessor :id
207
+
208
+ # The platform for the tags
209
+ sig do
210
+ returns(
211
+ PostForMe::TiktokConfiguration::Media::Tag::Platform::OrSymbol
212
+ )
213
+ end
214
+ attr_accessor :platform
215
+
216
+ # The type of tag, user to tag accounts, product to tag products (only supported
217
+ # for instagram)
218
+ sig do
219
+ returns(PostForMe::TiktokConfiguration::Media::Tag::Type::OrSymbol)
220
+ end
221
+ attr_accessor :type
222
+
223
+ # Percentage distance from left edge of the image, Not required for videos or
224
+ # stories
225
+ sig { returns(T.nilable(Float)) }
226
+ attr_reader :x
227
+
228
+ sig { params(x: Float).void }
229
+ attr_writer :x
230
+
231
+ # Percentage distance from top edge of the image, Not required for videos or
232
+ # stories
233
+ sig { returns(T.nilable(Float)) }
234
+ attr_reader :y_
235
+
236
+ sig { params(y_: Float).void }
237
+ attr_writer :y_
238
+
239
+ sig do
240
+ params(
241
+ id: String,
242
+ platform:
243
+ PostForMe::TiktokConfiguration::Media::Tag::Platform::OrSymbol,
244
+ type: PostForMe::TiktokConfiguration::Media::Tag::Type::OrSymbol,
245
+ x: Float,
246
+ y_: Float
247
+ ).returns(T.attached_class)
248
+ end
249
+ def self.new(
250
+ # Facebook User ID, Instagram Username or Instagram product id to tag
251
+ id:,
252
+ # The platform for the tags
253
+ platform:,
254
+ # The type of tag, user to tag accounts, product to tag products (only supported
255
+ # for instagram)
256
+ type:,
257
+ # Percentage distance from left edge of the image, Not required for videos or
258
+ # stories
259
+ x: nil,
260
+ # Percentage distance from top edge of the image, Not required for videos or
261
+ # stories
262
+ y_: nil
263
+ )
264
+ end
265
+
266
+ sig do
267
+ override.returns(
268
+ {
269
+ id: String,
270
+ platform:
271
+ PostForMe::TiktokConfiguration::Media::Tag::Platform::OrSymbol,
272
+ type:
273
+ PostForMe::TiktokConfiguration::Media::Tag::Type::OrSymbol,
274
+ x: Float,
275
+ y_: Float
276
+ }
277
+ )
278
+ end
279
+ def to_hash
280
+ end
281
+
282
+ # The platform for the tags
283
+ module Platform
284
+ extend PostForMe::Internal::Type::Enum
285
+
286
+ TaggedSymbol =
287
+ T.type_alias do
288
+ T.all(
289
+ Symbol,
290
+ PostForMe::TiktokConfiguration::Media::Tag::Platform
291
+ )
292
+ end
293
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
294
+
295
+ FACEBOOK =
296
+ T.let(
297
+ :facebook,
298
+ PostForMe::TiktokConfiguration::Media::Tag::Platform::TaggedSymbol
299
+ )
300
+ INSTAGRAM =
301
+ T.let(
302
+ :instagram,
303
+ PostForMe::TiktokConfiguration::Media::Tag::Platform::TaggedSymbol
304
+ )
305
+
306
+ sig do
307
+ override.returns(
308
+ T::Array[
309
+ PostForMe::TiktokConfiguration::Media::Tag::Platform::TaggedSymbol
310
+ ]
311
+ )
312
+ end
313
+ def self.values
314
+ end
315
+ end
316
+
317
+ # The type of tag, user to tag accounts, product to tag products (only supported
318
+ # for instagram)
319
+ module Type
320
+ extend PostForMe::Internal::Type::Enum
321
+
322
+ TaggedSymbol =
323
+ T.type_alias do
324
+ T.all(Symbol, PostForMe::TiktokConfiguration::Media::Tag::Type)
325
+ end
326
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
327
+
328
+ USER =
329
+ T.let(
330
+ :user,
331
+ PostForMe::TiktokConfiguration::Media::Tag::Type::TaggedSymbol
332
+ )
333
+ PRODUCT =
334
+ T.let(
335
+ :product,
336
+ PostForMe::TiktokConfiguration::Media::Tag::Type::TaggedSymbol
337
+ )
338
+
339
+ sig do
340
+ override.returns(
341
+ T::Array[
342
+ PostForMe::TiktokConfiguration::Media::Tag::Type::TaggedSymbol
343
+ ]
344
+ )
345
+ end
346
+ def self.values
347
+ end
348
+ end
349
+ end
170
350
  end
171
351
  end
172
352
  end