x-twitter-scraper 0.5.5 → 0.7.0

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 (129) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +34 -0
  3. data/README.md +1 -1
  4. data/lib/x_twitter_scraper/internal/type/union.rb +25 -9
  5. data/lib/x_twitter_scraper/models/compose_create_response.rb +62 -1
  6. data/lib/x_twitter_scraper/models/content_disclosure.rb +1 -9
  7. data/lib/x_twitter_scraper/models/embedded_tweet.rb +389 -1
  8. data/lib/x_twitter_scraper/models/paginated_tweets.rb +4 -5
  9. data/lib/x_twitter_scraper/models/radar_item.rb +144 -7
  10. data/lib/x_twitter_scraper/models/search_tweet.rb +371 -1
  11. data/lib/x_twitter_scraper/models/support/ticket_list_response.rb +30 -17
  12. data/lib/x_twitter_scraper/models/support/ticket_retrieve_response.rb +49 -24
  13. data/lib/x_twitter_scraper/models/support/ticket_update_response.rb +18 -6
  14. data/lib/x_twitter_scraper/models/trend_list_response.rb +28 -1
  15. data/lib/x_twitter_scraper/models/tweet_media.rb +213 -1
  16. data/lib/x_twitter_scraper/models/user_profile.rb +211 -21
  17. data/lib/x_twitter_scraper/models/x/account_connection_attempt_retrieve_params.rb +22 -0
  18. data/lib/x_twitter_scraper/models/x/account_connection_attempt_retrieve_response.rb +224 -0
  19. data/lib/x_twitter_scraper/models/x/account_connection_challenge_submit_response.rb +4 -4
  20. data/lib/x_twitter_scraper/models/x/account_create_params.rb +9 -9
  21. data/lib/x_twitter_scraper/models/x/account_create_response.rb +146 -54
  22. data/lib/x_twitter_scraper/models/x/account_reauth_params.rb +2 -2
  23. data/lib/x_twitter_scraper/models/x/account_reauth_response.rb +4 -4
  24. data/lib/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rb +3 -5
  25. data/lib/x_twitter_scraper/models/x/communities/tweet_list_params.rb +3 -5
  26. data/lib/x_twitter_scraper/models/x/community_retrieve_info_response.rb +1 -17
  27. data/lib/x_twitter_scraper/models/x/community_retrieve_search_params.rb +3 -5
  28. data/lib/x_twitter_scraper/models/x/list_retrieve_tweets_params.rb +3 -5
  29. data/lib/x_twitter_scraper/models/x/tweet_author.rb +14 -1
  30. data/lib/x_twitter_scraper/models/x/tweet_detail.rb +373 -1
  31. data/lib/x_twitter_scraper/models/x/tweet_get_quotes_params.rb +3 -5
  32. data/lib/x_twitter_scraper/models/x/tweet_get_replies_params.rb +34 -6
  33. data/lib/x_twitter_scraper/models/x/tweet_get_replies_response.rb +345 -0
  34. data/lib/x_twitter_scraper/models/x/tweet_get_thread_params.rb +3 -5
  35. data/lib/x_twitter_scraper/models/x/user_retrieve_likes_params.rb +3 -5
  36. data/lib/x_twitter_scraper/models/x/user_retrieve_media_params.rb +3 -5
  37. data/lib/x_twitter_scraper/models/x/user_retrieve_mentions_params.rb +3 -5
  38. data/lib/x_twitter_scraper/models/x/user_retrieve_replies_params.rb +3 -5
  39. data/lib/x_twitter_scraper/models/x/user_retrieve_tweets_params.rb +3 -5
  40. data/lib/x_twitter_scraper/models/x/x_account.rb +9 -9
  41. data/lib/x_twitter_scraper/models/x_get_article_response.rb +1 -7
  42. data/lib/x_twitter_scraper/models/x_get_trends_response.rb +28 -1
  43. data/lib/x_twitter_scraper/resources/compose.rb +4 -4
  44. data/lib/x_twitter_scraper/resources/x/account_connection_attempts.rb +37 -0
  45. data/lib/x_twitter_scraper/resources/x/accounts.rb +5 -5
  46. data/lib/x_twitter_scraper/resources/x/communities/tweets.rb +2 -2
  47. data/lib/x_twitter_scraper/resources/x/communities.rb +1 -1
  48. data/lib/x_twitter_scraper/resources/x/lists.rb +1 -1
  49. data/lib/x_twitter_scraper/resources/x/tweets.rb +14 -11
  50. data/lib/x_twitter_scraper/resources/x/users.rb +5 -5
  51. data/lib/x_twitter_scraper/resources/x.rb +6 -0
  52. data/lib/x_twitter_scraper/version.rb +1 -1
  53. data/lib/x_twitter_scraper.rb +5 -1
  54. data/rbi/x_twitter_scraper/models/compose_create_response.rbi +142 -0
  55. data/rbi/x_twitter_scraper/models/content_disclosure.rbi +1 -15
  56. data/rbi/x_twitter_scraper/models/embedded_tweet.rbi +708 -3
  57. data/rbi/x_twitter_scraper/models/paginated_tweets.rbi +4 -5
  58. data/rbi/x_twitter_scraper/models/radar_item.rbi +245 -8
  59. data/rbi/x_twitter_scraper/models/search_tweet.rbi +674 -3
  60. data/rbi/x_twitter_scraper/models/support/ticket_list_response.rbi +75 -55
  61. data/rbi/x_twitter_scraper/models/support/ticket_retrieve_response.rbi +129 -87
  62. data/rbi/x_twitter_scraper/models/support/ticket_update_response.rbi +62 -13
  63. data/rbi/x_twitter_scraper/models/trend_list_response.rbi +40 -3
  64. data/rbi/x_twitter_scraper/models/tweet_media.rbi +313 -3
  65. data/rbi/x_twitter_scraper/models/user_profile.rbi +340 -29
  66. data/rbi/x_twitter_scraper/models/x/account_connection_attempt_retrieve_params.rbi +40 -0
  67. data/rbi/x_twitter_scraper/models/x/account_connection_attempt_retrieve_response.rbi +295 -0
  68. data/rbi/x_twitter_scraper/models/x/account_connection_challenge_submit_response.rbi +6 -6
  69. data/rbi/x_twitter_scraper/models/x/account_create_params.rbi +8 -11
  70. data/rbi/x_twitter_scraper/models/x/account_create_response.rbi +232 -91
  71. data/rbi/x_twitter_scraper/models/x/account_reauth_params.rbi +2 -2
  72. data/rbi/x_twitter_scraper/models/x/account_reauth_response.rbi +6 -6
  73. data/rbi/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rbi +4 -8
  74. data/rbi/x_twitter_scraper/models/x/communities/tweet_list_params.rbi +4 -8
  75. data/rbi/x_twitter_scraper/models/x/community_retrieve_info_response.rbi +0 -22
  76. data/rbi/x_twitter_scraper/models/x/community_retrieve_search_params.rbi +4 -8
  77. data/rbi/x_twitter_scraper/models/x/list_retrieve_tweets_params.rbi +4 -8
  78. data/rbi/x_twitter_scraper/models/x/tweet_author.rbi +13 -3
  79. data/rbi/x_twitter_scraper/models/x/tweet_detail.rbi +690 -3
  80. data/rbi/x_twitter_scraper/models/x/tweet_get_quotes_params.rbi +4 -8
  81. data/rbi/x_twitter_scraper/models/x/tweet_get_replies_params.rbi +68 -8
  82. data/rbi/x_twitter_scraper/models/x/tweet_get_replies_response.rbi +527 -0
  83. data/rbi/x_twitter_scraper/models/x/tweet_get_thread_params.rbi +4 -8
  84. data/rbi/x_twitter_scraper/models/x/user_retrieve_likes_params.rbi +4 -8
  85. data/rbi/x_twitter_scraper/models/x/user_retrieve_media_params.rbi +4 -8
  86. data/rbi/x_twitter_scraper/models/x/user_retrieve_mentions_params.rbi +4 -8
  87. data/rbi/x_twitter_scraper/models/x/user_retrieve_replies_params.rbi +4 -8
  88. data/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_params.rbi +4 -8
  89. data/rbi/x_twitter_scraper/models/x/x_account.rbi +12 -12
  90. data/rbi/x_twitter_scraper/models/x_get_article_response.rbi +0 -9
  91. data/rbi/x_twitter_scraper/models/x_get_trends_response.rbi +40 -3
  92. data/rbi/x_twitter_scraper/resources/compose.rbi +4 -4
  93. data/rbi/x_twitter_scraper/resources/x/account_connection_attempts.rbi +33 -0
  94. data/rbi/x_twitter_scraper/resources/x/accounts.rbi +5 -5
  95. data/rbi/x_twitter_scraper/resources/x/communities/tweets.rbi +4 -8
  96. data/rbi/x_twitter_scraper/resources/x/communities.rbi +2 -4
  97. data/rbi/x_twitter_scraper/resources/x/lists.rbi +2 -4
  98. data/rbi/x_twitter_scraper/resources/x/tweets.rbi +20 -18
  99. data/rbi/x_twitter_scraper/resources/x/users.rbi +10 -20
  100. data/rbi/x_twitter_scraper/resources/x.rbi +4 -0
  101. data/sig/x_twitter_scraper/models/compose_create_response.rbs +60 -0
  102. data/sig/x_twitter_scraper/models/content_disclosure.rbs +1 -11
  103. data/sig/x_twitter_scraper/models/embedded_tweet.rbs +343 -62
  104. data/sig/x_twitter_scraper/models/radar_item.rbs +100 -4
  105. data/sig/x_twitter_scraper/models/search_tweet.rbs +333 -70
  106. data/sig/x_twitter_scraper/models/support/ticket_list_response.rbs +29 -32
  107. data/sig/x_twitter_scraper/models/support/ticket_retrieve_response.rbs +49 -48
  108. data/sig/x_twitter_scraper/models/support/ticket_update_response.rbs +25 -7
  109. data/sig/x_twitter_scraper/models/trend_list_response.rbs +16 -20
  110. data/sig/x_twitter_scraper/models/tweet_media.rbs +146 -15
  111. data/sig/x_twitter_scraper/models/user_profile.rbs +164 -86
  112. data/sig/x_twitter_scraper/models/x/account_connection_attempt_retrieve_params.rbs +25 -0
  113. data/sig/x_twitter_scraper/models/x/account_connection_attempt_retrieve_response.rbs +199 -0
  114. data/sig/x_twitter_scraper/models/x/account_connection_challenge_submit_response.rbs +5 -5
  115. data/sig/x_twitter_scraper/models/x/account_create_params.rbs +6 -8
  116. data/sig/x_twitter_scraper/models/x/account_create_response.rbs +144 -59
  117. data/sig/x_twitter_scraper/models/x/account_reauth_response.rbs +5 -5
  118. data/sig/x_twitter_scraper/models/x/community_retrieve_info_response.rbs +0 -14
  119. data/sig/x_twitter_scraper/models/x/tweet_author.rbs +11 -3
  120. data/sig/x_twitter_scraper/models/x/tweet_detail.rbs +333 -70
  121. data/sig/x_twitter_scraper/models/x/tweet_get_replies_params.rbs +26 -0
  122. data/sig/x_twitter_scraper/models/x/tweet_get_replies_response.rbs +274 -0
  123. data/sig/x_twitter_scraper/models/x_get_article_response.rbs +0 -7
  124. data/sig/x_twitter_scraper/models/x_get_trends_response.rbs +25 -3
  125. data/sig/x_twitter_scraper/resources/x/account_connection_attempts.rbs +14 -0
  126. data/sig/x_twitter_scraper/resources/x/accounts.rbs +2 -2
  127. data/sig/x_twitter_scraper/resources/x/tweets.rbs +3 -1
  128. data/sig/x_twitter_scraper/resources/x.rbs +2 -0
  129. metadata +14 -2
@@ -4,43 +4,7 @@
4
4
 
5
5
  module XTwitterScraper
6
6
  module Models
7
- type user_profile =
8
- {
9
- id: String,
10
- name: String,
11
- username: String,
12
- automated_by: String,
13
- can_dm: bool,
14
- community_role: String,
15
- cover_picture: String,
16
- created_at: String,
17
- description: String,
18
- favourites_count: Integer,
19
- followers: Integer,
20
- following: Integer,
21
- has_custom_timelines: bool,
22
- is_automated: bool,
23
- is_blue_verified: bool,
24
- is_translator: bool,
25
- is_verified: bool,
26
- location: String,
27
- media_count: Integer,
28
- pinned_tweet_ids: ::Array[String],
29
- possibly_sensitive: bool,
30
- profile_bio: ::Hash[Symbol, top],
31
- profile_banner_url: String,
32
- profile_picture: String,
33
- protected: bool,
34
- statuses_count: Integer,
35
- unavailable: bool,
36
- unavailable_reason: String,
37
- url: String,
38
- verified: bool,
39
- verified_type: String,
40
- viewer_followed_by: bool,
41
- viewer_following: bool,
42
- withheld_in_countries: ::Array[String]
43
- }
7
+ type user_profile = ::Hash[Symbol, top]
44
8
 
45
9
  class UserProfile < XTwitterScraper::Internal::Type::BaseModel
46
10
  attr_accessor id: String
@@ -49,13 +13,19 @@ module XTwitterScraper
49
13
 
50
14
  attr_accessor username: String
51
15
 
16
+ attr_reader affiliates_highlighted_label: XTwitterScraper::UserProfile::AffiliatesHighlightedLabel?
17
+
18
+ def affiliates_highlighted_label=: (
19
+ XTwitterScraper::UserProfile::AffiliatesHighlightedLabel | ::Hash[Symbol, top]
20
+ ) -> XTwitterScraper::UserProfile::AffiliatesHighlightedLabel
21
+
52
22
  attr_reader automated_by: String?
53
23
 
54
24
  def automated_by=: (String) -> String
55
25
 
56
- attr_reader can_dm: bool?
26
+ attr_reader business_account_affiliates_count: Integer?
57
27
 
58
- def can_dm=: (bool) -> bool
28
+ def business_account_affiliates_count=: (Integer) -> Integer
59
29
 
60
30
  attr_reader community_role: String?
61
31
 
@@ -69,6 +39,10 @@ module XTwitterScraper
69
39
 
70
40
  def created_at=: (String) -> String
71
41
 
42
+ attr_reader creator_subscriptions_count: Integer?
43
+
44
+ def creator_subscriptions_count=: (Integer) -> Integer
45
+
72
46
  attr_reader description: String?
73
47
 
74
48
  def description=: (String) -> String
@@ -89,6 +63,26 @@ module XTwitterScraper
89
63
 
90
64
  def has_custom_timelines=: (bool) -> bool
91
65
 
66
+ attr_reader has_graduated_access: bool?
67
+
68
+ def has_graduated_access=: (bool) -> bool
69
+
70
+ attr_reader has_hidden_subscriptions_on_profile: bool?
71
+
72
+ def has_hidden_subscriptions_on_profile=: (bool) -> bool
73
+
74
+ attr_reader highlights_info: XTwitterScraper::UserProfile::HighlightsInfo?
75
+
76
+ def highlights_info=: (
77
+ XTwitterScraper::UserProfile::HighlightsInfo | ::Hash[Symbol, top]
78
+ ) -> XTwitterScraper::UserProfile::HighlightsInfo
79
+
80
+ attr_reader identity_verification: XTwitterScraper::UserProfile::IdentityVerification?
81
+
82
+ def identity_verification=: (
83
+ XTwitterScraper::UserProfile::IdentityVerification | ::Hash[Symbol, top]
84
+ ) -> XTwitterScraper::UserProfile::IdentityVerification
85
+
92
86
  attr_reader is_automated: bool?
93
87
 
94
88
  def is_automated=: (bool) -> bool
@@ -97,6 +91,10 @@ module XTwitterScraper
97
91
 
98
92
  def is_blue_verified=: (bool) -> bool
99
93
 
94
+ attr_reader is_profile_translatable: bool?
95
+
96
+ def is_profile_translatable=: (bool) -> bool
97
+
100
98
  attr_reader is_translator: bool?
101
99
 
102
100
  def is_translator=: (bool) -> bool
@@ -113,6 +111,10 @@ module XTwitterScraper
113
111
 
114
112
  def media_count=: (Integer) -> Integer
115
113
 
114
+ attr_reader parody_commentary_fan_label: String?
115
+
116
+ def parody_commentary_fan_label=: (String) -> String
117
+
116
118
  attr_reader pinned_tweet_ids: ::Array[String]?
117
119
 
118
120
  def pinned_tweet_ids=: (::Array[String]) -> ::Array[String]
@@ -129,10 +131,30 @@ module XTwitterScraper
129
131
 
130
132
  def profile_banner_url=: (String) -> String
131
133
 
134
+ attr_reader profile_description_language: String?
135
+
136
+ def profile_description_language=: (String) -> String
137
+
138
+ attr_reader profile_image_shape: String?
139
+
140
+ def profile_image_shape=: (String) -> String
141
+
142
+ attr_reader profile_interstitial_type: String?
143
+
144
+ def profile_interstitial_type=: (String) -> String
145
+
132
146
  attr_reader profile_picture: String?
133
147
 
134
148
  def profile_picture=: (String) -> String
135
149
 
150
+ attr_reader profile_sort_enabled: bool?
151
+
152
+ def profile_sort_enabled=: (bool) -> bool
153
+
154
+ attr_reader profile_translator_type: String?
155
+
156
+ def profile_translator_type=: (String) -> String
157
+
136
158
  attr_reader protected: bool?
137
159
 
138
160
  def protected=: (bool) -> bool
@@ -141,6 +163,10 @@ module XTwitterScraper
141
163
 
142
164
  def statuses_count=: (Integer) -> Integer
143
165
 
166
+ attr_reader super_follow_eligible: bool?
167
+
168
+ def super_follow_eligible=: (bool) -> bool
169
+
144
170
  attr_reader unavailable: bool?
145
171
 
146
172
  def unavailable=: (bool) -> bool
@@ -161,14 +187,6 @@ module XTwitterScraper
161
187
 
162
188
  def verified_type=: (String) -> String
163
189
 
164
- attr_reader viewer_followed_by: bool?
165
-
166
- def viewer_followed_by=: (bool) -> bool
167
-
168
- attr_reader viewer_following: bool?
169
-
170
- def viewer_following=: (bool) -> bool
171
-
172
190
  attr_reader withheld_in_countries: ::Array[String]?
173
191
 
174
192
  def withheld_in_countries=: (::Array[String]) -> ::Array[String]
@@ -177,75 +195,135 @@ module XTwitterScraper
177
195
  id: String,
178
196
  name: String,
179
197
  username: String,
198
+ ?affiliates_highlighted_label: XTwitterScraper::UserProfile::AffiliatesHighlightedLabel | ::Hash[Symbol, top],
180
199
  ?automated_by: String,
181
- ?can_dm: bool,
200
+ ?business_account_affiliates_count: Integer,
182
201
  ?community_role: String,
183
202
  ?cover_picture: String,
184
203
  ?created_at: String,
204
+ ?creator_subscriptions_count: Integer,
185
205
  ?description: String,
186
206
  ?favourites_count: Integer,
187
207
  ?followers: Integer,
188
208
  ?following: Integer,
189
209
  ?has_custom_timelines: bool,
210
+ ?has_graduated_access: bool,
211
+ ?has_hidden_subscriptions_on_profile: bool,
212
+ ?highlights_info: XTwitterScraper::UserProfile::HighlightsInfo | ::Hash[Symbol, top],
213
+ ?identity_verification: XTwitterScraper::UserProfile::IdentityVerification | ::Hash[Symbol, top],
190
214
  ?is_automated: bool,
191
215
  ?is_blue_verified: bool,
216
+ ?is_profile_translatable: bool,
192
217
  ?is_translator: bool,
193
218
  ?is_verified: bool,
194
219
  ?location: String,
195
220
  ?media_count: Integer,
221
+ ?parody_commentary_fan_label: String,
196
222
  ?pinned_tweet_ids: ::Array[String],
197
223
  ?possibly_sensitive: bool,
198
224
  ?profile_bio: ::Hash[Symbol, top],
199
225
  ?profile_banner_url: String,
226
+ ?profile_description_language: String,
227
+ ?profile_image_shape: String,
228
+ ?profile_interstitial_type: String,
200
229
  ?profile_picture: String,
230
+ ?profile_sort_enabled: bool,
231
+ ?profile_translator_type: String,
201
232
  ?protected: bool,
202
233
  ?statuses_count: Integer,
234
+ ?super_follow_eligible: bool,
203
235
  ?unavailable: bool,
204
236
  ?unavailable_reason: String,
205
237
  ?url: String,
206
238
  ?verified: bool,
207
239
  ?verified_type: String,
208
- ?viewer_followed_by: bool,
209
- ?viewer_following: bool,
210
240
  ?withheld_in_countries: ::Array[String]
211
241
  ) -> void
212
242
 
213
- def to_hash: -> {
214
- id: String,
215
- name: String,
216
- username: String,
217
- automated_by: String,
218
- can_dm: bool,
219
- community_role: String,
220
- cover_picture: String,
221
- created_at: String,
222
- description: String,
223
- favourites_count: Integer,
224
- followers: Integer,
225
- following: Integer,
226
- has_custom_timelines: bool,
227
- is_automated: bool,
228
- is_blue_verified: bool,
229
- is_translator: bool,
230
- is_verified: bool,
231
- location: String,
232
- media_count: Integer,
233
- pinned_tweet_ids: ::Array[String],
234
- possibly_sensitive: bool,
235
- profile_bio: ::Hash[Symbol, top],
236
- profile_banner_url: String,
237
- profile_picture: String,
238
- protected: bool,
239
- statuses_count: Integer,
240
- unavailable: bool,
241
- unavailable_reason: String,
242
- url: String,
243
- verified: bool,
244
- verified_type: String,
245
- viewer_followed_by: bool,
246
- viewer_following: bool,
247
- withheld_in_countries: ::Array[String]
248
- }
243
+ def to_hash: -> ::Hash[Symbol, top]
244
+
245
+ type affiliates_highlighted_label = ::Hash[Symbol, top]
246
+
247
+ class AffiliatesHighlightedLabel < XTwitterScraper::Internal::Type::BaseModel
248
+ attr_reader badge_url: String?
249
+
250
+ def badge_url=: (String) -> String
251
+
252
+ attr_reader description: String?
253
+
254
+ def description=: (String) -> String
255
+
256
+ attr_reader url: String?
257
+
258
+ def url=: (String) -> String
259
+
260
+ attr_reader url_type: String?
261
+
262
+ def url_type=: (String) -> String
263
+
264
+ attr_reader user_label_display_type: String?
265
+
266
+ def user_label_display_type=: (String) -> String
267
+
268
+ attr_reader user_label_type: String?
269
+
270
+ def user_label_type=: (String) -> String
271
+
272
+ def initialize: (
273
+ ?badge_url: String,
274
+ ?description: String,
275
+ ?url: String,
276
+ ?url_type: String,
277
+ ?user_label_display_type: String,
278
+ ?user_label_type: String
279
+ ) -> void
280
+
281
+ def to_hash: -> ::Hash[Symbol, top]
282
+ end
283
+
284
+ type highlights_info =
285
+ { can_highlight_tweets: bool, highlighted_tweets: String }
286
+
287
+ class HighlightsInfo < XTwitterScraper::Internal::Type::BaseModel
288
+ attr_reader can_highlight_tweets: bool?
289
+
290
+ def can_highlight_tweets=: (bool) -> bool
291
+
292
+ attr_reader highlighted_tweets: String?
293
+
294
+ def highlighted_tweets=: (String) -> String
295
+
296
+ def initialize: (
297
+ ?can_highlight_tweets: bool,
298
+ ?highlighted_tweets: String
299
+ ) -> void
300
+
301
+ def to_hash: -> ::Hash[Symbol, top]
302
+ end
303
+
304
+ type identity_verification = ::Hash[Symbol, top]
305
+
306
+ class IdentityVerification < XTwitterScraper::Internal::Type::BaseModel
307
+ attr_reader description: String?
308
+
309
+ def description=: (String) -> String
310
+
311
+ attr_reader is_identity_verified: bool?
312
+
313
+ def is_identity_verified=: (bool) -> bool
314
+
315
+ attr_reader verified_since_msec: String?
316
+
317
+ def verified_since_msec=: (String) -> String
318
+
319
+ def initialize: (
320
+ ?description: String,
321
+ ?is_identity_verified: bool,
322
+ ?verified_since_msec: String
323
+ ) -> void
324
+
325
+ def to_hash: -> ::Hash[Symbol, top]
326
+ end
249
327
  end
250
328
  end
251
329
  end
@@ -0,0 +1,25 @@
1
+ module XTwitterScraper
2
+ module Models
3
+ module X
4
+ type account_connection_attempt_retrieve_params =
5
+ { id: String } & XTwitterScraper::Internal::Type::request_parameters
6
+
7
+ class AccountConnectionAttemptRetrieveParams < XTwitterScraper::Internal::Type::BaseModel
8
+ extend XTwitterScraper::Internal::Type::RequestParameters::Converter
9
+ include XTwitterScraper::Internal::Type::RequestParameters
10
+
11
+ attr_accessor id: String
12
+
13
+ def initialize: (
14
+ id: String,
15
+ ?request_options: XTwitterScraper::request_opts
16
+ ) -> void
17
+
18
+ def to_hash: -> {
19
+ id: String,
20
+ request_options: XTwitterScraper::RequestOptions
21
+ }
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,199 @@
1
+ module XTwitterScraper
2
+ module Models
3
+ module X
4
+ type account_connection_attempt_retrieve_response =
5
+ XTwitterScraper::Models::X::AccountConnectionAttemptRetrieveResponse::Pending
6
+ | XTwitterScraper::Models::X::AccountConnectionAttemptRetrieveResponse::Success
7
+ | XTwitterScraper::Models::X::AccountConnectionAttemptRetrieveResponse::Failed
8
+ | XTwitterScraper::Models::X::AccountConnectionAttemptRetrieveResponse::RequiresEmailCode
9
+
10
+ module AccountConnectionAttemptRetrieveResponse
11
+ extend XTwitterScraper::Internal::Type::Union
12
+
13
+ type pending =
14
+ {
15
+ id: String,
16
+ object: :x_account_connection_attempt,
17
+ poll_after_ms: Integer,
18
+ status: :pending
19
+ }
20
+
21
+ class Pending < XTwitterScraper::Internal::Type::BaseModel
22
+ attr_accessor id: String
23
+
24
+ attr_accessor object: :x_account_connection_attempt
25
+
26
+ attr_accessor poll_after_ms: Integer
27
+
28
+ attr_accessor status: :pending
29
+
30
+ def initialize: (
31
+ id: String,
32
+ poll_after_ms: Integer,
33
+ ?object: :x_account_connection_attempt,
34
+ ?status: :pending
35
+ ) -> void
36
+
37
+ def to_hash: -> {
38
+ id: String,
39
+ object: :x_account_connection_attempt,
40
+ poll_after_ms: Integer,
41
+ status: :pending
42
+ }
43
+
44
+ module Object
45
+ X_ACCOUNT_CONNECTION_ATTEMPT: :x_account_connection_attempt
46
+ end
47
+
48
+ module Status
49
+ PENDING: :pending
50
+ end
51
+ end
52
+
53
+ type success =
54
+ {
55
+ id: String,
56
+ object: :x_account_connection_attempt,
57
+ status: :success
58
+ }
59
+
60
+ class Success < XTwitterScraper::Internal::Type::BaseModel
61
+ attr_accessor id: String
62
+
63
+ attr_accessor object: :x_account_connection_attempt
64
+
65
+ attr_accessor status: :success
66
+
67
+ def initialize: (
68
+ id: String,
69
+ ?object: :x_account_connection_attempt,
70
+ ?status: :success
71
+ ) -> void
72
+
73
+ def to_hash: -> {
74
+ id: String,
75
+ object: :x_account_connection_attempt,
76
+ status: :success
77
+ }
78
+
79
+ module Object
80
+ X_ACCOUNT_CONNECTION_ATTEMPT: :x_account_connection_attempt
81
+ end
82
+
83
+ module Status
84
+ SUCCESS: :success
85
+ end
86
+ end
87
+
88
+ type failed =
89
+ {
90
+ id: String,
91
+ error: String,
92
+ object: :x_account_connection_attempt,
93
+ retryable: bool,
94
+ status: :failed,
95
+ reason: String
96
+ }
97
+
98
+ class Failed < XTwitterScraper::Internal::Type::BaseModel
99
+ attr_accessor id: String
100
+
101
+ attr_accessor error: String
102
+
103
+ attr_accessor object: :x_account_connection_attempt
104
+
105
+ attr_accessor retryable: bool
106
+
107
+ attr_accessor status: :failed
108
+
109
+ attr_reader reason: String?
110
+
111
+ def reason=: (String) -> String
112
+
113
+ def initialize: (
114
+ id: String,
115
+ error: String,
116
+ retryable: bool,
117
+ ?reason: String,
118
+ ?object: :x_account_connection_attempt,
119
+ ?status: :failed
120
+ ) -> void
121
+
122
+ def to_hash: -> {
123
+ id: String,
124
+ error: String,
125
+ object: :x_account_connection_attempt,
126
+ retryable: bool,
127
+ status: :failed,
128
+ reason: String
129
+ }
130
+
131
+ module Object
132
+ X_ACCOUNT_CONNECTION_ATTEMPT: :x_account_connection_attempt
133
+ end
134
+
135
+ module Status
136
+ FAILED: :failed
137
+ end
138
+ end
139
+
140
+ type requires_email_code =
141
+ {
142
+ id: String,
143
+ expires_at: Time,
144
+ message: String,
145
+ object: :x_account_connection_challenge,
146
+ status: :requires_email_code,
147
+ username: String
148
+ }
149
+
150
+ class RequiresEmailCode < XTwitterScraper::Internal::Type::BaseModel
151
+ attr_accessor id: String
152
+
153
+ attr_accessor expires_at: Time
154
+
155
+ attr_accessor message: String
156
+
157
+ attr_accessor object: :x_account_connection_challenge
158
+
159
+ attr_accessor status: :requires_email_code
160
+
161
+ attr_accessor username: String
162
+
163
+ def initialize: (
164
+ id: String,
165
+ expires_at: Time,
166
+ message: String,
167
+ username: String,
168
+ ?object: :x_account_connection_challenge,
169
+ ?status: :requires_email_code
170
+ ) -> void
171
+
172
+ def to_hash: -> {
173
+ id: String,
174
+ expires_at: Time,
175
+ message: String,
176
+ object: :x_account_connection_challenge,
177
+ status: :requires_email_code,
178
+ username: String
179
+ }
180
+
181
+ module Object
182
+ X_ACCOUNT_CONNECTION_CHALLENGE: :x_account_connection_challenge
183
+ end
184
+
185
+ module Status
186
+ REQUIRES_EMAIL_CODE: :requires_email_code
187
+ end
188
+ end
189
+
190
+ XAccountConnectionAttemptPending: singleton(Pending)
191
+ XAccountConnectionAttemptSuccess: singleton(Success)
192
+ XAccountConnectionAttemptFailed: singleton(Failed)
193
+ XAccountConnectionChallenge: singleton(RequiresEmailCode)
194
+
195
+ def self?.variants: -> ::Array[XTwitterScraper::Models::X::account_connection_attempt_retrieve_response]
196
+ end
197
+ end
198
+ end
199
+ end
@@ -10,7 +10,7 @@ module XTwitterScraper
10
10
  id: String,
11
11
  created_at: Time,
12
12
  health: XTwitterScraper::Models::X::AccountConnectionChallengeSubmitResponse::health,
13
- status: String,
13
+ status: :active,
14
14
  x_user_id: String,
15
15
  x_username: String
16
16
  }
@@ -22,7 +22,7 @@ module XTwitterScraper
22
22
 
23
23
  attr_accessor health: XTwitterScraper::Models::X::AccountConnectionChallengeSubmitResponse::health
24
24
 
25
- attr_accessor status: String
25
+ attr_accessor status: :active
26
26
 
27
27
  attr_accessor x_user_id: String
28
28
 
@@ -32,16 +32,16 @@ module XTwitterScraper
32
32
  id: String,
33
33
  created_at: Time,
34
34
  health: XTwitterScraper::Models::X::AccountConnectionChallengeSubmitResponse::health,
35
- status: String,
36
35
  x_user_id: String,
37
- x_username: String
36
+ x_username: String,
37
+ ?status: :active
38
38
  ) -> void
39
39
 
40
40
  def to_hash: -> {
41
41
  id: String,
42
42
  created_at: Time,
43
43
  health: XTwitterScraper::Models::X::AccountConnectionChallengeSubmitResponse::health,
44
- status: String,
44
+ status: :active,
45
45
  x_user_id: String,
46
46
  x_username: String
47
47
  }
@@ -9,8 +9,8 @@ module XTwitterScraper
9
9
  {
10
10
  email: String,
11
11
  password: String,
12
- username: String,
13
- totp_secret: String
12
+ totp_secret: String,
13
+ username: String
14
14
  }
15
15
  & XTwitterScraper::Internal::Type::request_parameters
16
16
 
@@ -22,25 +22,23 @@ module XTwitterScraper
22
22
 
23
23
  attr_accessor password: String
24
24
 
25
- attr_accessor username: String
26
-
27
- attr_reader totp_secret: String?
25
+ attr_accessor totp_secret: String
28
26
 
29
- def totp_secret=: (String) -> String
27
+ attr_accessor username: String
30
28
 
31
29
  def initialize: (
32
30
  email: String,
33
31
  password: String,
32
+ totp_secret: String,
34
33
  username: String,
35
- ?totp_secret: String,
36
34
  ?request_options: XTwitterScraper::request_opts
37
35
  ) -> void
38
36
 
39
37
  def to_hash: -> {
40
38
  email: String,
41
39
  password: String,
42
- username: String,
43
40
  totp_secret: String,
41
+ username: String,
44
42
  request_options: XTwitterScraper::RequestOptions
45
43
  }
46
44
  end