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.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +38 -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 +118 -3
  12. data/lib/post_for_me/models/create_social_post.rb +221 -2
  13. data/lib/post_for_me/models/facebook_configuration_dto.rb +137 -4
  14. data/lib/post_for_me/models/instagram_configuration_dto.rb +135 -4
  15. data/lib/post_for_me/models/linkedin_configuration_dto.rb +118 -3
  16. data/lib/post_for_me/models/pinterest_configuration_dto.rb +118 -3
  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 +118 -3
  20. data/lib/post_for_me/models/tiktok_configuration.rb +127 -4
  21. data/lib/post_for_me/models/twitter_configuration_dto.rb +211 -4
  22. data/lib/post_for_me/models/youtube_configuration_dto.rb +118 -3
  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 +243 -3
  30. data/rbi/post_for_me/models/create_social_post.rbi +424 -0
  31. data/rbi/post_for_me/models/facebook_configuration_dto.rbi +258 -3
  32. data/rbi/post_for_me/models/instagram_configuration_dto.rbi +267 -6
  33. data/rbi/post_for_me/models/linkedin_configuration_dto.rbi +245 -3
  34. data/rbi/post_for_me/models/pinterest_configuration_dto.rbi +246 -3
  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 +240 -3
  38. data/rbi/post_for_me/models/tiktok_configuration.rbi +237 -3
  39. data/rbi/post_for_me/models/twitter_configuration_dto.rbi +452 -4
  40. data/rbi/post_for_me/models/youtube_configuration_dto.rbi +240 -3
  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 +109 -4
  44. data/sig/post_for_me/models/create_social_post.rbs +180 -1
  45. data/sig/post_for_me/models/facebook_configuration_dto.rbs +109 -4
  46. data/sig/post_for_me/models/instagram_configuration_dto.rbs +112 -7
  47. data/sig/post_for_me/models/linkedin_configuration_dto.rbs +109 -4
  48. data/sig/post_for_me/models/pinterest_configuration_dto.rbs +99 -4
  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 +99 -4
  52. data/sig/post_for_me/models/tiktok_configuration.rbs +104 -4
  53. data/sig/post_for_me/models/twitter_configuration_dto.rbs +196 -4
  54. data/sig/post_for_me/models/youtube_configuration_dto.rbs +107 -4
  55. metadata +2 -2
@@ -12,8 +12,10 @@ module PostForMe
12
12
  # @!attribute media
13
13
  # Overrides the `media` from the post
14
14
  #
15
- # @return [Array<String>, nil]
16
- optional :media, PostForMe::Internal::Type::ArrayOf[String], nil?: true
15
+ # @return [Array<PostForMe::Models::ThreadsConfigurationDto::Media>, nil]
16
+ optional :media,
17
+ -> { PostForMe::Internal::Type::ArrayOf[PostForMe::ThreadsConfigurationDto::Media] },
18
+ nil?: true
17
19
 
18
20
  # @!attribute placement
19
21
  # Threads post placement
@@ -24,10 +26,123 @@ module PostForMe
24
26
  # @!method initialize(caption: nil, media: nil, placement: nil)
25
27
  # @param caption [Object, nil] Overrides the `caption` from the post
26
28
  #
27
- # @param media [Array<String>, nil] Overrides the `media` from the post
29
+ # @param media [Array<PostForMe::Models::ThreadsConfigurationDto::Media>, nil] Overrides the `media` from the post
28
30
  #
29
31
  # @param placement [Symbol, PostForMe::Models::ThreadsConfigurationDto::Placement, nil] Threads post placement
30
32
 
33
+ class Media < PostForMe::Internal::Type::BaseModel
34
+ # @!attribute url
35
+ # Public URL of the media
36
+ #
37
+ # @return [String]
38
+ required :url, String
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
+
48
+ # @!attribute thumbnail_timestamp_ms
49
+ # Timestamp in milliseconds of frame to use as thumbnail for the media
50
+ #
51
+ # @return [Object, nil]
52
+ optional :thumbnail_timestamp_ms, PostForMe::Internal::Type::Unknown, nil?: true
53
+
54
+ # @!attribute thumbnail_url
55
+ # Public URL of the thumbnail for the media
56
+ #
57
+ # @return [Object, nil]
58
+ optional :thumbnail_url, PostForMe::Internal::Type::Unknown, nil?: true
59
+
60
+ # @!method initialize(url:, tags: nil, thumbnail_timestamp_ms: nil, thumbnail_url: nil)
61
+ # @param url [String] Public URL of the media
62
+ #
63
+ # @param tags [Array<PostForMe::Models::ThreadsConfigurationDto::Media::Tag>, nil] List of tags to attach to the media
64
+ #
65
+ # @param thumbnail_timestamp_ms [Object, nil] Timestamp in milliseconds of frame to use as thumbnail for the media
66
+ #
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
144
+ end
145
+
31
146
  # Threads post placement
32
147
  #
33
148
  # @see PostForMe::Models::ThreadsConfigurationDto#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
  #
@@ -55,8 +61,10 @@ module PostForMe
55
61
  # @!attribute media
56
62
  # Overrides the `media` from the post
57
63
  #
58
- # @return [Array<String>, nil]
59
- optional :media, PostForMe::Internal::Type::ArrayOf[String], nil?: true
64
+ # @return [Array<PostForMe::Models::TiktokConfiguration::Media>, nil]
65
+ optional :media,
66
+ -> { PostForMe::Internal::Type::ArrayOf[PostForMe::TiktokConfiguration::Media] },
67
+ nil?: true
60
68
 
61
69
  # @!attribute privacy_status
62
70
  # Sets the privacy status for TikTok (private, public)
@@ -70,7 +78,7 @@ module PostForMe
70
78
  # @return [String, nil]
71
79
  optional :title, String, nil?: true
72
80
 
73
- # @!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)
74
82
  # Some parameter documentations has been truncated, see
75
83
  # {PostForMe::Models::TiktokConfiguration} for more details.
76
84
  #
@@ -80,6 +88,8 @@ module PostForMe
80
88
  #
81
89
  # @param allow_stitch [Boolean, nil] Allow stitch on TikTok
82
90
  #
91
+ # @param auto_add_music [Boolean, nil] Will automatically add music to photo posts
92
+ #
83
93
  # @param caption [Object, nil] Overrides the `caption` from the post
84
94
  #
85
95
  # @param disclose_branded_content [Boolean, nil] Disclose branded content on TikTok
@@ -90,11 +100,124 @@ module PostForMe
90
100
  #
91
101
  # @param is_draft [Boolean, nil] Will create a draft upload to TikTok, posting will need to be completed from wit
92
102
  #
93
- # @param media [Array<String>, nil] Overrides the `media` from the post
103
+ # @param media [Array<PostForMe::Models::TiktokConfiguration::Media>, nil] Overrides the `media` from the post
94
104
  #
95
105
  # @param privacy_status [String, nil] Sets the privacy status for TikTok (private, public)
96
106
  #
97
107
  # @param title [String, nil] Overrides the `title` from the post
108
+
109
+ class Media < PostForMe::Internal::Type::BaseModel
110
+ # @!attribute url
111
+ # Public URL of the media
112
+ #
113
+ # @return [String]
114
+ required :url, String
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
+
124
+ # @!attribute thumbnail_timestamp_ms
125
+ # Timestamp in milliseconds of frame to use as thumbnail for the media
126
+ #
127
+ # @return [Object, nil]
128
+ optional :thumbnail_timestamp_ms, PostForMe::Internal::Type::Unknown, nil?: true
129
+
130
+ # @!attribute thumbnail_url
131
+ # Public URL of the thumbnail for the media
132
+ #
133
+ # @return [Object, nil]
134
+ optional :thumbnail_url, PostForMe::Internal::Type::Unknown, nil?: true
135
+
136
+ # @!method initialize(url:, tags: nil, thumbnail_timestamp_ms: nil, thumbnail_url: nil)
137
+ # @param url [String] Public URL of the media
138
+ #
139
+ # @param tags [Array<PostForMe::Models::TiktokConfiguration::Media::Tag>, nil] List of tags to attach to the media
140
+ #
141
+ # @param thumbnail_timestamp_ms [Object, nil] Timestamp in milliseconds of frame to use as thumbnail for the media
142
+ #
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
220
+ end
98
221
  end
99
222
  end
100
223
  end
@@ -9,16 +9,223 @@ 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
  #
15
- # @return [Array<String>, nil]
16
- optional :media, PostForMe::Internal::Type::ArrayOf[String], nil?: true
21
+ # @return [Array<PostForMe::Models::TwitterConfigurationDto::Media>, nil]
22
+ optional :media,
23
+ -> { PostForMe::Internal::Type::ArrayOf[PostForMe::TwitterConfigurationDto::Media] },
24
+ nil?: true
25
+
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
17
43
 
18
- # @!method initialize(caption: nil, media: nil)
44
+ # @!method initialize(caption: nil, community_id: nil, media: nil, poll: nil, quote_tweet_id: nil, reply_settings: nil)
19
45
  # @param caption [Object, nil] Overrides the `caption` from the post
20
46
  #
21
- # @param media [Array<String>, nil] Overrides the `media` from the post
47
+ # @param community_id [String] Id of the community to post to
48
+ #
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
56
+
57
+ class Media < PostForMe::Internal::Type::BaseModel
58
+ # @!attribute url
59
+ # Public URL of the media
60
+ #
61
+ # @return [String]
62
+ required :url, String
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
+
72
+ # @!attribute thumbnail_timestamp_ms
73
+ # Timestamp in milliseconds of frame to use as thumbnail for the media
74
+ #
75
+ # @return [Object, nil]
76
+ optional :thumbnail_timestamp_ms, PostForMe::Internal::Type::Unknown, nil?: true
77
+
78
+ # @!attribute thumbnail_url
79
+ # Public URL of the thumbnail for the media
80
+ #
81
+ # @return [Object, nil]
82
+ optional :thumbnail_url, PostForMe::Internal::Type::Unknown, nil?: true
83
+
84
+ # @!method initialize(url:, tags: nil, thumbnail_timestamp_ms: nil, thumbnail_url: nil)
85
+ # @param url [String] Public URL of the media
86
+ #
87
+ # @param tags [Array<PostForMe::Models::TwitterConfigurationDto::Media::Tag>, nil] List of tags to attach to the media
88
+ #
89
+ # @param thumbnail_timestamp_ms [Object, nil] Timestamp in milliseconds of frame to use as thumbnail for the media
90
+ #
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>]
228
+ end
22
229
  end
23
230
  end
24
231
  end
@@ -12,8 +12,10 @@ module PostForMe
12
12
  # @!attribute media
13
13
  # Overrides the `media` from the post
14
14
  #
15
- # @return [Array<String>, nil]
16
- optional :media, PostForMe::Internal::Type::ArrayOf[String], nil?: true
15
+ # @return [Array<PostForMe::Models::YoutubeConfigurationDto::Media>, nil]
16
+ optional :media,
17
+ -> { PostForMe::Internal::Type::ArrayOf[PostForMe::YoutubeConfigurationDto::Media] },
18
+ nil?: true
17
19
 
18
20
  # @!attribute title
19
21
  # Overrides the `title` from the post
@@ -24,9 +26,122 @@ module PostForMe
24
26
  # @!method initialize(caption: nil, media: nil, title: nil)
25
27
  # @param caption [Object, nil] Overrides the `caption` from the post
26
28
  #
27
- # @param media [Array<String>, nil] Overrides the `media` from the post
29
+ # @param media [Array<PostForMe::Models::YoutubeConfigurationDto::Media>, nil] Overrides the `media` from the post
28
30
  #
29
31
  # @param title [String, nil] Overrides the `title` from the post
32
+
33
+ class Media < PostForMe::Internal::Type::BaseModel
34
+ # @!attribute url
35
+ # Public URL of the media
36
+ #
37
+ # @return [String]
38
+ required :url, String
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
+
48
+ # @!attribute thumbnail_timestamp_ms
49
+ # Timestamp in milliseconds of frame to use as thumbnail for the media
50
+ #
51
+ # @return [Object, nil]
52
+ optional :thumbnail_timestamp_ms, PostForMe::Internal::Type::Unknown, nil?: true
53
+
54
+ # @!attribute thumbnail_url
55
+ # Public URL of the thumbnail for the media
56
+ #
57
+ # @return [Object, nil]
58
+ optional :thumbnail_url, PostForMe::Internal::Type::Unknown, nil?: true
59
+
60
+ # @!method initialize(url:, tags: nil, thumbnail_timestamp_ms: nil, thumbnail_url: nil)
61
+ # @param url [String] Public URL of the media
62
+ #
63
+ # @param tags [Array<PostForMe::Models::YoutubeConfigurationDto::Media::Tag>, nil] List of tags to attach to the media
64
+ #
65
+ # @param thumbnail_timestamp_ms [Object, nil] Timestamp in milliseconds of frame to use as thumbnail for the media
66
+ #
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
144
+ end
30
145
  end
31
146
  end
32
147
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PostForMe
4
- VERSION = "0.1.0.pre.alpha.7"
4
+ VERSION = "0.1.0.pre.alpha.9"
5
5
  end