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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96a110a16a759489aa7803fe46b1f93e8e4a2fa1b98c5aa30e56e56adb2cb53f
4
- data.tar.gz: e73def41689f49e3adb3abcb4ef37e16c9bfc6de4627982496bdde73604484a0
3
+ metadata.gz: 8fa98c5d4ef5480cdd4fa0c729abf871cea84f607cb2d2094ca3473b9a8ec091
4
+ data.tar.gz: 0c8306194c89096f355018670d4028407e3a8a5047b38912ffbca97d59d5f95e
5
5
  SHA512:
6
- metadata.gz: dc1952fa0e535871074858d27da39385649d9cb207af6c81ea5e2913e32d5d30e8148f9368bef3cf7ac90dc8dcc9da86ea8a99c5a962206e4c9ac472790ffc9f
7
- data.tar.gz: ef72e6f46a8498788f4d90b2fa77eb640fbe477335f8cab300b9d62117dd060437a8f240d83b91eede2af39c238b767997f32c6db135c3792629a3012f64d406
6
+ metadata.gz: 8fd5b815d6407c517515ed2fdf74d2c05bd9bf4a60917aca2f94424496ea2e69d9fe4064c4c11ac1414f2cbdad18d67bf3a5aa942664247d34139305fd77ef08
7
+ data.tar.gz: 5b2f06d0f6d88d796859dadcfb7ba4dc8ca7d0bf711c24c8c5c47c310c63ef966a89aea2ba299637ce2181ec2f363445ce60085fdeaa73e2f4ea7497f6c23387
data/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.2 (2026-07-22)
4
+
5
+ Full Changelog: [v0.5.1...v0.5.2](https://github.com/Xquik-dev/x-twitter-scraper-ruby/compare/v0.5.1...v0.5.2)
6
+
7
+ ## 0.5.1 (2026-07-22)
8
+
9
+ Full Changelog: [v0.5.0...v0.5.1](https://github.com/Xquik-dev/x-twitter-scraper-ruby/compare/v0.5.0...v0.5.1)
10
+
11
+ ### Chores
12
+
13
+ * sync generated SDK contracts ([855299c](https://github.com/Xquik-dev/x-twitter-scraper-ruby/commit/855299c5db85833679c9377a9ba90b1c349d5a44))
14
+ * verify final public contract ([b91af35](https://github.com/Xquik-dev/x-twitter-scraper-ruby/commit/b91af355fc06443c5fcacca4ad6ade560577ddf2))
15
+
16
+ ## 0.5.0 (2026-07-22)
17
+
18
+ Full Changelog: [v0.4.5...v0.5.0](https://github.com/Xquik-dev/x-twitter-scraper-ruby/compare/v0.4.5...v0.5.0)
19
+
20
+ ### Features
21
+
22
+ * **api:** propagate durable write actions ([b959adc](https://github.com/Xquik-dev/x-twitter-scraper-ruby/commit/b959adc349d87f75be1dfb858c92479c637588d8))
23
+ * **api:** propagate production write-action contract ([b433f8d](https://github.com/Xquik-dev/x-twitter-scraper-ruby/commit/b433f8d824bcb1ca60592d21d9f90b8baa79878a))
24
+ * **stlc:** configurable CI runner and private-production-repo support in workflow templates ([9ad8d7c](https://github.com/Xquik-dev/x-twitter-scraper-ruby/commit/9ad8d7c87cdd91232cf5ba76a5f5022d43cb7348))
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * **client:** elide content type header on requests without body ([b0186db](https://github.com/Xquik-dev/x-twitter-scraper-ruby/commit/b0186db54e9074f563ae6528506fbd12d607d607))
30
+
31
+
32
+ ### Chores
33
+
34
+ * **deps:** support connection_pool 3 ([ad578c2](https://github.com/Xquik-dev/x-twitter-scraper-ruby/commit/ad578c2453ff451f3317606f542baa491267a250))
35
+
3
36
  ## 0.4.4 (2026-07-14)
4
37
 
5
38
  Full Changelog: [v0.4.3...v0.4.4](https://github.com/Xquik-dev/x-twitter-scraper-ruby/compare/v0.4.3...v0.4.4)
data/README.md CHANGED
@@ -1,31 +1,19 @@
1
- # X (Twitter) Scraper Ruby SDK: Tweet Search, Profile Tweets, Followers & Posting
1
+ # Xquik Ruby SDK
2
2
 
3
- > **Xquik is an independent third-party service.** Not affiliated with X Corp.
4
- > "Twitter" and "X" are trademarks of X Corp.
5
-
6
- [![Ask DeepWiki](https://deepwiki.com/badge.svg?url=https%3A%2F%2Fgithub.com%2FXquik-dev%2Fx-twitter-scraper-ruby)](https://deepwiki.com/Xquik-dev/x-twitter-scraper-ruby)
7
- [![Skills.sh x-twitter-scraper Skill](https://skills.sh/b/xquik-dev/x-twitter-scraper)](https://skills.sh/xquik-dev/x-twitter-scraper)
8
-
9
- The Xquik Ruby SDK is a Twitter API SDK and X API alternative for tweet search, advanced Twitter search queries, profile tweets, user lookup, follower export, media download, media upload, monitoring, webhooks, and posting automation.
10
-
11
- Use it from Ruby 3.2.0+ applications to get tweets from profiles, search tweets by keyword or operator query, send tweets, post replies, like, repost, follow, DM, run giveaway draws, and automate X workflows. It ships with comprehensive types and docstrings in Yard, RBS, and RBI. The standard library's `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem.
12
-
13
- It is generated with [Stainless](https://www.stainless.com/).
3
+ Use the Xquik API from Ruby 3.2+. The SDK includes Yard, RBS, and RBI types. It uses `net/http` with connection pooling.
14
4
 
15
5
  ## Documentation
16
6
 
17
- Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/x-twitter-scraper).
18
-
19
- The REST API documentation can be found on [xquik.com](https://xquik.com).
7
+ Read the [Ruby SDK guide](https://docs.xquik.com/sdks/ruby), [API guide](https://docs.xquik.com/api-reference/overview), or [RubyDoc reference](https://gemdocs.org/gems/x-twitter-scraper).
20
8
 
21
9
  ## Installation
22
10
 
23
- To use this gem, install via Bundler by adding the following to your application's `Gemfile`:
11
+ Add the gem to your `Gemfile`:
24
12
 
25
13
  <!-- x-release-please-start-version -->
26
14
 
27
15
  ```ruby
28
- gem "x-twitter-scraper", "~> 0.4.5"
16
+ gem "x-twitter-scraper", "~> 0.5.2"
29
17
  ```
30
18
 
31
19
  <!-- x-release-please-end -->
@@ -45,29 +33,6 @@ paginated_tweets = x_twitter_scraper.x.tweets.search(q: "from:elonmusk", limit:
45
33
  puts(paginated_tweets.has_next_page)
46
34
  ```
47
35
 
48
- ### File uploads
49
-
50
- Request parameters that correspond to file uploads can be passed as raw contents, a [`Pathname`](https://rubyapi.org/3.2/o/pathname) instance, [`StringIO`](https://rubyapi.org/3.2/o/stringio), or more.
51
-
52
- ```ruby
53
- require "pathname"
54
-
55
- # Use `Pathname` to send the filename and avoid paging a large file into memory:
56
- response = x_twitter_scraper.x.media.upload(file: Pathname("/path/to/file"))
57
-
58
- # Alternatively, pass file contents or a `StringIO` directly:
59
- response = x_twitter_scraper.x.media.upload(file: File.read("/path/to/file"))
60
-
61
- # Or, control the filename and content type:
62
- file =
63
- XTwitterScraper::FilePart.new(File.read("/path/to/file"), filename: "/path/to/file", content_type: "…")
64
- response = x_twitter_scraper.x.media.upload(file: file)
65
-
66
- puts(response.mediaId)
67
- ```
68
-
69
- Passing a raw `IO` descriptor disables retries because pipes cannot be rewound safely.
70
-
71
36
  ### Handling errors
72
37
 
73
38
  When the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `XTwitterScraper::Errors::APIError` will be thrown:
@@ -203,7 +168,7 @@ Unless otherwise specified, other classes in the SDK do not have locks protectin
203
168
 
204
169
  ## Sorbet
205
170
 
206
- This library provides comprehensive [RBI](https://sorbet.org/docs/rbi) definitions, and has no dependency on sorbet-runtime.
171
+ The SDK includes [RBI](https://sorbet.org/docs/rbi) definitions. It does not depend on `sorbet-runtime`.
207
172
 
208
173
  You can provide typesafe request parameters like so:
209
174
 
@@ -263,3 +228,5 @@ Ruby 3.2.0 or higher.
263
228
  ## Contributing
264
229
 
265
230
  See [the contributing documentation](https://github.com/Xquik-dev/x-twitter-scraper-ruby/tree/main/CONTRIBUTING.md).
231
+
232
+ Xquik is an independent third-party service. Not affiliated with X Corp. "Twitter" and "X" are trademarks of X Corp.
@@ -46,7 +46,7 @@ module XTwitterScraper
46
46
  # @return [XTwitterScraper::Resources::Radar]
47
47
  attr_reader :radar
48
48
 
49
- # Real-time X account monitoring
49
+ # X account monitoring with 1-second checks
50
50
  # @return [XTwitterScraper::Resources::Monitors]
51
51
  attr_reader :monitors
52
52
 
@@ -4,6 +4,19 @@ module XTwitterScraper
4
4
  module Internal
5
5
  module Type
6
6
  # @api private
7
+ #
8
+ # @example
9
+ # # `compose_create_response` is a `XTwitterScraper::Models::ComposeCreateResponse`
10
+ # case compose_create_response
11
+ # when XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult
12
+ # puts(compose_create_response.content_rules)
13
+ # when XTwitterScraper::Models::ComposeCreateResponse::ComposeRefineResult
14
+ # puts(compose_create_response.composition_guidance)
15
+ # when XTwitterScraper::Models::ComposeCreateResponse::ComposeScoreResult
16
+ # puts(compose_create_response.checklist)
17
+ # else
18
+ # puts(compose_create_response)
19
+ # end
7
20
  module Union
8
21
  include XTwitterScraper::Internal::Type::Converter
9
22
  include XTwitterScraper::Internal::Util::SorbetRuntimeSupport
@@ -74,13 +74,13 @@ module XTwitterScraper
74
74
  required :active_hourly_burn, String, api_name: :activeHourlyBurn
75
75
 
76
76
  # @!attribute credits_per_active_monitor_day
77
- # Estimated daily credits for 1 active instant monitor.
77
+ # Rounded daily estimate for 1 active monitor.
78
78
  #
79
79
  # @return [String]
80
80
  required :credits_per_active_monitor_day, String, api_name: :creditsPerActiveMonitorDay
81
81
 
82
82
  # @!attribute credits_per_active_monitor_hour
83
- # Hourly credits charged for 1 active instant monitor.
83
+ # Hourly credits charged for 1 active monitor.
84
84
  #
85
85
  # @return [String]
86
86
  required :credits_per_active_monitor_hour, String, api_name: :creditsPerActiveMonitorHour
@@ -108,9 +108,9 @@ module XTwitterScraper
108
108
  #
109
109
  # @param active_hourly_burn [String] Credits charged each hour for currently active monitors.
110
110
  #
111
- # @param credits_per_active_monitor_day [String] Estimated daily credits for 1 active instant monitor.
111
+ # @param credits_per_active_monitor_day [String] Rounded daily estimate for 1 active monitor.
112
112
  #
113
- # @param credits_per_active_monitor_hour [String] Hourly credits charged for 1 active instant monitor.
113
+ # @param credits_per_active_monitor_hour [String] Hourly credits charged for 1 active monitor.
114
114
  #
115
115
  # @param events_included [Boolean] Webhook and event deliveries are included in monitor billing.
116
116
  #
@@ -7,132 +7,204 @@ module XTwitterScraper
7
7
  extend XTwitterScraper::Internal::Type::RequestParameters::Converter
8
8
  include XTwitterScraper::Internal::Type::RequestParameters
9
9
 
10
- # @!attribute step
11
- # Workflow step
10
+ # @!attribute body
12
11
  #
13
- # @return [Symbol, XTwitterScraper::Models::ComposeCreateParams::Step]
14
- required :step, enum: -> { XTwitterScraper::ComposeCreateParams::Step }
12
+ # @return [XTwitterScraper::Models::ComposeCreateParams::Body::ComposePrepareRequest, XTwitterScraper::Models::ComposeCreateParams::Body::ComposeRefineRequest, XTwitterScraper::Models::ComposeCreateParams::Body::ComposeScoreRequest]
13
+ required :body, union: -> { XTwitterScraper::ComposeCreateParams::Body }
15
14
 
16
- # @!attribute additional_context
17
- # Extra context or URLs (refine)
18
- #
19
- # @return [String, nil]
20
- optional :additional_context, String, api_name: :additionalContext
21
-
22
- # @!attribute call_to_action
23
- # Desired call to action (refine)
24
- #
25
- # @return [String, nil]
26
- optional :call_to_action, String, api_name: :callToAction
27
-
28
- # @!attribute draft
29
- # Tweet draft text to evaluate (score)
30
- #
31
- # @return [String, nil]
32
- optional :draft, String
33
-
34
- # @!attribute goal
35
- # Optimization goal
36
- #
37
- # @return [Symbol, XTwitterScraper::Models::ComposeCreateParams::Goal, nil]
38
- optional :goal, enum: -> { XTwitterScraper::ComposeCreateParams::Goal }
39
-
40
- # @!attribute has_link
41
- # Whether a link is attached (score)
42
- #
43
- # @return [Boolean, nil]
44
- optional :has_link, XTwitterScraper::Internal::Type::Boolean, api_name: :hasLink
45
-
46
- # @!attribute has_media
47
- # Whether media is attached (score)
48
- #
49
- # @return [Boolean, nil]
50
- optional :has_media, XTwitterScraper::Internal::Type::Boolean, api_name: :hasMedia
51
-
52
- # @!attribute media_type
53
- # Media type (refine)
54
- #
55
- # @return [Symbol, XTwitterScraper::Models::ComposeCreateParams::MediaType, nil]
56
- optional :media_type, enum: -> { XTwitterScraper::ComposeCreateParams::MediaType }, api_name: :mediaType
57
-
58
- # @!attribute style_username
59
- # Cached style username for voice matching (compose)
60
- #
61
- # @return [String, nil]
62
- optional :style_username, String, api_name: :styleUsername
63
-
64
- # @!attribute tone
65
- # Desired tone (refine)
66
- #
67
- # @return [String, nil]
68
- optional :tone, String
69
-
70
- # @!attribute topic
71
- # Tweet topic (compose, refine)
72
- #
73
- # @return [String, nil]
74
- optional :topic, String
75
-
76
- # @!method initialize(step:, additional_context: nil, call_to_action: nil, draft: nil, goal: nil, has_link: nil, has_media: nil, media_type: nil, style_username: nil, tone: nil, topic: nil, request_options: {})
77
- # @param step [Symbol, XTwitterScraper::Models::ComposeCreateParams::Step] Workflow step
78
- #
79
- # @param additional_context [String] Extra context or URLs (refine)
80
- #
81
- # @param call_to_action [String] Desired call to action (refine)
82
- #
83
- # @param draft [String] Tweet draft text to evaluate (score)
84
- #
85
- # @param goal [Symbol, XTwitterScraper::Models::ComposeCreateParams::Goal] Optimization goal
86
- #
87
- # @param has_link [Boolean] Whether a link is attached (score)
88
- #
89
- # @param has_media [Boolean] Whether media is attached (score)
90
- #
91
- # @param media_type [Symbol, XTwitterScraper::Models::ComposeCreateParams::MediaType] Media type (refine)
92
- #
93
- # @param style_username [String] Cached style username for voice matching (compose)
94
- #
95
- # @param tone [String] Desired tone (refine)
96
- #
97
- # @param topic [String] Tweet topic (compose, refine)
98
- #
15
+ # @!method initialize(body:, request_options: {})
16
+ # @param body [XTwitterScraper::Models::ComposeCreateParams::Body::ComposePrepareRequest, XTwitterScraper::Models::ComposeCreateParams::Body::ComposeRefineRequest, XTwitterScraper::Models::ComposeCreateParams::Body::ComposeScoreRequest]
99
17
  # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}]
100
18
 
101
- # Workflow step
102
- module Step
103
- extend XTwitterScraper::Internal::Type::Enum
104
-
105
- COMPOSE = :compose
106
- REFINE = :refine
107
- SCORE = :score
108
-
109
- # @!method self.values
110
- # @return [Array<Symbol>]
111
- end
112
-
113
- # Optimization goal
114
- module Goal
115
- extend XTwitterScraper::Internal::Type::Enum
116
-
117
- ENGAGEMENT = :engagement
118
- FOLLOWERS = :followers
119
- AUTHORITY = :authority
120
- CONVERSATION = :conversation
121
-
122
- # @!method self.values
123
- # @return [Array<Symbol>]
124
- end
125
-
126
- # Media type (refine)
127
- module MediaType
128
- extend XTwitterScraper::Internal::Type::Enum
129
-
130
- PHOTO = :photo
131
- VIDEO = :video
132
- NONE = :none
133
-
134
- # @!method self.values
135
- # @return [Array<Symbol>]
19
+ module Body
20
+ extend XTwitterScraper::Internal::Type::Union
21
+
22
+ variant -> { XTwitterScraper::ComposeCreateParams::Body::ComposePrepareRequest }
23
+
24
+ variant -> { XTwitterScraper::ComposeCreateParams::Body::ComposeRefineRequest }
25
+
26
+ variant -> { XTwitterScraper::ComposeCreateParams::Body::ComposeScoreRequest }
27
+
28
+ class ComposePrepareRequest < XTwitterScraper::Internal::Type::BaseModel
29
+ # @!attribute step
30
+ #
31
+ # @return [Symbol, :compose]
32
+ required :step, const: :compose
33
+
34
+ # @!attribute topic
35
+ # Subject for the post.
36
+ #
37
+ # @return [String]
38
+ required :topic, String
39
+
40
+ # @!attribute goal
41
+ # Editorial goal used to order the rules and questions.
42
+ #
43
+ # @return [Symbol, XTwitterScraper::Models::ComposeCreateParams::Body::ComposePrepareRequest::Goal, nil]
44
+ optional :goal, enum: -> { XTwitterScraper::ComposeCreateParams::Body::ComposePrepareRequest::Goal }
45
+
46
+ # @!attribute style_username
47
+ # Username from a style analysis saved to this account.
48
+ #
49
+ # @return [String, nil]
50
+ optional :style_username, String, api_name: :styleUsername
51
+
52
+ # @!method initialize(topic:, goal: nil, style_username: nil, step: :compose)
53
+ # @param topic [String] Subject for the post.
54
+ #
55
+ # @param goal [Symbol, XTwitterScraper::Models::ComposeCreateParams::Body::ComposePrepareRequest::Goal] Editorial goal used to order the rules and questions.
56
+ #
57
+ # @param style_username [String] Username from a style analysis saved to this account.
58
+ #
59
+ # @param step [Symbol, :compose]
60
+
61
+ # Editorial goal used to order the rules and questions.
62
+ #
63
+ # @see XTwitterScraper::Models::ComposeCreateParams::Body::ComposePrepareRequest#goal
64
+ module Goal
65
+ extend XTwitterScraper::Internal::Type::Enum
66
+
67
+ ENGAGEMENT = :engagement
68
+ FOLLOWERS = :followers
69
+ AUTHORITY = :authority
70
+ CONVERSATION = :conversation
71
+
72
+ # @!method self.values
73
+ # @return [Array<Symbol>]
74
+ end
75
+ end
76
+
77
+ class ComposeRefineRequest < XTwitterScraper::Internal::Type::BaseModel
78
+ # @!attribute goal
79
+ # Editorial goal for the guidance.
80
+ #
81
+ # @return [Symbol, XTwitterScraper::Models::ComposeCreateParams::Body::ComposeRefineRequest::Goal]
82
+ required :goal, enum: -> { XTwitterScraper::ComposeCreateParams::Body::ComposeRefineRequest::Goal }
83
+
84
+ # @!attribute step
85
+ #
86
+ # @return [Symbol, :refine]
87
+ required :step, const: :refine
88
+
89
+ # @!attribute tone
90
+ # Requested writing tone.
91
+ #
92
+ # @return [String]
93
+ required :tone, String
94
+
95
+ # @!attribute topic
96
+ # Subject for the post.
97
+ #
98
+ # @return [String]
99
+ required :topic, String
100
+
101
+ # @!attribute additional_context
102
+ # Audience, constraints, sources, or other writing context.
103
+ #
104
+ # @return [String, nil]
105
+ optional :additional_context, String, api_name: :additionalContext
106
+
107
+ # @!attribute call_to_action
108
+ # Specific action the draft should request.
109
+ #
110
+ # @return [String, nil]
111
+ optional :call_to_action, String, api_name: :callToAction
112
+
113
+ # @!attribute media_type
114
+ # Planned media type.
115
+ #
116
+ # @return [Symbol, XTwitterScraper::Models::ComposeCreateParams::Body::ComposeRefineRequest::MediaType, nil]
117
+ optional :media_type,
118
+ enum: -> { XTwitterScraper::ComposeCreateParams::Body::ComposeRefineRequest::MediaType },
119
+ api_name: :mediaType
120
+
121
+ # @!method initialize(goal:, tone:, topic:, additional_context: nil, call_to_action: nil, media_type: nil, step: :refine)
122
+ # @param goal [Symbol, XTwitterScraper::Models::ComposeCreateParams::Body::ComposeRefineRequest::Goal] Editorial goal for the guidance.
123
+ #
124
+ # @param tone [String] Requested writing tone.
125
+ #
126
+ # @param topic [String] Subject for the post.
127
+ #
128
+ # @param additional_context [String] Audience, constraints, sources, or other writing context.
129
+ #
130
+ # @param call_to_action [String] Specific action the draft should request.
131
+ #
132
+ # @param media_type [Symbol, XTwitterScraper::Models::ComposeCreateParams::Body::ComposeRefineRequest::MediaType] Planned media type.
133
+ #
134
+ # @param step [Symbol, :refine]
135
+
136
+ # Editorial goal for the guidance.
137
+ #
138
+ # @see XTwitterScraper::Models::ComposeCreateParams::Body::ComposeRefineRequest#goal
139
+ module Goal
140
+ extend XTwitterScraper::Internal::Type::Enum
141
+
142
+ ENGAGEMENT = :engagement
143
+ FOLLOWERS = :followers
144
+ AUTHORITY = :authority
145
+ CONVERSATION = :conversation
146
+
147
+ # @!method self.values
148
+ # @return [Array<Symbol>]
149
+ end
150
+
151
+ # Planned media type.
152
+ #
153
+ # @see XTwitterScraper::Models::ComposeCreateParams::Body::ComposeRefineRequest#media_type
154
+ module MediaType
155
+ extend XTwitterScraper::Internal::Type::Enum
156
+
157
+ PHOTO = :photo
158
+ VIDEO = :video
159
+ NONE = :none
160
+
161
+ # @!method self.values
162
+ # @return [Array<Symbol>]
163
+ end
164
+ end
165
+
166
+ class ComposeScoreRequest < XTwitterScraper::Internal::Type::BaseModel
167
+ # @!attribute draft
168
+ # Full post text for deterministic editorial checks.
169
+ #
170
+ # @return [String]
171
+ required :draft, String
172
+
173
+ # @!attribute step
174
+ #
175
+ # @return [Symbol, :score]
176
+ required :step, const: :score
177
+
178
+ # @!attribute has_link
179
+ # True when a separate link card is attached.
180
+ #
181
+ # @return [Boolean, nil]
182
+ optional :has_link, XTwitterScraper::Internal::Type::Boolean, api_name: :hasLink
183
+
184
+ # @!attribute has_media
185
+ # @deprecated Ignored. Remove this field. Use hasLink for a separate link card.
186
+ #
187
+ # Accepted for backward compatibility. Text checks ignore this field.
188
+ #
189
+ # @return [Boolean, nil]
190
+ optional :has_media, XTwitterScraper::Internal::Type::Boolean, api_name: :hasMedia
191
+
192
+ # @!method initialize(draft:, has_link: nil, has_media: nil, step: :score)
193
+ # Some parameter documentations has been truncated, see
194
+ # {XTwitterScraper::Models::ComposeCreateParams::Body::ComposeScoreRequest} for
195
+ # more details.
196
+ #
197
+ # @param draft [String] Full post text for deterministic editorial checks.
198
+ #
199
+ # @param has_link [Boolean] True when a separate link card is attached.
200
+ #
201
+ # @param has_media [Boolean] Accepted for backward compatibility. Text checks ignore this field.
202
+ #
203
+ # @param step [Symbol, :score]
204
+ end
205
+
206
+ # @!method self.variants
207
+ # @return [Array(XTwitterScraper::Models::ComposeCreateParams::Body::ComposePrepareRequest, XTwitterScraper::Models::ComposeCreateParams::Body::ComposeRefineRequest, XTwitterScraper::Models::ComposeCreateParams::Body::ComposeScoreRequest)]
136
208
  end
137
209
  end
138
210
  end