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
@@ -18,6 +18,34 @@ module XTwitterScraper
18
18
  end
19
19
  attr_accessor :error
20
20
 
21
+ # Human-readable error guidance.
22
+ sig { returns(T.nilable(String)) }
23
+ attr_reader :message
24
+
25
+ sig { params(message: String).void }
26
+ attr_writer :message
27
+
28
+ # Machine-readable reason for a login cooldown.
29
+ sig { returns(T.nilable(String)) }
30
+ attr_reader :reason
31
+
32
+ sig { params(reason: String).void }
33
+ attr_writer :reason
34
+
35
+ # Seconds until the next permitted request.
36
+ sig { returns(T.nilable(Integer)) }
37
+ attr_reader :retry_after
38
+
39
+ sig { params(retry_after: Integer).void }
40
+ attr_writer :retry_after
41
+
42
+ # Required wait in milliseconds.
43
+ sig { returns(T.nilable(Integer)) }
44
+ attr_reader :retry_after_ms
45
+
46
+ sig { params(retry_after_ms: Integer).void }
47
+ attr_writer :retry_after_ms
48
+
21
49
  # Error response. Default v1 returns a legacy string error code. Send
22
50
  # `xquik-api-contract: 2026-04-29` to receive the structured best-practice error
23
51
  # object.
@@ -27,10 +55,24 @@ module XTwitterScraper
27
55
  T.any(
28
56
  XTwitterScraper::Error::Error::LegacyErrorCode::OrSymbol,
29
57
  XTwitterScraper::Error::Error::StructuredError::OrHash
30
- )
58
+ ),
59
+ message: String,
60
+ reason: String,
61
+ retry_after: Integer,
62
+ retry_after_ms: Integer
31
63
  ).returns(T.attached_class)
32
64
  end
33
- def self.new(error:)
65
+ def self.new(
66
+ error:,
67
+ # Human-readable error guidance.
68
+ message: nil,
69
+ # Machine-readable reason for a login cooldown.
70
+ reason: nil,
71
+ # Seconds until the next permitted request.
72
+ retry_after: nil,
73
+ # Required wait in milliseconds.
74
+ retry_after_ms: nil
75
+ )
34
76
  end
35
77
 
36
78
  sig do
@@ -40,7 +82,11 @@ module XTwitterScraper
40
82
  T.any(
41
83
  XTwitterScraper::Error::Error::LegacyErrorCode::OrSymbol,
42
84
  XTwitterScraper::Error::Error::StructuredError
43
- )
85
+ ),
86
+ message: String,
87
+ reason: String,
88
+ retry_after: Integer,
89
+ retry_after_ms: Integer
44
90
  }
45
91
  )
46
92
  end
@@ -267,6 +313,171 @@ module XTwitterScraper
267
313
  :user_not_found,
268
314
  XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
269
315
  )
316
+ BODY_TOO_LARGE =
317
+ T.let(
318
+ :body_too_large,
319
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
320
+ )
321
+ CHECKOUT_UNAVAILABLE =
322
+ T.let(
323
+ :checkout_unavailable,
324
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
325
+ )
326
+ CONNECTION_CHALLENGE_EXPIRED =
327
+ T.let(
328
+ :connection_challenge_expired,
329
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
330
+ )
331
+ CONNECTION_CHALLENGE_INACTIVE =
332
+ T.let(
333
+ :connection_challenge_inactive,
334
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
335
+ )
336
+ DRAFT_NOT_FOUND =
337
+ T.let(
338
+ :draft_not_found,
339
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
340
+ )
341
+ FAVORITERS_UNAVAILABLE =
342
+ T.let(
343
+ :favoriters_unavailable,
344
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
345
+ )
346
+ FORBIDDEN =
347
+ T.let(
348
+ :forbidden,
349
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
350
+ )
351
+ GUEST_WALLET_UNAVAILABLE =
352
+ T.let(
353
+ :guest_wallet_unavailable,
354
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
355
+ )
356
+ GUEST_WALLETS_DISABLED =
357
+ T.let(
358
+ :guest_wallets_disabled,
359
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
360
+ )
361
+ GUEST_WALLETS_UNAVAILABLE =
362
+ T.let(
363
+ :guest_wallets_unavailable,
364
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
365
+ )
366
+ IDEMPOTENCY_CONFLICT =
367
+ T.let(
368
+ :idempotency_conflict,
369
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
370
+ )
371
+ IDEMPOTENCY_KEY_CONFLICT =
372
+ T.let(
373
+ :idempotency_key_conflict,
374
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
375
+ )
376
+ INVALID_COMMUNITY_ID =
377
+ T.let(
378
+ :invalid_community_id,
379
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
380
+ )
381
+ INVALID_IDEMPOTENCY_KEY =
382
+ T.let(
383
+ :invalid_idempotency_key,
384
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
385
+ )
386
+ INVALID_LIST_ID =
387
+ T.let(
388
+ :invalid_list_id,
389
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
390
+ )
391
+ INVALID_PAYMENT_AMOUNT =
392
+ T.let(
393
+ :invalid_payment_amount,
394
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
395
+ )
396
+ INVALID_RANGE =
397
+ T.let(
398
+ :invalid_range,
399
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
400
+ )
401
+ LOGIN_RATE_LIMITED =
402
+ T.let(
403
+ :login_rate_limited,
404
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
405
+ )
406
+ MISSING_IDEMPOTENCY_KEY =
407
+ T.let(
408
+ :missing_idempotency_key,
409
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
410
+ )
411
+ MISSING_IDS =
412
+ T.let(
413
+ :missing_ids,
414
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
415
+ )
416
+ NO_CACHED_STYLE =
417
+ T.let(
418
+ :no_cached_style,
419
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
420
+ )
421
+ PASSKEY_REQUIRED =
422
+ T.let(
423
+ :passkey_required,
424
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
425
+ )
426
+ RATE_LIMITED =
427
+ T.let(
428
+ :rate_limited,
429
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
430
+ )
431
+ READ_REQUEST_TIMEOUT =
432
+ T.let(
433
+ :read_request_timeout,
434
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
435
+ )
436
+ REPLIES_INCOMPLETE =
437
+ T.let(
438
+ :replies_incomplete,
439
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
440
+ )
441
+ SUPPORT_MEDIA_RATE_LIMIT =
442
+ T.let(
443
+ :support_media_rate_limit,
444
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
445
+ )
446
+ SUPPORT_REQUEST_RATE_LIMIT =
447
+ T.let(
448
+ :support_request_rate_limit,
449
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
450
+ )
451
+ TOO_MANY_IDS =
452
+ T.let(
453
+ :too_many_ids,
454
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
455
+ )
456
+ UNKNOWN_FIELD =
457
+ T.let(
458
+ :unknown_field,
459
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
460
+ )
461
+ UNSUPPORTED_MEDIA_TYPE =
462
+ T.let(
463
+ :unsupported_media_type,
464
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
465
+ )
466
+ WEBHOOK_INACTIVE =
467
+ T.let(
468
+ :webhook_inactive,
469
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
470
+ )
471
+ WRITE_TRACKING_UNAVAILABLE =
472
+ T.let(
473
+ :write_tracking_unavailable,
474
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
475
+ )
476
+ X_WRITE_UNCONFIRMED =
477
+ T.let(
478
+ :x_write_unconfirmed,
479
+ XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
480
+ )
270
481
  X_ACCOUNT_FEATURE_REQUIRED =
271
482
  T.let(
272
483
  :x_account_feature_required,
@@ -397,11 +608,6 @@ module XTwitterScraper
397
608
  :x_write_failed,
398
609
  XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
399
610
  )
400
- X_WRITE_UNCONFIRMED =
401
- T.let(
402
- :x_write_unconfirmed,
403
- XTwitterScraper::Error::Error::LegacyErrorCode::TaggedSymbol
404
- )
405
611
 
406
612
  sig do
407
613
  override.returns(
@@ -678,6 +884,171 @@ module XTwitterScraper
678
884
  :user_not_found,
679
885
  XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
680
886
  )
887
+ BODY_TOO_LARGE =
888
+ T.let(
889
+ :body_too_large,
890
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
891
+ )
892
+ CHECKOUT_UNAVAILABLE =
893
+ T.let(
894
+ :checkout_unavailable,
895
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
896
+ )
897
+ CONNECTION_CHALLENGE_EXPIRED =
898
+ T.let(
899
+ :connection_challenge_expired,
900
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
901
+ )
902
+ CONNECTION_CHALLENGE_INACTIVE =
903
+ T.let(
904
+ :connection_challenge_inactive,
905
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
906
+ )
907
+ DRAFT_NOT_FOUND =
908
+ T.let(
909
+ :draft_not_found,
910
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
911
+ )
912
+ FAVORITERS_UNAVAILABLE =
913
+ T.let(
914
+ :favoriters_unavailable,
915
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
916
+ )
917
+ FORBIDDEN =
918
+ T.let(
919
+ :forbidden,
920
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
921
+ )
922
+ GUEST_WALLET_UNAVAILABLE =
923
+ T.let(
924
+ :guest_wallet_unavailable,
925
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
926
+ )
927
+ GUEST_WALLETS_DISABLED =
928
+ T.let(
929
+ :guest_wallets_disabled,
930
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
931
+ )
932
+ GUEST_WALLETS_UNAVAILABLE =
933
+ T.let(
934
+ :guest_wallets_unavailable,
935
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
936
+ )
937
+ IDEMPOTENCY_CONFLICT =
938
+ T.let(
939
+ :idempotency_conflict,
940
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
941
+ )
942
+ IDEMPOTENCY_KEY_CONFLICT =
943
+ T.let(
944
+ :idempotency_key_conflict,
945
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
946
+ )
947
+ INVALID_COMMUNITY_ID =
948
+ T.let(
949
+ :invalid_community_id,
950
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
951
+ )
952
+ INVALID_IDEMPOTENCY_KEY =
953
+ T.let(
954
+ :invalid_idempotency_key,
955
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
956
+ )
957
+ INVALID_LIST_ID =
958
+ T.let(
959
+ :invalid_list_id,
960
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
961
+ )
962
+ INVALID_PAYMENT_AMOUNT =
963
+ T.let(
964
+ :invalid_payment_amount,
965
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
966
+ )
967
+ INVALID_RANGE =
968
+ T.let(
969
+ :invalid_range,
970
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
971
+ )
972
+ LOGIN_RATE_LIMITED =
973
+ T.let(
974
+ :login_rate_limited,
975
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
976
+ )
977
+ MISSING_IDEMPOTENCY_KEY =
978
+ T.let(
979
+ :missing_idempotency_key,
980
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
981
+ )
982
+ MISSING_IDS =
983
+ T.let(
984
+ :missing_ids,
985
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
986
+ )
987
+ NO_CACHED_STYLE =
988
+ T.let(
989
+ :no_cached_style,
990
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
991
+ )
992
+ PASSKEY_REQUIRED =
993
+ T.let(
994
+ :passkey_required,
995
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
996
+ )
997
+ RATE_LIMITED =
998
+ T.let(
999
+ :rate_limited,
1000
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
1001
+ )
1002
+ READ_REQUEST_TIMEOUT =
1003
+ T.let(
1004
+ :read_request_timeout,
1005
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
1006
+ )
1007
+ REPLIES_INCOMPLETE =
1008
+ T.let(
1009
+ :replies_incomplete,
1010
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
1011
+ )
1012
+ SUPPORT_MEDIA_RATE_LIMIT =
1013
+ T.let(
1014
+ :support_media_rate_limit,
1015
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
1016
+ )
1017
+ SUPPORT_REQUEST_RATE_LIMIT =
1018
+ T.let(
1019
+ :support_request_rate_limit,
1020
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
1021
+ )
1022
+ TOO_MANY_IDS =
1023
+ T.let(
1024
+ :too_many_ids,
1025
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
1026
+ )
1027
+ UNKNOWN_FIELD =
1028
+ T.let(
1029
+ :unknown_field,
1030
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
1031
+ )
1032
+ UNSUPPORTED_MEDIA_TYPE =
1033
+ T.let(
1034
+ :unsupported_media_type,
1035
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
1036
+ )
1037
+ WEBHOOK_INACTIVE =
1038
+ T.let(
1039
+ :webhook_inactive,
1040
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
1041
+ )
1042
+ WRITE_TRACKING_UNAVAILABLE =
1043
+ T.let(
1044
+ :write_tracking_unavailable,
1045
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
1046
+ )
1047
+ X_WRITE_UNCONFIRMED =
1048
+ T.let(
1049
+ :x_write_unconfirmed,
1050
+ XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
1051
+ )
681
1052
  X_ACCOUNT_FEATURE_REQUIRED =
682
1053
  T.let(
683
1054
  :x_account_feature_required,
@@ -808,11 +1179,6 @@ module XTwitterScraper
808
1179
  :x_write_failed,
809
1180
  XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
810
1181
  )
811
- X_WRITE_UNCONFIRMED =
812
- T.let(
813
- :x_write_unconfirmed,
814
- XTwitterScraper::Error::Error::StructuredError::Code::TaggedSymbol
815
- )
816
1182
 
817
1183
  sig do
818
1184
  override.returns(
@@ -260,7 +260,7 @@ module XTwitterScraper
260
260
  sig { params(retweets_of_tweet_id: String).void }
261
261
  attr_writer :retweets_of_tweet_id
262
262
 
263
- # Required for tweet_search_extractor & community_search.
263
+ # Query used to price tweet_search_extractor or community_search.
264
264
  sig { returns(T.nilable(String)) }
265
265
  attr_reader :search_query
266
266
 
@@ -274,14 +274,14 @@ module XTwitterScraper
274
274
  sig { params(since_date: Date).void }
275
275
  attr_writer :since_date
276
276
 
277
- # Required for community_post_extractor & community_search.
277
+ # Community ID used to price community_post_extractor or community_search.
278
278
  sig { returns(T.nilable(String)) }
279
279
  attr_reader :target_community_id
280
280
 
281
281
  sig { params(target_community_id: String).void }
282
282
  attr_writer :target_community_id
283
283
 
284
- # Required for list_follower_explorer, list_member_extractor &
284
+ # List ID used to price list_follower_explorer, list_member_extractor, or
285
285
  # list_post_extractor.
286
286
  sig { returns(T.nilable(String)) }
287
287
  attr_reader :target_list_id
@@ -289,7 +289,7 @@ module XTwitterScraper
289
289
  sig { params(target_list_id: String).void }
290
290
  attr_writer :target_list_id
291
291
 
292
- # Required for space_explorer.
292
+ # Space ID used to price space_explorer.
293
293
  sig { returns(T.nilable(String)) }
294
294
  attr_reader :target_space_id
295
295
 
@@ -447,16 +447,16 @@ module XTwitterScraper
447
447
  retweets: nil,
448
448
  # Estimate only retweets of this tweet ID (tweet_search_extractor)
449
449
  retweets_of_tweet_id: nil,
450
- # Required for tweet_search_extractor & community_search.
450
+ # Query used to price tweet_search_extractor or community_search.
451
451
  search_query: nil,
452
452
  # Estimate start date in YYYY-MM-DD format (tweet_search_extractor)
453
453
  since_date: nil,
454
- # Required for community_post_extractor & community_search.
454
+ # Community ID used to price community_post_extractor or community_search.
455
455
  target_community_id: nil,
456
- # Required for list_follower_explorer, list_member_extractor &
456
+ # List ID used to price list_follower_explorer, list_member_extractor, or
457
457
  # list_post_extractor.
458
458
  target_list_id: nil,
459
- # Required for space_explorer.
459
+ # Space ID used to price space_explorer.
460
460
  target_space_id: nil,
461
461
  target_tweet_id: nil,
462
462
  target_username: nil,
@@ -14,7 +14,7 @@ module XTwitterScraper
14
14
  )
15
15
  end
16
16
 
17
- # Confirmed USD amount in cents.
17
+ # USD cents accepted for this checkout.
18
18
  sig { returns(Integer) }
19
19
  attr_accessor :amount_minor
20
20
 
@@ -33,7 +33,7 @@ module XTwitterScraper
33
33
  ).returns(T.attached_class)
34
34
  end
35
35
  def self.new(
36
- # Confirmed USD amount in cents.
36
+ # USD cents accepted for this checkout.
37
37
  amount_minor:,
38
38
  idempotency_key:,
39
39
  currency: :usd,
@@ -165,19 +165,101 @@ module XTwitterScraper
165
165
  )
166
166
  end
167
167
 
168
- sig { returns(Symbol) }
168
+ sig do
169
+ returns(
170
+ XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Header::TaggedSymbol
171
+ )
172
+ end
169
173
  attr_accessor :header
170
174
 
171
- sig { returns(Symbol) }
175
+ sig do
176
+ returns(
177
+ XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Scheme::TaggedSymbol
178
+ )
179
+ end
172
180
  attr_accessor :scheme
173
181
 
174
- sig { params(header: Symbol, scheme: Symbol).returns(T.attached_class) }
175
- def self.new(header: :Authorization, scheme: :Bearer)
182
+ sig do
183
+ params(
184
+ header:
185
+ XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Header::OrSymbol,
186
+ scheme:
187
+ XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Scheme::OrSymbol
188
+ ).returns(T.attached_class)
189
+ end
190
+ def self.new(header:, scheme:)
176
191
  end
177
192
 
178
- sig { override.returns({ header: Symbol, scheme: Symbol }) }
193
+ sig do
194
+ override.returns(
195
+ {
196
+ header:
197
+ XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Header::TaggedSymbol,
198
+ scheme:
199
+ XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Scheme::TaggedSymbol
200
+ }
201
+ )
202
+ end
179
203
  def to_hash
180
204
  end
205
+
206
+ module Header
207
+ extend XTwitterScraper::Internal::Type::Enum
208
+
209
+ TaggedSymbol =
210
+ T.type_alias do
211
+ T.all(
212
+ Symbol,
213
+ XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Header
214
+ )
215
+ end
216
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
217
+
218
+ AUTHORIZATION =
219
+ T.let(
220
+ :Authorization,
221
+ XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Header::TaggedSymbol
222
+ )
223
+
224
+ sig do
225
+ override.returns(
226
+ T::Array[
227
+ XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Header::TaggedSymbol
228
+ ]
229
+ )
230
+ end
231
+ def self.values
232
+ end
233
+ end
234
+
235
+ module Scheme
236
+ extend XTwitterScraper::Internal::Type::Enum
237
+
238
+ TaggedSymbol =
239
+ T.type_alias do
240
+ T.all(
241
+ Symbol,
242
+ XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Scheme
243
+ )
244
+ end
245
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
246
+
247
+ BEARER =
248
+ T.let(
249
+ :Bearer,
250
+ XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Scheme::TaggedSymbol
251
+ )
252
+
253
+ sig do
254
+ override.returns(
255
+ T::Array[
256
+ XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Scheme::TaggedSymbol
257
+ ]
258
+ )
259
+ end
260
+ def self.values
261
+ end
262
+ end
181
263
  end
182
264
 
183
265
  module Status
@@ -14,7 +14,7 @@ module XTwitterScraper
14
14
  )
15
15
  end
16
16
 
17
- # Confirmed USD amount in cents.
17
+ # USD cents accepted for this checkout.
18
18
  sig { returns(Integer) }
19
19
  attr_accessor :amount_minor
20
20
 
@@ -33,7 +33,7 @@ module XTwitterScraper
33
33
  ).returns(T.attached_class)
34
34
  end
35
35
  def self.new(
36
- # Confirmed USD amount in cents.
36
+ # USD cents accepted for this checkout.
37
37
  amount_minor:,
38
38
  idempotency_key:,
39
39
  currency: :usd,