x-twitter-scraper 0.6.0 → 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 (106) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -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/content_disclosure.rb +1 -9
  6. data/lib/x_twitter_scraper/models/embedded_tweet.rb +389 -1
  7. data/lib/x_twitter_scraper/models/paginated_tweets.rb +4 -5
  8. data/lib/x_twitter_scraper/models/search_tweet.rb +371 -1
  9. data/lib/x_twitter_scraper/models/support/ticket_list_response.rb +30 -17
  10. data/lib/x_twitter_scraper/models/support/ticket_retrieve_response.rb +49 -24
  11. data/lib/x_twitter_scraper/models/support/ticket_update_response.rb +18 -6
  12. data/lib/x_twitter_scraper/models/trend_list_response.rb +28 -1
  13. data/lib/x_twitter_scraper/models/tweet_media.rb +213 -1
  14. data/lib/x_twitter_scraper/models/user_profile.rb +211 -21
  15. data/lib/x_twitter_scraper/models/x/account_connection_attempt_retrieve_response.rb +60 -26
  16. data/lib/x_twitter_scraper/models/x/account_connection_challenge_submit_response.rb +4 -4
  17. data/lib/x_twitter_scraper/models/x/account_create_response.rb +149 -2
  18. data/lib/x_twitter_scraper/models/x/account_reauth_response.rb +4 -4
  19. data/lib/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rb +3 -5
  20. data/lib/x_twitter_scraper/models/x/communities/tweet_list_params.rb +3 -5
  21. data/lib/x_twitter_scraper/models/x/community_retrieve_info_response.rb +1 -17
  22. data/lib/x_twitter_scraper/models/x/community_retrieve_search_params.rb +3 -5
  23. data/lib/x_twitter_scraper/models/x/list_retrieve_tweets_params.rb +3 -5
  24. data/lib/x_twitter_scraper/models/x/tweet_author.rb +14 -1
  25. data/lib/x_twitter_scraper/models/x/tweet_detail.rb +373 -1
  26. data/lib/x_twitter_scraper/models/x/tweet_get_quotes_params.rb +3 -5
  27. data/lib/x_twitter_scraper/models/x/tweet_get_replies_params.rb +34 -6
  28. data/lib/x_twitter_scraper/models/x/tweet_get_replies_response.rb +345 -0
  29. data/lib/x_twitter_scraper/models/x/tweet_get_thread_params.rb +3 -5
  30. data/lib/x_twitter_scraper/models/x/user_retrieve_likes_params.rb +3 -5
  31. data/lib/x_twitter_scraper/models/x/user_retrieve_media_params.rb +3 -5
  32. data/lib/x_twitter_scraper/models/x/user_retrieve_mentions_params.rb +3 -5
  33. data/lib/x_twitter_scraper/models/x/user_retrieve_replies_params.rb +3 -5
  34. data/lib/x_twitter_scraper/models/x/user_retrieve_tweets_params.rb +3 -5
  35. data/lib/x_twitter_scraper/models/x_get_article_response.rb +1 -7
  36. data/lib/x_twitter_scraper/models/x_get_trends_response.rb +28 -1
  37. data/lib/x_twitter_scraper/resources/x/account_connection_attempts.rb +1 -1
  38. data/lib/x_twitter_scraper/resources/x/accounts.rb +2 -2
  39. data/lib/x_twitter_scraper/resources/x/communities/tweets.rb +2 -2
  40. data/lib/x_twitter_scraper/resources/x/communities.rb +1 -1
  41. data/lib/x_twitter_scraper/resources/x/lists.rb +1 -1
  42. data/lib/x_twitter_scraper/resources/x/tweets.rb +14 -11
  43. data/lib/x_twitter_scraper/resources/x/users.rb +5 -5
  44. data/lib/x_twitter_scraper/version.rb +1 -1
  45. data/lib/x_twitter_scraper.rb +2 -1
  46. data/rbi/x_twitter_scraper/models/content_disclosure.rbi +1 -15
  47. data/rbi/x_twitter_scraper/models/embedded_tweet.rbi +708 -3
  48. data/rbi/x_twitter_scraper/models/paginated_tweets.rbi +4 -5
  49. data/rbi/x_twitter_scraper/models/search_tweet.rbi +674 -3
  50. data/rbi/x_twitter_scraper/models/support/ticket_list_response.rbi +75 -55
  51. data/rbi/x_twitter_scraper/models/support/ticket_retrieve_response.rbi +129 -87
  52. data/rbi/x_twitter_scraper/models/support/ticket_update_response.rbi +62 -13
  53. data/rbi/x_twitter_scraper/models/trend_list_response.rbi +40 -3
  54. data/rbi/x_twitter_scraper/models/tweet_media.rbi +313 -3
  55. data/rbi/x_twitter_scraper/models/user_profile.rbi +340 -29
  56. data/rbi/x_twitter_scraper/models/x/account_connection_attempt_retrieve_response.rbi +61 -83
  57. data/rbi/x_twitter_scraper/models/x/account_connection_challenge_submit_response.rbi +6 -6
  58. data/rbi/x_twitter_scraper/models/x/account_create_response.rbi +264 -2
  59. data/rbi/x_twitter_scraper/models/x/account_reauth_response.rbi +6 -6
  60. data/rbi/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rbi +4 -8
  61. data/rbi/x_twitter_scraper/models/x/communities/tweet_list_params.rbi +4 -8
  62. data/rbi/x_twitter_scraper/models/x/community_retrieve_info_response.rbi +0 -22
  63. data/rbi/x_twitter_scraper/models/x/community_retrieve_search_params.rbi +4 -8
  64. data/rbi/x_twitter_scraper/models/x/list_retrieve_tweets_params.rbi +4 -8
  65. data/rbi/x_twitter_scraper/models/x/tweet_author.rbi +13 -3
  66. data/rbi/x_twitter_scraper/models/x/tweet_detail.rbi +690 -3
  67. data/rbi/x_twitter_scraper/models/x/tweet_get_quotes_params.rbi +4 -8
  68. data/rbi/x_twitter_scraper/models/x/tweet_get_replies_params.rbi +68 -8
  69. data/rbi/x_twitter_scraper/models/x/tweet_get_replies_response.rbi +527 -0
  70. data/rbi/x_twitter_scraper/models/x/tweet_get_thread_params.rbi +4 -8
  71. data/rbi/x_twitter_scraper/models/x/user_retrieve_likes_params.rbi +4 -8
  72. data/rbi/x_twitter_scraper/models/x/user_retrieve_media_params.rbi +4 -8
  73. data/rbi/x_twitter_scraper/models/x/user_retrieve_mentions_params.rbi +4 -8
  74. data/rbi/x_twitter_scraper/models/x/user_retrieve_replies_params.rbi +4 -8
  75. data/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_params.rbi +4 -8
  76. data/rbi/x_twitter_scraper/models/x_get_article_response.rbi +0 -9
  77. data/rbi/x_twitter_scraper/models/x_get_trends_response.rbi +40 -3
  78. data/rbi/x_twitter_scraper/resources/x/accounts.rbi +1 -1
  79. data/rbi/x_twitter_scraper/resources/x/communities/tweets.rbi +4 -8
  80. data/rbi/x_twitter_scraper/resources/x/communities.rbi +2 -4
  81. data/rbi/x_twitter_scraper/resources/x/lists.rbi +2 -4
  82. data/rbi/x_twitter_scraper/resources/x/tweets.rbi +20 -18
  83. data/rbi/x_twitter_scraper/resources/x/users.rbi +10 -20
  84. data/sig/x_twitter_scraper/models/content_disclosure.rbs +1 -11
  85. data/sig/x_twitter_scraper/models/embedded_tweet.rbs +343 -62
  86. data/sig/x_twitter_scraper/models/search_tweet.rbs +333 -70
  87. data/sig/x_twitter_scraper/models/support/ticket_list_response.rbs +29 -32
  88. data/sig/x_twitter_scraper/models/support/ticket_retrieve_response.rbs +49 -48
  89. data/sig/x_twitter_scraper/models/support/ticket_update_response.rbs +25 -7
  90. data/sig/x_twitter_scraper/models/trend_list_response.rbs +16 -20
  91. data/sig/x_twitter_scraper/models/tweet_media.rbs +146 -15
  92. data/sig/x_twitter_scraper/models/user_profile.rbs +164 -86
  93. data/sig/x_twitter_scraper/models/x/account_connection_attempt_retrieve_response.rbs +50 -33
  94. data/sig/x_twitter_scraper/models/x/account_connection_challenge_submit_response.rbs +5 -5
  95. data/sig/x_twitter_scraper/models/x/account_create_response.rbs +147 -1
  96. data/sig/x_twitter_scraper/models/x/account_reauth_response.rbs +5 -5
  97. data/sig/x_twitter_scraper/models/x/community_retrieve_info_response.rbs +0 -14
  98. data/sig/x_twitter_scraper/models/x/tweet_author.rbs +11 -3
  99. data/sig/x_twitter_scraper/models/x/tweet_detail.rbs +333 -70
  100. data/sig/x_twitter_scraper/models/x/tweet_get_replies_params.rbs +26 -0
  101. data/sig/x_twitter_scraper/models/x/tweet_get_replies_response.rbs +274 -0
  102. data/sig/x_twitter_scraper/models/x_get_article_response.rbs +0 -7
  103. data/sig/x_twitter_scraper/models/x_get_trends_response.rbs +25 -3
  104. data/sig/x_twitter_scraper/resources/x/accounts.rbs +1 -1
  105. data/sig/x_twitter_scraper/resources/x/tweets.rbs +3 -1
  106. metadata +4 -1
@@ -24,17 +24,33 @@ module XTwitterScraper
24
24
  sig { returns(String) }
25
25
  attr_accessor :username
26
26
 
27
+ # Organization affiliation label shown on an X profile.
28
+ sig do
29
+ returns(
30
+ T.nilable(XTwitterScraper::UserProfile::AffiliatesHighlightedLabel)
31
+ )
32
+ end
33
+ attr_reader :affiliates_highlighted_label
34
+
35
+ sig do
36
+ params(
37
+ affiliates_highlighted_label:
38
+ XTwitterScraper::UserProfile::AffiliatesHighlightedLabel::OrHash
39
+ ).void
40
+ end
41
+ attr_writer :affiliates_highlighted_label
42
+
27
43
  sig { returns(T.nilable(String)) }
28
44
  attr_reader :automated_by
29
45
 
30
46
  sig { params(automated_by: String).void }
31
47
  attr_writer :automated_by
32
48
 
33
- sig { returns(T.nilable(T::Boolean)) }
34
- attr_reader :can_dm
49
+ sig { returns(T.nilable(Integer)) }
50
+ attr_reader :business_account_affiliates_count
35
51
 
36
- sig { params(can_dm: T::Boolean).void }
37
- attr_writer :can_dm
52
+ sig { params(business_account_affiliates_count: Integer).void }
53
+ attr_writer :business_account_affiliates_count
38
54
 
39
55
  # Community role when returned by community member reads
40
56
  sig { returns(T.nilable(String)) }
@@ -55,6 +71,12 @@ module XTwitterScraper
55
71
  sig { params(created_at: String).void }
56
72
  attr_writer :created_at
57
73
 
74
+ sig { returns(T.nilable(Integer)) }
75
+ attr_reader :creator_subscriptions_count
76
+
77
+ sig { params(creator_subscriptions_count: Integer).void }
78
+ attr_writer :creator_subscriptions_count
79
+
58
80
  sig { returns(T.nilable(String)) }
59
81
  attr_reader :description
60
82
 
@@ -85,6 +107,43 @@ module XTwitterScraper
85
107
  sig { params(has_custom_timelines: T::Boolean).void }
86
108
  attr_writer :has_custom_timelines
87
109
 
110
+ sig { returns(T.nilable(T::Boolean)) }
111
+ attr_reader :has_graduated_access
112
+
113
+ sig { params(has_graduated_access: T::Boolean).void }
114
+ attr_writer :has_graduated_access
115
+
116
+ sig { returns(T.nilable(T::Boolean)) }
117
+ attr_reader :has_hidden_subscriptions_on_profile
118
+
119
+ sig { params(has_hidden_subscriptions_on_profile: T::Boolean).void }
120
+ attr_writer :has_hidden_subscriptions_on_profile
121
+
122
+ # Profile highlight availability and count metadata.
123
+ sig { returns(T.nilable(XTwitterScraper::UserProfile::HighlightsInfo)) }
124
+ attr_reader :highlights_info
125
+
126
+ sig do
127
+ params(
128
+ highlights_info: XTwitterScraper::UserProfile::HighlightsInfo::OrHash
129
+ ).void
130
+ end
131
+ attr_writer :highlights_info
132
+
133
+ # Identity verification metadata displayed by X.
134
+ sig do
135
+ returns(T.nilable(XTwitterScraper::UserProfile::IdentityVerification))
136
+ end
137
+ attr_reader :identity_verification
138
+
139
+ sig do
140
+ params(
141
+ identity_verification:
142
+ XTwitterScraper::UserProfile::IdentityVerification::OrHash
143
+ ).void
144
+ end
145
+ attr_writer :identity_verification
146
+
88
147
  sig { returns(T.nilable(T::Boolean)) }
89
148
  attr_reader :is_automated
90
149
 
@@ -98,6 +157,12 @@ module XTwitterScraper
98
157
  sig { params(is_blue_verified: T::Boolean).void }
99
158
  attr_writer :is_blue_verified
100
159
 
160
+ sig { returns(T.nilable(T::Boolean)) }
161
+ attr_reader :is_profile_translatable
162
+
163
+ sig { params(is_profile_translatable: T::Boolean).void }
164
+ attr_writer :is_profile_translatable
165
+
101
166
  sig { returns(T.nilable(T::Boolean)) }
102
167
  attr_reader :is_translator
103
168
 
@@ -123,6 +188,12 @@ module XTwitterScraper
123
188
  sig { params(media_count: Integer).void }
124
189
  attr_writer :media_count
125
190
 
191
+ sig { returns(T.nilable(String)) }
192
+ attr_reader :parody_commentary_fan_label
193
+
194
+ sig { params(parody_commentary_fan_label: String).void }
195
+ attr_writer :parody_commentary_fan_label
196
+
126
197
  sig { returns(T.nilable(T::Array[String])) }
127
198
  attr_reader :pinned_tweet_ids
128
199
 
@@ -149,12 +220,42 @@ module XTwitterScraper
149
220
  sig { params(profile_banner_url: String).void }
150
221
  attr_writer :profile_banner_url
151
222
 
223
+ sig { returns(T.nilable(String)) }
224
+ attr_reader :profile_description_language
225
+
226
+ sig { params(profile_description_language: String).void }
227
+ attr_writer :profile_description_language
228
+
229
+ sig { returns(T.nilable(String)) }
230
+ attr_reader :profile_image_shape
231
+
232
+ sig { params(profile_image_shape: String).void }
233
+ attr_writer :profile_image_shape
234
+
235
+ sig { returns(T.nilable(String)) }
236
+ attr_reader :profile_interstitial_type
237
+
238
+ sig { params(profile_interstitial_type: String).void }
239
+ attr_writer :profile_interstitial_type
240
+
152
241
  sig { returns(T.nilable(String)) }
153
242
  attr_reader :profile_picture
154
243
 
155
244
  sig { params(profile_picture: String).void }
156
245
  attr_writer :profile_picture
157
246
 
247
+ sig { returns(T.nilable(T::Boolean)) }
248
+ attr_reader :profile_sort_enabled
249
+
250
+ sig { params(profile_sort_enabled: T::Boolean).void }
251
+ attr_writer :profile_sort_enabled
252
+
253
+ sig { returns(T.nilable(String)) }
254
+ attr_reader :profile_translator_type
255
+
256
+ sig { params(profile_translator_type: String).void }
257
+ attr_writer :profile_translator_type
258
+
158
259
  # Whether the profile protects its posts
159
260
  sig { returns(T.nilable(T::Boolean)) }
160
261
  attr_reader :protected
@@ -168,6 +269,12 @@ module XTwitterScraper
168
269
  sig { params(statuses_count: Integer).void }
169
270
  attr_writer :statuses_count
170
271
 
272
+ sig { returns(T.nilable(T::Boolean)) }
273
+ attr_reader :super_follow_eligible
274
+
275
+ sig { params(super_follow_eligible: T::Boolean).void }
276
+ attr_writer :super_follow_eligible
277
+
171
278
  sig { returns(T.nilable(T::Boolean)) }
172
279
  attr_reader :unavailable
173
280
 
@@ -198,20 +305,6 @@ module XTwitterScraper
198
305
  sig { params(verified_type: String).void }
199
306
  attr_writer :verified_type
200
307
 
201
- # Whether this profile follows the authenticated viewer
202
- sig { returns(T.nilable(T::Boolean)) }
203
- attr_reader :viewer_followed_by
204
-
205
- sig { params(viewer_followed_by: T::Boolean).void }
206
- attr_writer :viewer_followed_by
207
-
208
- # Whether the authenticated viewer follows this profile
209
- sig { returns(T.nilable(T::Boolean)) }
210
- attr_reader :viewer_following
211
-
212
- sig { params(viewer_following: T::Boolean).void }
213
- attr_writer :viewer_following
214
-
215
308
  sig { returns(T.nilable(T::Array[String])) }
216
309
  attr_reader :withheld_in_countries
217
310
 
@@ -224,36 +317,50 @@ module XTwitterScraper
224
317
  id: String,
225
318
  name: String,
226
319
  username: String,
320
+ affiliates_highlighted_label:
321
+ XTwitterScraper::UserProfile::AffiliatesHighlightedLabel::OrHash,
227
322
  automated_by: String,
228
- can_dm: T::Boolean,
323
+ business_account_affiliates_count: Integer,
229
324
  community_role: String,
230
325
  cover_picture: String,
231
326
  created_at: String,
327
+ creator_subscriptions_count: Integer,
232
328
  description: String,
233
329
  favourites_count: Integer,
234
330
  followers: Integer,
235
331
  following: Integer,
236
332
  has_custom_timelines: T::Boolean,
333
+ has_graduated_access: T::Boolean,
334
+ has_hidden_subscriptions_on_profile: T::Boolean,
335
+ highlights_info: XTwitterScraper::UserProfile::HighlightsInfo::OrHash,
336
+ identity_verification:
337
+ XTwitterScraper::UserProfile::IdentityVerification::OrHash,
237
338
  is_automated: T::Boolean,
238
339
  is_blue_verified: T::Boolean,
340
+ is_profile_translatable: T::Boolean,
239
341
  is_translator: T::Boolean,
240
342
  is_verified: T::Boolean,
241
343
  location: String,
242
344
  media_count: Integer,
345
+ parody_commentary_fan_label: String,
243
346
  pinned_tweet_ids: T::Array[String],
244
347
  possibly_sensitive: T::Boolean,
245
348
  profile_bio: T::Hash[Symbol, T.anything],
246
349
  profile_banner_url: String,
350
+ profile_description_language: String,
351
+ profile_image_shape: String,
352
+ profile_interstitial_type: String,
247
353
  profile_picture: String,
354
+ profile_sort_enabled: T::Boolean,
355
+ profile_translator_type: String,
248
356
  protected: T::Boolean,
249
357
  statuses_count: Integer,
358
+ super_follow_eligible: T::Boolean,
250
359
  unavailable: T::Boolean,
251
360
  unavailable_reason: String,
252
361
  url: String,
253
362
  verified: T::Boolean,
254
363
  verified_type: String,
255
- viewer_followed_by: T::Boolean,
256
- viewer_following: T::Boolean,
257
364
  withheld_in_countries: T::Array[String]
258
365
  ).returns(T.attached_class)
259
366
  end
@@ -261,44 +368,57 @@ module XTwitterScraper
261
368
  id:,
262
369
  name:,
263
370
  username:,
371
+ # Organization affiliation label shown on an X profile.
372
+ affiliates_highlighted_label: nil,
264
373
  automated_by: nil,
265
- can_dm: nil,
374
+ business_account_affiliates_count: nil,
266
375
  # Community role when returned by community member reads
267
376
  community_role: nil,
268
377
  cover_picture: nil,
269
378
  created_at: nil,
379
+ creator_subscriptions_count: nil,
270
380
  description: nil,
271
381
  favourites_count: nil,
272
382
  followers: nil,
273
383
  following: nil,
274
384
  has_custom_timelines: nil,
385
+ has_graduated_access: nil,
386
+ has_hidden_subscriptions_on_profile: nil,
387
+ # Profile highlight availability and count metadata.
388
+ highlights_info: nil,
389
+ # Identity verification metadata displayed by X.
390
+ identity_verification: nil,
275
391
  is_automated: nil,
276
392
  # Whether X shows a blue verification badge
277
393
  is_blue_verified: nil,
394
+ is_profile_translatable: nil,
278
395
  is_translator: nil,
279
396
  # Whether X marks the profile as verified
280
397
  is_verified: nil,
281
398
  location: nil,
282
399
  media_count: nil,
400
+ parody_commentary_fan_label: nil,
283
401
  pinned_tweet_ids: nil,
284
402
  possibly_sensitive: nil,
285
403
  # Structured profile bio with entity annotations
286
404
  profile_bio: nil,
287
405
  # Original X profile banner field when available
288
406
  profile_banner_url: nil,
407
+ profile_description_language: nil,
408
+ profile_image_shape: nil,
409
+ profile_interstitial_type: nil,
289
410
  profile_picture: nil,
411
+ profile_sort_enabled: nil,
412
+ profile_translator_type: nil,
290
413
  # Whether the profile protects its posts
291
414
  protected: nil,
292
415
  statuses_count: nil,
416
+ super_follow_eligible: nil,
293
417
  unavailable: nil,
294
418
  unavailable_reason: nil,
295
419
  url: nil,
296
420
  verified: nil,
297
421
  verified_type: nil,
298
- # Whether this profile follows the authenticated viewer
299
- viewer_followed_by: nil,
300
- # Whether the authenticated viewer follows this profile
301
- viewer_following: nil,
302
422
  withheld_in_countries: nil
303
423
  )
304
424
  end
@@ -309,42 +429,233 @@ module XTwitterScraper
309
429
  id: String,
310
430
  name: String,
311
431
  username: String,
432
+ affiliates_highlighted_label:
433
+ XTwitterScraper::UserProfile::AffiliatesHighlightedLabel,
312
434
  automated_by: String,
313
- can_dm: T::Boolean,
435
+ business_account_affiliates_count: Integer,
314
436
  community_role: String,
315
437
  cover_picture: String,
316
438
  created_at: String,
439
+ creator_subscriptions_count: Integer,
317
440
  description: String,
318
441
  favourites_count: Integer,
319
442
  followers: Integer,
320
443
  following: Integer,
321
444
  has_custom_timelines: T::Boolean,
445
+ has_graduated_access: T::Boolean,
446
+ has_hidden_subscriptions_on_profile: T::Boolean,
447
+ highlights_info: XTwitterScraper::UserProfile::HighlightsInfo,
448
+ identity_verification:
449
+ XTwitterScraper::UserProfile::IdentityVerification,
322
450
  is_automated: T::Boolean,
323
451
  is_blue_verified: T::Boolean,
452
+ is_profile_translatable: T::Boolean,
324
453
  is_translator: T::Boolean,
325
454
  is_verified: T::Boolean,
326
455
  location: String,
327
456
  media_count: Integer,
457
+ parody_commentary_fan_label: String,
328
458
  pinned_tweet_ids: T::Array[String],
329
459
  possibly_sensitive: T::Boolean,
330
460
  profile_bio: T::Hash[Symbol, T.anything],
331
461
  profile_banner_url: String,
462
+ profile_description_language: String,
463
+ profile_image_shape: String,
464
+ profile_interstitial_type: String,
332
465
  profile_picture: String,
466
+ profile_sort_enabled: T::Boolean,
467
+ profile_translator_type: String,
333
468
  protected: T::Boolean,
334
469
  statuses_count: Integer,
470
+ super_follow_eligible: T::Boolean,
335
471
  unavailable: T::Boolean,
336
472
  unavailable_reason: String,
337
473
  url: String,
338
474
  verified: T::Boolean,
339
475
  verified_type: String,
340
- viewer_followed_by: T::Boolean,
341
- viewer_following: T::Boolean,
342
476
  withheld_in_countries: T::Array[String]
343
477
  }
344
478
  )
345
479
  end
346
480
  def to_hash
347
481
  end
482
+
483
+ class AffiliatesHighlightedLabel < XTwitterScraper::Internal::Type::BaseModel
484
+ OrHash =
485
+ T.type_alias do
486
+ T.any(
487
+ XTwitterScraper::UserProfile::AffiliatesHighlightedLabel,
488
+ XTwitterScraper::Internal::AnyHash
489
+ )
490
+ end
491
+
492
+ sig { returns(T.nilable(String)) }
493
+ attr_reader :badge_url
494
+
495
+ sig { params(badge_url: String).void }
496
+ attr_writer :badge_url
497
+
498
+ sig { returns(T.nilable(String)) }
499
+ attr_reader :description
500
+
501
+ sig { params(description: String).void }
502
+ attr_writer :description
503
+
504
+ sig { returns(T.nilable(String)) }
505
+ attr_reader :url
506
+
507
+ sig { params(url: String).void }
508
+ attr_writer :url
509
+
510
+ sig { returns(T.nilable(String)) }
511
+ attr_reader :url_type
512
+
513
+ sig { params(url_type: String).void }
514
+ attr_writer :url_type
515
+
516
+ sig { returns(T.nilable(String)) }
517
+ attr_reader :user_label_display_type
518
+
519
+ sig { params(user_label_display_type: String).void }
520
+ attr_writer :user_label_display_type
521
+
522
+ sig { returns(T.nilable(String)) }
523
+ attr_reader :user_label_type
524
+
525
+ sig { params(user_label_type: String).void }
526
+ attr_writer :user_label_type
527
+
528
+ # Organization affiliation label shown on an X profile.
529
+ sig do
530
+ params(
531
+ badge_url: String,
532
+ description: String,
533
+ url: String,
534
+ url_type: String,
535
+ user_label_display_type: String,
536
+ user_label_type: String
537
+ ).returns(T.attached_class)
538
+ end
539
+ def self.new(
540
+ badge_url: nil,
541
+ description: nil,
542
+ url: nil,
543
+ url_type: nil,
544
+ user_label_display_type: nil,
545
+ user_label_type: nil
546
+ )
547
+ end
548
+
549
+ sig do
550
+ override.returns(
551
+ {
552
+ badge_url: String,
553
+ description: String,
554
+ url: String,
555
+ url_type: String,
556
+ user_label_display_type: String,
557
+ user_label_type: String
558
+ }
559
+ )
560
+ end
561
+ def to_hash
562
+ end
563
+ end
564
+
565
+ class HighlightsInfo < XTwitterScraper::Internal::Type::BaseModel
566
+ OrHash =
567
+ T.type_alias do
568
+ T.any(
569
+ XTwitterScraper::UserProfile::HighlightsInfo,
570
+ XTwitterScraper::Internal::AnyHash
571
+ )
572
+ end
573
+
574
+ sig { returns(T.nilable(T::Boolean)) }
575
+ attr_reader :can_highlight_tweets
576
+
577
+ sig { params(can_highlight_tweets: T::Boolean).void }
578
+ attr_writer :can_highlight_tweets
579
+
580
+ sig { returns(T.nilable(String)) }
581
+ attr_reader :highlighted_tweets
582
+
583
+ sig { params(highlighted_tweets: String).void }
584
+ attr_writer :highlighted_tweets
585
+
586
+ # Profile highlight availability and count metadata.
587
+ sig do
588
+ params(
589
+ can_highlight_tweets: T::Boolean,
590
+ highlighted_tweets: String
591
+ ).returns(T.attached_class)
592
+ end
593
+ def self.new(can_highlight_tweets: nil, highlighted_tweets: nil)
594
+ end
595
+
596
+ sig do
597
+ override.returns(
598
+ { can_highlight_tweets: T::Boolean, highlighted_tweets: String }
599
+ )
600
+ end
601
+ def to_hash
602
+ end
603
+ end
604
+
605
+ class IdentityVerification < XTwitterScraper::Internal::Type::BaseModel
606
+ OrHash =
607
+ T.type_alias do
608
+ T.any(
609
+ XTwitterScraper::UserProfile::IdentityVerification,
610
+ XTwitterScraper::Internal::AnyHash
611
+ )
612
+ end
613
+
614
+ sig { returns(T.nilable(String)) }
615
+ attr_reader :description
616
+
617
+ sig { params(description: String).void }
618
+ attr_writer :description
619
+
620
+ sig { returns(T.nilable(T::Boolean)) }
621
+ attr_reader :is_identity_verified
622
+
623
+ sig { params(is_identity_verified: T::Boolean).void }
624
+ attr_writer :is_identity_verified
625
+
626
+ sig { returns(T.nilable(String)) }
627
+ attr_reader :verified_since_msec
628
+
629
+ sig { params(verified_since_msec: String).void }
630
+ attr_writer :verified_since_msec
631
+
632
+ # Identity verification metadata displayed by X.
633
+ sig do
634
+ params(
635
+ description: String,
636
+ is_identity_verified: T::Boolean,
637
+ verified_since_msec: String
638
+ ).returns(T.attached_class)
639
+ end
640
+ def self.new(
641
+ description: nil,
642
+ is_identity_verified: nil,
643
+ verified_since_msec: nil
644
+ )
645
+ end
646
+
647
+ sig do
648
+ override.returns(
649
+ {
650
+ description: String,
651
+ is_identity_verified: T::Boolean,
652
+ verified_since_msec: String
653
+ }
654
+ )
655
+ end
656
+ def to_hash
657
+ end
658
+ end
348
659
  end
349
660
  end
350
661
  end