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
@@ -3,45 +3,106 @@ module XTwitterScraper
3
3
  module X
4
4
  type write_action_retrieve_response =
5
5
  {
6
- action: String,
6
+ id: String,
7
+ account: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Account?,
8
+ action: XTwitterScraper::Models::X::WriteActionRetrieveResponse::action,
9
+ billing: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Billing,
7
10
  charged: bool,
8
11
  charged_credits: String,
9
- created_at: Time,
10
- media: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Media,
11
- retryable: false,
12
+ next_action: XTwitterScraper::Models::X::WriteActionRetrieveResponse::NextAction?,
13
+ object: :x_write_action,
14
+ poll_after_ms: Integer?,
15
+ request: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Request,
16
+ result: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Result?,
17
+ retryable: bool,
18
+ safe_to_retry: bool,
12
19
  send_dispatched: bool,
13
20
  status: XTwitterScraper::Models::X::WriteActionRetrieveResponse::status,
21
+ status_url: String,
22
+ success: bool,
23
+ target: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Target?,
24
+ target_id: String?,
25
+ terminal: bool,
14
26
  write_action_id: String,
27
+ community_id: String,
28
+ community_name: String,
29
+ completed_at: Time,
15
30
  confirmation_attempts: Integer,
16
31
  confirmation_checked_at: Time,
17
- confirmation_source: String?,
18
32
  confirmed_at: Time,
33
+ created_at: Time,
34
+ details: ::Hash[Symbol, top],
35
+ error: String,
36
+ expires_at: Time,
37
+ idempotent: bool,
38
+ media: ::Hash[Symbol, top],
39
+ media_id: String,
40
+ media_url: String,
19
41
  message: String,
20
42
  message_id: String,
43
+ request_hash: String,
44
+ request_id: String,
45
+ result_id: String,
21
46
  send_dispatched_at: Time,
22
- target_id: String?,
23
- tweet_id: String
47
+ tweet_id: String,
48
+ updated_at: Time
24
49
  }
25
50
 
26
51
  class WriteActionRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel
27
- attr_accessor action: String
52
+ attr_accessor id: String
53
+
54
+ attr_accessor account: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Account?
55
+
56
+ attr_accessor action: XTwitterScraper::Models::X::WriteActionRetrieveResponse::action
57
+
58
+ attr_accessor billing: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Billing
28
59
 
29
60
  attr_accessor charged: bool
30
61
 
31
62
  attr_accessor charged_credits: String
32
63
 
33
- attr_accessor created_at: Time
64
+ attr_accessor next_action: XTwitterScraper::Models::X::WriteActionRetrieveResponse::NextAction?
65
+
66
+ attr_accessor object: :x_write_action
67
+
68
+ attr_accessor poll_after_ms: Integer?
34
69
 
35
- attr_accessor media: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Media
70
+ attr_accessor request: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Request
36
71
 
37
- attr_accessor retryable: false
72
+ attr_accessor result: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Result?
73
+
74
+ attr_accessor retryable: bool
75
+
76
+ attr_accessor safe_to_retry: bool
38
77
 
39
78
  attr_accessor send_dispatched: bool
40
79
 
41
80
  attr_accessor status: XTwitterScraper::Models::X::WriteActionRetrieveResponse::status
42
81
 
82
+ attr_accessor status_url: String
83
+
84
+ attr_accessor success: bool
85
+
86
+ attr_accessor target: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Target?
87
+
88
+ attr_accessor target_id: String?
89
+
90
+ attr_accessor terminal: bool
91
+
43
92
  attr_accessor write_action_id: String
44
93
 
94
+ attr_reader community_id: String?
95
+
96
+ def community_id=: (String) -> String
97
+
98
+ attr_reader community_name: String?
99
+
100
+ def community_name=: (String) -> String
101
+
102
+ attr_reader completed_at: Time?
103
+
104
+ def completed_at=: (Time) -> Time
105
+
45
106
  attr_reader confirmation_attempts: Integer?
46
107
 
47
108
  def confirmation_attempts=: (Integer) -> Integer
@@ -50,12 +111,42 @@ module XTwitterScraper
50
111
 
51
112
  def confirmation_checked_at=: (Time) -> Time
52
113
 
53
- attr_accessor confirmation_source: String?
54
-
55
114
  attr_reader confirmed_at: Time?
56
115
 
57
116
  def confirmed_at=: (Time) -> Time
58
117
 
118
+ attr_reader created_at: Time?
119
+
120
+ def created_at=: (Time) -> Time
121
+
122
+ attr_reader details: ::Hash[Symbol, top]?
123
+
124
+ def details=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
125
+
126
+ attr_reader error: String?
127
+
128
+ def error=: (String) -> String
129
+
130
+ attr_reader expires_at: Time?
131
+
132
+ def expires_at=: (Time) -> Time
133
+
134
+ attr_reader idempotent: bool?
135
+
136
+ def idempotent=: (bool) -> bool
137
+
138
+ attr_reader media: ::Hash[Symbol, top]?
139
+
140
+ def media=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
141
+
142
+ attr_reader media_id: String?
143
+
144
+ def media_id=: (String) -> String
145
+
146
+ attr_reader media_url: String?
147
+
148
+ def media_url=: (String) -> String
149
+
59
150
  attr_reader message: String?
60
151
 
61
152
  def message=: (String) -> String
@@ -64,113 +155,396 @@ module XTwitterScraper
64
155
 
65
156
  def message_id=: (String) -> String
66
157
 
158
+ attr_reader request_hash: String?
159
+
160
+ def request_hash=: (String) -> String
161
+
162
+ attr_reader request_id: String?
163
+
164
+ def request_id=: (String) -> String
165
+
166
+ attr_reader result_id: String?
167
+
168
+ def result_id=: (String) -> String
169
+
67
170
  attr_reader send_dispatched_at: Time?
68
171
 
69
172
  def send_dispatched_at=: (Time) -> Time
70
173
 
71
- attr_accessor target_id: String?
72
-
73
174
  attr_reader tweet_id: String?
74
175
 
75
176
  def tweet_id=: (String) -> String
76
177
 
178
+ attr_reader updated_at: Time?
179
+
180
+ def updated_at=: (Time) -> Time
181
+
77
182
  def initialize: (
78
- action: String,
183
+ id: String,
184
+ account: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Account?,
185
+ action: XTwitterScraper::Models::X::WriteActionRetrieveResponse::action,
186
+ billing: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Billing,
79
187
  charged: bool,
80
188
  charged_credits: String,
81
- created_at: Time,
82
- media: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Media,
189
+ next_action: XTwitterScraper::Models::X::WriteActionRetrieveResponse::NextAction?,
190
+ poll_after_ms: Integer?,
191
+ request: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Request,
192
+ result: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Result?,
193
+ retryable: bool,
194
+ safe_to_retry: bool,
83
195
  send_dispatched: bool,
84
196
  status: XTwitterScraper::Models::X::WriteActionRetrieveResponse::status,
197
+ status_url: String,
198
+ success: bool,
199
+ target: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Target?,
200
+ target_id: String?,
201
+ terminal: bool,
85
202
  write_action_id: String,
203
+ ?community_id: String,
204
+ ?community_name: String,
205
+ ?completed_at: Time,
86
206
  ?confirmation_attempts: Integer,
87
207
  ?confirmation_checked_at: Time,
88
- ?confirmation_source: String?,
89
208
  ?confirmed_at: Time,
209
+ ?created_at: Time,
210
+ ?details: ::Hash[Symbol, top],
211
+ ?error: String,
212
+ ?expires_at: Time,
213
+ ?idempotent: bool,
214
+ ?media: ::Hash[Symbol, top],
215
+ ?media_id: String,
216
+ ?media_url: String,
90
217
  ?message: String,
91
218
  ?message_id: String,
219
+ ?request_hash: String,
220
+ ?request_id: String,
221
+ ?result_id: String,
92
222
  ?send_dispatched_at: Time,
93
- ?target_id: String?,
94
223
  ?tweet_id: String,
95
- ?retryable: false
224
+ ?updated_at: Time,
225
+ ?object: :x_write_action
96
226
  ) -> void
97
227
 
98
228
  def to_hash: -> {
99
- action: String,
229
+ id: String,
230
+ account: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Account?,
231
+ action: XTwitterScraper::Models::X::WriteActionRetrieveResponse::action,
232
+ billing: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Billing,
100
233
  charged: bool,
101
234
  charged_credits: String,
102
- created_at: Time,
103
- media: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Media,
104
- retryable: false,
235
+ next_action: XTwitterScraper::Models::X::WriteActionRetrieveResponse::NextAction?,
236
+ object: :x_write_action,
237
+ poll_after_ms: Integer?,
238
+ request: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Request,
239
+ result: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Result?,
240
+ retryable: bool,
241
+ safe_to_retry: bool,
105
242
  send_dispatched: bool,
106
243
  status: XTwitterScraper::Models::X::WriteActionRetrieveResponse::status,
244
+ status_url: String,
245
+ success: bool,
246
+ target: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Target?,
247
+ target_id: String?,
248
+ terminal: bool,
107
249
  write_action_id: String,
250
+ community_id: String,
251
+ community_name: String,
252
+ completed_at: Time,
108
253
  confirmation_attempts: Integer,
109
254
  confirmation_checked_at: Time,
110
- confirmation_source: String?,
111
255
  confirmed_at: Time,
256
+ created_at: Time,
257
+ details: ::Hash[Symbol, top],
258
+ error: String,
259
+ expires_at: Time,
260
+ idempotent: bool,
261
+ media: ::Hash[Symbol, top],
262
+ media_id: String,
263
+ media_url: String,
112
264
  message: String,
113
265
  message_id: String,
266
+ request_hash: String,
267
+ request_id: String,
268
+ result_id: String,
114
269
  send_dispatched_at: Time,
115
- target_id: String?,
116
- tweet_id: String
270
+ tweet_id: String,
271
+ updated_at: Time
117
272
  }
118
273
 
119
- type media =
274
+ type account = { id: String, username: String }
275
+
276
+ class Account < XTwitterScraper::Internal::Type::BaseModel
277
+ attr_accessor id: String
278
+
279
+ attr_accessor username: String
280
+
281
+ def initialize: (id: String, username: String) -> void
282
+
283
+ def to_hash: -> { id: String, username: String }
284
+ end
285
+
286
+ type action =
287
+ :create_tweet
288
+ | :delete_tweet
289
+ | :like
290
+ | :unlike
291
+ | :retweet
292
+ | :unretweet
293
+ | :follow
294
+ | :unfollow
295
+ | :remove_follower
296
+ | :send_dm
297
+ | :upload_media
298
+ | :update_profile
299
+ | :update_avatar
300
+ | :update_banner
301
+ | :create_community
302
+ | :delete_community
303
+ | :join_community
304
+ | :leave_community
305
+
306
+ module Action
307
+ extend XTwitterScraper::Internal::Type::Enum
308
+
309
+ CREATE_TWEET: :create_tweet
310
+ DELETE_TWEET: :delete_tweet
311
+ LIKE: :like
312
+ UNLIKE: :unlike
313
+ RETWEET: :retweet
314
+ UNRETWEET: :unretweet
315
+ FOLLOW: :follow
316
+ UNFOLLOW: :unfollow
317
+ REMOVE_FOLLOWER: :remove_follower
318
+ SEND_DM: :send_dm
319
+ UPLOAD_MEDIA: :upload_media
320
+ UPDATE_PROFILE: :update_profile
321
+ UPDATE_AVATAR: :update_avatar
322
+ UPDATE_BANNER: :update_banner
323
+ CREATE_COMMUNITY: :create_community
324
+ DELETE_COMMUNITY: :delete_community
325
+ JOIN_COMMUNITY: :join_community
326
+ LEAVE_COMMUNITY: :leave_community
327
+
328
+ def self?.values: -> ::Array[XTwitterScraper::Models::X::WriteActionRetrieveResponse::action]
329
+ end
330
+
331
+ type billing =
120
332
  {
121
- count: Integer,
122
- credits: String,
123
- kind: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Media::kind,
124
- total_bytes: String
333
+ charged: bool,
334
+ charged_credits: String,
335
+ planned_credits: String,
336
+ status: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Billing::status
125
337
  }
126
338
 
127
- class Media < XTwitterScraper::Internal::Type::BaseModel
128
- attr_accessor count: Integer
339
+ class Billing < XTwitterScraper::Internal::Type::BaseModel
340
+ attr_accessor charged: bool
129
341
 
130
- attr_accessor credits: String
342
+ attr_accessor charged_credits: String
131
343
 
132
- attr_accessor kind: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Media::kind
344
+ attr_accessor planned_credits: String
133
345
 
134
- attr_accessor total_bytes: String
346
+ attr_accessor status: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Billing::status
135
347
 
136
348
  def initialize: (
137
- count: Integer,
138
- credits: String,
139
- kind: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Media::kind,
140
- total_bytes: String
349
+ charged: bool,
350
+ charged_credits: String,
351
+ planned_credits: String,
352
+ status: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Billing::status
141
353
  ) -> void
142
354
 
143
355
  def to_hash: -> {
144
- count: Integer,
145
- credits: String,
146
- kind: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Media::kind,
147
- total_bytes: String
356
+ charged: bool,
357
+ charged_credits: String,
358
+ planned_credits: String,
359
+ status: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Billing::status
148
360
  }
149
361
 
150
- type kind = :none | :image | :video
362
+ type status =
363
+ :not_charged | :pending | :charged | :charge_failed | :refunded
151
364
 
152
- module Kind
365
+ module Status
153
366
  extend XTwitterScraper::Internal::Type::Enum
154
367
 
155
- NONE: :none
156
- IMAGE: :image
157
- VIDEO: :video
368
+ NOT_CHARGED: :not_charged
369
+ PENDING: :pending
370
+ CHARGED: :charged
371
+ CHARGE_FAILED: :charge_failed
372
+ REFUNDED: :refunded
158
373
 
159
- def self?.values: -> ::Array[XTwitterScraper::Models::X::WriteActionRetrieveResponse::Media::kind]
374
+ def self?.values: -> ::Array[XTwitterScraper::Models::X::WriteActionRetrieveResponse::Billing::status]
160
375
  end
161
376
  end
162
377
 
163
- type status = :success | :failed | :pending_confirmation
378
+ type next_action =
379
+ {
380
+ type: XTwitterScraper::Models::X::WriteActionRetrieveResponse::NextAction::type_,
381
+ after_ms: Integer,
382
+ requires_new_idempotency_key: bool,
383
+ url: String
384
+ }
385
+
386
+ class NextAction < XTwitterScraper::Internal::Type::BaseModel
387
+ attr_accessor type: XTwitterScraper::Models::X::WriteActionRetrieveResponse::NextAction::type_
388
+
389
+ attr_reader after_ms: Integer?
390
+
391
+ def after_ms=: (Integer) -> Integer
392
+
393
+ attr_reader requires_new_idempotency_key: bool?
394
+
395
+ def requires_new_idempotency_key=: (bool) -> bool
396
+
397
+ attr_reader url: String?
398
+
399
+ def url=: (String) -> String
400
+
401
+ def initialize: (
402
+ type: XTwitterScraper::Models::X::WriteActionRetrieveResponse::NextAction::type_,
403
+ ?after_ms: Integer,
404
+ ?requires_new_idempotency_key: bool,
405
+ ?url: String
406
+ ) -> void
407
+
408
+ def to_hash: -> {
409
+ type: XTwitterScraper::Models::X::WriteActionRetrieveResponse::NextAction::type_,
410
+ after_ms: Integer,
411
+ requires_new_idempotency_key: bool,
412
+ url: String
413
+ }
414
+
415
+ type type_ = :poll | :retry | :verify_result | :fix_request
416
+
417
+ module Type
418
+ extend XTwitterScraper::Internal::Type::Enum
419
+
420
+ POLL: :poll
421
+ RETRY: :retry
422
+ VERIFY_RESULT: :verify_result
423
+ FIX_REQUEST: :fix_request
424
+
425
+ def self?.values: -> ::Array[XTwitterScraper::Models::X::WriteActionRetrieveResponse::NextAction::type_]
426
+ end
427
+ end
428
+
429
+ type request = { hash_: String?, payload: ::Hash[Symbol, top]? }
430
+
431
+ class Request < XTwitterScraper::Internal::Type::BaseModel
432
+ attr_accessor hash_: String?
433
+
434
+ attr_accessor payload: ::Hash[Symbol, top]?
435
+
436
+ def initialize: (
437
+ hash_: String?,
438
+ payload: ::Hash[Symbol, top]?
439
+ ) -> void
440
+
441
+ def to_hash: -> { hash_: String?, payload: ::Hash[Symbol, top]? }
442
+ end
443
+
444
+ type result =
445
+ {
446
+ id: String,
447
+ state: String,
448
+ type: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Result::type_
449
+ }
450
+
451
+ class Result < XTwitterScraper::Internal::Type::BaseModel
452
+ attr_reader id: String?
453
+
454
+ def id=: (String) -> String
455
+
456
+ attr_reader state: String?
457
+
458
+ def state=: (String) -> String
459
+
460
+ attr_reader type: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Result::type_?
461
+
462
+ def type=: (
463
+ XTwitterScraper::Models::X::WriteActionRetrieveResponse::Result::type_
464
+ ) -> XTwitterScraper::Models::X::WriteActionRetrieveResponse::Result::type_
465
+
466
+ def initialize: (
467
+ ?id: String,
468
+ ?state: String,
469
+ ?type: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Result::type_
470
+ ) -> void
471
+
472
+ def to_hash: -> {
473
+ id: String,
474
+ state: String,
475
+ type: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Result::type_
476
+ }
477
+
478
+ type type_ =
479
+ :tweet | :direct_message | :media | :community | :state_change
480
+
481
+ module Type
482
+ extend XTwitterScraper::Internal::Type::Enum
483
+
484
+ TWEET: :tweet
485
+ DIRECT_MESSAGE: :direct_message
486
+ MEDIA: :media
487
+ COMMUNITY: :community
488
+ STATE_CHANGE: :state_change
489
+
490
+ def self?.values: -> ::Array[XTwitterScraper::Models::X::WriteActionRetrieveResponse::Result::type_]
491
+ end
492
+ end
493
+
494
+ type status =
495
+ :accepted
496
+ | :dispatching
497
+ | :pending_confirmation
498
+ | :success
499
+ | :failed
500
+ | :expired
164
501
 
165
502
  module Status
166
503
  extend XTwitterScraper::Internal::Type::Enum
167
504
 
505
+ ACCEPTED: :accepted
506
+ DISPATCHING: :dispatching
507
+ PENDING_CONFIRMATION: :pending_confirmation
168
508
  SUCCESS: :success
169
509
  FAILED: :failed
170
- PENDING_CONFIRMATION: :pending_confirmation
510
+ EXPIRED: :expired
171
511
 
172
512
  def self?.values: -> ::Array[XTwitterScraper::Models::X::WriteActionRetrieveResponse::status]
173
513
  end
514
+
515
+ type target =
516
+ {
517
+ id: String,
518
+ type: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Target::type_
519
+ }
520
+
521
+ class Target < XTwitterScraper::Internal::Type::BaseModel
522
+ attr_accessor id: String
523
+
524
+ attr_accessor type: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Target::type_
525
+
526
+ def initialize: (
527
+ id: String,
528
+ type: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Target::type_
529
+ ) -> void
530
+
531
+ def to_hash: -> {
532
+ id: String,
533
+ type: XTwitterScraper::Models::X::WriteActionRetrieveResponse::Target::type_
534
+ }
535
+
536
+ type type_ = :tweet | :user | :community
537
+
538
+ module Type
539
+ extend XTwitterScraper::Internal::Type::Enum
540
+
541
+ TWEET: :tweet
542
+ USER: :user
543
+ COMMUNITY: :community
544
+
545
+ def self?.values: -> ::Array[XTwitterScraper::Models::X::WriteActionRetrieveResponse::Target::type_]
546
+ end
547
+ end
174
548
  end
175
549
  end
176
550
  end
@@ -2,19 +2,9 @@ module XTwitterScraper
2
2
  module Resources
3
3
  class Compose
4
4
  def create: (
5
- step: XTwitterScraper::Models::ComposeCreateParams::step,
6
- ?additional_context: String,
7
- ?call_to_action: String,
8
- ?draft: String,
9
- ?goal: XTwitterScraper::Models::ComposeCreateParams::goal,
10
- ?has_link: bool,
11
- ?has_media: bool,
12
- ?media_type: XTwitterScraper::Models::ComposeCreateParams::media_type,
13
- ?style_username: String,
14
- ?tone: String,
15
- ?topic: String,
5
+ body: XTwitterScraper::Models::ComposeCreateParams::body,
16
6
  ?request_options: XTwitterScraper::request_opts
17
- ) -> XTwitterScraper::Models::ComposeCreateResponse
7
+ ) -> XTwitterScraper::Models::compose_create_response
18
8
 
19
9
  def initialize: (client: XTwitterScraper::Client) -> void
20
10
  end
@@ -5,6 +5,7 @@ module XTwitterScraper
5
5
  def create: (
6
6
  body: String,
7
7
  subject: String,
8
+ ?idempotency_key: String,
8
9
  ?request_options: XTwitterScraper::request_opts
9
10
  ) -> XTwitterScraper::Models::Support::TicketCreateResponse
10
11
 
@@ -26,6 +27,7 @@ module XTwitterScraper
26
27
  def reply: (
27
28
  String id,
28
29
  body: String,
30
+ ?idempotency_key: String,
29
31
  ?request_options: XTwitterScraper::request_opts
30
32
  ) -> XTwitterScraper::Models::Support::TicketReplyResponse
31
33
 
@@ -6,12 +6,14 @@ module XTwitterScraper
6
6
  def create: (
7
7
  String id,
8
8
  account: String,
9
+ idempotency_key: String,
9
10
  ?request_options: XTwitterScraper::request_opts
10
11
  ) -> XTwitterScraper::Models::X::Communities::JoinCreateResponse
11
12
 
12
13
  def delete_all: (
13
14
  String id,
14
15
  account: String,
16
+ idempotency_key: String,
15
17
  ?request_options: XTwitterScraper::request_opts
16
18
  ) -> XTwitterScraper::Models::X::Communities::JoinDeleteAllResponse
17
19
 
@@ -9,6 +9,7 @@ module XTwitterScraper
9
9
  def create: (
10
10
  account: String,
11
11
  name: String,
12
+ idempotency_key: String,
12
13
  ?description: String,
13
14
  ?request_options: XTwitterScraper::request_opts
14
15
  ) -> XTwitterScraper::Models::X::CommunityCreateResponse
@@ -17,6 +18,7 @@ module XTwitterScraper
17
18
  String id,
18
19
  account: String,
19
20
  community_name: String,
21
+ idempotency_key: String,
20
22
  ?request_options: XTwitterScraper::request_opts
21
23
  ) -> XTwitterScraper::Models::X::CommunityDeleteResponse
22
24
 
@@ -14,6 +14,7 @@ module XTwitterScraper
14
14
  String user_id,
15
15
  account: String,
16
16
  text: String,
17
+ idempotency_key: String,
17
18
  ?media_ids: ::Array[String],
18
19
  ?request_options: XTwitterScraper::request_opts
19
20
  ) -> XTwitterScraper::Models::X::DmSendResponse
@@ -13,6 +13,7 @@ module XTwitterScraper
13
13
  def upload: (
14
14
  account: String,
15
15
  url: String,
16
+ idempotency_key: String,
16
17
  ?request_options: XTwitterScraper::request_opts
17
18
  ) -> XTwitterScraper::Models::X::MediaUploadResponse
18
19