post-for-me 0.1.0.pre.alpha.18 → 0.1.0.pre.alpha.20

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 (138) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +39 -0
  3. data/README.md +3 -3
  4. data/lib/post_for_me/client.rb +58 -3
  5. data/lib/post_for_me/internal/transport/base_client.rb +5 -0
  6. data/lib/post_for_me/models/account_configuration.rb +455 -0
  7. data/lib/post_for_me/models/bluesky_configuration_dto.rb +3 -118
  8. data/lib/post_for_me/models/create_social_post.rb +8 -594
  9. data/lib/post_for_me/models/create_social_post_preview.rb +82 -0
  10. data/lib/post_for_me/models/{social_post_delete_response.rb → delete_entity_response.rb} +1 -1
  11. data/lib/post_for_me/models/facebook_activity_by_action_type.rb +24 -0
  12. data/lib/post_for_me/models/facebook_configuration_dto.rb +16 -119
  13. data/lib/post_for_me/models/facebook_video_retention_graph.rb +24 -0
  14. data/lib/post_for_me/models/facebook_video_view_time_by_demographic.rb +24 -0
  15. data/lib/post_for_me/models/instagram_configuration_dto.rb +14 -119
  16. data/lib/post_for_me/models/linkedin_configuration_dto.rb +12 -119
  17. data/lib/post_for_me/models/pinterest_configuration_dto.rb +12 -119
  18. data/lib/post_for_me/models/pinterest_metrics_window.rb +120 -0
  19. data/lib/post_for_me/models/platform_post.rb +198 -271
  20. data/lib/post_for_me/models/social_account_create_auth_url_params.rb +70 -36
  21. data/lib/post_for_me/models/social_account_list_params.rb +21 -1
  22. data/lib/post_for_me/models/social_account_metadata.rb +8 -0
  23. data/lib/post_for_me/models/social_post.rb +7 -585
  24. data/lib/post_for_me/models/social_post_media.rb +129 -0
  25. data/lib/post_for_me/models/social_post_preview.rb +64 -0
  26. data/lib/post_for_me/models/social_post_preview_create_params.rb +14 -0
  27. data/lib/post_for_me/models/social_post_preview_create_response.rb +8 -0
  28. data/lib/post_for_me/models/social_post_result.rb +9 -1
  29. data/lib/post_for_me/models/threads_configuration_dto.rb +3 -118
  30. data/lib/post_for_me/models/tiktok_business_video_metric_percentage.rb +24 -0
  31. data/lib/post_for_me/models/tiktok_configuration.rb +3 -118
  32. data/lib/post_for_me/models/twitter_configuration_dto.rb +6 -166
  33. data/lib/post_for_me/models/twitter_poll.rb +47 -0
  34. data/lib/post_for_me/models/webhook.rb +41 -0
  35. data/lib/post_for_me/models/webhook_create_params.rb +45 -0
  36. data/lib/post_for_me/models/webhook_delete_params.rb +20 -0
  37. data/lib/post_for_me/models/webhook_list_params.rb +60 -0
  38. data/lib/post_for_me/models/webhook_list_response.rb +58 -0
  39. data/lib/post_for_me/models/webhook_retrieve_params.rb +20 -0
  40. data/lib/post_for_me/models/webhook_update_params.rb +52 -0
  41. data/lib/post_for_me/models/youtube_configuration_dto.rb +141 -118
  42. data/lib/post_for_me/models/youtube_post_platform_data.rb +16 -0
  43. data/lib/post_for_me/models.rb +41 -0
  44. data/lib/post_for_me/resources/social_account_feeds.rb +4 -2
  45. data/lib/post_for_me/resources/social_accounts.rb +8 -2
  46. data/lib/post_for_me/resources/social_post_previews.rb +49 -0
  47. data/lib/post_for_me/resources/social_posts.rb +6 -6
  48. data/lib/post_for_me/resources/webhooks.rb +167 -0
  49. data/lib/post_for_me/version.rb +1 -1
  50. data/lib/post_for_me.rb +24 -1
  51. data/rbi/post_for_me/client.rbi +41 -2
  52. data/rbi/post_for_me/models/account_configuration.rbi +740 -0
  53. data/rbi/post_for_me/models/bluesky_configuration_dto.rbi +3 -240
  54. data/rbi/post_for_me/models/create_social_post.rbi +10 -1126
  55. data/rbi/post_for_me/models/create_social_post_preview.rbi +142 -0
  56. data/rbi/post_for_me/models/{social_post_delete_response.rbi → delete_entity_response.rbi} +2 -5
  57. data/rbi/post_for_me/models/facebook_activity_by_action_type.rbi +38 -0
  58. data/rbi/post_for_me/models/facebook_configuration_dto.rbi +16 -245
  59. data/rbi/post_for_me/models/facebook_video_retention_graph.rbi +36 -0
  60. data/rbi/post_for_me/models/facebook_video_view_time_by_demographic.rbi +36 -0
  61. data/rbi/post_for_me/models/instagram_configuration_dto.rbi +15 -246
  62. data/rbi/post_for_me/models/linkedin_configuration_dto.rbi +12 -243
  63. data/rbi/post_for_me/models/pinterest_configuration_dto.rbi +12 -247
  64. data/rbi/post_for_me/models/pinterest_metrics_window.rbi +177 -0
  65. data/rbi/post_for_me/models/platform_post.rbi +332 -513
  66. data/rbi/post_for_me/models/social_account_create_auth_url_params.rbi +148 -85
  67. data/rbi/post_for_me/models/social_account_list_params.rbi +54 -0
  68. data/rbi/post_for_me/models/social_account_metadata.rbi +8 -0
  69. data/rbi/post_for_me/models/social_post.rbi +8 -1106
  70. data/rbi/post_for_me/models/social_post_media.rbi +204 -0
  71. data/rbi/post_for_me/models/social_post_preview.rbi +94 -0
  72. data/rbi/post_for_me/models/social_post_preview_create_params.rbi +30 -0
  73. data/rbi/post_for_me/models/social_post_preview_create_response.rbi +11 -0
  74. data/rbi/post_for_me/models/social_post_result.rbi +8 -0
  75. data/rbi/post_for_me/models/threads_configuration_dto.rbi +3 -240
  76. data/rbi/post_for_me/models/tiktok_business_video_metric_percentage.rbi +38 -0
  77. data/rbi/post_for_me/models/tiktok_configuration.rbi +3 -229
  78. data/rbi/post_for_me/models/twitter_configuration_dto.rbi +7 -359
  79. data/rbi/post_for_me/models/twitter_poll.rbi +94 -0
  80. data/rbi/post_for_me/models/webhook.rbi +59 -0
  81. data/rbi/post_for_me/models/webhook_create_params.rbi +104 -0
  82. data/rbi/post_for_me/models/webhook_delete_params.rbi +35 -0
  83. data/rbi/post_for_me/models/webhook_list_params.rbi +96 -0
  84. data/rbi/post_for_me/models/webhook_list_response.rbi +105 -0
  85. data/rbi/post_for_me/models/webhook_retrieve_params.rbi +35 -0
  86. data/rbi/post_for_me/models/webhook_update_params.rbi +125 -0
  87. data/rbi/post_for_me/models/youtube_configuration_dto.rbi +186 -218
  88. data/rbi/post_for_me/models/youtube_post_platform_data.rbi +30 -0
  89. data/rbi/post_for_me/models.rbi +47 -0
  90. data/rbi/post_for_me/resources/social_account_feeds.rbi +4 -2
  91. data/rbi/post_for_me/resources/social_accounts.rbi +11 -2
  92. data/rbi/post_for_me/resources/social_post_previews.rbi +46 -0
  93. data/rbi/post_for_me/resources/social_posts.rbi +9 -17
  94. data/rbi/post_for_me/resources/webhooks.rbi +137 -0
  95. data/sig/post_for_me/client.rbs +4 -0
  96. data/sig/post_for_me/models/account_configuration.rbs +300 -0
  97. data/sig/post_for_me/models/bluesky_configuration_dto.rbs +4 -102
  98. data/sig/post_for_me/models/create_social_post.rbs +8 -454
  99. data/sig/post_for_me/models/create_social_post_preview.rbs +61 -0
  100. data/sig/post_for_me/models/{social_post_delete_response.rbs → delete_entity_response.rbs} +2 -2
  101. data/sig/post_for_me/models/facebook_activity_by_action_type.rbs +16 -0
  102. data/sig/post_for_me/models/facebook_configuration_dto.rbs +12 -102
  103. data/sig/post_for_me/models/facebook_video_retention_graph.rbs +15 -0
  104. data/sig/post_for_me/models/facebook_video_view_time_by_demographic.rbs +15 -0
  105. data/sig/post_for_me/models/instagram_configuration_dto.rbs +9 -99
  106. data/sig/post_for_me/models/linkedin_configuration_dto.rbs +9 -99
  107. data/sig/post_for_me/models/pinterest_configuration_dto.rbs +9 -99
  108. data/sig/post_for_me/models/pinterest_metrics_window.rbs +109 -0
  109. data/sig/post_for_me/models/platform_post.rbs +209 -220
  110. data/sig/post_for_me/models/social_account_create_auth_url_params.rbs +77 -56
  111. data/sig/post_for_me/models/social_account_list_params.rbs +20 -0
  112. data/sig/post_for_me/models/social_account_metadata.rbs +5 -0
  113. data/sig/post_for_me/models/social_post.rbs +8 -454
  114. data/sig/post_for_me/models/social_post_media.rbs +103 -0
  115. data/sig/post_for_me/models/social_post_preview.rbs +56 -0
  116. data/sig/post_for_me/models/social_post_preview_create_params.rbs +15 -0
  117. data/sig/post_for_me/models/social_post_preview_create_response.rbs +8 -0
  118. data/sig/post_for_me/models/social_post_result.rbs +5 -0
  119. data/sig/post_for_me/models/threads_configuration_dto.rbs +4 -99
  120. data/sig/post_for_me/models/tiktok_business_video_metric_percentage.rbs +16 -0
  121. data/sig/post_for_me/models/tiktok_configuration.rbs +4 -99
  122. data/sig/post_for_me/models/twitter_configuration_dto.rbs +9 -151
  123. data/sig/post_for_me/models/twitter_poll.rbs +48 -0
  124. data/sig/post_for_me/models/webhook.rbs +30 -0
  125. data/sig/post_for_me/models/webhook_create_params.rbs +52 -0
  126. data/sig/post_for_me/models/webhook_delete_params.rbs +20 -0
  127. data/sig/post_for_me/models/webhook_list_params.rbs +56 -0
  128. data/sig/post_for_me/models/webhook_list_response.rbs +51 -0
  129. data/sig/post_for_me/models/webhook_retrieve_params.rbs +20 -0
  130. data/sig/post_for_me/models/webhook_update_params.rbs +63 -0
  131. data/sig/post_for_me/models/youtube_configuration_dto.rbs +72 -89
  132. data/sig/post_for_me/models/youtube_post_platform_data.rbs +13 -0
  133. data/sig/post_for_me/models.rbs +40 -0
  134. data/sig/post_for_me/resources/social_accounts.rbs +1 -0
  135. data/sig/post_for_me/resources/social_post_previews.rbs +16 -0
  136. data/sig/post_for_me/resources/social_posts.rbs +5 -5
  137. data/sig/post_for_me/resources/webhooks.rbs +39 -0
  138. metadata +74 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9eed2cd59d70c8ae5e1ea6cfd03e89c0f110611e2bb3831e7501e08e15ea10d6
4
- data.tar.gz: 158166b3b8406e1a13a49f3bd042a4643f53c5605445f0b2a7440944d4f37cac
3
+ metadata.gz: 7c0ce2879f330af65e00f2fcb4ef10ca0d2fd26902590ce44539c981a2335942
4
+ data.tar.gz: 6e86e91a5a683314aef10b246a119e47a92952a098c5169245375133afab167a
5
5
  SHA512:
6
- metadata.gz: d183c77fab58c6f4bec0864c088c2b612a802ecf3b40fdada9b3404ef76ae18534f9bbe929012890161c5c399b487bcfeecd2319930e00562ff19b99b63396d5
7
- data.tar.gz: 39352e27642ba2394a662e6aff18a249bfde42cb77bc3eb59d945e0213a486aab6c25a34ff93cd83db951a7be85f7358dda4e282e9e034dd99f2deeee6c38f6c
6
+ metadata.gz: 9fe1d1621f15252a9cb57dc0914da6c4c17d99e46d3211a9e453aa37af79cb2e66871556395f19bb631e892b5406639fc20c9b48f83ed19cec8a04b9b41bb593
7
+ data.tar.gz: ede3922cc9d4a4a8ca18fcc48825d0019171baa0859497c1ac798775ff90b5880f506c0e8a7838cc56a246d43b08c207ef72f01af4723586e8edeb12ce579d5f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.20 (2026-07-29)
4
+
5
+ Full Changelog: [v0.1.0-alpha.19...v0.1.0-alpha.20](https://github.com/DayMoonDevelopment/post-for-me-ruby/compare/v0.1.0-alpha.19...v0.1.0-alpha.20)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([cc42b0b](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/cc42b0b4a955070d6504799ed2cf65a7aa30b24d))
10
+ * **api:** api update ([cea638b](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/cea638b36863e1acafd7c56a729e547101fdaaa2))
11
+ * **api:** api update ([5401d88](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/5401d88c2b8d4d97f4516c3a429362a10474d985))
12
+ * **api:** api update ([2563cec](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/2563cecfa66fb0f57b5a901fb6b1c6a5adf0d855))
13
+ * **api:** api update ([b7dd794](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/b7dd79454f0c8f011b925724ab9150d7f688b352))
14
+ * **api:** api update ([f03b4d5](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/f03b4d58047d8e48693f8e04df897217d678dee7))
15
+ * **api:** api update ([69f5d77](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/69f5d77884c3af57980f3cd03c0049eb702278a1))
16
+ * **api:** api update ([8135057](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/8135057ababb9efa1e04403e69240bd111253f90))
17
+ * **api:** api update ([660592b](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/660592bfb078716516492819adbc4d6ac441705e))
18
+ * **api:** manual updates ([ee67cbb](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/ee67cbb33219db6c6a5c370908d52fc9d043f104))
19
+ * **stlc:** configurable CI runner and private-production-repo support in workflow templates ([6ce42b3](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/6ce42b32069b9e30ba1665e4a768e8a04f3aacec))
20
+ * support setting headers via env ([df33ef4](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/df33ef40c6e553fbb1492310a421384207093c34))
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * **client:** elide content type header on requests without body ([e2f3fa7](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/e2f3fa7ec494317f5d419a98d0463db16c58f2ce))
26
+ * **client:** send content-type header for requests with an omitted optional body ([fb1fdc4](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/fb1fdc408f78c145e056f940dbd73fcf6ed6a5fe))
27
+
28
+
29
+ ### Chores
30
+
31
+ * **internal:** codegen related update ([c113ae9](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/c113ae9bbe6790e0cdef8822956ac57ec0408fd4))
32
+ * **internal:** more robust bootstrap script ([ee0dc44](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/ee0dc4464e8d9e9e7027aa3a4b77a12fbb0d970d))
33
+
34
+ ## 0.1.0-alpha.19 (2026-04-11)
35
+
36
+ Full Changelog: [v0.1.0-alpha.18...v0.1.0-alpha.19](https://github.com/DayMoonDevelopment/post-for-me-ruby/compare/v0.1.0-alpha.18...v0.1.0-alpha.19)
37
+
38
+ ### Features
39
+
40
+ * **api:** api update ([e9d2eb5](https://github.com/DayMoonDevelopment/post-for-me-ruby/commit/e9d2eb511818f795101fa9695c849c7f4c2add80))
41
+
3
42
  ## 0.1.0-alpha.18 (2026-04-09)
4
43
 
5
44
  Full Changelog: [v0.1.0-alpha.17...v0.1.0-alpha.18](https://github.com/DayMoonDevelopment/post-for-me-ruby/compare/v0.1.0-alpha.17...v0.1.0-alpha.18)
data/README.md CHANGED
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "post-for-me", "~> 0.1.0.pre.alpha.18"
29
+ gem "post-for-me", "~> 0.1.0.pre.alpha.20"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -210,7 +210,7 @@ You can provide typesafe request parameters like so:
210
210
  post_for_me.social_posts.create(
211
211
  caption: "My first post!",
212
212
  social_accounts: ["sa_1234"],
213
- media: [PostForMe::CreateSocialPost::Media.new(url: "https://picsum.photos/1080")]
213
+ media: [PostForMe::SocialPostMedia.new(url: "https://picsum.photos/1080")]
214
214
  )
215
215
  ```
216
216
 
@@ -228,7 +228,7 @@ post_for_me.social_posts.create(
228
228
  params = PostForMe::SocialPostCreateParams.new(
229
229
  caption: "My first post!",
230
230
  social_accounts: ["sa_1234"],
231
- media: [PostForMe::CreateSocialPost::Media.new(url: "https://picsum.photos/1080")]
231
+ media: [PostForMe::SocialPostMedia.new(url: "https://picsum.photos/1080")]
232
232
  )
233
233
  post_for_me.social_posts.create(**params)
234
234
  ```
@@ -69,6 +69,9 @@ module PostForMe
69
69
  # - Post information including caption, url, media, etc..
70
70
  # - When passing **expand=metrics**, Metrics information including views, likes,
71
71
  # follows, etc..
72
+ # - For **Facebook** feeds with **expand=metrics**, page size is capped by the
73
+ # server-side **FacebookFeedMetricsLimitCap** setting (default: **10**) to
74
+ # protect API memory usage.
72
75
  #
73
76
  # Note: Currently the following platforms are supported:
74
77
  #
@@ -78,8 +81,7 @@ module PostForMe
78
81
  # through TikTok Business
79
82
  # - **TikTok Business**,
80
83
  # - **Youtube**
81
- # - **Threads**, If using our Quickstart project then metrics are currently
82
- # unavailable.
84
+ # - **Threads**
83
85
  # - **X (Twitter)**
84
86
  # - **Bluesky**, Bluesky does not expose views or impressions through their API.
85
87
  # - **Pinterest**
@@ -89,6 +91,43 @@ module PostForMe
89
91
  # @return [PostForMe::Resources::SocialAccountFeeds]
90
92
  attr_reader :social_account_feeds
91
93
 
94
+ # Webhooks enable you to subscribe to certain events. This involves Post for Me
95
+ # making a POST request to the URL of any webhooks you create. Only the events you
96
+ # subscribe to will be sent to your webhook URL.
97
+ #
98
+ # ## Payload
99
+ #
100
+ # When an event happens that your webhook is subscribed to, we will make a POST
101
+ # request with the following JSON body
102
+ #
103
+ # ```
104
+ # {
105
+ # "event_type": "",
106
+ # "data": {}
107
+ # }
108
+ # ```
109
+ #
110
+ # The event_type will be the event that triggered the webhook POST, data will be
111
+ # the resulting entity from the event
112
+ #
113
+ # ## Security
114
+ #
115
+ # To verify the POST to your webhook URL is from us we will include a secret in
116
+ # the header "Post-For-Me-Webhook-Secret". When you create a webhook you will
117
+ # receive the secret in the response.
118
+ #
119
+ # ## Retries
120
+ #
121
+ # If your server fails to respond with a 2XX code, requests to it will be retried
122
+ # with exponential backoff around 8 times over the course of just over a day.
123
+ # @return [PostForMe::Resources::Webhooks]
124
+ attr_reader :webhooks
125
+
126
+ # Social Post Previews allow you to see what a Social Post will create for each
127
+ # account in the post.
128
+ # @return [PostForMe::Resources::SocialPostPreviews]
129
+ attr_reader :social_post_previews
130
+
92
131
  # @api private
93
132
  #
94
133
  # @return [Hash{String=>String}]
@@ -126,6 +165,19 @@ module PostForMe
126
165
  raise ArgumentError.new("api_key is required, and can be set via environ: \"POST_FOR_ME_API_KEY\"")
127
166
  end
128
167
 
168
+ headers = {}
169
+ custom_headers_env = ENV["POST_FOR_ME_CUSTOM_HEADERS"]
170
+ unless custom_headers_env.nil?
171
+ parsed = {}
172
+ custom_headers_env.split("\n").each do |line|
173
+ colon = line.index(":")
174
+ unless colon.nil?
175
+ parsed[line[0...colon].strip] = line[(colon + 1)..].strip
176
+ end
177
+ end
178
+ headers = parsed.merge(headers)
179
+ end
180
+
129
181
  @api_key = api_key.to_s
130
182
 
131
183
  super(
@@ -133,7 +185,8 @@ module PostForMe
133
185
  timeout: timeout,
134
186
  max_retries: max_retries,
135
187
  initial_retry_delay: initial_retry_delay,
136
- max_retry_delay: max_retry_delay
188
+ max_retry_delay: max_retry_delay,
189
+ headers: headers
137
190
  )
138
191
 
139
192
  @media = PostForMe::Resources::Media.new(client: self)
@@ -141,6 +194,8 @@ module PostForMe
141
194
  @social_post_results = PostForMe::Resources::SocialPostResults.new(client: self)
142
195
  @social_accounts = PostForMe::Resources::SocialAccounts.new(client: self)
143
196
  @social_account_feeds = PostForMe::Resources::SocialAccountFeeds.new(client: self)
197
+ @webhooks = PostForMe::Resources::Webhooks.new(client: self)
198
+ @social_post_previews = PostForMe::Resources::SocialPostPreviews.new(client: self)
144
199
  end
145
200
  end
146
201
  end
@@ -306,6 +306,11 @@ module PostForMe
306
306
  PostForMe::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
307
307
  end
308
308
 
309
+ # Generated methods always pass `req[:body]` for operations that define a
310
+ # request body, so only elide the content-type header when the operation
311
+ # has no body at all, not when an optional body param was omitted.
312
+ headers.delete("content-type") if body.nil? && !req.key?(:body)
313
+
309
314
  url = PostForMe::Internal::Util.join_parsed_uri(
310
315
  @base_url_components,
311
316
  {**req, path: path, query: query}
@@ -0,0 +1,455 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PostForMe
4
+ module Models
5
+ class AccountConfiguration < PostForMe::Internal::Type::BaseModel
6
+ # @!attribute configuration
7
+ # Configuration for the social account
8
+ #
9
+ # @return [PostForMe::Models::AccountConfiguration::Configuration]
10
+ required :configuration, -> { PostForMe::AccountConfiguration::Configuration }
11
+
12
+ # @!attribute social_account_id
13
+ # ID of the social account, you want to apply the configuration to
14
+ #
15
+ # @return [String]
16
+ required :social_account_id, String
17
+
18
+ # @!method initialize(configuration:, social_account_id:)
19
+ # @param configuration [PostForMe::Models::AccountConfiguration::Configuration] Configuration for the social account
20
+ #
21
+ # @param social_account_id [String] ID of the social account, you want to apply the configuration to
22
+
23
+ # @see PostForMe::Models::AccountConfiguration#configuration
24
+ class Configuration < PostForMe::Internal::Type::BaseModel
25
+ # @!attribute localizations
26
+ # Per-language localizations for the video title and description. Keys are BCP-47
27
+ # language tags (e.g. "fr", "es"). Maps to localizations on the YouTube Data API
28
+ # videos resource.
29
+ #
30
+ # @return [Hash{Symbol=>PostForMe::Models::AccountConfiguration::Configuration::Localization}, nil]
31
+ required :localizations,
32
+ -> {
33
+ PostForMe::Internal::Type::HashOf[PostForMe::AccountConfiguration::Configuration::Localization]
34
+ },
35
+ nil?: true
36
+
37
+ # @!attribute allow_comment
38
+ # Allow comments on TikTok
39
+ #
40
+ # @return [Boolean, nil]
41
+ optional :allow_comment, PostForMe::Internal::Type::Boolean, nil?: true
42
+
43
+ # @!attribute allow_duet
44
+ # Allow duets on TikTok
45
+ #
46
+ # @return [Boolean, nil]
47
+ optional :allow_duet, PostForMe::Internal::Type::Boolean, nil?: true
48
+
49
+ # @!attribute allow_stitch
50
+ # Allow stitch on TikTok
51
+ #
52
+ # @return [Boolean, nil]
53
+ optional :allow_stitch, PostForMe::Internal::Type::Boolean, nil?: true
54
+
55
+ # @!attribute audio_name
56
+ # Display name for the audio track on Instagram Reels. Only honored on Reels
57
+ # uploads, and only when the audio is original (Meta silently ignores it on
58
+ # licensed/fingerprinted tracks).
59
+ #
60
+ # @return [String, nil]
61
+ optional :audio_name, String, nil?: true
62
+
63
+ # @!attribute auto_add_music
64
+ # Will automatically add music to photo posts on TikTok
65
+ #
66
+ # @return [Boolean, nil]
67
+ optional :auto_add_music, PostForMe::Internal::Type::Boolean, nil?: true
68
+
69
+ # @!attribute board_ids
70
+ # Pinterest board IDs
71
+ #
72
+ # @return [Array<String>, nil]
73
+ optional :board_ids, PostForMe::Internal::Type::ArrayOf[String], nil?: true
74
+
75
+ # @!attribute caption
76
+ # Overrides the `caption` from the post
77
+ #
78
+ # @return [Object, nil]
79
+ optional :caption, PostForMe::Internal::Type::Unknown, nil?: true
80
+
81
+ # @!attribute category_id
82
+ # YouTube video category id (maps to snippet.categoryId; see YouTube Data API
83
+ # videoCategories.list)
84
+ #
85
+ # @return [String, nil]
86
+ optional :category_id, String, nil?: true
87
+
88
+ # @!attribute collaborators
89
+ # List of page ids or users to invite as collaborators for a Video Reel (Instagram
90
+ # and Facebook)
91
+ #
92
+ # @return [Array<Array<Object>>, nil]
93
+ optional :collaborators,
94
+ PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::Unknown]],
95
+ nil?: true
96
+
97
+ # @!attribute community_id
98
+ # Id of the twitter community to post to
99
+ #
100
+ # @return [String, nil]
101
+ optional :community_id, String
102
+
103
+ # @!attribute contains_synthetic_media
104
+ # If true, marks the YouTube video as containing altered or synthetic content per
105
+ # YouTube's disclosure policy. Sets status.containsSyntheticMedia on the
106
+ # videos.insert call; YouTube adds a "How this content was made" label to the
107
+ # description automatically.
108
+ #
109
+ # @return [Boolean, nil]
110
+ optional :contains_synthetic_media, PostForMe::Internal::Type::Boolean, nil?: true
111
+
112
+ # @!attribute default_language
113
+ # Default language of the video (BCP-47 language tag, e.g. "en"). Maps to
114
+ # snippet.defaultLanguage.
115
+ #
116
+ # @return [String, nil]
117
+ optional :default_language, String, nil?: true
118
+
119
+ # @!attribute disclose_branded_content
120
+ # Disclose branded content on TikTok
121
+ #
122
+ # @return [Boolean, nil]
123
+ optional :disclose_branded_content, PostForMe::Internal::Type::Boolean, nil?: true
124
+
125
+ # @!attribute disclose_your_brand
126
+ # Disclose your brand on TikTok
127
+ #
128
+ # @return [Boolean, nil]
129
+ optional :disclose_your_brand, PostForMe::Internal::Type::Boolean, nil?: true
130
+
131
+ # @!attribute embeddable
132
+ # If true the video can be embedded on other websites (maps to status.embeddable).
133
+ # Defaults to true.
134
+ #
135
+ # @return [Boolean, nil]
136
+ optional :embeddable, PostForMe::Internal::Type::Boolean, nil?: true
137
+
138
+ # @!attribute is_ai_generated
139
+ # Flag content as AI generated on TikTok
140
+ #
141
+ # @return [Boolean, nil]
142
+ optional :is_ai_generated, PostForMe::Internal::Type::Boolean, nil?: true
143
+
144
+ # @!attribute is_draft
145
+ # Will create a draft upload to TikTok, posting will need to be completed from
146
+ # within the app
147
+ #
148
+ # @return [Boolean, nil]
149
+ optional :is_draft, PostForMe::Internal::Type::Boolean, nil?: true
150
+
151
+ # @!attribute license
152
+ # The video's license (maps to status.license). "youtube" is the standard YouTube
153
+ # license; "creativeCommon" is Creative Commons.
154
+ #
155
+ # @return [Symbol, PostForMe::Models::AccountConfiguration::Configuration::License, nil]
156
+ optional :license, enum: -> { PostForMe::AccountConfiguration::Configuration::License }, nil?: true
157
+
158
+ # @!attribute link
159
+ # Pinterest post link
160
+ #
161
+ # @return [String, nil]
162
+ optional :link, String, nil?: true
163
+
164
+ # @!attribute location
165
+ # Page id with a location that you want to tag the image or video with (Instagram
166
+ # and Facebook)
167
+ #
168
+ # @return [String, nil]
169
+ optional :location, String, nil?: true
170
+
171
+ # @!attribute made_for_kids
172
+ # If true will notify YouTube the video is intended for kids, defaults to false
173
+ #
174
+ # @return [Boolean, nil]
175
+ optional :made_for_kids, PostForMe::Internal::Type::Boolean, nil?: true
176
+
177
+ # @!attribute media
178
+ # Overrides the `media` from the post
179
+ #
180
+ # @return [Array<PostForMe::Models::SocialPostMedia>, nil]
181
+ optional :media, -> { PostForMe::Internal::Type::ArrayOf[PostForMe::SocialPostMedia] }, nil?: true
182
+
183
+ # @!attribute placement
184
+ # Post placement for Facebook/Instagram/Threads
185
+ #
186
+ # @return [Symbol, PostForMe::Models::AccountConfiguration::Configuration::Placement, nil]
187
+ optional :placement,
188
+ enum: -> {
189
+ PostForMe::AccountConfiguration::Configuration::Placement
190
+ },
191
+ nil?: true
192
+
193
+ # @!attribute poll
194
+ # Poll options for the twitter
195
+ #
196
+ # @return [PostForMe::Models::TwitterPoll, nil]
197
+ optional :poll, -> { PostForMe::TwitterPoll }
198
+
199
+ # @!attribute privacy_status
200
+ # Sets the privacy status for TikTok (private, public), or YouTube (private,
201
+ # public, unlisted)
202
+ #
203
+ # @return [Symbol, PostForMe::Models::AccountConfiguration::Configuration::PrivacyStatus, nil]
204
+ optional :privacy_status,
205
+ enum: -> { PostForMe::AccountConfiguration::Configuration::PrivacyStatus },
206
+ nil?: true
207
+
208
+ # @!attribute public_stats_viewable
209
+ # If true, the extended video statistics are publicly viewable (maps to
210
+ # status.publicStatsViewable). Defaults to true.
211
+ #
212
+ # @return [Boolean, nil]
213
+ optional :public_stats_viewable, PostForMe::Internal::Type::Boolean, nil?: true
214
+
215
+ # @!attribute publish_at
216
+ # ISO 8601 datetime at which the video should be published. Only honoured when
217
+ # privacy_status is "private" (maps to status.publishAt).
218
+ #
219
+ # @return [String, nil]
220
+ optional :publish_at, String, nil?: true
221
+
222
+ # @!attribute quote_tweet_id
223
+ # Id of the tweet you want to quote
224
+ #
225
+ # @return [String, nil]
226
+ optional :quote_tweet_id, String
227
+
228
+ # @!attribute recording_date
229
+ # ISO 8601 date (YYYY-MM-DD) or datetime when the video was recorded (maps to
230
+ # recordingDetails.recordingDate).
231
+ #
232
+ # @return [String, nil]
233
+ optional :recording_date, String, nil?: true
234
+
235
+ # @!attribute reply_settings
236
+ # Who can reply to the tweet
237
+ #
238
+ # @return [Symbol, PostForMe::Models::AccountConfiguration::Configuration::ReplySettings, nil]
239
+ optional :reply_settings,
240
+ enum: -> { PostForMe::AccountConfiguration::Configuration::ReplySettings },
241
+ nil?: true
242
+
243
+ # @!attribute reshare_post_id
244
+ # LinkedIn UGC post id to reshare. The caption is used as the reshare commentary.
245
+ #
246
+ # @return [String, nil]
247
+ optional :reshare_post_id, String, nil?: true
248
+
249
+ # @!attribute set_caption_for_each_image
250
+ # If true, include the caption on each image in a Facebook carousel upload; if
251
+ # false, only include it on the final carousel post
252
+ #
253
+ # @return [Boolean, nil]
254
+ optional :set_caption_for_each_image, PostForMe::Internal::Type::Boolean, nil?: true
255
+
256
+ # @!attribute share_to_feed
257
+ # If false Instagram video posts will only be shown in the Reels tab
258
+ #
259
+ # @return [Boolean, nil]
260
+ optional :share_to_feed, PostForMe::Internal::Type::Boolean, nil?: true
261
+
262
+ # @!attribute tags
263
+ # YouTube video tags
264
+ #
265
+ # @return [Array<String>, nil]
266
+ optional :tags, PostForMe::Internal::Type::ArrayOf[String], nil?: true
267
+
268
+ # @!attribute title
269
+ # Overrides the `title` from the post (Pinterest, TikTok, YouTube)
270
+ #
271
+ # @return [String, nil]
272
+ optional :title, String, nil?: true
273
+
274
+ # @!attribute trial_reel_type
275
+ # Instagram trial reel type, when passed will be created as a trial reel. If
276
+ # manual the trial reel can be manually graduated in the native app. If perfomance
277
+ # the trial reel will be automatically graduated if the trial reel performs well.
278
+ #
279
+ # @return [Symbol, PostForMe::Models::AccountConfiguration::Configuration::TrialReelType, nil]
280
+ optional :trial_reel_type,
281
+ enum: -> { PostForMe::AccountConfiguration::Configuration::TrialReelType },
282
+ nil?: true
283
+
284
+ # @!method initialize(localizations:, allow_comment: nil, allow_duet: nil, allow_stitch: nil, audio_name: nil, auto_add_music: nil, board_ids: nil, caption: nil, category_id: nil, collaborators: nil, community_id: nil, contains_synthetic_media: nil, default_language: nil, disclose_branded_content: nil, disclose_your_brand: nil, embeddable: nil, is_ai_generated: nil, is_draft: nil, license: nil, link: nil, location: nil, made_for_kids: nil, media: nil, placement: nil, poll: nil, privacy_status: nil, public_stats_viewable: nil, publish_at: nil, quote_tweet_id: nil, recording_date: nil, reply_settings: nil, reshare_post_id: nil, set_caption_for_each_image: nil, share_to_feed: nil, tags: nil, title: nil, trial_reel_type: nil)
285
+ # Some parameter documentations has been truncated, see
286
+ # {PostForMe::Models::AccountConfiguration::Configuration} for more details.
287
+ #
288
+ # Configuration for the social account
289
+ #
290
+ # @param localizations [Hash{Symbol=>PostForMe::Models::AccountConfiguration::Configuration::Localization}, nil] Per-language localizations for the video title and description. Keys are BCP-47
291
+ #
292
+ # @param allow_comment [Boolean, nil] Allow comments on TikTok
293
+ #
294
+ # @param allow_duet [Boolean, nil] Allow duets on TikTok
295
+ #
296
+ # @param allow_stitch [Boolean, nil] Allow stitch on TikTok
297
+ #
298
+ # @param audio_name [String, nil] Display name for the audio track on Instagram Reels. Only honored on Reels uploa
299
+ #
300
+ # @param auto_add_music [Boolean, nil] Will automatically add music to photo posts on TikTok
301
+ #
302
+ # @param board_ids [Array<String>, nil] Pinterest board IDs
303
+ #
304
+ # @param caption [Object, nil] Overrides the `caption` from the post
305
+ #
306
+ # @param category_id [String, nil] YouTube video category id (maps to snippet.categoryId; see YouTube Data API vide
307
+ #
308
+ # @param collaborators [Array<Array<Object>>, nil] List of page ids or users to invite as collaborators for a Video Reel (Instagram
309
+ #
310
+ # @param community_id [String] Id of the twitter community to post to
311
+ #
312
+ # @param contains_synthetic_media [Boolean, nil] If true, marks the YouTube video as containing altered or synthetic content per
313
+ #
314
+ # @param default_language [String, nil] Default language of the video (BCP-47 language tag, e.g. "en"). Maps to snippet.
315
+ #
316
+ # @param disclose_branded_content [Boolean, nil] Disclose branded content on TikTok
317
+ #
318
+ # @param disclose_your_brand [Boolean, nil] Disclose your brand on TikTok
319
+ #
320
+ # @param embeddable [Boolean, nil] If true the video can be embedded on other websites (maps to status.embeddable).
321
+ #
322
+ # @param is_ai_generated [Boolean, nil] Flag content as AI generated on TikTok
323
+ #
324
+ # @param is_draft [Boolean, nil] Will create a draft upload to TikTok, posting will need to be completed from wit
325
+ #
326
+ # @param license [Symbol, PostForMe::Models::AccountConfiguration::Configuration::License, nil] The video's license (maps to status.license). "youtube" is the standard YouTube
327
+ #
328
+ # @param link [String, nil] Pinterest post link
329
+ #
330
+ # @param location [String, nil] Page id with a location that you want to tag the image or video with (Instagram
331
+ #
332
+ # @param made_for_kids [Boolean, nil] If true will notify YouTube the video is intended for kids, defaults to false
333
+ #
334
+ # @param media [Array<PostForMe::Models::SocialPostMedia>, nil] Overrides the `media` from the post
335
+ #
336
+ # @param placement [Symbol, PostForMe::Models::AccountConfiguration::Configuration::Placement, nil] Post placement for Facebook/Instagram/Threads
337
+ #
338
+ # @param poll [PostForMe::Models::TwitterPoll] Poll options for the twitter
339
+ #
340
+ # @param privacy_status [Symbol, PostForMe::Models::AccountConfiguration::Configuration::PrivacyStatus, nil] Sets the privacy status for TikTok (private, public), or YouTube (private, publi
341
+ #
342
+ # @param public_stats_viewable [Boolean, nil] If true, the extended video statistics are publicly viewable (maps to status.pub
343
+ #
344
+ # @param publish_at [String, nil] ISO 8601 datetime at which the video should be published. Only honoured when pri
345
+ #
346
+ # @param quote_tweet_id [String] Id of the tweet you want to quote
347
+ #
348
+ # @param recording_date [String, nil] ISO 8601 date (YYYY-MM-DD) or datetime when the video was recorded (maps to reco
349
+ #
350
+ # @param reply_settings [Symbol, PostForMe::Models::AccountConfiguration::Configuration::ReplySettings, nil] Who can reply to the tweet
351
+ #
352
+ # @param reshare_post_id [String, nil] LinkedIn UGC post id to reshare. The caption is used as the reshare commentary.
353
+ #
354
+ # @param set_caption_for_each_image [Boolean, nil] If true, include the caption on each image in a Facebook carousel upload; if fal
355
+ #
356
+ # @param share_to_feed [Boolean, nil] If false Instagram video posts will only be shown in the Reels tab
357
+ #
358
+ # @param tags [Array<String>, nil] YouTube video tags
359
+ #
360
+ # @param title [String, nil] Overrides the `title` from the post (Pinterest, TikTok, YouTube)
361
+ #
362
+ # @param trial_reel_type [Symbol, PostForMe::Models::AccountConfiguration::Configuration::TrialReelType, nil] Instagram trial reel type, when passed will be created as a trial reel. If manua
363
+
364
+ class Localization < PostForMe::Internal::Type::BaseModel
365
+ # @!attribute description
366
+ #
367
+ # @return [String, nil]
368
+ optional :description, String, nil?: true
369
+
370
+ # @!attribute title
371
+ #
372
+ # @return [String, nil]
373
+ optional :title, String, nil?: true
374
+
375
+ # @!method initialize(description: nil, title: nil)
376
+ # @param description [String, nil]
377
+ # @param title [String, nil]
378
+ end
379
+
380
+ # The video's license (maps to status.license). "youtube" is the standard YouTube
381
+ # license; "creativeCommon" is Creative Commons.
382
+ #
383
+ # @see PostForMe::Models::AccountConfiguration::Configuration#license
384
+ module License
385
+ extend PostForMe::Internal::Type::Enum
386
+
387
+ YOUTUBE = :youtube
388
+ CREATIVE_COMMON = :creativeCommon
389
+
390
+ # @!method self.values
391
+ # @return [Array<Symbol>]
392
+ end
393
+
394
+ # Post placement for Facebook/Instagram/Threads
395
+ #
396
+ # @see PostForMe::Models::AccountConfiguration::Configuration#placement
397
+ module Placement
398
+ extend PostForMe::Internal::Type::Enum
399
+
400
+ REELS = :reels
401
+ TIMELINE = :timeline
402
+ STORIES = :stories
403
+
404
+ # @!method self.values
405
+ # @return [Array<Symbol>]
406
+ end
407
+
408
+ # Sets the privacy status for TikTok (private, public), or YouTube (private,
409
+ # public, unlisted)
410
+ #
411
+ # @see PostForMe::Models::AccountConfiguration::Configuration#privacy_status
412
+ module PrivacyStatus
413
+ extend PostForMe::Internal::Type::Enum
414
+
415
+ PUBLIC = :public
416
+ PRIVATE = :private
417
+ UNLISTED = :unlisted
418
+
419
+ # @!method self.values
420
+ # @return [Array<Symbol>]
421
+ end
422
+
423
+ # Who can reply to the tweet
424
+ #
425
+ # @see PostForMe::Models::AccountConfiguration::Configuration#reply_settings
426
+ module ReplySettings
427
+ extend PostForMe::Internal::Type::Enum
428
+
429
+ FOLLOWING = :following
430
+ MENTIONED_USERS = :mentionedUsers
431
+ SUBSCRIBERS = :subscribers
432
+ VERIFIED = :verified
433
+
434
+ # @!method self.values
435
+ # @return [Array<Symbol>]
436
+ end
437
+
438
+ # Instagram trial reel type, when passed will be created as a trial reel. If
439
+ # manual the trial reel can be manually graduated in the native app. If perfomance
440
+ # the trial reel will be automatically graduated if the trial reel performs well.
441
+ #
442
+ # @see PostForMe::Models::AccountConfiguration::Configuration#trial_reel_type
443
+ module TrialReelType
444
+ extend PostForMe::Internal::Type::Enum
445
+
446
+ MANUAL = :manual
447
+ PERFORMANCE = :performance
448
+
449
+ # @!method self.values
450
+ # @return [Array<Symbol>]
451
+ end
452
+ end
453
+ end
454
+ end
455
+ end