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
@@ -47,12 +47,30 @@ module XTwitterScraper
47
47
  # @return [Integer]
48
48
  required :view_count, Integer, api_name: :viewCount
49
49
 
50
+ # @!attribute article
51
+ # Article metadata attached to a tweet.
52
+ #
53
+ # @return [XTwitterScraper::Models::SearchTweet::Article, nil]
54
+ optional :article, -> { XTwitterScraper::SearchTweet::Article }
55
+
50
56
  # @!attribute author
51
57
  # X user profile with bio, follower counts, and verification status.
52
58
  #
53
59
  # @return [XTwitterScraper::Models::UserProfile, nil]
54
60
  optional :author, -> { XTwitterScraper::UserProfile }
55
61
 
62
+ # @!attribute card
63
+ # Public card metadata attached to a tweet.
64
+ #
65
+ # @return [XTwitterScraper::Models::SearchTweet::Card, nil]
66
+ optional :card, -> { XTwitterScraper::SearchTweet::Card }
67
+
68
+ # @!attribute community_note
69
+ # Community Note presentation metadata returned by X.
70
+ #
71
+ # @return [XTwitterScraper::Models::SearchTweet::CommunityNote, nil]
72
+ optional :community_note, -> { XTwitterScraper::SearchTweet::CommunityNote }, api_name: :communityNote
73
+
56
74
  # @!attribute content_disclosure
57
75
  # Content disclosure metadata shown by X when a tweet is labeled as paid
58
76
  # partnership content or AI-generated media.
@@ -79,6 +97,12 @@ module XTwitterScraper
79
97
  XTwitterScraper::Internal::Type::ArrayOf[Integer],
80
98
  api_name: :displayTextRange
81
99
 
100
+ # @!attribute edit
101
+ # Edit history metadata returned by X.
102
+ #
103
+ # @return [XTwitterScraper::Models::SearchTweet::Edit, nil]
104
+ optional :edit, -> { XTwitterScraper::SearchTweet::Edit }
105
+
82
106
  # @!attribute entities
83
107
  # Parsed search-result entities including URLs, mentions, hashtags, and media
84
108
  # markers
@@ -128,6 +152,11 @@ module XTwitterScraper
128
152
  # @return [Boolean, nil]
129
153
  optional :is_reply, XTwitterScraper::Internal::Type::Boolean, api_name: :isReply
130
154
 
155
+ # @!attribute is_translatable
156
+ #
157
+ # @return [Boolean, nil]
158
+ optional :is_translatable, XTwitterScraper::Internal::Type::Boolean, api_name: :isTranslatable
159
+
131
160
  # @!attribute lang
132
161
  # Search result language code.
133
162
  #
@@ -140,6 +169,33 @@ module XTwitterScraper
140
169
  # @return [Array<XTwitterScraper::Models::TweetMedia>, nil]
141
170
  optional :media, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::TweetMedia] }
142
171
 
172
+ # @!attribute note_tweet
173
+ # Complete Note Tweet content and rich-text metadata.
174
+ #
175
+ # @return [XTwitterScraper::Models::SearchTweet::NoteTweet, nil]
176
+ optional :note_tweet, -> { XTwitterScraper::SearchTweet::NoteTweet }, api_name: :noteTweet
177
+
178
+ # @!attribute place
179
+ # Public place metadata attached to a tweet.
180
+ #
181
+ # @return [XTwitterScraper::Models::SearchTweet::Place, nil]
182
+ optional :place, -> { XTwitterScraper::SearchTweet::Place }
183
+
184
+ # @!attribute possibly_sensitive
185
+ #
186
+ # @return [Boolean, nil]
187
+ optional :possibly_sensitive, XTwitterScraper::Internal::Type::Boolean, api_name: :possiblySensitive
188
+
189
+ # @!attribute previous_counts
190
+ # Engagement counts retained from a prior tweet edit.
191
+ #
192
+ # @return [XTwitterScraper::Models::SearchTweet::PreviousCounts, nil]
193
+ optional :previous_counts,
194
+ -> {
195
+ XTwitterScraper::SearchTweet::PreviousCounts
196
+ },
197
+ api_name: :previousCounts
198
+
143
199
  # @!attribute quoted_tweet
144
200
  # Quoted or retweeted tweet context. Every object includes id, text, and
145
201
  # engagement metrics. A zero metric can mean X did not report the count. Author,
@@ -173,7 +229,12 @@ module XTwitterScraper
173
229
  # @return [String, nil]
174
230
  optional :url, String
175
231
 
176
- # @!method initialize(id:, bookmark_count:, like_count:, quote_count:, reply_count:, retweet_count:, text:, view_count:, author: nil, content_disclosure: nil, conversation_id: nil, created_at: nil, display_text_range: nil, entities: nil, in_reply_to_id: nil, in_reply_to_user_id: nil, in_reply_to_username: nil, is_limited_reply: nil, is_note_tweet: nil, is_quote_status: nil, is_reply: nil, lang: nil, media: nil, quoted_tweet: nil, retweeted_tweet: nil, source: nil, type: nil, url: nil)
232
+ # @!attribute view_state
233
+ #
234
+ # @return [String, nil]
235
+ optional :view_state, String, api_name: :viewState
236
+
237
+ # @!method initialize(id:, bookmark_count:, like_count:, quote_count:, reply_count:, retweet_count:, text:, view_count:, article: nil, author: nil, card: nil, community_note: nil, content_disclosure: nil, conversation_id: nil, created_at: nil, display_text_range: nil, edit: nil, entities: nil, in_reply_to_id: nil, in_reply_to_user_id: nil, in_reply_to_username: nil, is_limited_reply: nil, is_note_tweet: nil, is_quote_status: nil, is_reply: nil, is_translatable: nil, lang: nil, media: nil, note_tweet: nil, place: nil, possibly_sensitive: nil, previous_counts: nil, quoted_tweet: nil, retweeted_tweet: nil, source: nil, type: nil, url: nil, view_state: nil)
177
238
  # Some parameter documentations has been truncated, see
178
239
  # {XTwitterScraper::Models::SearchTweet} for more details.
179
240
  #
@@ -196,8 +257,14 @@ module XTwitterScraper
196
257
  #
197
258
  # @param view_count [Integer]
198
259
  #
260
+ # @param article [XTwitterScraper::Models::SearchTweet::Article] Article metadata attached to a tweet.
261
+ #
199
262
  # @param author [XTwitterScraper::Models::UserProfile] X user profile with bio, follower counts, and verification status.
200
263
  #
264
+ # @param card [XTwitterScraper::Models::SearchTweet::Card] Public card metadata attached to a tweet.
265
+ #
266
+ # @param community_note [XTwitterScraper::Models::SearchTweet::CommunityNote] Community Note presentation metadata returned by X.
267
+ #
201
268
  # @param content_disclosure [XTwitterScraper::Models::ContentDisclosure] Content disclosure metadata shown by X when a tweet is labeled as paid partnersh
202
269
  #
203
270
  # @param conversation_id [String] Root tweet ID for the search result conversation
@@ -206,6 +273,8 @@ module XTwitterScraper
206
273
  #
207
274
  # @param display_text_range [Array<Integer>] Rendered text's start and end offsets.
208
275
  #
276
+ # @param edit [XTwitterScraper::Models::SearchTweet::Edit] Edit history metadata returned by X.
277
+ #
209
278
  # @param entities [Hash{Symbol=>Object}] Parsed search-result entities including URLs, mentions, hashtags, and media mark
210
279
  #
211
280
  # @param in_reply_to_id [String] ID of the tweet this result replies to.
@@ -222,10 +291,20 @@ module XTwitterScraper
222
291
  #
223
292
  # @param is_reply [Boolean] True when this search result is a reply
224
293
  #
294
+ # @param is_translatable [Boolean]
295
+ #
225
296
  # @param lang [String] Search result language code.
226
297
  #
227
298
  # @param media [Array<XTwitterScraper::Models::TweetMedia>] Search-result media attachments, omitted when no media is present
228
299
  #
300
+ # @param note_tweet [XTwitterScraper::Models::SearchTweet::NoteTweet] Complete Note Tweet content and rich-text metadata.
301
+ #
302
+ # @param place [XTwitterScraper::Models::SearchTweet::Place] Public place metadata attached to a tweet.
303
+ #
304
+ # @param possibly_sensitive [Boolean]
305
+ #
306
+ # @param previous_counts [XTwitterScraper::Models::SearchTweet::PreviousCounts] Engagement counts retained from a prior tweet edit.
307
+ #
229
308
  # @param quoted_tweet [XTwitterScraper::Models::EmbeddedTweet] Quoted or retweeted tweet context. Every object includes id, text, and engagemen
230
309
  #
231
310
  # @param retweeted_tweet [XTwitterScraper::Models::EmbeddedTweet] Quoted or retweeted tweet context. Every object includes id, text, and engagemen
@@ -235,6 +314,297 @@ module XTwitterScraper
235
314
  # @param type [String]
236
315
  #
237
316
  # @param url [String] Search result permalink.
317
+ #
318
+ # @param view_state [String]
319
+
320
+ # @see XTwitterScraper::Models::SearchTweet#article
321
+ class Article < XTwitterScraper::Internal::Type::BaseModel
322
+ # @!attribute id
323
+ #
324
+ # @return [String, nil]
325
+ optional :id, String
326
+
327
+ # @!attribute cover_media_url
328
+ #
329
+ # @return [String, nil]
330
+ optional :cover_media_url, String, api_name: :coverMediaUrl
331
+
332
+ # @!attribute preview_text
333
+ #
334
+ # @return [String, nil]
335
+ optional :preview_text, String, api_name: :previewText
336
+
337
+ # @!attribute title
338
+ #
339
+ # @return [String, nil]
340
+ optional :title, String
341
+
342
+ # @!method initialize(id: nil, cover_media_url: nil, preview_text: nil, title: nil)
343
+ # Article metadata attached to a tweet.
344
+ #
345
+ # @param id [String]
346
+ # @param cover_media_url [String]
347
+ # @param preview_text [String]
348
+ # @param title [String]
349
+ end
350
+
351
+ # @see XTwitterScraper::Models::SearchTweet#card
352
+ class Card < XTwitterScraper::Internal::Type::BaseModel
353
+ # @!attribute id
354
+ #
355
+ # @return [String, nil]
356
+ optional :id, String
357
+
358
+ # @!attribute binding_values
359
+ #
360
+ # @return [Hash{Symbol=>Object}, nil]
361
+ optional :binding_values,
362
+ XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown],
363
+ api_name: :bindingValues
364
+
365
+ # @!attribute name
366
+ #
367
+ # @return [String, nil]
368
+ optional :name, String
369
+
370
+ # @!attribute url
371
+ #
372
+ # @return [String, nil]
373
+ optional :url, String
374
+
375
+ # @!method initialize(id: nil, binding_values: nil, name: nil, url: nil)
376
+ # Public card metadata attached to a tweet.
377
+ #
378
+ # @param id [String]
379
+ # @param binding_values [Hash{Symbol=>Object}]
380
+ # @param name [String]
381
+ # @param url [String]
382
+ end
383
+
384
+ # @see XTwitterScraper::Models::SearchTweet#community_note
385
+ class CommunityNote < XTwitterScraper::Internal::Type::BaseModel
386
+ # @!attribute id
387
+ #
388
+ # @return [String, nil]
389
+ optional :id, String
390
+
391
+ # @!attribute destination_url
392
+ #
393
+ # @return [String, nil]
394
+ optional :destination_url, String, api_name: :destinationUrl
395
+
396
+ # @!attribute footer
397
+ #
398
+ # @return [String, nil]
399
+ optional :footer, String
400
+
401
+ # @!attribute short_title
402
+ #
403
+ # @return [String, nil]
404
+ optional :short_title, String, api_name: :shortTitle
405
+
406
+ # @!attribute subtitle
407
+ #
408
+ # @return [String, nil]
409
+ optional :subtitle, String
410
+
411
+ # @!attribute title
412
+ #
413
+ # @return [String, nil]
414
+ optional :title, String
415
+
416
+ # @!attribute visual_style
417
+ #
418
+ # @return [String, nil]
419
+ optional :visual_style, String, api_name: :visualStyle
420
+
421
+ # @!method initialize(id: nil, destination_url: nil, footer: nil, short_title: nil, subtitle: nil, title: nil, visual_style: nil)
422
+ # Community Note presentation metadata returned by X.
423
+ #
424
+ # @param id [String]
425
+ # @param destination_url [String]
426
+ # @param footer [String]
427
+ # @param short_title [String]
428
+ # @param subtitle [String]
429
+ # @param title [String]
430
+ # @param visual_style [String]
431
+ end
432
+
433
+ # @see XTwitterScraper::Models::SearchTweet#edit
434
+ class Edit < XTwitterScraper::Internal::Type::BaseModel
435
+ # @!attribute editable_until_msecs
436
+ #
437
+ # @return [String, nil]
438
+ optional :editable_until_msecs, String, api_name: :editableUntilMsecs
439
+
440
+ # @!attribute edit_tweet_ids
441
+ #
442
+ # @return [Array<String>, nil]
443
+ optional :edit_tweet_ids, XTwitterScraper::Internal::Type::ArrayOf[String], api_name: :editTweetIds
444
+
445
+ # @!method initialize(editable_until_msecs: nil, edit_tweet_ids: nil)
446
+ # Edit history metadata returned by X.
447
+ #
448
+ # @param editable_until_msecs [String]
449
+ # @param edit_tweet_ids [Array<String>]
450
+ end
451
+
452
+ # @see XTwitterScraper::Models::SearchTweet#note_tweet
453
+ class NoteTweet < XTwitterScraper::Internal::Type::BaseModel
454
+ # @!attribute text
455
+ #
456
+ # @return [String]
457
+ required :text, String
458
+
459
+ # @!attribute id
460
+ #
461
+ # @return [String, nil]
462
+ optional :id, String
463
+
464
+ # @!attribute entities
465
+ #
466
+ # @return [Hash{Symbol=>Object}, nil]
467
+ optional :entities, XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown]
468
+
469
+ # @!attribute is_expandable
470
+ #
471
+ # @return [Boolean, nil]
472
+ optional :is_expandable, XTwitterScraper::Internal::Type::Boolean, api_name: :isExpandable
473
+
474
+ # @!attribute richtext_tags
475
+ #
476
+ # @return [Array<XTwitterScraper::Models::SearchTweet::NoteTweet::RichtextTag>, nil]
477
+ optional :richtext_tags,
478
+ -> {
479
+ XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::SearchTweet::NoteTweet::RichtextTag]
480
+ },
481
+ api_name: :richtextTags
482
+
483
+ # @!method initialize(text:, id: nil, entities: nil, is_expandable: nil, richtext_tags: nil)
484
+ # Complete Note Tweet content and rich-text metadata.
485
+ #
486
+ # @param text [String]
487
+ # @param id [String]
488
+ # @param entities [Hash{Symbol=>Object}]
489
+ # @param is_expandable [Boolean]
490
+ # @param richtext_tags [Array<XTwitterScraper::Models::SearchTweet::NoteTweet::RichtextTag>]
491
+
492
+ class RichtextTag < XTwitterScraper::Internal::Type::BaseModel
493
+ # @!attribute from_index
494
+ #
495
+ # @return [Integer]
496
+ required :from_index, Integer, api_name: :fromIndex
497
+
498
+ # @!attribute to_index
499
+ #
500
+ # @return [Integer]
501
+ required :to_index, Integer, api_name: :toIndex
502
+
503
+ # @!attribute types
504
+ #
505
+ # @return [Array<String>]
506
+ required :types, XTwitterScraper::Internal::Type::ArrayOf[String]
507
+
508
+ # @!method initialize(from_index:, to_index:, types:)
509
+ # @param from_index [Integer]
510
+ # @param to_index [Integer]
511
+ # @param types [Array<String>]
512
+ end
513
+ end
514
+
515
+ # @see XTwitterScraper::Models::SearchTweet#place
516
+ class Place < XTwitterScraper::Internal::Type::BaseModel
517
+ # @!attribute id
518
+ #
519
+ # @return [String, nil]
520
+ optional :id, String
521
+
522
+ # @!attribute bounding_box
523
+ #
524
+ # @return [Hash{Symbol=>Object}, nil]
525
+ optional :bounding_box,
526
+ XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown],
527
+ api_name: :boundingBox
528
+
529
+ # @!attribute country
530
+ #
531
+ # @return [String, nil]
532
+ optional :country, String
533
+
534
+ # @!attribute country_code
535
+ #
536
+ # @return [String, nil]
537
+ optional :country_code, String, api_name: :countryCode
538
+
539
+ # @!attribute full_name
540
+ #
541
+ # @return [String, nil]
542
+ optional :full_name, String, api_name: :fullName
543
+
544
+ # @!attribute name
545
+ #
546
+ # @return [String, nil]
547
+ optional :name, String
548
+
549
+ # @!attribute place_type
550
+ #
551
+ # @return [String, nil]
552
+ optional :place_type, String, api_name: :placeType
553
+
554
+ # @!attribute url
555
+ #
556
+ # @return [String, nil]
557
+ optional :url, String
558
+
559
+ # @!method initialize(id: nil, bounding_box: nil, country: nil, country_code: nil, full_name: nil, name: nil, place_type: nil, url: nil)
560
+ # Public place metadata attached to a tweet.
561
+ #
562
+ # @param id [String]
563
+ # @param bounding_box [Hash{Symbol=>Object}]
564
+ # @param country [String]
565
+ # @param country_code [String]
566
+ # @param full_name [String]
567
+ # @param name [String]
568
+ # @param place_type [String]
569
+ # @param url [String]
570
+ end
571
+
572
+ # @see XTwitterScraper::Models::SearchTweet#previous_counts
573
+ class PreviousCounts < XTwitterScraper::Internal::Type::BaseModel
574
+ # @!attribute bookmark_count
575
+ #
576
+ # @return [Integer, nil]
577
+ optional :bookmark_count, Integer, api_name: :bookmarkCount
578
+
579
+ # @!attribute like_count
580
+ #
581
+ # @return [Integer, nil]
582
+ optional :like_count, Integer, api_name: :likeCount
583
+
584
+ # @!attribute quote_count
585
+ #
586
+ # @return [Integer, nil]
587
+ optional :quote_count, Integer, api_name: :quoteCount
588
+
589
+ # @!attribute reply_count
590
+ #
591
+ # @return [Integer, nil]
592
+ optional :reply_count, Integer, api_name: :replyCount
593
+
594
+ # @!attribute retweet_count
595
+ #
596
+ # @return [Integer, nil]
597
+ optional :retweet_count, Integer, api_name: :retweetCount
598
+
599
+ # @!method initialize(bookmark_count: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil)
600
+ # Engagement counts retained from a prior tweet edit.
601
+ #
602
+ # @param bookmark_count [Integer]
603
+ # @param like_count [Integer]
604
+ # @param quote_count [Integer]
605
+ # @param reply_count [Integer]
606
+ # @param retweet_count [Integer]
607
+ end
238
608
  end
239
609
  end
240
610
  end
@@ -11,51 +11,64 @@ module XTwitterScraper
11
11
  class TicketListResponse < XTwitterScraper::Internal::Type::BaseModel
12
12
  # @!attribute tickets
13
13
  #
14
- # @return [Array<XTwitterScraper::Models::Support::TicketListResponse::Ticket>, nil]
15
- optional :tickets,
14
+ # @return [Array<XTwitterScraper::Models::Support::TicketListResponse::Ticket>]
15
+ required :tickets,
16
16
  -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::Support::TicketListResponse::Ticket] }
17
17
 
18
- # @!method initialize(tickets: nil)
18
+ # @!method initialize(tickets:)
19
19
  # @param tickets [Array<XTwitterScraper::Models::Support::TicketListResponse::Ticket>]
20
20
 
21
21
  class Ticket < XTwitterScraper::Internal::Type::BaseModel
22
22
  # @!attribute created_at
23
23
  #
24
- # @return [Time, nil]
25
- optional :created_at, Time, api_name: :createdAt
24
+ # @return [Time]
25
+ required :created_at, Time, api_name: :createdAt
26
26
 
27
27
  # @!attribute message_count
28
28
  #
29
- # @return [Integer, nil]
30
- optional :message_count, Integer, api_name: :messageCount
29
+ # @return [Integer]
30
+ required :message_count, Integer, api_name: :messageCount
31
31
 
32
32
  # @!attribute public_id
33
33
  #
34
- # @return [String, nil]
35
- optional :public_id, String, api_name: :publicId
34
+ # @return [String]
35
+ required :public_id, String, api_name: :publicId
36
36
 
37
37
  # @!attribute status
38
38
  #
39
- # @return [String, nil]
40
- optional :status, String
39
+ # @return [Symbol, XTwitterScraper::Models::Support::TicketListResponse::Ticket::Status]
40
+ required :status, enum: -> { XTwitterScraper::Models::Support::TicketListResponse::Ticket::Status }
41
41
 
42
42
  # @!attribute subject
43
43
  #
44
- # @return [String, nil]
45
- optional :subject, String
44
+ # @return [String]
45
+ required :subject, String
46
46
 
47
47
  # @!attribute updated_at
48
48
  #
49
- # @return [Time, nil]
50
- optional :updated_at, Time, api_name: :updatedAt
49
+ # @return [Time]
50
+ required :updated_at, Time, api_name: :updatedAt
51
51
 
52
- # @!method initialize(created_at: nil, message_count: nil, public_id: nil, status: nil, subject: nil, updated_at: nil)
52
+ # @!method initialize(created_at:, message_count:, public_id:, status:, subject:, updated_at:)
53
53
  # @param created_at [Time]
54
54
  # @param message_count [Integer]
55
55
  # @param public_id [String]
56
- # @param status [String]
56
+ # @param status [Symbol, XTwitterScraper::Models::Support::TicketListResponse::Ticket::Status]
57
57
  # @param subject [String]
58
58
  # @param updated_at [Time]
59
+
60
+ # @see XTwitterScraper::Models::Support::TicketListResponse::Ticket#status
61
+ module Status
62
+ extend XTwitterScraper::Internal::Type::Enum
63
+
64
+ OPEN = :open
65
+ IN_PROGRESS = :in_progress
66
+ RESOLVED = :resolved
67
+ CLOSED = :closed
68
+
69
+ # @!method self.values
70
+ # @return [Array<Symbol>]
71
+ end
59
72
  end
60
73
  end
61
74
  end
@@ -11,70 +11,70 @@ module XTwitterScraper
11
11
  class TicketRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel
12
12
  # @!attribute created_at
13
13
  #
14
- # @return [Time, nil]
15
- optional :created_at, Time, api_name: :createdAt
14
+ # @return [Time]
15
+ required :created_at, Time, api_name: :createdAt
16
16
 
17
17
  # @!attribute messages
18
18
  #
19
- # @return [Array<XTwitterScraper::Models::Support::TicketRetrieveResponse::Message>, nil]
20
- optional :messages,
19
+ # @return [Array<XTwitterScraper::Models::Support::TicketRetrieveResponse::Message>]
20
+ required :messages,
21
21
  -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::Support::TicketRetrieveResponse::Message] }
22
22
 
23
23
  # @!attribute public_id
24
24
  #
25
- # @return [String, nil]
26
- optional :public_id, String, api_name: :publicId
25
+ # @return [String]
26
+ required :public_id, String, api_name: :publicId
27
27
 
28
28
  # @!attribute status
29
29
  #
30
- # @return [String, nil]
31
- optional :status, String
30
+ # @return [Symbol, XTwitterScraper::Models::Support::TicketRetrieveResponse::Status]
31
+ required :status, enum: -> { XTwitterScraper::Models::Support::TicketRetrieveResponse::Status }
32
32
 
33
33
  # @!attribute subject
34
34
  #
35
- # @return [String, nil]
36
- optional :subject, String
35
+ # @return [String]
36
+ required :subject, String
37
37
 
38
38
  # @!attribute updated_at
39
39
  #
40
- # @return [Time, nil]
41
- optional :updated_at, Time, api_name: :updatedAt
40
+ # @return [Time]
41
+ required :updated_at, Time, api_name: :updatedAt
42
42
 
43
- # @!method initialize(created_at: nil, messages: nil, public_id: nil, status: nil, subject: nil, updated_at: nil)
43
+ # @!method initialize(created_at:, messages:, public_id:, status:, subject:, updated_at:)
44
44
  # @param created_at [Time]
45
45
  # @param messages [Array<XTwitterScraper::Models::Support::TicketRetrieveResponse::Message>]
46
46
  # @param public_id [String]
47
- # @param status [String]
47
+ # @param status [Symbol, XTwitterScraper::Models::Support::TicketRetrieveResponse::Status]
48
48
  # @param subject [String]
49
49
  # @param updated_at [Time]
50
50
 
51
51
  class Message < XTwitterScraper::Internal::Type::BaseModel
52
52
  # @!attribute attachments
53
53
  #
54
- # @return [Array<XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment>, nil]
55
- optional :attachments,
54
+ # @return [Array<XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment>]
55
+ required :attachments,
56
56
  -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment] }
57
57
 
58
58
  # @!attribute body
59
59
  #
60
- # @return [String, nil]
61
- optional :body, String
60
+ # @return [String]
61
+ required :body, String
62
62
 
63
63
  # @!attribute created_at
64
64
  #
65
- # @return [Time, nil]
66
- optional :created_at, Time, api_name: :createdAt
65
+ # @return [Time]
66
+ required :created_at, Time, api_name: :createdAt
67
67
 
68
68
  # @!attribute sender
69
69
  #
70
- # @return [String, nil]
71
- optional :sender, String
70
+ # @return [Symbol, XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Sender]
71
+ required :sender, enum: -> { XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Sender }
72
72
 
73
- # @!method initialize(attachments: nil, body: nil, created_at: nil, sender: nil)
73
+ # @!method initialize(attachments:, body:, created_at:, sender:)
74
74
  # @param attachments [Array<XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment>]
75
75
  # @param body [String]
76
76
  # @param created_at [Time]
77
- # @param sender [String]
77
+ # @param sender [Symbol, XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Sender]
78
78
 
79
79
  class Attachment < XTwitterScraper::Internal::Type::BaseModel
80
80
  # @!attribute content_type
@@ -181,6 +181,31 @@ module XTwitterScraper
181
181
  # @return [Array<Symbol>]
182
182
  end
183
183
  end
184
+
185
+ # @see XTwitterScraper::Models::Support::TicketRetrieveResponse::Message#sender
186
+ module Sender
187
+ extend XTwitterScraper::Internal::Type::Enum
188
+
189
+ USER = :user
190
+ SUPPORT = :support
191
+ SYSTEM = :system
192
+
193
+ # @!method self.values
194
+ # @return [Array<Symbol>]
195
+ end
196
+ end
197
+
198
+ # @see XTwitterScraper::Models::Support::TicketRetrieveResponse#status
199
+ module Status
200
+ extend XTwitterScraper::Internal::Type::Enum
201
+
202
+ OPEN = :open
203
+ IN_PROGRESS = :in_progress
204
+ RESOLVED = :resolved
205
+ CLOSED = :closed
206
+
207
+ # @!method self.values
208
+ # @return [Array<Symbol>]
184
209
  end
185
210
  end
186
211
  end
@@ -11,17 +11,29 @@ module XTwitterScraper
11
11
  class TicketUpdateResponse < XTwitterScraper::Internal::Type::BaseModel
12
12
  # @!attribute public_id
13
13
  #
14
- # @return [String, nil]
15
- optional :public_id, String, api_name: :publicId
14
+ # @return [String]
15
+ required :public_id, String, api_name: :publicId
16
16
 
17
17
  # @!attribute status
18
18
  #
19
- # @return [String, nil]
20
- optional :status, String
19
+ # @return [Symbol, XTwitterScraper::Models::Support::TicketUpdateResponse::Status]
20
+ required :status, enum: -> { XTwitterScraper::Models::Support::TicketUpdateResponse::Status }
21
21
 
22
- # @!method initialize(public_id: nil, status: nil)
22
+ # @!method initialize(public_id:, status:)
23
23
  # @param public_id [String]
24
- # @param status [String]
24
+ # @param status [Symbol, XTwitterScraper::Models::Support::TicketUpdateResponse::Status]
25
+
26
+ # @see XTwitterScraper::Models::Support::TicketUpdateResponse#status
27
+ module Status
28
+ extend XTwitterScraper::Internal::Type::Enum
29
+
30
+ OPEN = :open
31
+ RESOLVED = :resolved
32
+ CLOSED = :closed
33
+
34
+ # @!method self.values
35
+ # @return [Array<Symbol>]
36
+ end
25
37
  end
26
38
  end
27
39
  end