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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a5184e35560a1450d6ba4aa1d1ee45d81d515721f60373b20f48185c0138ef76
4
- data.tar.gz: a94e68f06be96e9d740be9ab9bdbd2eae2ccc6c84f2d13c99979b8af1a3ad40c
3
+ metadata.gz: 01ccb7d44dae77373838e7b5fe9d286727f29d5b0cb28c147c4d5f2db24f8755
4
+ data.tar.gz: 80cf5a0f6c198eb315344dfeec272c8987552d5ec63ac8054b10b6c99787d577
5
5
  SHA512:
6
- metadata.gz: d305f8e81294a82dfb1d92d87ba0091a1dab1cd4735a7bc31127a4cc48db458de2014bda479984a47aad2939537e1eb4c1b57f85ccfc38d84a98cfc20dcae112
7
- data.tar.gz: ed001f25ccbdfb84a5c4672803353528d90f9566d132dce231c0e59bf7259ef2cabac5ee3653c1d8bab35cfe1d76fbbca5f121fa57afea0c8f04ef2ffa6c2808
6
+ metadata.gz: 3040c94c71317b8e81ec5b45fd1b06ed7214b291b158d9ae292d229ce1ad7404b359c6424294702923d4d2edec71dbe5c14542e4c5ae101f189ef07f2dd730ef
7
+ data.tar.gz: a294fa51eff7716dd53392b2defcc295b559c5fddbc3d857f4274d6bcfd52189b105c8d0e247c25820e601670f76ef5c8ab319c423ce777eebf74e1dc69aa14a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.9 (2025-10-03)
4
+
5
+ Full Changelog: [v0.1.0-alpha.8...v0.1.0-alpha.9](https://github.com/DayMoonDevelopment/post-for-me-ruby/compare/v0.1.0-alpha.8...v0.1.0-alpha.9)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([29166f7](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/29166f7dd2eebd6f9a49e99c553f4212233879e9))
10
+ * **api:** api update ([c75db7a](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/c75db7ab2fcc16f9e831ed1722e837d4dc1fbd91))
11
+ * **api:** api update ([11635c1](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/11635c16438bf92c6aec3d4c524f09768bf8f2cc))
12
+ * expose response headers for both streams and errors ([c4a0864](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/c4a0864dab0421eca1ba510038376497ca4c3d1f))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * coroutine leaks from connection pool ([5ca79a4](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/5ca79a4bbab523051dbecd1f48eb95ad5bf93af7))
18
+ * shorten multipart boundary sep to less than RFC specificed max length ([e467fe7](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/e467fe77aacf67eeff2f4abd38177476c925c411))
19
+
20
+
21
+ ### Performance Improvements
22
+
23
+ * faster code formatting ([58bee30](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/58bee30eb5b12ee89f3271e386d425d119641227))
24
+
25
+
26
+ ### Chores
27
+
28
+ * allow fast-format to use bsd sed as well ([b753209](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/b7532090e9056a27ce382fe54965a90a1bf65cce))
29
+ * do not install brew dependencies in ./scripts/bootstrap by default ([ba2ba3c](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/ba2ba3cc8fa0b6e756a840035bcd6f30054a1831))
30
+ * **internal:** codegen related update ([11c589f](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/11c589fc01e8a1c650e271dffb5c9bd9ef2f4da3))
31
+ * **internal:** codegen related update ([6e6de4f](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/6e6de4f6f1424334a37de60918ea43190593d522))
32
+
3
33
  ## 0.1.0-alpha.8 (2025-09-06)
4
34
 
5
35
  Full Changelog: [v0.1.0-alpha.7...v0.1.0-alpha.8](https://github.com/DayMoonDevelopment/post-for-me-ruby/compare/v0.1.0-alpha.7...v0.1.0-alpha.8)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "post-for-me", "~> 0.1.0.pre.alpha.8"
20
+ gem "post-for-me", "~> 0.1.0.pre.alpha.9"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -40,6 +40,9 @@ module PostForMe
40
40
  # @return [Integer, nil]
41
41
  attr_accessor :status
42
42
 
43
+ # @return [Hash{String=>String}, nil]
44
+ attr_accessor :headers
45
+
43
46
  # @return [Object, nil]
44
47
  attr_accessor :body
45
48
 
@@ -47,13 +50,15 @@ module PostForMe
47
50
  #
48
51
  # @param url [URI::Generic]
49
52
  # @param status [Integer, nil]
53
+ # @param headers [Hash{String=>String}, nil]
50
54
  # @param body [Object, nil]
51
55
  # @param request [nil]
52
56
  # @param response [nil]
53
57
  # @param message [String, nil]
54
- def initialize(url:, status: nil, body: nil, request: nil, response: nil, message: nil)
58
+ def initialize(url:, status: nil, headers: nil, body: nil, request: nil, response: nil, message: nil)
55
59
  @url = url
56
60
  @status = status
61
+ @headers = headers
57
62
  @body = body
58
63
  @request = request
59
64
  @response = response
@@ -74,6 +79,7 @@ module PostForMe
74
79
  #
75
80
  # @param url [URI::Generic]
76
81
  # @param status [nil]
82
+ # @param headers [Hash{String=>String}, nil]
77
83
  # @param body [nil]
78
84
  # @param request [nil]
79
85
  # @param response [nil]
@@ -81,6 +87,7 @@ module PostForMe
81
87
  def initialize(
82
88
  url:,
83
89
  status: nil,
90
+ headers: nil,
84
91
  body: nil,
85
92
  request: nil,
86
93
  response: nil,
@@ -95,6 +102,7 @@ module PostForMe
95
102
  #
96
103
  # @param url [URI::Generic]
97
104
  # @param status [nil]
105
+ # @param headers [Hash{String=>String}, nil]
98
106
  # @param body [nil]
99
107
  # @param request [nil]
100
108
  # @param response [nil]
@@ -102,6 +110,7 @@ module PostForMe
102
110
  def initialize(
103
111
  url:,
104
112
  status: nil,
113
+ headers: nil,
105
114
  body: nil,
106
115
  request: nil,
107
116
  response: nil,
@@ -116,21 +125,24 @@ module PostForMe
116
125
  #
117
126
  # @param url [URI::Generic]
118
127
  # @param status [Integer]
128
+ # @param headers [Hash{String=>String}, nil]
119
129
  # @param body [Object, nil]
120
130
  # @param request [nil]
121
131
  # @param response [nil]
122
132
  # @param message [String, nil]
123
133
  #
124
134
  # @return [self]
125
- def self.for(url:, status:, body:, request:, response:, message: nil)
126
- kwargs = {
127
- url: url,
128
- status: status,
129
- body: body,
130
- request: request,
131
- response: response,
132
- message: message
133
- }
135
+ def self.for(url:, status:, headers:, body:, request:, response:, message: nil)
136
+ kwargs =
137
+ {
138
+ url: url,
139
+ status: status,
140
+ headers: headers,
141
+ body: body,
142
+ request: request,
143
+ response: response,
144
+ message: message
145
+ }
134
146
 
135
147
  case status
136
148
  in 400
@@ -162,15 +174,17 @@ module PostForMe
162
174
  #
163
175
  # @param url [URI::Generic]
164
176
  # @param status [Integer]
177
+ # @param headers [Hash{String=>String}, nil]
165
178
  # @param body [Object, nil]
166
179
  # @param request [nil]
167
180
  # @param response [nil]
168
181
  # @param message [String, nil]
169
- def initialize(url:, status:, body:, request:, response:, message: nil)
182
+ def initialize(url:, status:, headers:, body:, request:, response:, message: nil)
170
183
  message ||= {url: url.to_s, status: status, body: body}
171
184
  super(
172
185
  url: url,
173
186
  status: status,
187
+ headers: headers,
174
188
  body: body,
175
189
  request: request,
176
190
  response: response,
@@ -38,18 +38,21 @@ module PostForMe
38
38
  def to_yaml(*a) = read.to_yaml(*a)
39
39
 
40
40
  # @param content [Pathname, StringIO, IO, String]
41
- # @param filename [String, nil]
41
+ # @param filename [Pathname, String, nil]
42
42
  # @param content_type [String, nil]
43
43
  def initialize(content, filename: nil, content_type: nil)
44
- @content = content
44
+ @content_type = content_type
45
45
  @filename =
46
- case content
47
- in Pathname
48
- filename.nil? ? content.basename.to_path : ::File.basename(filename)
46
+ case [filename, (@content = content)]
47
+ in [String | Pathname, _]
48
+ ::File.basename(filename)
49
+ in [nil, Pathname]
50
+ content.basename.to_path
51
+ in [nil, IO]
52
+ content.to_path
49
53
  else
50
- filename.nil? ? nil : ::File.basename(filename)
54
+ filename
51
55
  end
52
- @content_type = content_type
53
56
  end
54
57
  end
55
58
  end
@@ -47,7 +47,7 @@ module PostForMe
47
47
  # @api private
48
48
  #
49
49
  # @param status [Integer]
50
- # @param headers [Hash{String=>String}, Net::HTTPHeader]
50
+ # @param headers [Hash{String=>String}]
51
51
  #
52
52
  # @return [Boolean]
53
53
  def should_retry?(status, headers:)
@@ -85,7 +85,7 @@ module PostForMe
85
85
  #
86
86
  # @param status [Integer]
87
87
  #
88
- # @param response_headers [Hash{String=>String}, Net::HTTPHeader]
88
+ # @param response_headers [Hash{String=>String}]
89
89
  #
90
90
  # @return [Hash{Symbol=>Object}]
91
91
  def follow_redirect(request, status:, response_headers:)
@@ -378,6 +378,7 @@ module PostForMe
378
378
  rescue PostForMe::Errors::APIConnectionError => e
379
379
  status = e
380
380
  end
381
+ headers = PostForMe::Internal::Util.normalized_headers(response&.each_header&.to_h)
381
382
 
382
383
  case status
383
384
  in ..299
@@ -390,7 +391,7 @@ module PostForMe
390
391
  in 300..399
391
392
  self.class.reap_connection!(status, stream: stream)
392
393
 
393
- request = self.class.follow_redirect(request, status: status, response_headers: response)
394
+ request = self.class.follow_redirect(request, status: status, response_headers: headers)
394
395
  send_request(
395
396
  request,
396
397
  redirect_count: redirect_count + 1,
@@ -399,9 +400,9 @@ module PostForMe
399
400
  )
400
401
  in PostForMe::Errors::APIConnectionError if retry_count >= max_retries
401
402
  raise status
402
- in (400..) if retry_count >= max_retries || !self.class.should_retry?(status, headers: response)
403
+ in (400..) if retry_count >= max_retries || !self.class.should_retry?(status, headers: headers)
403
404
  decoded = Kernel.then do
404
- PostForMe::Internal::Util.decode_content(response, stream: stream, suppress_error: true)
405
+ PostForMe::Internal::Util.decode_content(headers, stream: stream, suppress_error: true)
405
406
  ensure
406
407
  self.class.reap_connection!(status, stream: stream)
407
408
  end
@@ -409,6 +410,7 @@ module PostForMe
409
410
  raise PostForMe::Errors::APIStatusError.for(
410
411
  url: url,
411
412
  status: status,
413
+ headers: headers,
412
414
  body: decoded,
413
415
  request: nil,
414
416
  response: response
@@ -485,19 +487,21 @@ module PostForMe
485
487
  send_retry_header: send_retry_header
486
488
  )
487
489
 
488
- decoded = PostForMe::Internal::Util.decode_content(response, stream: stream)
490
+ headers = PostForMe::Internal::Util.normalized_headers(response.each_header.to_h)
491
+ decoded = PostForMe::Internal::Util.decode_content(headers, stream: stream)
489
492
  case req
490
493
  in {stream: Class => st}
491
494
  st.new(
492
495
  model: model,
493
496
  url: url,
494
497
  status: status,
498
+ headers: headers,
495
499
  response: response,
496
500
  unwrap: unwrap,
497
501
  stream: decoded
498
502
  )
499
503
  in {page: Class => page}
500
- page.new(client: self, req: req, headers: response, page_data: decoded)
504
+ page.new(client: self, req: req, headers: headers, page_data: decoded)
501
505
  else
502
506
  unwrapped = PostForMe::Internal::Util.dig(decoded, unwrap)
503
507
  PostForMe::Internal::Type::Converter.coerce(model, unwrapped)
@@ -134,9 +134,9 @@ module PostForMe
134
134
 
135
135
  # rubocop:disable Metrics/BlockLength
136
136
  enum = Enumerator.new do |y|
137
- with_pool(url, deadline: deadline) do |conn|
138
- next if finished
137
+ next if finished
139
138
 
139
+ with_pool(url, deadline: deadline) do |conn|
140
140
  req, closing = self.class.build_request(request) do
141
141
  self.class.calibrate_socket_timeout(conn, deadline)
142
142
  end
@@ -149,7 +149,7 @@ module PostForMe
149
149
 
150
150
  self.class.calibrate_socket_timeout(conn, deadline)
151
151
  conn.request(req) do |rsp|
152
- y << [conn, req, rsp]
152
+ y << [req, rsp]
153
153
  break if finished
154
154
 
155
155
  rsp.read_body do |bytes|
@@ -160,6 +160,8 @@ module PostForMe
160
160
  end
161
161
  eof = true
162
162
  end
163
+ ensure
164
+ conn.finish if !eof && conn&.started?
163
165
  end
164
166
  rescue Timeout::Error
165
167
  raise PostForMe::Errors::APITimeoutError.new(url: url, request: req)
@@ -168,16 +170,11 @@ module PostForMe
168
170
  end
169
171
  # rubocop:enable Metrics/BlockLength
170
172
 
171
- conn, _, response = enum.next
173
+ _, response = enum.next
172
174
  body = PostForMe::Internal::Util.fused_enum(enum, external: true) do
173
175
  finished = true
174
- tap do
175
- enum.next
176
- rescue StopIteration
177
- nil
178
- end
176
+ loop { enum.next }
179
177
  ensure
180
- conn.finish if !eof && conn&.started?
181
178
  closing&.call
182
179
  end
183
180
  [Integer(response.code), response, body]
@@ -39,7 +39,7 @@ module PostForMe
39
39
  #
40
40
  # @param client [PostForMe::Internal::Transport::BaseClient]
41
41
  # @param req [Hash{Symbol=>Object}]
42
- # @param headers [Hash{String=>String}, Net::HTTPHeader]
42
+ # @param headers [Hash{String=>String}]
43
43
  # @param page_data [Object]
44
44
  def initialize(client:, req:, headers:, page_data:)
45
45
  @client = client
@@ -82,17 +82,20 @@ module PostForMe
82
82
  #
83
83
  # @return [Pathname, StringIO, IO, String, Object]
84
84
  def dump(value, state:)
85
- # rubocop:disable Lint/DuplicateBranch
86
85
  case value
86
+ in StringIO | String
87
+ # https://datatracker.ietf.org/doc/html/rfc7578#section-4.2
88
+ # while not required, a filename is recommended, and in practice many servers do expect this
89
+ PostForMe::FilePart.new(value, filename: "upload")
87
90
  in IO
88
91
  state[:can_retry] = false
92
+ value.to_path.nil? ? PostForMe::FilePart.new(value, filename: "upload") : value
89
93
  in PostForMe::FilePart if value.content.is_a?(IO)
90
94
  state[:can_retry] = false
95
+ value
91
96
  else
97
+ value
92
98
  end
93
- # rubocop:enable Lint/DuplicateBranch
94
-
95
- value
96
99
  end
97
100
 
98
101
  # @api private
@@ -566,7 +566,8 @@ module PostForMe
566
566
  #
567
567
  # @return [Array(String, Enumerable<String>)]
568
568
  private def encode_multipart_streaming(body)
569
- boundary = SecureRandom.urlsafe_base64(60)
569
+ # RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length
570
+ boundary = SecureRandom.urlsafe_base64(46)
570
571
 
571
572
  closing = []
572
573
  strio = writable_enum do |y|
@@ -647,7 +648,7 @@ module PostForMe
647
648
  #
648
649
  # Assumes each chunk in stream has `Encoding::BINARY`.
649
650
  #
650
- # @param headers [Hash{String=>String}, Net::HTTPHeader]
651
+ # @param headers [Hash{String=>String}]
651
652
  # @param stream [Enumerable<String>]
652
653
  # @param suppress_error [Boolean]
653
654
  #
@@ -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::BlueskyConfigurationDto::Media::Tag>, nil]
36
+ optional :tags,
37
+ -> { PostForMe::Internal::Type::ArrayOf[PostForMe::BlueskyConfigurationDto::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::BlueskyConfigurationDto::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::BlueskyConfigurationDto::Media::Tag::Platform]
72
+ required :platform, enum: -> { PostForMe::BlueskyConfigurationDto::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::BlueskyConfigurationDto::Media::Tag::Type]
79
+ required :type, enum: -> { PostForMe::BlueskyConfigurationDto::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::BlueskyConfigurationDto::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::BlueskyConfigurationDto::Media::Tag::Platform] The platform for the tags
102
+ #
103
+ # @param type [Symbol, PostForMe::Models::BlueskyConfigurationDto::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::BlueskyConfigurationDto::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::BlueskyConfigurationDto::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