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
@@ -2,28 +2,549 @@ module XTwitterScraper
2
2
  module Models
3
3
  module X
4
4
  type community_create_response =
5
- { community_id: String, success: true, community_name: String }
5
+ {
6
+ id: String,
7
+ account: XTwitterScraper::Models::X::CommunityCreateResponse::Account?,
8
+ action: XTwitterScraper::Models::X::CommunityCreateResponse::action,
9
+ billing: XTwitterScraper::Models::X::CommunityCreateResponse::Billing,
10
+ charged: bool,
11
+ charged_credits: String,
12
+ next_action: XTwitterScraper::Models::X::CommunityCreateResponse::NextAction?,
13
+ object: :x_write_action,
14
+ poll_after_ms: Integer?,
15
+ request: XTwitterScraper::Models::X::CommunityCreateResponse::Request,
16
+ result: XTwitterScraper::Models::X::CommunityCreateResponse::Result?,
17
+ retryable: bool,
18
+ safe_to_retry: bool,
19
+ send_dispatched: bool,
20
+ status: XTwitterScraper::Models::X::CommunityCreateResponse::status,
21
+ status_url: String,
22
+ success: bool,
23
+ target: XTwitterScraper::Models::X::CommunityCreateResponse::Target?,
24
+ target_id: String?,
25
+ terminal: bool,
26
+ write_action_id: String,
27
+ community_id: String,
28
+ community_name: String,
29
+ completed_at: Time,
30
+ confirmation_attempts: Integer,
31
+ confirmation_checked_at: Time,
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,
41
+ message: String,
42
+ message_id: String,
43
+ request_hash: String,
44
+ request_id: String,
45
+ result_id: String,
46
+ send_dispatched_at: Time,
47
+ tweet_id: String,
48
+ updated_at: Time
49
+ }
6
50
 
7
51
  class CommunityCreateResponse < XTwitterScraper::Internal::Type::BaseModel
8
- attr_accessor community_id: String
52
+ attr_accessor id: String
53
+
54
+ attr_accessor account: XTwitterScraper::Models::X::CommunityCreateResponse::Account?
55
+
56
+ attr_accessor action: XTwitterScraper::Models::X::CommunityCreateResponse::action
57
+
58
+ attr_accessor billing: XTwitterScraper::Models::X::CommunityCreateResponse::Billing
59
+
60
+ attr_accessor charged: bool
61
+
62
+ attr_accessor charged_credits: String
63
+
64
+ attr_accessor next_action: XTwitterScraper::Models::X::CommunityCreateResponse::NextAction?
65
+
66
+ attr_accessor object: :x_write_action
67
+
68
+ attr_accessor poll_after_ms: Integer?
69
+
70
+ attr_accessor request: XTwitterScraper::Models::X::CommunityCreateResponse::Request
71
+
72
+ attr_accessor result: XTwitterScraper::Models::X::CommunityCreateResponse::Result?
73
+
74
+ attr_accessor retryable: bool
75
+
76
+ attr_accessor safe_to_retry: bool
77
+
78
+ attr_accessor send_dispatched: bool
79
+
80
+ attr_accessor status: XTwitterScraper::Models::X::CommunityCreateResponse::status
81
+
82
+ attr_accessor status_url: String
9
83
 
10
- attr_accessor success: true
84
+ attr_accessor success: bool
85
+
86
+ attr_accessor target: XTwitterScraper::Models::X::CommunityCreateResponse::Target?
87
+
88
+ attr_accessor target_id: String?
89
+
90
+ attr_accessor terminal: bool
91
+
92
+ attr_accessor write_action_id: String
93
+
94
+ attr_reader community_id: String?
95
+
96
+ def community_id=: (String) -> String
11
97
 
12
98
  attr_reader community_name: String?
13
99
 
14
100
  def community_name=: (String) -> String
15
101
 
102
+ attr_reader completed_at: Time?
103
+
104
+ def completed_at=: (Time) -> Time
105
+
106
+ attr_reader confirmation_attempts: Integer?
107
+
108
+ def confirmation_attempts=: (Integer) -> Integer
109
+
110
+ attr_reader confirmation_checked_at: Time?
111
+
112
+ def confirmation_checked_at=: (Time) -> Time
113
+
114
+ attr_reader confirmed_at: Time?
115
+
116
+ def confirmed_at=: (Time) -> Time
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
+
150
+ attr_reader message: String?
151
+
152
+ def message=: (String) -> String
153
+
154
+ attr_reader message_id: String?
155
+
156
+ def message_id=: (String) -> String
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
+
170
+ attr_reader send_dispatched_at: Time?
171
+
172
+ def send_dispatched_at=: (Time) -> Time
173
+
174
+ attr_reader tweet_id: String?
175
+
176
+ def tweet_id=: (String) -> String
177
+
178
+ attr_reader updated_at: Time?
179
+
180
+ def updated_at=: (Time) -> Time
181
+
16
182
  def initialize: (
17
- community_id: String,
183
+ id: String,
184
+ account: XTwitterScraper::Models::X::CommunityCreateResponse::Account?,
185
+ action: XTwitterScraper::Models::X::CommunityCreateResponse::action,
186
+ billing: XTwitterScraper::Models::X::CommunityCreateResponse::Billing,
187
+ charged: bool,
188
+ charged_credits: String,
189
+ next_action: XTwitterScraper::Models::X::CommunityCreateResponse::NextAction?,
190
+ poll_after_ms: Integer?,
191
+ request: XTwitterScraper::Models::X::CommunityCreateResponse::Request,
192
+ result: XTwitterScraper::Models::X::CommunityCreateResponse::Result?,
193
+ retryable: bool,
194
+ safe_to_retry: bool,
195
+ send_dispatched: bool,
196
+ status: XTwitterScraper::Models::X::CommunityCreateResponse::status,
197
+ status_url: String,
198
+ success: bool,
199
+ target: XTwitterScraper::Models::X::CommunityCreateResponse::Target?,
200
+ target_id: String?,
201
+ terminal: bool,
202
+ write_action_id: String,
203
+ ?community_id: String,
18
204
  ?community_name: String,
19
- ?success: true
205
+ ?completed_at: Time,
206
+ ?confirmation_attempts: Integer,
207
+ ?confirmation_checked_at: Time,
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,
217
+ ?message: String,
218
+ ?message_id: String,
219
+ ?request_hash: String,
220
+ ?request_id: String,
221
+ ?result_id: String,
222
+ ?send_dispatched_at: Time,
223
+ ?tweet_id: String,
224
+ ?updated_at: Time,
225
+ ?object: :x_write_action
20
226
  ) -> void
21
227
 
22
228
  def to_hash: -> {
229
+ id: String,
230
+ account: XTwitterScraper::Models::X::CommunityCreateResponse::Account?,
231
+ action: XTwitterScraper::Models::X::CommunityCreateResponse::action,
232
+ billing: XTwitterScraper::Models::X::CommunityCreateResponse::Billing,
233
+ charged: bool,
234
+ charged_credits: String,
235
+ next_action: XTwitterScraper::Models::X::CommunityCreateResponse::NextAction?,
236
+ object: :x_write_action,
237
+ poll_after_ms: Integer?,
238
+ request: XTwitterScraper::Models::X::CommunityCreateResponse::Request,
239
+ result: XTwitterScraper::Models::X::CommunityCreateResponse::Result?,
240
+ retryable: bool,
241
+ safe_to_retry: bool,
242
+ send_dispatched: bool,
243
+ status: XTwitterScraper::Models::X::CommunityCreateResponse::status,
244
+ status_url: String,
245
+ success: bool,
246
+ target: XTwitterScraper::Models::X::CommunityCreateResponse::Target?,
247
+ target_id: String?,
248
+ terminal: bool,
249
+ write_action_id: String,
23
250
  community_id: String,
24
- success: true,
25
- community_name: String
251
+ community_name: String,
252
+ completed_at: Time,
253
+ confirmation_attempts: Integer,
254
+ confirmation_checked_at: Time,
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,
264
+ message: String,
265
+ message_id: String,
266
+ request_hash: String,
267
+ request_id: String,
268
+ result_id: String,
269
+ send_dispatched_at: Time,
270
+ tweet_id: String,
271
+ updated_at: Time
26
272
  }
273
+
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::CommunityCreateResponse::action]
329
+ end
330
+
331
+ type billing =
332
+ {
333
+ charged: bool,
334
+ charged_credits: String,
335
+ planned_credits: String,
336
+ status: XTwitterScraper::Models::X::CommunityCreateResponse::Billing::status
337
+ }
338
+
339
+ class Billing < XTwitterScraper::Internal::Type::BaseModel
340
+ attr_accessor charged: bool
341
+
342
+ attr_accessor charged_credits: String
343
+
344
+ attr_accessor planned_credits: String
345
+
346
+ attr_accessor status: XTwitterScraper::Models::X::CommunityCreateResponse::Billing::status
347
+
348
+ def initialize: (
349
+ charged: bool,
350
+ charged_credits: String,
351
+ planned_credits: String,
352
+ status: XTwitterScraper::Models::X::CommunityCreateResponse::Billing::status
353
+ ) -> void
354
+
355
+ def to_hash: -> {
356
+ charged: bool,
357
+ charged_credits: String,
358
+ planned_credits: String,
359
+ status: XTwitterScraper::Models::X::CommunityCreateResponse::Billing::status
360
+ }
361
+
362
+ type status =
363
+ :not_charged | :pending | :charged | :charge_failed | :refunded
364
+
365
+ module Status
366
+ extend XTwitterScraper::Internal::Type::Enum
367
+
368
+ NOT_CHARGED: :not_charged
369
+ PENDING: :pending
370
+ CHARGED: :charged
371
+ CHARGE_FAILED: :charge_failed
372
+ REFUNDED: :refunded
373
+
374
+ def self?.values: -> ::Array[XTwitterScraper::Models::X::CommunityCreateResponse::Billing::status]
375
+ end
376
+ end
377
+
378
+ type next_action =
379
+ {
380
+ type: XTwitterScraper::Models::X::CommunityCreateResponse::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::CommunityCreateResponse::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::CommunityCreateResponse::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::CommunityCreateResponse::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::CommunityCreateResponse::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::CommunityCreateResponse::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::CommunityCreateResponse::Result::type_?
461
+
462
+ def type=: (
463
+ XTwitterScraper::Models::X::CommunityCreateResponse::Result::type_
464
+ ) -> XTwitterScraper::Models::X::CommunityCreateResponse::Result::type_
465
+
466
+ def initialize: (
467
+ ?id: String,
468
+ ?state: String,
469
+ ?type: XTwitterScraper::Models::X::CommunityCreateResponse::Result::type_
470
+ ) -> void
471
+
472
+ def to_hash: -> {
473
+ id: String,
474
+ state: String,
475
+ type: XTwitterScraper::Models::X::CommunityCreateResponse::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::CommunityCreateResponse::Result::type_]
491
+ end
492
+ end
493
+
494
+ type status =
495
+ :accepted
496
+ | :dispatching
497
+ | :pending_confirmation
498
+ | :success
499
+ | :failed
500
+ | :expired
501
+
502
+ module Status
503
+ extend XTwitterScraper::Internal::Type::Enum
504
+
505
+ ACCEPTED: :accepted
506
+ DISPATCHING: :dispatching
507
+ PENDING_CONFIRMATION: :pending_confirmation
508
+ SUCCESS: :success
509
+ FAILED: :failed
510
+ EXPIRED: :expired
511
+
512
+ def self?.values: -> ::Array[XTwitterScraper::Models::X::CommunityCreateResponse::status]
513
+ end
514
+
515
+ type target =
516
+ {
517
+ id: String,
518
+ type: XTwitterScraper::Models::X::CommunityCreateResponse::Target::type_
519
+ }
520
+
521
+ class Target < XTwitterScraper::Internal::Type::BaseModel
522
+ attr_accessor id: String
523
+
524
+ attr_accessor type: XTwitterScraper::Models::X::CommunityCreateResponse::Target::type_
525
+
526
+ def initialize: (
527
+ id: String,
528
+ type: XTwitterScraper::Models::X::CommunityCreateResponse::Target::type_
529
+ ) -> void
530
+
531
+ def to_hash: -> {
532
+ id: String,
533
+ type: XTwitterScraper::Models::X::CommunityCreateResponse::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::CommunityCreateResponse::Target::type_]
546
+ end
547
+ end
27
548
  end
28
549
  end
29
550
  end
@@ -2,7 +2,12 @@ module XTwitterScraper
2
2
  module Models
3
3
  module X
4
4
  type community_delete_params =
5
- { id: String, account: String, community_name: String }
5
+ {
6
+ id: String,
7
+ account: String,
8
+ community_name: String,
9
+ idempotency_key: String
10
+ }
6
11
  & XTwitterScraper::Internal::Type::request_parameters
7
12
 
8
13
  class CommunityDeleteParams < XTwitterScraper::Internal::Type::BaseModel
@@ -15,10 +20,13 @@ module XTwitterScraper
15
20
 
16
21
  attr_accessor community_name: String
17
22
 
23
+ attr_accessor idempotency_key: String
24
+
18
25
  def initialize: (
19
26
  id: String,
20
27
  account: String,
21
28
  community_name: String,
29
+ idempotency_key: String,
22
30
  ?request_options: XTwitterScraper::request_opts
23
31
  ) -> void
24
32
 
@@ -26,6 +34,7 @@ module XTwitterScraper
26
34
  id: String,
27
35
  account: String,
28
36
  community_name: String,
37
+ idempotency_key: String,
29
38
  request_options: XTwitterScraper::RequestOptions
30
39
  }
31
40
  end