x-twitter-scraper 0.4.5 → 0.5.2

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 (222) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -0
  3. data/README.md +8 -41
  4. data/lib/x_twitter_scraper/client.rb +1 -1
  5. data/lib/x_twitter_scraper/internal/type/union.rb +13 -0
  6. data/lib/x_twitter_scraper/models/account_retrieve_response.rb +4 -4
  7. data/lib/x_twitter_scraper/models/compose_create_params.rb +194 -122
  8. data/lib/x_twitter_scraper/models/compose_create_response.rb +326 -33
  9. data/lib/x_twitter_scraper/models/credit_retrieve_topup_status_params.rb +2 -2
  10. data/lib/x_twitter_scraper/models/error.rb +99 -3
  11. data/lib/x_twitter_scraper/models/extraction_estimate_cost_params.rb +8 -8
  12. data/lib/x_twitter_scraper/models/guest_wallet_create_params.rb +2 -2
  13. data/lib/x_twitter_scraper/models/guest_wallet_create_response.rb +27 -7
  14. data/lib/x_twitter_scraper/models/guest_wallet_topup_params.rb +2 -2
  15. data/lib/x_twitter_scraper/models/guest_wallet_topup_response.rb +27 -7
  16. data/lib/x_twitter_scraper/models/search_tweet.rb +12 -12
  17. data/lib/x_twitter_scraper/models/support/ticket_create_params.rb +7 -1
  18. data/lib/x_twitter_scraper/models/support/ticket_create_response.rb +40 -3
  19. data/lib/x_twitter_scraper/models/support/ticket_reply_params.rb +7 -1
  20. data/lib/x_twitter_scraper/models/support/ticket_reply_response.rb +40 -3
  21. data/lib/x_twitter_scraper/models/support/ticket_retrieve_response.rb +114 -1
  22. data/lib/x_twitter_scraper/models/x/communities/join_create_params.rb +8 -1
  23. data/lib/x_twitter_scraper/models/x/communities/join_create_response.rb +577 -4
  24. data/lib/x_twitter_scraper/models/x/communities/join_delete_all_params.rb +8 -1
  25. data/lib/x_twitter_scraper/models/x/communities/join_delete_all_response.rb +585 -4
  26. data/lib/x_twitter_scraper/models/x/community_create_params.rb +8 -1
  27. data/lib/x_twitter_scraper/models/x/community_create_response.rb +568 -8
  28. data/lib/x_twitter_scraper/models/x/community_delete_params.rb +8 -1
  29. data/lib/x_twitter_scraper/models/x/community_delete_response.rb +576 -4
  30. data/lib/x_twitter_scraper/models/x/dm_send_params.rb +8 -1
  31. data/lib/x_twitter_scraper/models/x/dm_send_response.rb +573 -7
  32. data/lib/x_twitter_scraper/models/x/media_upload_params.rb +8 -1
  33. data/lib/x_twitter_scraper/models/x/media_upload_response.rb +568 -11
  34. data/lib/x_twitter_scraper/models/x/profile_update_avatar_params.rb +8 -1
  35. data/lib/x_twitter_scraper/models/x/profile_update_avatar_response.rb +576 -4
  36. data/lib/x_twitter_scraper/models/x/profile_update_banner_params.rb +8 -1
  37. data/lib/x_twitter_scraper/models/x/profile_update_banner_response.rb +576 -4
  38. data/lib/x_twitter_scraper/models/x/profile_update_params.rb +8 -1
  39. data/lib/x_twitter_scraper/models/x/profile_update_response.rb +576 -4
  40. data/lib/x_twitter_scraper/models/x/tweet_author.rb +1 -14
  41. data/lib/x_twitter_scraper/models/x/tweet_create_params.rb +5 -5
  42. data/lib/x_twitter_scraper/models/x/tweet_create_response.rb +551 -12
  43. data/lib/x_twitter_scraper/models/x/tweet_delete_params.rb +8 -1
  44. data/lib/x_twitter_scraper/models/x/tweet_delete_response.rb +576 -4
  45. data/lib/x_twitter_scraper/models/x/tweets/like_create_params.rb +8 -1
  46. data/lib/x_twitter_scraper/models/x/tweets/like_create_response.rb +576 -4
  47. data/lib/x_twitter_scraper/models/x/tweets/like_delete_params.rb +8 -1
  48. data/lib/x_twitter_scraper/models/x/tweets/like_delete_response.rb +576 -4
  49. data/lib/x_twitter_scraper/models/x/tweets/retweet_create_params.rb +8 -1
  50. data/lib/x_twitter_scraper/models/x/tweets/retweet_create_response.rb +576 -4
  51. data/lib/x_twitter_scraper/models/x/tweets/retweet_delete_params.rb +8 -1
  52. data/lib/x_twitter_scraper/models/x/tweets/retweet_delete_response.rb +576 -4
  53. data/lib/x_twitter_scraper/models/x/user_remove_follower_params.rb +8 -1
  54. data/lib/x_twitter_scraper/models/x/user_remove_follower_response.rb +576 -4
  55. data/lib/x_twitter_scraper/models/x/user_retrieve_following_params.rb +2 -2
  56. data/lib/x_twitter_scraper/models/x/user_retrieve_replies_params.rb +2 -2
  57. data/lib/x_twitter_scraper/models/x/users/follow_create_params.rb +8 -1
  58. data/lib/x_twitter_scraper/models/x/users/follow_create_response.rb +576 -4
  59. data/lib/x_twitter_scraper/models/x/users/follow_delete_all_params.rb +8 -1
  60. data/lib/x_twitter_scraper/models/x/users/follow_delete_all_response.rb +576 -4
  61. data/lib/x_twitter_scraper/models/x/write_action_retrieve_response.rb +469 -52
  62. data/lib/x_twitter_scraper/models/x/x_account.rb +7 -7
  63. data/lib/x_twitter_scraper/models/x/x_account_detail.rb +1 -1
  64. data/lib/x_twitter_scraper/resources/compose.rb +8 -26
  65. data/lib/x_twitter_scraper/resources/credits.rb +1 -1
  66. data/lib/x_twitter_scraper/resources/extractions.rb +4 -4
  67. data/lib/x_twitter_scraper/resources/guest_wallets.rb +2 -2
  68. data/lib/x_twitter_scraper/resources/monitors/keywords.rb +4 -5
  69. data/lib/x_twitter_scraper/resources/monitors.rb +3 -3
  70. data/lib/x_twitter_scraper/resources/support/tickets.rb +24 -8
  71. data/lib/x_twitter_scraper/resources/trends.rb +1 -1
  72. data/lib/x_twitter_scraper/resources/x/communities/join.rb +22 -8
  73. data/lib/x_twitter_scraper/resources/x/communities.rb +25 -11
  74. data/lib/x_twitter_scraper/resources/x/dm.rb +13 -6
  75. data/lib/x_twitter_scraper/resources/x/media.rb +17 -7
  76. data/lib/x_twitter_scraper/resources/x/profile.rb +46 -17
  77. data/lib/x_twitter_scraper/resources/x/tweets/like.rb +22 -8
  78. data/lib/x_twitter_scraper/resources/x/tweets/retweet.rb +22 -8
  79. data/lib/x_twitter_scraper/resources/x/tweets.rb +31 -16
  80. data/lib/x_twitter_scraper/resources/x/users/follow.rb +22 -8
  81. data/lib/x_twitter_scraper/resources/x/users.rb +16 -9
  82. data/lib/x_twitter_scraper/resources/x.rb +1 -2
  83. data/lib/x_twitter_scraper/version.rb +1 -1
  84. data/rbi/x_twitter_scraper/client.rbi +1 -1
  85. data/rbi/x_twitter_scraper/models/account_retrieve_response.rbi +4 -4
  86. data/rbi/x_twitter_scraper/models/compose_create_params.rbi +392 -215
  87. data/rbi/x_twitter_scraper/models/compose_create_response.rbi +537 -48
  88. data/rbi/x_twitter_scraper/models/credit_retrieve_topup_status_params.rbi +2 -2
  89. data/rbi/x_twitter_scraper/models/error.rbi +379 -13
  90. data/rbi/x_twitter_scraper/models/extraction_estimate_cost_params.rbi +8 -8
  91. data/rbi/x_twitter_scraper/models/guest_wallet_create_params.rbi +2 -2
  92. data/rbi/x_twitter_scraper/models/guest_wallet_create_response.rbi +87 -5
  93. data/rbi/x_twitter_scraper/models/guest_wallet_topup_params.rbi +2 -2
  94. data/rbi/x_twitter_scraper/models/guest_wallet_topup_response.rbi +87 -5
  95. data/rbi/x_twitter_scraper/models/search_tweet.rbi +12 -12
  96. data/rbi/x_twitter_scraper/models/support/ticket_create_params.rbi +9 -1
  97. data/rbi/x_twitter_scraper/models/support/ticket_create_response.rbi +113 -7
  98. data/rbi/x_twitter_scraper/models/support/ticket_reply_params.rbi +9 -1
  99. data/rbi/x_twitter_scraper/models/support/ticket_reply_response.rbi +113 -7
  100. data/rbi/x_twitter_scraper/models/support/ticket_retrieve_response.rbi +276 -5
  101. data/rbi/x_twitter_scraper/models/x/communities/join_create_params.rbi +6 -0
  102. data/rbi/x_twitter_scraper/models/x/communities/join_create_response.rbi +1154 -3
  103. data/rbi/x_twitter_scraper/models/x/communities/join_delete_all_params.rbi +6 -0
  104. data/rbi/x_twitter_scraper/models/x/communities/join_delete_all_response.rbi +1154 -3
  105. data/rbi/x_twitter_scraper/models/x/community_create_params.rbi +6 -0
  106. data/rbi/x_twitter_scraper/models/x/community_create_response.rbi +1127 -5
  107. data/rbi/x_twitter_scraper/models/x/community_delete_params.rbi +6 -0
  108. data/rbi/x_twitter_scraper/models/x/community_delete_response.rbi +1148 -3
  109. data/rbi/x_twitter_scraper/models/x/dm_send_params.rbi +6 -0
  110. data/rbi/x_twitter_scraper/models/x/dm_send_response.rbi +1112 -6
  111. data/rbi/x_twitter_scraper/models/x/media_upload_params.rbi +6 -0
  112. data/rbi/x_twitter_scraper/models/x/media_upload_response.rbi +1124 -9
  113. data/rbi/x_twitter_scraper/models/x/profile_update_avatar_params.rbi +6 -0
  114. data/rbi/x_twitter_scraper/models/x/profile_update_avatar_response.rbi +1152 -3
  115. data/rbi/x_twitter_scraper/models/x/profile_update_banner_params.rbi +6 -0
  116. data/rbi/x_twitter_scraper/models/x/profile_update_banner_response.rbi +1152 -3
  117. data/rbi/x_twitter_scraper/models/x/profile_update_params.rbi +6 -0
  118. data/rbi/x_twitter_scraper/models/x/profile_update_response.rbi +1144 -3
  119. data/rbi/x_twitter_scraper/models/x/tweet_author.rbi +3 -13
  120. data/rbi/x_twitter_scraper/models/x/tweet_create_params.rbi +5 -8
  121. data/rbi/x_twitter_scraper/models/x/tweet_create_response.rbi +1108 -14
  122. data/rbi/x_twitter_scraper/models/x/tweet_delete_params.rbi +6 -0
  123. data/rbi/x_twitter_scraper/models/x/tweet_delete_response.rbi +1140 -3
  124. data/rbi/x_twitter_scraper/models/x/tweets/like_create_params.rbi +6 -0
  125. data/rbi/x_twitter_scraper/models/x/tweets/like_create_response.rbi +1154 -3
  126. data/rbi/x_twitter_scraper/models/x/tweets/like_delete_params.rbi +6 -0
  127. data/rbi/x_twitter_scraper/models/x/tweets/like_delete_response.rbi +1154 -3
  128. data/rbi/x_twitter_scraper/models/x/tweets/retweet_create_params.rbi +6 -0
  129. data/rbi/x_twitter_scraper/models/x/tweets/retweet_create_response.rbi +1154 -3
  130. data/rbi/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbi +6 -0
  131. data/rbi/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbi +1154 -3
  132. data/rbi/x_twitter_scraper/models/x/user_remove_follower_params.rbi +6 -0
  133. data/rbi/x_twitter_scraper/models/x/user_remove_follower_response.rbi +1152 -3
  134. data/rbi/x_twitter_scraper/models/x/user_retrieve_following_params.rbi +2 -2
  135. data/rbi/x_twitter_scraper/models/x/user_retrieve_replies_params.rbi +2 -2
  136. data/rbi/x_twitter_scraper/models/x/users/follow_create_params.rbi +6 -0
  137. data/rbi/x_twitter_scraper/models/x/users/follow_create_response.rbi +1154 -3
  138. data/rbi/x_twitter_scraper/models/x/users/follow_delete_all_params.rbi +6 -0
  139. data/rbi/x_twitter_scraper/models/x/users/follow_delete_all_response.rbi +1154 -3
  140. data/rbi/x_twitter_scraper/models/x/write_action_retrieve_response.rbi +930 -66
  141. data/rbi/x_twitter_scraper/models/x/x_account.rbi +9 -9
  142. data/rbi/x_twitter_scraper/models/x/x_account_detail.rbi +1 -1
  143. data/rbi/x_twitter_scraper/resources/compose.rbi +12 -38
  144. data/rbi/x_twitter_scraper/resources/credits.rbi +1 -1
  145. data/rbi/x_twitter_scraper/resources/extractions.rbi +4 -4
  146. data/rbi/x_twitter_scraper/resources/guest_wallets.rbi +2 -2
  147. data/rbi/x_twitter_scraper/resources/monitors/keywords.rbi +4 -5
  148. data/rbi/x_twitter_scraper/resources/monitors.rbi +3 -3
  149. data/rbi/x_twitter_scraper/resources/support/tickets.rbi +17 -2
  150. data/rbi/x_twitter_scraper/resources/trends.rbi +1 -1
  151. data/rbi/x_twitter_scraper/resources/x/communities/join.rbi +16 -4
  152. data/rbi/x_twitter_scraper/resources/x/communities.rbi +19 -7
  153. data/rbi/x_twitter_scraper/resources/x/dm.rbi +10 -3
  154. data/rbi/x_twitter_scraper/resources/x/media.rbi +9 -4
  155. data/rbi/x_twitter_scraper/resources/x/profile.rbi +27 -8
  156. data/rbi/x_twitter_scraper/resources/x/tweets/like.rbi +16 -4
  157. data/rbi/x_twitter_scraper/resources/x/tweets/retweet.rbi +16 -4
  158. data/rbi/x_twitter_scraper/resources/x/tweets.rbi +31 -12
  159. data/rbi/x_twitter_scraper/resources/x/users/follow.rbi +16 -4
  160. data/rbi/x_twitter_scraper/resources/x/users.rbi +13 -7
  161. data/rbi/x_twitter_scraper/resources/x.rbi +1 -2
  162. data/sig/x_twitter_scraper/models/compose_create_params.rbs +150 -90
  163. data/sig/x_twitter_scraper/models/compose_create_response.rbs +249 -27
  164. data/sig/x_twitter_scraper/models/error.rbs +170 -7
  165. data/sig/x_twitter_scraper/models/guest_wallet_create_response.rbs +35 -5
  166. data/sig/x_twitter_scraper/models/guest_wallet_topup_response.rbs +35 -5
  167. data/sig/x_twitter_scraper/models/support/ticket_create_params.rbs +7 -1
  168. data/sig/x_twitter_scraper/models/support/ticket_create_response.rbs +49 -5
  169. data/sig/x_twitter_scraper/models/support/ticket_reply_params.rbs +7 -1
  170. data/sig/x_twitter_scraper/models/support/ticket_reply_response.rbs +49 -5
  171. data/sig/x_twitter_scraper/models/support/ticket_retrieve_response.rbs +113 -2
  172. data/sig/x_twitter_scraper/models/x/communities/join_create_params.rbs +5 -1
  173. data/sig/x_twitter_scraper/models/x/communities/join_create_response.rbs +540 -4
  174. data/sig/x_twitter_scraper/models/x/communities/join_delete_all_params.rbs +5 -1
  175. data/sig/x_twitter_scraper/models/x/communities/join_delete_all_response.rbs +540 -4
  176. data/sig/x_twitter_scraper/models/x/community_create_params.rbs +10 -1
  177. data/sig/x_twitter_scraper/models/x/community_create_response.rbs +528 -7
  178. data/sig/x_twitter_scraper/models/x/community_delete_params.rbs +10 -1
  179. data/sig/x_twitter_scraper/models/x/community_delete_response.rbs +540 -4
  180. data/sig/x_twitter_scraper/models/x/dm_send_params.rbs +5 -0
  181. data/sig/x_twitter_scraper/models/x/dm_send_response.rbs +539 -5
  182. data/sig/x_twitter_scraper/models/x/media_upload_params.rbs +5 -1
  183. data/sig/x_twitter_scraper/models/x/media_upload_response.rbs +534 -7
  184. data/sig/x_twitter_scraper/models/x/profile_update_avatar_params.rbs +5 -1
  185. data/sig/x_twitter_scraper/models/x/profile_update_avatar_response.rbs +540 -4
  186. data/sig/x_twitter_scraper/models/x/profile_update_banner_params.rbs +5 -1
  187. data/sig/x_twitter_scraper/models/x/profile_update_banner_response.rbs +540 -4
  188. data/sig/x_twitter_scraper/models/x/profile_update_params.rbs +5 -0
  189. data/sig/x_twitter_scraper/models/x/profile_update_response.rbs +540 -4
  190. data/sig/x_twitter_scraper/models/x/tweet_author.rbs +3 -11
  191. data/sig/x_twitter_scraper/models/x/tweet_create_params.rbs +4 -6
  192. data/sig/x_twitter_scraper/models/x/tweet_create_response.rbs +518 -11
  193. data/sig/x_twitter_scraper/models/x/tweet_delete_params.rbs +5 -1
  194. data/sig/x_twitter_scraper/models/x/tweet_delete_response.rbs +540 -4
  195. data/sig/x_twitter_scraper/models/x/tweets/like_create_params.rbs +5 -1
  196. data/sig/x_twitter_scraper/models/x/tweets/like_create_response.rbs +540 -4
  197. data/sig/x_twitter_scraper/models/x/tweets/like_delete_params.rbs +5 -1
  198. data/sig/x_twitter_scraper/models/x/tweets/like_delete_response.rbs +540 -4
  199. data/sig/x_twitter_scraper/models/x/tweets/retweet_create_params.rbs +5 -1
  200. data/sig/x_twitter_scraper/models/x/tweets/retweet_create_response.rbs +540 -4
  201. data/sig/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbs +5 -1
  202. data/sig/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbs +540 -4
  203. data/sig/x_twitter_scraper/models/x/user_remove_follower_params.rbs +5 -1
  204. data/sig/x_twitter_scraper/models/x/user_remove_follower_response.rbs +540 -4
  205. data/sig/x_twitter_scraper/models/x/users/follow_create_params.rbs +5 -1
  206. data/sig/x_twitter_scraper/models/x/users/follow_create_response.rbs +540 -4
  207. data/sig/x_twitter_scraper/models/x/users/follow_delete_all_params.rbs +5 -1
  208. data/sig/x_twitter_scraper/models/x/users/follow_delete_all_response.rbs +540 -4
  209. data/sig/x_twitter_scraper/models/x/write_action_retrieve_response.rbs +428 -54
  210. data/sig/x_twitter_scraper/resources/compose.rbs +2 -12
  211. data/sig/x_twitter_scraper/resources/support/tickets.rbs +2 -0
  212. data/sig/x_twitter_scraper/resources/x/communities/join.rbs +2 -0
  213. data/sig/x_twitter_scraper/resources/x/communities.rbs +2 -0
  214. data/sig/x_twitter_scraper/resources/x/dm.rbs +1 -0
  215. data/sig/x_twitter_scraper/resources/x/media.rbs +1 -0
  216. data/sig/x_twitter_scraper/resources/x/profile.rbs +3 -0
  217. data/sig/x_twitter_scraper/resources/x/tweets/like.rbs +2 -0
  218. data/sig/x_twitter_scraper/resources/x/tweets/retweet.rbs +2 -0
  219. data/sig/x_twitter_scraper/resources/x/tweets.rbs +2 -1
  220. data/sig/x_twitter_scraper/resources/x/users/follow.rbs +2 -0
  221. data/sig/x_twitter_scraper/resources/x/users.rbs +1 -0
  222. metadata +17 -26
@@ -5,25 +5,585 @@ module XTwitterScraper
5
5
  module X
6
6
  # @see XTwitterScraper::Resources::X::Communities#create
7
7
  class CommunityCreateResponse < XTwitterScraper::Internal::Type::BaseModel
8
- # @!attribute community_id
8
+ # @!attribute id
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute account
14
+ # Connected account selected for the write.
15
+ #
16
+ # @return [XTwitterScraper::Models::X::CommunityCreateResponse::Account, nil]
17
+ required :account, -> { XTwitterScraper::Models::X::CommunityCreateResponse::Account }, nil?: true
18
+
19
+ # @!attribute action
20
+ #
21
+ # @return [Symbol, XTwitterScraper::Models::X::CommunityCreateResponse::Action]
22
+ required :action, enum: -> { XTwitterScraper::Models::X::CommunityCreateResponse::Action }
23
+
24
+ # @!attribute billing
25
+ # plannedCredits is the approved maximum. chargedCredits comes from the settled
26
+ # credit ledger. Pending or failed writes are not charged.
27
+ #
28
+ # @return [XTwitterScraper::Models::X::CommunityCreateResponse::Billing]
29
+ required :billing, -> { XTwitterScraper::Models::X::CommunityCreateResponse::Billing }
30
+
31
+ # @!attribute charged
32
+ #
33
+ # @return [Boolean]
34
+ required :charged, XTwitterScraper::Internal::Type::Boolean
35
+
36
+ # @!attribute charged_credits
37
+ #
38
+ # @return [String]
39
+ required :charged_credits, String, api_name: :chargedCredits
40
+
41
+ # @!attribute next_action
42
+ # Exact follow-up an API client or agent should perform.
43
+ #
44
+ # @return [XTwitterScraper::Models::X::CommunityCreateResponse::NextAction, nil]
45
+ required :next_action,
46
+ -> { XTwitterScraper::Models::X::CommunityCreateResponse::NextAction },
47
+ api_name: :nextAction,
48
+ nil?: true
49
+
50
+ # @!attribute object
51
+ #
52
+ # @return [Symbol, :x_write_action]
53
+ required :object, const: :x_write_action
54
+
55
+ # @!attribute poll_after_ms
56
+ #
57
+ # @return [Integer, nil]
58
+ required :poll_after_ms, Integer, api_name: :pollAfterMs, nil?: true
59
+
60
+ # @!attribute request
61
+ # Stable fingerprint and sanitized payload for replay checks.
62
+ #
63
+ # @return [XTwitterScraper::Models::X::CommunityCreateResponse::Request]
64
+ required :request, -> { XTwitterScraper::Models::X::CommunityCreateResponse::Request }
65
+
66
+ # @!attribute result
67
+ # Confirmed result produced by the write, when available.
68
+ #
69
+ # @return [XTwitterScraper::Models::X::CommunityCreateResponse::Result, nil]
70
+ required :result, -> { XTwitterScraper::Models::X::CommunityCreateResponse::Result }, nil?: true
71
+
72
+ # @!attribute retryable
73
+ # True only when a new attempt can reasonably succeed.
74
+ #
75
+ # @return [Boolean]
76
+ required :retryable, XTwitterScraper::Internal::Type::Boolean
77
+
78
+ # @!attribute safe_to_retry
79
+ # True only when no write was dispatched and a new idempotency key may be used.
80
+ #
81
+ # @return [Boolean]
82
+ required :safe_to_retry, XTwitterScraper::Internal::Type::Boolean, api_name: :safeToRetry
83
+
84
+ # @!attribute send_dispatched
85
+ #
86
+ # @return [Boolean]
87
+ required :send_dispatched, XTwitterScraper::Internal::Type::Boolean, api_name: :sendDispatched
88
+
89
+ # @!attribute status
90
+ #
91
+ # @return [Symbol, XTwitterScraper::Models::X::CommunityCreateResponse::Status]
92
+ required :status, enum: -> { XTwitterScraper::Models::X::CommunityCreateResponse::Status }
93
+
94
+ # @!attribute status_url
9
95
  #
10
96
  # @return [String]
11
- required :community_id, String, api_name: :communityId
97
+ required :status_url, String, api_name: :statusUrl
12
98
 
13
99
  # @!attribute success
14
100
  #
15
- # @return [Boolean, true]
16
- required :success, const: true
101
+ # @return [Boolean]
102
+ required :success, XTwitterScraper::Internal::Type::Boolean
103
+
104
+ # @!attribute target
105
+ # Existing X resource targeted by the write, when applicable.
106
+ #
107
+ # @return [XTwitterScraper::Models::X::CommunityCreateResponse::Target, nil]
108
+ required :target, -> { XTwitterScraper::Models::X::CommunityCreateResponse::Target }, nil?: true
109
+
110
+ # @!attribute target_id
111
+ #
112
+ # @return [String, nil]
113
+ required :target_id, String, api_name: :targetId, nil?: true
114
+
115
+ # @!attribute terminal
116
+ #
117
+ # @return [Boolean]
118
+ required :terminal, XTwitterScraper::Internal::Type::Boolean
119
+
120
+ # @!attribute write_action_id
121
+ #
122
+ # @return [String]
123
+ required :write_action_id, String, api_name: :writeActionId
124
+
125
+ # @!attribute community_id
126
+ # Compatibility field for a confirmed community ID.
127
+ #
128
+ # @return [String, nil]
129
+ optional :community_id, String, api_name: :communityId
17
130
 
18
131
  # @!attribute community_name
132
+ # Confirmed community name when available.
19
133
  #
20
134
  # @return [String, nil]
21
135
  optional :community_name, String, api_name: :communityName
22
136
 
23
- # @!method initialize(community_id:, community_name: nil, success: true)
24
- # @param community_id [String]
25
- # @param community_name [String]
26
- # @param success [Boolean, true]
137
+ # @!attribute completed_at
138
+ #
139
+ # @return [Time, nil]
140
+ optional :completed_at, Time, api_name: :completedAt
141
+
142
+ # @!attribute confirmation_attempts
143
+ #
144
+ # @return [Integer, nil]
145
+ optional :confirmation_attempts, Integer, api_name: :confirmationAttempts
146
+
147
+ # @!attribute confirmation_checked_at
148
+ #
149
+ # @return [Time, nil]
150
+ optional :confirmation_checked_at, Time, api_name: :confirmationCheckedAt
151
+
152
+ # @!attribute confirmed_at
153
+ #
154
+ # @return [Time, nil]
155
+ optional :confirmed_at, Time, api_name: :confirmedAt
156
+
157
+ # @!attribute created_at
158
+ #
159
+ # @return [Time, nil]
160
+ optional :created_at, Time, api_name: :createdAt
161
+
162
+ # @!attribute details
163
+ # Structured recovery context for a failed write.
164
+ #
165
+ # @return [Hash{Symbol=>Object}, nil]
166
+ optional :details, XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown]
167
+
168
+ # @!attribute error
169
+ #
170
+ # @return [String, nil]
171
+ optional :error, String
172
+
173
+ # @!attribute expires_at
174
+ # Deadline for resolving a non-terminal write. This is not the Idempotency-Key
175
+ # retention deadline.
176
+ #
177
+ # @return [Time, nil]
178
+ optional :expires_at, Time, api_name: :expiresAt
179
+
180
+ # @!attribute idempotent
181
+ #
182
+ # @return [Boolean, nil]
183
+ optional :idempotent, XTwitterScraper::Internal::Type::Boolean
184
+
185
+ # @!attribute media
186
+ # Media count, kind, size, and billing details when used.
187
+ #
188
+ # @return [Hash{Symbol=>Object}, nil]
189
+ optional :media, XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown]
190
+
191
+ # @!attribute media_id
192
+ # Compatibility field for a confirmed media upload ID.
193
+ #
194
+ # @return [String, nil]
195
+ optional :media_id, String, api_name: :mediaId
196
+
197
+ # @!attribute media_url
198
+ # Public media URL when the upload creates one.
199
+ #
200
+ # @return [String, nil]
201
+ optional :media_url, String, api_name: :mediaUrl
202
+
203
+ # @!attribute message
204
+ #
205
+ # @return [String, nil]
206
+ optional :message, String
207
+
208
+ # @!attribute message_id
209
+ # Compatibility field for a confirmed direct message ID.
210
+ #
211
+ # @return [String, nil]
212
+ optional :message_id, String, api_name: :messageId
213
+
214
+ # @!attribute request_hash
215
+ #
216
+ # @return [String, nil]
217
+ optional :request_hash, String, api_name: :requestHash
218
+
219
+ # @!attribute request_id
220
+ #
221
+ # @return [String, nil]
222
+ optional :request_id, String, api_name: :requestId
223
+
224
+ # @!attribute result_id
225
+ # Compatibility result ID for other write actions.
226
+ #
227
+ # @return [String, nil]
228
+ optional :result_id, String, api_name: :resultId
229
+
230
+ # @!attribute send_dispatched_at
231
+ # Dispatch timestamp when the write reached execution.
232
+ #
233
+ # @return [Time, nil]
234
+ optional :send_dispatched_at, Time, api_name: :sendDispatchedAt
235
+
236
+ # @!attribute tweet_id
237
+ # Compatibility field for a confirmed tweet result ID.
238
+ #
239
+ # @return [String, nil]
240
+ optional :tweet_id, String, api_name: :tweetId
241
+
242
+ # @!attribute updated_at
243
+ #
244
+ # @return [Time, nil]
245
+ optional :updated_at, Time, api_name: :updatedAt
246
+
247
+ # @!method initialize(id:, account:, action:, billing:, charged:, charged_credits:, next_action:, poll_after_ms:, request:, result:, retryable:, safe_to_retry:, send_dispatched:, status:, status_url:, success:, target:, target_id:, terminal:, write_action_id:, community_id: nil, community_name: nil, completed_at: nil, confirmation_attempts: nil, confirmation_checked_at: nil, confirmed_at: nil, created_at: nil, details: nil, error: nil, expires_at: nil, idempotent: nil, media: nil, media_id: nil, media_url: nil, message: nil, message_id: nil, request_hash: nil, request_id: nil, result_id: nil, send_dispatched_at: nil, tweet_id: nil, updated_at: nil, object: :x_write_action)
248
+ # Some parameter documentations has been truncated, see
249
+ # {XTwitterScraper::Models::X::CommunityCreateResponse} for more details.
250
+ #
251
+ # Durable write lifecycle record. Poll statusUrl until terminal is true. Reusing
252
+ # the original Idempotency-Key returns this same record. Submit a new write only
253
+ # when safeToRetry is true, using a new key.
254
+ #
255
+ # @param id [String]
256
+ #
257
+ # @param account [XTwitterScraper::Models::X::CommunityCreateResponse::Account, nil] Connected account selected for the write.
258
+ #
259
+ # @param action [Symbol, XTwitterScraper::Models::X::CommunityCreateResponse::Action]
260
+ #
261
+ # @param billing [XTwitterScraper::Models::X::CommunityCreateResponse::Billing] plannedCredits is the approved maximum. chargedCredits comes from the settled cr
262
+ #
263
+ # @param charged [Boolean]
264
+ #
265
+ # @param charged_credits [String]
266
+ #
267
+ # @param next_action [XTwitterScraper::Models::X::CommunityCreateResponse::NextAction, nil] Exact follow-up an API client or agent should perform.
268
+ #
269
+ # @param poll_after_ms [Integer, nil]
270
+ #
271
+ # @param request [XTwitterScraper::Models::X::CommunityCreateResponse::Request] Stable fingerprint and sanitized payload for replay checks.
272
+ #
273
+ # @param result [XTwitterScraper::Models::X::CommunityCreateResponse::Result, nil] Confirmed result produced by the write, when available.
274
+ #
275
+ # @param retryable [Boolean] True only when a new attempt can reasonably succeed.
276
+ #
277
+ # @param safe_to_retry [Boolean] True only when no write was dispatched and a new idempotency key may be used.
278
+ #
279
+ # @param send_dispatched [Boolean]
280
+ #
281
+ # @param status [Symbol, XTwitterScraper::Models::X::CommunityCreateResponse::Status]
282
+ #
283
+ # @param status_url [String]
284
+ #
285
+ # @param success [Boolean]
286
+ #
287
+ # @param target [XTwitterScraper::Models::X::CommunityCreateResponse::Target, nil] Existing X resource targeted by the write, when applicable.
288
+ #
289
+ # @param target_id [String, nil]
290
+ #
291
+ # @param terminal [Boolean]
292
+ #
293
+ # @param write_action_id [String]
294
+ #
295
+ # @param community_id [String] Compatibility field for a confirmed community ID.
296
+ #
297
+ # @param community_name [String] Confirmed community name when available.
298
+ #
299
+ # @param completed_at [Time]
300
+ #
301
+ # @param confirmation_attempts [Integer]
302
+ #
303
+ # @param confirmation_checked_at [Time]
304
+ #
305
+ # @param confirmed_at [Time]
306
+ #
307
+ # @param created_at [Time]
308
+ #
309
+ # @param details [Hash{Symbol=>Object}] Structured recovery context for a failed write.
310
+ #
311
+ # @param error [String]
312
+ #
313
+ # @param expires_at [Time] Deadline for resolving a non-terminal write. This is not the Idempotency-Key ret
314
+ #
315
+ # @param idempotent [Boolean]
316
+ #
317
+ # @param media [Hash{Symbol=>Object}] Media count, kind, size, and billing details when used.
318
+ #
319
+ # @param media_id [String] Compatibility field for a confirmed media upload ID.
320
+ #
321
+ # @param media_url [String] Public media URL when the upload creates one.
322
+ #
323
+ # @param message [String]
324
+ #
325
+ # @param message_id [String] Compatibility field for a confirmed direct message ID.
326
+ #
327
+ # @param request_hash [String]
328
+ #
329
+ # @param request_id [String]
330
+ #
331
+ # @param result_id [String] Compatibility result ID for other write actions.
332
+ #
333
+ # @param send_dispatched_at [Time] Dispatch timestamp when the write reached execution.
334
+ #
335
+ # @param tweet_id [String] Compatibility field for a confirmed tweet result ID.
336
+ #
337
+ # @param updated_at [Time]
338
+ #
339
+ # @param object [Symbol, :x_write_action]
340
+
341
+ # @see XTwitterScraper::Models::X::CommunityCreateResponse#account
342
+ class Account < XTwitterScraper::Internal::Type::BaseModel
343
+ # @!attribute id
344
+ #
345
+ # @return [String]
346
+ required :id, String
347
+
348
+ # @!attribute username
349
+ #
350
+ # @return [String]
351
+ required :username, String
352
+
353
+ # @!method initialize(id:, username:)
354
+ # Connected account selected for the write.
355
+ #
356
+ # @param id [String]
357
+ # @param username [String]
358
+ end
359
+
360
+ # @see XTwitterScraper::Models::X::CommunityCreateResponse#action
361
+ module Action
362
+ extend XTwitterScraper::Internal::Type::Enum
363
+
364
+ CREATE_TWEET = :create_tweet
365
+ DELETE_TWEET = :delete_tweet
366
+ LIKE = :like
367
+ UNLIKE = :unlike
368
+ RETWEET = :retweet
369
+ UNRETWEET = :unretweet
370
+ FOLLOW = :follow
371
+ UNFOLLOW = :unfollow
372
+ REMOVE_FOLLOWER = :remove_follower
373
+ SEND_DM = :send_dm
374
+ UPLOAD_MEDIA = :upload_media
375
+ UPDATE_PROFILE = :update_profile
376
+ UPDATE_AVATAR = :update_avatar
377
+ UPDATE_BANNER = :update_banner
378
+ CREATE_COMMUNITY = :create_community
379
+ DELETE_COMMUNITY = :delete_community
380
+ JOIN_COMMUNITY = :join_community
381
+ LEAVE_COMMUNITY = :leave_community
382
+
383
+ # @!method self.values
384
+ # @return [Array<Symbol>]
385
+ end
386
+
387
+ # @see XTwitterScraper::Models::X::CommunityCreateResponse#billing
388
+ class Billing < XTwitterScraper::Internal::Type::BaseModel
389
+ # @!attribute charged
390
+ #
391
+ # @return [Boolean]
392
+ required :charged, XTwitterScraper::Internal::Type::Boolean
393
+
394
+ # @!attribute charged_credits
395
+ #
396
+ # @return [String]
397
+ required :charged_credits, String, api_name: :chargedCredits
398
+
399
+ # @!attribute planned_credits
400
+ #
401
+ # @return [String]
402
+ required :planned_credits, String, api_name: :plannedCredits
403
+
404
+ # @!attribute status
405
+ #
406
+ # @return [Symbol, XTwitterScraper::Models::X::CommunityCreateResponse::Billing::Status]
407
+ required :status, enum: -> { XTwitterScraper::Models::X::CommunityCreateResponse::Billing::Status }
408
+
409
+ # @!method initialize(charged:, charged_credits:, planned_credits:, status:)
410
+ # plannedCredits is the approved maximum. chargedCredits comes from the settled
411
+ # credit ledger. Pending or failed writes are not charged.
412
+ #
413
+ # @param charged [Boolean]
414
+ # @param charged_credits [String]
415
+ # @param planned_credits [String]
416
+ # @param status [Symbol, XTwitterScraper::Models::X::CommunityCreateResponse::Billing::Status]
417
+
418
+ # @see XTwitterScraper::Models::X::CommunityCreateResponse::Billing#status
419
+ module Status
420
+ extend XTwitterScraper::Internal::Type::Enum
421
+
422
+ NOT_CHARGED = :not_charged
423
+ PENDING = :pending
424
+ CHARGED = :charged
425
+ CHARGE_FAILED = :charge_failed
426
+ REFUNDED = :refunded
427
+
428
+ # @!method self.values
429
+ # @return [Array<Symbol>]
430
+ end
431
+ end
432
+
433
+ # @see XTwitterScraper::Models::X::CommunityCreateResponse#next_action
434
+ class NextAction < XTwitterScraper::Internal::Type::BaseModel
435
+ # @!attribute type
436
+ #
437
+ # @return [Symbol, XTwitterScraper::Models::X::CommunityCreateResponse::NextAction::Type]
438
+ required :type, enum: -> { XTwitterScraper::Models::X::CommunityCreateResponse::NextAction::Type }
439
+
440
+ # @!attribute after_ms
441
+ #
442
+ # @return [Integer, nil]
443
+ optional :after_ms, Integer, api_name: :afterMs
444
+
445
+ # @!attribute requires_new_idempotency_key
446
+ #
447
+ # @return [Boolean, nil]
448
+ optional :requires_new_idempotency_key,
449
+ XTwitterScraper::Internal::Type::Boolean,
450
+ api_name: :requiresNewIdempotencyKey
451
+
452
+ # @!attribute url
453
+ #
454
+ # @return [String, nil]
455
+ optional :url, String
456
+
457
+ # @!method initialize(type:, after_ms: nil, requires_new_idempotency_key: nil, url: nil)
458
+ # Exact follow-up an API client or agent should perform.
459
+ #
460
+ # @param type [Symbol, XTwitterScraper::Models::X::CommunityCreateResponse::NextAction::Type]
461
+ # @param after_ms [Integer]
462
+ # @param requires_new_idempotency_key [Boolean]
463
+ # @param url [String]
464
+
465
+ # @see XTwitterScraper::Models::X::CommunityCreateResponse::NextAction#type
466
+ module Type
467
+ extend XTwitterScraper::Internal::Type::Enum
468
+
469
+ POLL = :poll
470
+ RETRY = :retry
471
+ VERIFY_RESULT = :verify_result
472
+ FIX_REQUEST = :fix_request
473
+
474
+ # @!method self.values
475
+ # @return [Array<Symbol>]
476
+ end
477
+ end
478
+
479
+ # @see XTwitterScraper::Models::X::CommunityCreateResponse#request
480
+ class Request < XTwitterScraper::Internal::Type::BaseModel
481
+ # @!attribute hash_
482
+ # Stable hash of account, action, target, and payload.
483
+ #
484
+ # @return [String, nil]
485
+ required :hash_, String, api_name: :hash, nil?: true
486
+
487
+ # @!attribute payload
488
+ # Exact sanitized payload dispatched for this action.
489
+ #
490
+ # @return [Hash{Symbol=>Object}, nil]
491
+ required :payload,
492
+ XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown],
493
+ nil?: true
494
+
495
+ # @!method initialize(hash_:, payload:)
496
+ # Stable fingerprint and sanitized payload for replay checks.
497
+ #
498
+ # @param hash_ [String, nil] Stable hash of account, action, target, and payload.
499
+ #
500
+ # @param payload [Hash{Symbol=>Object}, nil] Exact sanitized payload dispatched for this action.
501
+ end
502
+
503
+ # @see XTwitterScraper::Models::X::CommunityCreateResponse#result
504
+ class Result < XTwitterScraper::Internal::Type::BaseModel
505
+ # @!attribute id
506
+ #
507
+ # @return [String, nil]
508
+ optional :id, String
509
+
510
+ # @!attribute state
511
+ #
512
+ # @return [String, nil]
513
+ optional :state, String
514
+
515
+ # @!attribute type
516
+ #
517
+ # @return [Symbol, XTwitterScraper::Models::X::CommunityCreateResponse::Result::Type, nil]
518
+ optional :type, enum: -> { XTwitterScraper::Models::X::CommunityCreateResponse::Result::Type }
519
+
520
+ # @!method initialize(id: nil, state: nil, type: nil)
521
+ # Confirmed result produced by the write, when available.
522
+ #
523
+ # @param id [String]
524
+ # @param state [String]
525
+ # @param type [Symbol, XTwitterScraper::Models::X::CommunityCreateResponse::Result::Type]
526
+
527
+ # @see XTwitterScraper::Models::X::CommunityCreateResponse::Result#type
528
+ module Type
529
+ extend XTwitterScraper::Internal::Type::Enum
530
+
531
+ TWEET = :tweet
532
+ DIRECT_MESSAGE = :direct_message
533
+ MEDIA = :media
534
+ COMMUNITY = :community
535
+ STATE_CHANGE = :state_change
536
+
537
+ # @!method self.values
538
+ # @return [Array<Symbol>]
539
+ end
540
+ end
541
+
542
+ # @see XTwitterScraper::Models::X::CommunityCreateResponse#status
543
+ module Status
544
+ extend XTwitterScraper::Internal::Type::Enum
545
+
546
+ ACCEPTED = :accepted
547
+ DISPATCHING = :dispatching
548
+ PENDING_CONFIRMATION = :pending_confirmation
549
+ SUCCESS = :success
550
+ FAILED = :failed
551
+ EXPIRED = :expired
552
+
553
+ # @!method self.values
554
+ # @return [Array<Symbol>]
555
+ end
556
+
557
+ # @see XTwitterScraper::Models::X::CommunityCreateResponse#target
558
+ class Target < XTwitterScraper::Internal::Type::BaseModel
559
+ # @!attribute id
560
+ #
561
+ # @return [String]
562
+ required :id, String
563
+
564
+ # @!attribute type
565
+ #
566
+ # @return [Symbol, XTwitterScraper::Models::X::CommunityCreateResponse::Target::Type]
567
+ required :type, enum: -> { XTwitterScraper::Models::X::CommunityCreateResponse::Target::Type }
568
+
569
+ # @!method initialize(id:, type:)
570
+ # Existing X resource targeted by the write, when applicable.
571
+ #
572
+ # @param id [String]
573
+ # @param type [Symbol, XTwitterScraper::Models::X::CommunityCreateResponse::Target::Type]
574
+
575
+ # @see XTwitterScraper::Models::X::CommunityCreateResponse::Target#type
576
+ module Type
577
+ extend XTwitterScraper::Internal::Type::Enum
578
+
579
+ TWEET = :tweet
580
+ USER = :user
581
+ COMMUNITY = :community
582
+
583
+ # @!method self.values
584
+ # @return [Array<Symbol>]
585
+ end
586
+ end
27
587
  end
28
588
  end
29
589
  end
@@ -25,13 +25,20 @@ module XTwitterScraper
25
25
  # @return [String]
26
26
  required :community_name, String
27
27
 
28
- # @!method initialize(id:, account:, community_name:, request_options: {})
28
+ # @!attribute idempotency_key
29
+ #
30
+ # @return [String]
31
+ required :idempotency_key, String
32
+
33
+ # @!method initialize(id:, account:, community_name:, idempotency_key:, request_options: {})
29
34
  # @param id [String]
30
35
  #
31
36
  # @param account [String] X account (@username or ID) deleting the community
32
37
  #
33
38
  # @param community_name [String] Community name for confirmation
34
39
  #
40
+ # @param idempotency_key [String]
41
+ #
35
42
  # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}]
36
43
  end
37
44
  end