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