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
@@ -37,6 +37,14 @@ module PostForMe
37
37
  # @return [String]
38
38
  required :url, String
39
39
 
40
+ # @!attribute tags
41
+ # List of tags to attach to the media
42
+ #
43
+ # @return [Array<PostForMe::Models::ThreadsConfigurationDto::Media::Tag>, nil]
44
+ optional :tags,
45
+ -> { PostForMe::Internal::Type::ArrayOf[PostForMe::ThreadsConfigurationDto::Media::Tag] },
46
+ nil?: true
47
+
40
48
  # @!attribute thumbnail_timestamp_ms
41
49
  # Timestamp in milliseconds of frame to use as thumbnail for the media
42
50
  #
@@ -49,12 +57,90 @@ module PostForMe
49
57
  # @return [Object, nil]
50
58
  optional :thumbnail_url, PostForMe::Internal::Type::Unknown, nil?: true
51
59
 
52
- # @!method initialize(url:, thumbnail_timestamp_ms: nil, thumbnail_url: nil)
60
+ # @!method initialize(url:, tags: nil, thumbnail_timestamp_ms: nil, thumbnail_url: nil)
53
61
  # @param url [String] Public URL of the media
54
62
  #
63
+ # @param tags [Array<PostForMe::Models::ThreadsConfigurationDto::Media::Tag>, nil] List of tags to attach to the media
64
+ #
55
65
  # @param thumbnail_timestamp_ms [Object, nil] Timestamp in milliseconds of frame to use as thumbnail for the media
56
66
  #
57
67
  # @param thumbnail_url [Object, nil] Public URL of the thumbnail for the media
68
+
69
+ class Tag < PostForMe::Internal::Type::BaseModel
70
+ # @!attribute id
71
+ # Facebook User ID, Instagram Username or Instagram product id to tag
72
+ #
73
+ # @return [String]
74
+ required :id, String
75
+
76
+ # @!attribute platform
77
+ # The platform for the tags
78
+ #
79
+ # @return [Symbol, PostForMe::Models::ThreadsConfigurationDto::Media::Tag::Platform]
80
+ required :platform, enum: -> { PostForMe::ThreadsConfigurationDto::Media::Tag::Platform }
81
+
82
+ # @!attribute type
83
+ # The type of tag, user to tag accounts, product to tag products (only supported
84
+ # for instagram)
85
+ #
86
+ # @return [Symbol, PostForMe::Models::ThreadsConfigurationDto::Media::Tag::Type]
87
+ required :type, enum: -> { PostForMe::ThreadsConfigurationDto::Media::Tag::Type }
88
+
89
+ # @!attribute x
90
+ # Percentage distance from left edge of the image, Not required for videos or
91
+ # stories
92
+ #
93
+ # @return [Float, nil]
94
+ optional :x, Float
95
+
96
+ # @!attribute y_
97
+ # Percentage distance from top edge of the image, Not required for videos or
98
+ # stories
99
+ #
100
+ # @return [Float, nil]
101
+ optional :y_, Float, api_name: :y
102
+
103
+ # @!method initialize(id:, platform:, type:, x: nil, y_: nil)
104
+ # Some parameter documentations has been truncated, see
105
+ # {PostForMe::Models::ThreadsConfigurationDto::Media::Tag} for more details.
106
+ #
107
+ # @param id [String] Facebook User ID, Instagram Username or Instagram product id to tag
108
+ #
109
+ # @param platform [Symbol, PostForMe::Models::ThreadsConfigurationDto::Media::Tag::Platform] The platform for the tags
110
+ #
111
+ # @param type [Symbol, PostForMe::Models::ThreadsConfigurationDto::Media::Tag::Type] The type of tag, user to tag accounts, product to tag products (only supported f
112
+ #
113
+ # @param x [Float] Percentage distance from left edge of the image, Not required for videos or stor
114
+ #
115
+ # @param y_ [Float] Percentage distance from top edge of the image, Not required for videos or stori
116
+
117
+ # The platform for the tags
118
+ #
119
+ # @see PostForMe::Models::ThreadsConfigurationDto::Media::Tag#platform
120
+ module Platform
121
+ extend PostForMe::Internal::Type::Enum
122
+
123
+ FACEBOOK = :facebook
124
+ INSTAGRAM = :instagram
125
+
126
+ # @!method self.values
127
+ # @return [Array<Symbol>]
128
+ end
129
+
130
+ # The type of tag, user to tag accounts, product to tag products (only supported
131
+ # for instagram)
132
+ #
133
+ # @see PostForMe::Models::ThreadsConfigurationDto::Media::Tag#type
134
+ module Type
135
+ extend PostForMe::Internal::Type::Enum
136
+
137
+ USER = :user
138
+ PRODUCT = :product
139
+
140
+ # @!method self.values
141
+ # @return [Array<Symbol>]
142
+ end
143
+ end
58
144
  end
59
145
 
60
146
  # Threads post placement
@@ -21,6 +21,12 @@ module PostForMe
21
21
  # @return [Boolean, nil]
22
22
  optional :allow_stitch, PostForMe::Internal::Type::Boolean, nil?: true
23
23
 
24
+ # @!attribute auto_add_music
25
+ # Will automatically add music to photo posts
26
+ #
27
+ # @return [Boolean, nil]
28
+ optional :auto_add_music, PostForMe::Internal::Type::Boolean, nil?: true
29
+
24
30
  # @!attribute caption
25
31
  # Overrides the `caption` from the post
26
32
  #
@@ -72,7 +78,7 @@ module PostForMe
72
78
  # @return [String, nil]
73
79
  optional :title, String, nil?: true
74
80
 
75
- # @!method initialize(allow_comment: nil, allow_duet: nil, allow_stitch: nil, caption: nil, disclose_branded_content: nil, disclose_your_brand: nil, is_ai_generated: nil, is_draft: nil, media: nil, privacy_status: nil, title: nil)
81
+ # @!method initialize(allow_comment: nil, allow_duet: nil, allow_stitch: nil, auto_add_music: nil, caption: nil, disclose_branded_content: nil, disclose_your_brand: nil, is_ai_generated: nil, is_draft: nil, media: nil, privacy_status: nil, title: nil)
76
82
  # Some parameter documentations has been truncated, see
77
83
  # {PostForMe::Models::TiktokConfiguration} for more details.
78
84
  #
@@ -82,6 +88,8 @@ module PostForMe
82
88
  #
83
89
  # @param allow_stitch [Boolean, nil] Allow stitch on TikTok
84
90
  #
91
+ # @param auto_add_music [Boolean, nil] Will automatically add music to photo posts
92
+ #
85
93
  # @param caption [Object, nil] Overrides the `caption` from the post
86
94
  #
87
95
  # @param disclose_branded_content [Boolean, nil] Disclose branded content on TikTok
@@ -105,6 +113,14 @@ module PostForMe
105
113
  # @return [String]
106
114
  required :url, String
107
115
 
116
+ # @!attribute tags
117
+ # List of tags to attach to the media
118
+ #
119
+ # @return [Array<PostForMe::Models::TiktokConfiguration::Media::Tag>, nil]
120
+ optional :tags,
121
+ -> { PostForMe::Internal::Type::ArrayOf[PostForMe::TiktokConfiguration::Media::Tag] },
122
+ nil?: true
123
+
108
124
  # @!attribute thumbnail_timestamp_ms
109
125
  # Timestamp in milliseconds of frame to use as thumbnail for the media
110
126
  #
@@ -117,12 +133,90 @@ module PostForMe
117
133
  # @return [Object, nil]
118
134
  optional :thumbnail_url, PostForMe::Internal::Type::Unknown, nil?: true
119
135
 
120
- # @!method initialize(url:, thumbnail_timestamp_ms: nil, thumbnail_url: nil)
136
+ # @!method initialize(url:, tags: nil, thumbnail_timestamp_ms: nil, thumbnail_url: nil)
121
137
  # @param url [String] Public URL of the media
122
138
  #
139
+ # @param tags [Array<PostForMe::Models::TiktokConfiguration::Media::Tag>, nil] List of tags to attach to the media
140
+ #
123
141
  # @param thumbnail_timestamp_ms [Object, nil] Timestamp in milliseconds of frame to use as thumbnail for the media
124
142
  #
125
143
  # @param thumbnail_url [Object, nil] Public URL of the thumbnail for the media
144
+
145
+ class Tag < PostForMe::Internal::Type::BaseModel
146
+ # @!attribute id
147
+ # Facebook User ID, Instagram Username or Instagram product id to tag
148
+ #
149
+ # @return [String]
150
+ required :id, String
151
+
152
+ # @!attribute platform
153
+ # The platform for the tags
154
+ #
155
+ # @return [Symbol, PostForMe::Models::TiktokConfiguration::Media::Tag::Platform]
156
+ required :platform, enum: -> { PostForMe::TiktokConfiguration::Media::Tag::Platform }
157
+
158
+ # @!attribute type
159
+ # The type of tag, user to tag accounts, product to tag products (only supported
160
+ # for instagram)
161
+ #
162
+ # @return [Symbol, PostForMe::Models::TiktokConfiguration::Media::Tag::Type]
163
+ required :type, enum: -> { PostForMe::TiktokConfiguration::Media::Tag::Type }
164
+
165
+ # @!attribute x
166
+ # Percentage distance from left edge of the image, Not required for videos or
167
+ # stories
168
+ #
169
+ # @return [Float, nil]
170
+ optional :x, Float
171
+
172
+ # @!attribute y_
173
+ # Percentage distance from top edge of the image, Not required for videos or
174
+ # stories
175
+ #
176
+ # @return [Float, nil]
177
+ optional :y_, Float, api_name: :y
178
+
179
+ # @!method initialize(id:, platform:, type:, x: nil, y_: nil)
180
+ # Some parameter documentations has been truncated, see
181
+ # {PostForMe::Models::TiktokConfiguration::Media::Tag} for more details.
182
+ #
183
+ # @param id [String] Facebook User ID, Instagram Username or Instagram product id to tag
184
+ #
185
+ # @param platform [Symbol, PostForMe::Models::TiktokConfiguration::Media::Tag::Platform] The platform for the tags
186
+ #
187
+ # @param type [Symbol, PostForMe::Models::TiktokConfiguration::Media::Tag::Type] The type of tag, user to tag accounts, product to tag products (only supported f
188
+ #
189
+ # @param x [Float] Percentage distance from left edge of the image, Not required for videos or stor
190
+ #
191
+ # @param y_ [Float] Percentage distance from top edge of the image, Not required for videos or stori
192
+
193
+ # The platform for the tags
194
+ #
195
+ # @see PostForMe::Models::TiktokConfiguration::Media::Tag#platform
196
+ module Platform
197
+ extend PostForMe::Internal::Type::Enum
198
+
199
+ FACEBOOK = :facebook
200
+ INSTAGRAM = :instagram
201
+
202
+ # @!method self.values
203
+ # @return [Array<Symbol>]
204
+ end
205
+
206
+ # The type of tag, user to tag accounts, product to tag products (only supported
207
+ # for instagram)
208
+ #
209
+ # @see PostForMe::Models::TiktokConfiguration::Media::Tag#type
210
+ module Type
211
+ extend PostForMe::Internal::Type::Enum
212
+
213
+ USER = :user
214
+ PRODUCT = :product
215
+
216
+ # @!method self.values
217
+ # @return [Array<Symbol>]
218
+ end
219
+ end
126
220
  end
127
221
  end
128
222
  end
@@ -9,6 +9,12 @@ module PostForMe
9
9
  # @return [Object, nil]
10
10
  optional :caption, PostForMe::Internal::Type::Unknown, nil?: true
11
11
 
12
+ # @!attribute community_id
13
+ # Id of the community to post to
14
+ #
15
+ # @return [String, nil]
16
+ optional :community_id, String
17
+
12
18
  # @!attribute media
13
19
  # Overrides the `media` from the post
14
20
  #
@@ -17,10 +23,36 @@ module PostForMe
17
23
  -> { PostForMe::Internal::Type::ArrayOf[PostForMe::TwitterConfigurationDto::Media] },
18
24
  nil?: true
19
25
 
20
- # @!method initialize(caption: nil, media: nil)
26
+ # @!attribute poll
27
+ # Poll options for the tweet
28
+ #
29
+ # @return [PostForMe::Models::TwitterConfigurationDto::Poll, nil]
30
+ optional :poll, -> { PostForMe::TwitterConfigurationDto::Poll }
31
+
32
+ # @!attribute quote_tweet_id
33
+ # Id of the tweet you want to quote
34
+ #
35
+ # @return [String, nil]
36
+ optional :quote_tweet_id, String
37
+
38
+ # @!attribute reply_settings
39
+ # Who can reply to the tweet
40
+ #
41
+ # @return [Symbol, PostForMe::Models::TwitterConfigurationDto::ReplySettings, nil]
42
+ optional :reply_settings, enum: -> { PostForMe::TwitterConfigurationDto::ReplySettings }, nil?: true
43
+
44
+ # @!method initialize(caption: nil, community_id: nil, media: nil, poll: nil, quote_tweet_id: nil, reply_settings: nil)
21
45
  # @param caption [Object, nil] Overrides the `caption` from the post
22
46
  #
47
+ # @param community_id [String] Id of the community to post to
48
+ #
23
49
  # @param media [Array<PostForMe::Models::TwitterConfigurationDto::Media>, nil] Overrides the `media` from the post
50
+ #
51
+ # @param poll [PostForMe::Models::TwitterConfigurationDto::Poll] Poll options for the tweet
52
+ #
53
+ # @param quote_tweet_id [String] Id of the tweet you want to quote
54
+ #
55
+ # @param reply_settings [Symbol, PostForMe::Models::TwitterConfigurationDto::ReplySettings, nil] Who can reply to the tweet
24
56
 
25
57
  class Media < PostForMe::Internal::Type::BaseModel
26
58
  # @!attribute url
@@ -29,6 +61,14 @@ module PostForMe
29
61
  # @return [String]
30
62
  required :url, String
31
63
 
64
+ # @!attribute tags
65
+ # List of tags to attach to the media
66
+ #
67
+ # @return [Array<PostForMe::Models::TwitterConfigurationDto::Media::Tag>, nil]
68
+ optional :tags,
69
+ -> { PostForMe::Internal::Type::ArrayOf[PostForMe::TwitterConfigurationDto::Media::Tag] },
70
+ nil?: true
71
+
32
72
  # @!attribute thumbnail_timestamp_ms
33
73
  # Timestamp in milliseconds of frame to use as thumbnail for the media
34
74
  #
@@ -41,12 +81,150 @@ module PostForMe
41
81
  # @return [Object, nil]
42
82
  optional :thumbnail_url, PostForMe::Internal::Type::Unknown, nil?: true
43
83
 
44
- # @!method initialize(url:, thumbnail_timestamp_ms: nil, thumbnail_url: nil)
84
+ # @!method initialize(url:, tags: nil, thumbnail_timestamp_ms: nil, thumbnail_url: nil)
45
85
  # @param url [String] Public URL of the media
46
86
  #
87
+ # @param tags [Array<PostForMe::Models::TwitterConfigurationDto::Media::Tag>, nil] List of tags to attach to the media
88
+ #
47
89
  # @param thumbnail_timestamp_ms [Object, nil] Timestamp in milliseconds of frame to use as thumbnail for the media
48
90
  #
49
91
  # @param thumbnail_url [Object, nil] Public URL of the thumbnail for the media
92
+
93
+ class Tag < PostForMe::Internal::Type::BaseModel
94
+ # @!attribute id
95
+ # Facebook User ID, Instagram Username or Instagram product id to tag
96
+ #
97
+ # @return [String]
98
+ required :id, String
99
+
100
+ # @!attribute platform
101
+ # The platform for the tags
102
+ #
103
+ # @return [Symbol, PostForMe::Models::TwitterConfigurationDto::Media::Tag::Platform]
104
+ required :platform, enum: -> { PostForMe::TwitterConfigurationDto::Media::Tag::Platform }
105
+
106
+ # @!attribute type
107
+ # The type of tag, user to tag accounts, product to tag products (only supported
108
+ # for instagram)
109
+ #
110
+ # @return [Symbol, PostForMe::Models::TwitterConfigurationDto::Media::Tag::Type]
111
+ required :type, enum: -> { PostForMe::TwitterConfigurationDto::Media::Tag::Type }
112
+
113
+ # @!attribute x
114
+ # Percentage distance from left edge of the image, Not required for videos or
115
+ # stories
116
+ #
117
+ # @return [Float, nil]
118
+ optional :x, Float
119
+
120
+ # @!attribute y_
121
+ # Percentage distance from top edge of the image, Not required for videos or
122
+ # stories
123
+ #
124
+ # @return [Float, nil]
125
+ optional :y_, Float, api_name: :y
126
+
127
+ # @!method initialize(id:, platform:, type:, x: nil, y_: nil)
128
+ # Some parameter documentations has been truncated, see
129
+ # {PostForMe::Models::TwitterConfigurationDto::Media::Tag} for more details.
130
+ #
131
+ # @param id [String] Facebook User ID, Instagram Username or Instagram product id to tag
132
+ #
133
+ # @param platform [Symbol, PostForMe::Models::TwitterConfigurationDto::Media::Tag::Platform] The platform for the tags
134
+ #
135
+ # @param type [Symbol, PostForMe::Models::TwitterConfigurationDto::Media::Tag::Type] The type of tag, user to tag accounts, product to tag products (only supported f
136
+ #
137
+ # @param x [Float] Percentage distance from left edge of the image, Not required for videos or stor
138
+ #
139
+ # @param y_ [Float] Percentage distance from top edge of the image, Not required for videos or stori
140
+
141
+ # The platform for the tags
142
+ #
143
+ # @see PostForMe::Models::TwitterConfigurationDto::Media::Tag#platform
144
+ module Platform
145
+ extend PostForMe::Internal::Type::Enum
146
+
147
+ FACEBOOK = :facebook
148
+ INSTAGRAM = :instagram
149
+
150
+ # @!method self.values
151
+ # @return [Array<Symbol>]
152
+ end
153
+
154
+ # The type of tag, user to tag accounts, product to tag products (only supported
155
+ # for instagram)
156
+ #
157
+ # @see PostForMe::Models::TwitterConfigurationDto::Media::Tag#type
158
+ module Type
159
+ extend PostForMe::Internal::Type::Enum
160
+
161
+ USER = :user
162
+ PRODUCT = :product
163
+
164
+ # @!method self.values
165
+ # @return [Array<Symbol>]
166
+ end
167
+ end
168
+ end
169
+
170
+ # @see PostForMe::Models::TwitterConfigurationDto#poll
171
+ class Poll < PostForMe::Internal::Type::BaseModel
172
+ # @!attribute duration_minutes
173
+ # Duration of the poll in minutes
174
+ #
175
+ # @return [Float]
176
+ required :duration_minutes, Float
177
+
178
+ # @!attribute options
179
+ # The choices of the poll, requiring 2-4 options
180
+ #
181
+ # @return [Array<String>]
182
+ required :options, PostForMe::Internal::Type::ArrayOf[String]
183
+
184
+ # @!attribute reply_settings
185
+ # Who can reply to the tweet
186
+ #
187
+ # @return [Symbol, PostForMe::Models::TwitterConfigurationDto::Poll::ReplySettings, nil]
188
+ optional :reply_settings, enum: -> { PostForMe::TwitterConfigurationDto::Poll::ReplySettings }
189
+
190
+ # @!method initialize(duration_minutes:, options:, reply_settings: nil)
191
+ # Poll options for the tweet
192
+ #
193
+ # @param duration_minutes [Float] Duration of the poll in minutes
194
+ #
195
+ # @param options [Array<String>] The choices of the poll, requiring 2-4 options
196
+ #
197
+ # @param reply_settings [Symbol, PostForMe::Models::TwitterConfigurationDto::Poll::ReplySettings] Who can reply to the tweet
198
+
199
+ # Who can reply to the tweet
200
+ #
201
+ # @see PostForMe::Models::TwitterConfigurationDto::Poll#reply_settings
202
+ module ReplySettings
203
+ extend PostForMe::Internal::Type::Enum
204
+
205
+ FOLLOWING = :following
206
+ MENTIONED_USERS = :mentionedUsers
207
+ SUBSCRIBERS = :subscribers
208
+ VERIFIED = :verified
209
+
210
+ # @!method self.values
211
+ # @return [Array<Symbol>]
212
+ end
213
+ end
214
+
215
+ # Who can reply to the tweet
216
+ #
217
+ # @see PostForMe::Models::TwitterConfigurationDto#reply_settings
218
+ module ReplySettings
219
+ extend PostForMe::Internal::Type::Enum
220
+
221
+ FOLLOWING = :following
222
+ MENTIONED_USERS = :mentionedUsers
223
+ SUBSCRIBERS = :subscribers
224
+ VERIFIED = :verified
225
+
226
+ # @!method self.values
227
+ # @return [Array<Symbol>]
50
228
  end
51
229
  end
52
230
  end
@@ -37,6 +37,14 @@ module PostForMe
37
37
  # @return [String]
38
38
  required :url, String
39
39
 
40
+ # @!attribute tags
41
+ # List of tags to attach to the media
42
+ #
43
+ # @return [Array<PostForMe::Models::YoutubeConfigurationDto::Media::Tag>, nil]
44
+ optional :tags,
45
+ -> { PostForMe::Internal::Type::ArrayOf[PostForMe::YoutubeConfigurationDto::Media::Tag] },
46
+ nil?: true
47
+
40
48
  # @!attribute thumbnail_timestamp_ms
41
49
  # Timestamp in milliseconds of frame to use as thumbnail for the media
42
50
  #
@@ -49,12 +57,90 @@ module PostForMe
49
57
  # @return [Object, nil]
50
58
  optional :thumbnail_url, PostForMe::Internal::Type::Unknown, nil?: true
51
59
 
52
- # @!method initialize(url:, thumbnail_timestamp_ms: nil, thumbnail_url: nil)
60
+ # @!method initialize(url:, tags: nil, thumbnail_timestamp_ms: nil, thumbnail_url: nil)
53
61
  # @param url [String] Public URL of the media
54
62
  #
63
+ # @param tags [Array<PostForMe::Models::YoutubeConfigurationDto::Media::Tag>, nil] List of tags to attach to the media
64
+ #
55
65
  # @param thumbnail_timestamp_ms [Object, nil] Timestamp in milliseconds of frame to use as thumbnail for the media
56
66
  #
57
67
  # @param thumbnail_url [Object, nil] Public URL of the thumbnail for the media
68
+
69
+ class Tag < PostForMe::Internal::Type::BaseModel
70
+ # @!attribute id
71
+ # Facebook User ID, Instagram Username or Instagram product id to tag
72
+ #
73
+ # @return [String]
74
+ required :id, String
75
+
76
+ # @!attribute platform
77
+ # The platform for the tags
78
+ #
79
+ # @return [Symbol, PostForMe::Models::YoutubeConfigurationDto::Media::Tag::Platform]
80
+ required :platform, enum: -> { PostForMe::YoutubeConfigurationDto::Media::Tag::Platform }
81
+
82
+ # @!attribute type
83
+ # The type of tag, user to tag accounts, product to tag products (only supported
84
+ # for instagram)
85
+ #
86
+ # @return [Symbol, PostForMe::Models::YoutubeConfigurationDto::Media::Tag::Type]
87
+ required :type, enum: -> { PostForMe::YoutubeConfigurationDto::Media::Tag::Type }
88
+
89
+ # @!attribute x
90
+ # Percentage distance from left edge of the image, Not required for videos or
91
+ # stories
92
+ #
93
+ # @return [Float, nil]
94
+ optional :x, Float
95
+
96
+ # @!attribute y_
97
+ # Percentage distance from top edge of the image, Not required for videos or
98
+ # stories
99
+ #
100
+ # @return [Float, nil]
101
+ optional :y_, Float, api_name: :y
102
+
103
+ # @!method initialize(id:, platform:, type:, x: nil, y_: nil)
104
+ # Some parameter documentations has been truncated, see
105
+ # {PostForMe::Models::YoutubeConfigurationDto::Media::Tag} for more details.
106
+ #
107
+ # @param id [String] Facebook User ID, Instagram Username or Instagram product id to tag
108
+ #
109
+ # @param platform [Symbol, PostForMe::Models::YoutubeConfigurationDto::Media::Tag::Platform] The platform for the tags
110
+ #
111
+ # @param type [Symbol, PostForMe::Models::YoutubeConfigurationDto::Media::Tag::Type] The type of tag, user to tag accounts, product to tag products (only supported f
112
+ #
113
+ # @param x [Float] Percentage distance from left edge of the image, Not required for videos or stor
114
+ #
115
+ # @param y_ [Float] Percentage distance from top edge of the image, Not required for videos or stori
116
+
117
+ # The platform for the tags
118
+ #
119
+ # @see PostForMe::Models::YoutubeConfigurationDto::Media::Tag#platform
120
+ module Platform
121
+ extend PostForMe::Internal::Type::Enum
122
+
123
+ FACEBOOK = :facebook
124
+ INSTAGRAM = :instagram
125
+
126
+ # @!method self.values
127
+ # @return [Array<Symbol>]
128
+ end
129
+
130
+ # The type of tag, user to tag accounts, product to tag products (only supported
131
+ # for instagram)
132
+ #
133
+ # @see PostForMe::Models::YoutubeConfigurationDto::Media::Tag#type
134
+ module Type
135
+ extend PostForMe::Internal::Type::Enum
136
+
137
+ USER = :user
138
+ PRODUCT = :product
139
+
140
+ # @!method self.values
141
+ # @return [Array<Symbol>]
142
+ end
143
+ end
58
144
  end
59
145
  end
60
146
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PostForMe
4
- VERSION = "0.1.0.pre.alpha.8"
4
+ VERSION = "0.1.0.pre.alpha.9"
5
5
  end
@@ -33,6 +33,9 @@ module PostForMe
33
33
  sig { returns(T.nilable(Integer)) }
34
34
  attr_accessor :status
35
35
 
36
+ sig { returns(T.nilable(T::Hash[String, String])) }
37
+ attr_accessor :headers
38
+
36
39
  sig { returns(T.nilable(T.anything)) }
37
40
  attr_accessor :body
38
41
 
@@ -41,6 +44,7 @@ module PostForMe
41
44
  params(
42
45
  url: URI::Generic,
43
46
  status: T.nilable(Integer),
47
+ headers: T.nilable(T::Hash[String, String]),
44
48
  body: T.nilable(Object),
45
49
  request: NilClass,
46
50
  response: NilClass,
@@ -50,6 +54,7 @@ module PostForMe
50
54
  def self.new(
51
55
  url:,
52
56
  status: nil,
57
+ headers: nil,
53
58
  body: nil,
54
59
  request: nil,
55
60
  response: nil,
@@ -70,6 +75,7 @@ module PostForMe
70
75
  params(
71
76
  url: URI::Generic,
72
77
  status: NilClass,
78
+ headers: T.nilable(T::Hash[String, String]),
73
79
  body: NilClass,
74
80
  request: NilClass,
75
81
  response: NilClass,
@@ -79,6 +85,7 @@ module PostForMe
79
85
  def self.new(
80
86
  url:,
81
87
  status: nil,
88
+ headers: nil,
82
89
  body: nil,
83
90
  request: nil,
84
91
  response: nil,
@@ -93,6 +100,7 @@ module PostForMe
93
100
  params(
94
101
  url: URI::Generic,
95
102
  status: NilClass,
103
+ headers: T.nilable(T::Hash[String, String]),
96
104
  body: NilClass,
97
105
  request: NilClass,
98
106
  response: NilClass,
@@ -102,6 +110,7 @@ module PostForMe
102
110
  def self.new(
103
111
  url:,
104
112
  status: nil,
113
+ headers: nil,
105
114
  body: nil,
106
115
  request: nil,
107
116
  response: nil,
@@ -116,13 +125,22 @@ module PostForMe
116
125
  params(
117
126
  url: URI::Generic,
118
127
  status: Integer,
128
+ headers: T.nilable(T::Hash[String, String]),
119
129
  body: T.nilable(Object),
120
130
  request: NilClass,
121
131
  response: NilClass,
122
132
  message: T.nilable(String)
123
133
  ).returns(T.attached_class)
124
134
  end
125
- def self.for(url:, status:, body:, request:, response:, message: nil)
135
+ def self.for(
136
+ url:,
137
+ status:,
138
+ headers:,
139
+ body:,
140
+ request:,
141
+ response:,
142
+ message: nil
143
+ )
126
144
  end
127
145
 
128
146
  sig { returns(Integer) }
@@ -133,13 +151,22 @@ module PostForMe
133
151
  params(
134
152
  url: URI::Generic,
135
153
  status: Integer,
154
+ headers: T.nilable(T::Hash[String, String]),
136
155
  body: T.nilable(Object),
137
156
  request: NilClass,
138
157
  response: NilClass,
139
158
  message: T.nilable(String)
140
159
  ).returns(T.attached_class)
141
160
  end
142
- def self.new(url:, status:, body:, request:, response:, message: nil)
161
+ def self.new(
162
+ url:,
163
+ status:,
164
+ headers:,
165
+ body:,
166
+ request:,
167
+ response:,
168
+ message: nil
169
+ )
143
170
  end
144
171
  end
145
172
 
@@ -27,7 +27,7 @@ module PostForMe
27
27
  sig do
28
28
  params(
29
29
  content: T.any(Pathname, StringIO, IO, String),
30
- filename: T.nilable(String),
30
+ filename: T.nilable(T.any(Pathname, String)),
31
31
  content_type: T.nilable(String)
32
32
  ).returns(T.attached_class)
33
33
  end