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
@@ -40,6 +40,12 @@ module XTwitterScraper
40
40
  # @return [String, nil]
41
41
  optional :description, String
42
42
 
43
+ # @!attribute promoted_content
44
+ # Promotion identifier from X. Null for organic trends.
45
+ #
46
+ # @return [String, nil]
47
+ optional :promoted_content, String, api_name: :promotedContent, nil?: true
48
+
43
49
  # @!attribute query
44
50
  #
45
51
  # @return [String, nil]
@@ -50,11 +56,32 @@ module XTwitterScraper
50
56
  # @return [Integer, nil]
51
57
  optional :rank, Integer
52
58
 
53
- # @!method initialize(name:, description: nil, query: nil, rank: nil)
59
+ # @!attribute tweet_volume
60
+ # Approximate public post volume when X supplies it.
61
+ #
62
+ # @return [Integer, nil]
63
+ optional :tweet_volume, Integer, api_name: :tweetVolume, nil?: true
64
+
65
+ # @!attribute url
66
+ # X search URL for the trend.
67
+ #
68
+ # @return [String, nil]
69
+ optional :url, String
70
+
71
+ # @!method initialize(name:, description: nil, promoted_content: nil, query: nil, rank: nil, tweet_volume: nil, url: nil)
54
72
  # @param name [String]
73
+ #
55
74
  # @param description [String]
75
+ #
76
+ # @param promoted_content [String, nil] Promotion identifier from X. Null for organic trends.
77
+ #
56
78
  # @param query [String]
79
+ #
57
80
  # @param rank [Integer]
81
+ #
82
+ # @param tweet_volume [Integer, nil] Approximate public post volume when X supplies it.
83
+ #
84
+ # @param url [String] X search URL for the trend.
58
85
  end
59
86
  end
60
87
  end
@@ -24,6 +24,102 @@ module XTwitterScraper
24
24
  # @return [String]
25
25
  required :url, String
26
26
 
27
+ # @!attribute id
28
+ # X media entity ID.
29
+ #
30
+ # @return [String, nil]
31
+ optional :id, String
32
+
33
+ # @!attribute allow_download
34
+ # Whether X permits direct media download.
35
+ #
36
+ # @return [Boolean, nil]
37
+ optional :allow_download, XTwitterScraper::Internal::Type::Boolean, api_name: :allowDownload
38
+
39
+ # @!attribute alt_text
40
+ # Accessibility text supplied for the media.
41
+ #
42
+ # @return [String, nil]
43
+ optional :alt_text, String, api_name: :altText
44
+
45
+ # @!attribute aspect_ratio
46
+ # Video aspect ratio as width and height.
47
+ #
48
+ # @return [Array<Integer>, nil]
49
+ optional :aspect_ratio, XTwitterScraper::Internal::Type::ArrayOf[Integer], api_name: :aspectRatio
50
+
51
+ # @!attribute availability_status
52
+ # Media availability state reported by X.
53
+ #
54
+ # @return [String, nil]
55
+ optional :availability_status, String, api_name: :availabilityStatus
56
+
57
+ # @!attribute display_url
58
+ # Display-friendly media URL reported by X.
59
+ #
60
+ # @return [String, nil]
61
+ optional :display_url, String, api_name: :displayUrl
62
+
63
+ # @!attribute duration_millis
64
+ # Video duration in milliseconds.
65
+ #
66
+ # @return [Integer, nil]
67
+ optional :duration_millis, Integer, api_name: :durationMillis
68
+
69
+ # @!attribute expanded_url
70
+ # Expanded X media URL.
71
+ #
72
+ # @return [String, nil]
73
+ optional :expanded_url, String, api_name: :expandedUrl
74
+
75
+ # @!attribute face_rects
76
+ # Face-aware crop rectangles grouped by media size.
77
+ #
78
+ # @return [Hash{Symbol=>Array<XTwitterScraper::Models::TweetMedia::FaceRect>}, nil]
79
+ optional :face_rects,
80
+ -> {
81
+ XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::TweetMedia::FaceRect]]
82
+ },
83
+ api_name: :faceRects
84
+
85
+ # @!attribute focus_rects
86
+ # Suggested image crops reported by X.
87
+ #
88
+ # @return [Array<XTwitterScraper::Models::TweetMedia::FocusRect>, nil]
89
+ optional :focus_rects,
90
+ -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::TweetMedia::FocusRect] },
91
+ api_name: :focusRects
92
+
93
+ # @!attribute height
94
+ # Original media height.
95
+ #
96
+ # @return [Integer, nil]
97
+ optional :height, Integer
98
+
99
+ # @!attribute indices
100
+ # Media entity offsets in the tweet text.
101
+ #
102
+ # @return [Array<Integer>, nil]
103
+ optional :indices, XTwitterScraper::Internal::Type::ArrayOf[Integer]
104
+
105
+ # @!attribute media_key
106
+ # Stable X media key.
107
+ #
108
+ # @return [String, nil]
109
+ optional :media_key, String, api_name: :mediaKey
110
+
111
+ # @!attribute monetizable
112
+ # Whether X reports the media as monetizable.
113
+ #
114
+ # @return [Boolean, nil]
115
+ optional :monetizable, XTwitterScraper::Internal::Type::Boolean
116
+
117
+ # @!attribute sizes
118
+ # Named media renditions and resize modes.
119
+ #
120
+ # @return [Hash{Symbol=>XTwitterScraper::Models::TweetMedia::Size}, nil]
121
+ optional :sizes, -> { XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::TweetMedia::Size] }
122
+
27
123
  # @!attribute video_variants
28
124
  # Available video encodings, ordered as returned
29
125
  #
@@ -32,7 +128,13 @@ module XTwitterScraper
32
128
  -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::TweetMedia::VideoVariant] },
33
129
  api_name: :videoVariants
34
130
 
35
- # @!method initialize(media_url:, type:, url:, video_variants: nil)
131
+ # @!attribute width
132
+ # Original media width.
133
+ #
134
+ # @return [Integer, nil]
135
+ optional :width, Integer
136
+
137
+ # @!method initialize(media_url:, type:, url:, id: nil, allow_download: nil, alt_text: nil, aspect_ratio: nil, availability_status: nil, display_url: nil, duration_millis: nil, expanded_url: nil, face_rects: nil, focus_rects: nil, height: nil, indices: nil, media_key: nil, monetizable: nil, sizes: nil, video_variants: nil, width: nil)
36
138
  # Normalized media attached to a tweet.
37
139
  #
38
140
  # @param media_url [String] Media preview URL
@@ -41,7 +143,39 @@ module XTwitterScraper
41
143
  #
42
144
  # @param url [String] X media link from the tweet
43
145
  #
146
+ # @param id [String] X media entity ID.
147
+ #
148
+ # @param allow_download [Boolean] Whether X permits direct media download.
149
+ #
150
+ # @param alt_text [String] Accessibility text supplied for the media.
151
+ #
152
+ # @param aspect_ratio [Array<Integer>] Video aspect ratio as width and height.
153
+ #
154
+ # @param availability_status [String] Media availability state reported by X.
155
+ #
156
+ # @param display_url [String] Display-friendly media URL reported by X.
157
+ #
158
+ # @param duration_millis [Integer] Video duration in milliseconds.
159
+ #
160
+ # @param expanded_url [String] Expanded X media URL.
161
+ #
162
+ # @param face_rects [Hash{Symbol=>Array<XTwitterScraper::Models::TweetMedia::FaceRect>}] Face-aware crop rectangles grouped by media size.
163
+ #
164
+ # @param focus_rects [Array<XTwitterScraper::Models::TweetMedia::FocusRect>] Suggested image crops reported by X.
165
+ #
166
+ # @param height [Integer] Original media height.
167
+ #
168
+ # @param indices [Array<Integer>] Media entity offsets in the tweet text.
169
+ #
170
+ # @param media_key [String] Stable X media key.
171
+ #
172
+ # @param monetizable [Boolean] Whether X reports the media as monetizable.
173
+ #
174
+ # @param sizes [Hash{Symbol=>XTwitterScraper::Models::TweetMedia::Size}] Named media renditions and resize modes.
175
+ #
44
176
  # @param video_variants [Array<XTwitterScraper::Models::TweetMedia::VideoVariant>] Available video encodings, ordered as returned
177
+ #
178
+ # @param width [Integer] Original media width.
45
179
 
46
180
  # @see XTwitterScraper::Models::TweetMedia#type
47
181
  module Type
@@ -55,6 +189,84 @@ module XTwitterScraper
55
189
  # @return [Array<Symbol>]
56
190
  end
57
191
 
192
+ class FaceRect < XTwitterScraper::Internal::Type::BaseModel
193
+ # @!attribute h
194
+ #
195
+ # @return [Integer]
196
+ required :h, Integer
197
+
198
+ # @!attribute w
199
+ #
200
+ # @return [Integer]
201
+ required :w, Integer
202
+
203
+ # @!attribute x
204
+ #
205
+ # @return [Integer]
206
+ required :x, Integer
207
+
208
+ # @!attribute y_
209
+ #
210
+ # @return [Integer]
211
+ required :y_, Integer, api_name: :y
212
+
213
+ # @!method initialize(h:, w:, x:, y_:)
214
+ # @param h [Integer]
215
+ # @param w [Integer]
216
+ # @param x [Integer]
217
+ # @param y_ [Integer]
218
+ end
219
+
220
+ class FocusRect < XTwitterScraper::Internal::Type::BaseModel
221
+ # @!attribute h
222
+ #
223
+ # @return [Integer]
224
+ required :h, Integer
225
+
226
+ # @!attribute w
227
+ #
228
+ # @return [Integer]
229
+ required :w, Integer
230
+
231
+ # @!attribute x
232
+ #
233
+ # @return [Integer]
234
+ required :x, Integer
235
+
236
+ # @!attribute y_
237
+ #
238
+ # @return [Integer]
239
+ required :y_, Integer, api_name: :y
240
+
241
+ # @!method initialize(h:, w:, x:, y_:)
242
+ # @param h [Integer]
243
+ # @param w [Integer]
244
+ # @param x [Integer]
245
+ # @param y_ [Integer]
246
+ end
247
+
248
+ class Size < XTwitterScraper::Internal::Type::BaseModel
249
+ # @!attribute h
250
+ #
251
+ # @return [Integer]
252
+ required :h, Integer
253
+
254
+ # @!attribute resize
255
+ #
256
+ # @return [String]
257
+ required :resize, String
258
+
259
+ # @!attribute w
260
+ #
261
+ # @return [Integer]
262
+ required :w, Integer
263
+
264
+ # @!method initialize(h:, resize:, w:)
265
+ # @param h [Integer]
266
+ # @param resize [String]
267
+ # @param w [Integer]
268
+ end
269
+
58
270
  class VideoVariant < XTwitterScraper::Internal::Type::BaseModel
59
271
  # @!attribute content_type
60
272
  #
@@ -22,15 +22,23 @@ module XTwitterScraper
22
22
  # @return [String]
23
23
  required :username, String
24
24
 
25
+ # @!attribute affiliates_highlighted_label
26
+ # Organization affiliation label shown on an X profile.
27
+ #
28
+ # @return [XTwitterScraper::Models::UserProfile::AffiliatesHighlightedLabel, nil]
29
+ optional :affiliates_highlighted_label,
30
+ -> { XTwitterScraper::UserProfile::AffiliatesHighlightedLabel },
31
+ api_name: :affiliatesHighlightedLabel
32
+
25
33
  # @!attribute automated_by
26
34
  #
27
35
  # @return [String, nil]
28
36
  optional :automated_by, String, api_name: :automatedBy
29
37
 
30
- # @!attribute can_dm
38
+ # @!attribute business_account_affiliates_count
31
39
  #
32
- # @return [Boolean, nil]
33
- optional :can_dm, XTwitterScraper::Internal::Type::Boolean, api_name: :canDm
40
+ # @return [Integer, nil]
41
+ optional :business_account_affiliates_count, Integer, api_name: :businessAccountAffiliatesCount
34
42
 
35
43
  # @!attribute community_role
36
44
  # Community role when returned by community member reads
@@ -48,6 +56,11 @@ module XTwitterScraper
48
56
  # @return [String, nil]
49
57
  optional :created_at, String, api_name: :createdAt
50
58
 
59
+ # @!attribute creator_subscriptions_count
60
+ #
61
+ # @return [Integer, nil]
62
+ optional :creator_subscriptions_count, Integer, api_name: :creatorSubscriptionsCount
63
+
51
64
  # @!attribute description
52
65
  #
53
66
  # @return [String, nil]
@@ -73,6 +86,36 @@ module XTwitterScraper
73
86
  # @return [Boolean, nil]
74
87
  optional :has_custom_timelines, XTwitterScraper::Internal::Type::Boolean, api_name: :hasCustomTimelines
75
88
 
89
+ # @!attribute has_graduated_access
90
+ #
91
+ # @return [Boolean, nil]
92
+ optional :has_graduated_access, XTwitterScraper::Internal::Type::Boolean, api_name: :hasGraduatedAccess
93
+
94
+ # @!attribute has_hidden_subscriptions_on_profile
95
+ #
96
+ # @return [Boolean, nil]
97
+ optional :has_hidden_subscriptions_on_profile,
98
+ XTwitterScraper::Internal::Type::Boolean,
99
+ api_name: :hasHiddenSubscriptionsOnProfile
100
+
101
+ # @!attribute highlights_info
102
+ # Profile highlight availability and count metadata.
103
+ #
104
+ # @return [XTwitterScraper::Models::UserProfile::HighlightsInfo, nil]
105
+ optional :highlights_info,
106
+ -> {
107
+ XTwitterScraper::UserProfile::HighlightsInfo
108
+ },
109
+ api_name: :highlightsInfo
110
+
111
+ # @!attribute identity_verification
112
+ # Identity verification metadata displayed by X.
113
+ #
114
+ # @return [XTwitterScraper::Models::UserProfile::IdentityVerification, nil]
115
+ optional :identity_verification,
116
+ -> { XTwitterScraper::UserProfile::IdentityVerification },
117
+ api_name: :identityVerification
118
+
76
119
  # @!attribute is_automated
77
120
  #
78
121
  # @return [Boolean, nil]
@@ -84,6 +127,13 @@ module XTwitterScraper
84
127
  # @return [Boolean, nil]
85
128
  optional :is_blue_verified, XTwitterScraper::Internal::Type::Boolean, api_name: :isBlueVerified
86
129
 
130
+ # @!attribute is_profile_translatable
131
+ #
132
+ # @return [Boolean, nil]
133
+ optional :is_profile_translatable,
134
+ XTwitterScraper::Internal::Type::Boolean,
135
+ api_name: :isProfileTranslatable
136
+
87
137
  # @!attribute is_translator
88
138
  #
89
139
  # @return [Boolean, nil]
@@ -105,6 +155,11 @@ module XTwitterScraper
105
155
  # @return [Integer, nil]
106
156
  optional :media_count, Integer, api_name: :mediaCount
107
157
 
158
+ # @!attribute parody_commentary_fan_label
159
+ #
160
+ # @return [String, nil]
161
+ optional :parody_commentary_fan_label, String, api_name: :parodyCommentaryFanLabel
162
+
108
163
  # @!attribute pinned_tweet_ids
109
164
  #
110
165
  # @return [Array<String>, nil]
@@ -127,11 +182,36 @@ module XTwitterScraper
127
182
  # @return [String, nil]
128
183
  optional :profile_banner_url, String, api_name: :profileBannerUrl
129
184
 
185
+ # @!attribute profile_description_language
186
+ #
187
+ # @return [String, nil]
188
+ optional :profile_description_language, String, api_name: :profileDescriptionLanguage
189
+
190
+ # @!attribute profile_image_shape
191
+ #
192
+ # @return [String, nil]
193
+ optional :profile_image_shape, String, api_name: :profileImageShape
194
+
195
+ # @!attribute profile_interstitial_type
196
+ #
197
+ # @return [String, nil]
198
+ optional :profile_interstitial_type, String, api_name: :profileInterstitialType
199
+
130
200
  # @!attribute profile_picture
131
201
  #
132
202
  # @return [String, nil]
133
203
  optional :profile_picture, String, api_name: :profilePicture
134
204
 
205
+ # @!attribute profile_sort_enabled
206
+ #
207
+ # @return [Boolean, nil]
208
+ optional :profile_sort_enabled, XTwitterScraper::Internal::Type::Boolean, api_name: :profileSortEnabled
209
+
210
+ # @!attribute profile_translator_type
211
+ #
212
+ # @return [String, nil]
213
+ optional :profile_translator_type, String, api_name: :profileTranslatorType
214
+
135
215
  # @!attribute protected
136
216
  # Whether the profile protects its posts
137
217
  #
@@ -143,6 +223,13 @@ module XTwitterScraper
143
223
  # @return [Integer, nil]
144
224
  optional :statuses_count, Integer, api_name: :statusesCount
145
225
 
226
+ # @!attribute super_follow_eligible
227
+ #
228
+ # @return [Boolean, nil]
229
+ optional :super_follow_eligible,
230
+ XTwitterScraper::Internal::Type::Boolean,
231
+ api_name: :superFollowEligible
232
+
146
233
  # @!attribute unavailable
147
234
  #
148
235
  # @return [Boolean, nil]
@@ -168,18 +255,6 @@ module XTwitterScraper
168
255
  # @return [String, nil]
169
256
  optional :verified_type, String, api_name: :verifiedType
170
257
 
171
- # @!attribute viewer_followed_by
172
- # Whether this profile follows the authenticated viewer
173
- #
174
- # @return [Boolean, nil]
175
- optional :viewer_followed_by, XTwitterScraper::Internal::Type::Boolean, api_name: :viewerFollowedBy
176
-
177
- # @!attribute viewer_following
178
- # Whether the authenticated viewer follows this profile
179
- #
180
- # @return [Boolean, nil]
181
- optional :viewer_following, XTwitterScraper::Internal::Type::Boolean, api_name: :viewerFollowing
182
-
183
258
  # @!attribute withheld_in_countries
184
259
  #
185
260
  # @return [Array<String>, nil]
@@ -187,7 +262,7 @@ module XTwitterScraper
187
262
  XTwitterScraper::Internal::Type::ArrayOf[String],
188
263
  api_name: :withheldInCountries
189
264
 
190
- # @!method initialize(id:, name:, username:, automated_by: nil, can_dm: nil, community_role: nil, cover_picture: nil, created_at: nil, description: nil, favourites_count: nil, followers: nil, following: nil, has_custom_timelines: nil, is_automated: nil, is_blue_verified: nil, is_translator: nil, is_verified: nil, location: nil, media_count: nil, pinned_tweet_ids: nil, possibly_sensitive: nil, profile_bio: nil, profile_banner_url: nil, profile_picture: nil, protected: nil, statuses_count: nil, unavailable: nil, unavailable_reason: nil, url: nil, verified: nil, verified_type: nil, viewer_followed_by: nil, viewer_following: nil, withheld_in_countries: nil)
265
+ # @!method initialize(id:, name:, username:, affiliates_highlighted_label: nil, automated_by: nil, business_account_affiliates_count: nil, community_role: nil, cover_picture: nil, created_at: nil, creator_subscriptions_count: nil, description: nil, favourites_count: nil, followers: nil, following: nil, has_custom_timelines: nil, has_graduated_access: nil, has_hidden_subscriptions_on_profile: nil, highlights_info: nil, identity_verification: nil, is_automated: nil, is_blue_verified: nil, is_profile_translatable: nil, is_translator: nil, is_verified: nil, location: nil, media_count: nil, parody_commentary_fan_label: nil, pinned_tweet_ids: nil, possibly_sensitive: nil, profile_bio: nil, profile_banner_url: nil, profile_description_language: nil, profile_image_shape: nil, profile_interstitial_type: nil, profile_picture: nil, profile_sort_enabled: nil, profile_translator_type: nil, protected: nil, statuses_count: nil, super_follow_eligible: nil, unavailable: nil, unavailable_reason: nil, url: nil, verified: nil, verified_type: nil, withheld_in_countries: nil)
191
266
  # X user profile with bio, follower counts, and verification status.
192
267
  #
193
268
  # @param id [String]
@@ -196,9 +271,11 @@ module XTwitterScraper
196
271
  #
197
272
  # @param username [String]
198
273
  #
274
+ # @param affiliates_highlighted_label [XTwitterScraper::Models::UserProfile::AffiliatesHighlightedLabel] Organization affiliation label shown on an X profile.
275
+ #
199
276
  # @param automated_by [String]
200
277
  #
201
- # @param can_dm [Boolean]
278
+ # @param business_account_affiliates_count [Integer]
202
279
  #
203
280
  # @param community_role [String] Community role when returned by community member reads
204
281
  #
@@ -206,6 +283,8 @@ module XTwitterScraper
206
283
  #
207
284
  # @param created_at [String]
208
285
  #
286
+ # @param creator_subscriptions_count [Integer]
287
+ #
209
288
  # @param description [String]
210
289
  #
211
290
  # @param favourites_count [Integer]
@@ -216,10 +295,20 @@ module XTwitterScraper
216
295
  #
217
296
  # @param has_custom_timelines [Boolean]
218
297
  #
298
+ # @param has_graduated_access [Boolean]
299
+ #
300
+ # @param has_hidden_subscriptions_on_profile [Boolean]
301
+ #
302
+ # @param highlights_info [XTwitterScraper::Models::UserProfile::HighlightsInfo] Profile highlight availability and count metadata.
303
+ #
304
+ # @param identity_verification [XTwitterScraper::Models::UserProfile::IdentityVerification] Identity verification metadata displayed by X.
305
+ #
219
306
  # @param is_automated [Boolean]
220
307
  #
221
308
  # @param is_blue_verified [Boolean] Whether X shows a blue verification badge
222
309
  #
310
+ # @param is_profile_translatable [Boolean]
311
+ #
223
312
  # @param is_translator [Boolean]
224
313
  #
225
314
  # @param is_verified [Boolean] Whether X marks the profile as verified
@@ -228,6 +317,8 @@ module XTwitterScraper
228
317
  #
229
318
  # @param media_count [Integer]
230
319
  #
320
+ # @param parody_commentary_fan_label [String]
321
+ #
231
322
  # @param pinned_tweet_ids [Array<String>]
232
323
  #
233
324
  # @param possibly_sensitive [Boolean]
@@ -236,12 +327,24 @@ module XTwitterScraper
236
327
  #
237
328
  # @param profile_banner_url [String] Original X profile banner field when available
238
329
  #
330
+ # @param profile_description_language [String]
331
+ #
332
+ # @param profile_image_shape [String]
333
+ #
334
+ # @param profile_interstitial_type [String]
335
+ #
239
336
  # @param profile_picture [String]
240
337
  #
338
+ # @param profile_sort_enabled [Boolean]
339
+ #
340
+ # @param profile_translator_type [String]
341
+ #
241
342
  # @param protected [Boolean] Whether the profile protects its posts
242
343
  #
243
344
  # @param statuses_count [Integer]
244
345
  #
346
+ # @param super_follow_eligible [Boolean]
347
+ #
245
348
  # @param unavailable [Boolean]
246
349
  #
247
350
  # @param unavailable_reason [String]
@@ -252,11 +355,98 @@ module XTwitterScraper
252
355
  #
253
356
  # @param verified_type [String]
254
357
  #
255
- # @param viewer_followed_by [Boolean] Whether this profile follows the authenticated viewer
256
- #
257
- # @param viewer_following [Boolean] Whether the authenticated viewer follows this profile
258
- #
259
358
  # @param withheld_in_countries [Array<String>]
359
+
360
+ # @see XTwitterScraper::Models::UserProfile#affiliates_highlighted_label
361
+ class AffiliatesHighlightedLabel < XTwitterScraper::Internal::Type::BaseModel
362
+ # @!attribute badge_url
363
+ #
364
+ # @return [String, nil]
365
+ optional :badge_url, String, api_name: :badgeUrl
366
+
367
+ # @!attribute description
368
+ #
369
+ # @return [String, nil]
370
+ optional :description, String
371
+
372
+ # @!attribute url
373
+ #
374
+ # @return [String, nil]
375
+ optional :url, String
376
+
377
+ # @!attribute url_type
378
+ #
379
+ # @return [String, nil]
380
+ optional :url_type, String, api_name: :urlType
381
+
382
+ # @!attribute user_label_display_type
383
+ #
384
+ # @return [String, nil]
385
+ optional :user_label_display_type, String, api_name: :userLabelDisplayType
386
+
387
+ # @!attribute user_label_type
388
+ #
389
+ # @return [String, nil]
390
+ optional :user_label_type, String, api_name: :userLabelType
391
+
392
+ # @!method initialize(badge_url: nil, description: nil, url: nil, url_type: nil, user_label_display_type: nil, user_label_type: nil)
393
+ # Organization affiliation label shown on an X profile.
394
+ #
395
+ # @param badge_url [String]
396
+ # @param description [String]
397
+ # @param url [String]
398
+ # @param url_type [String]
399
+ # @param user_label_display_type [String]
400
+ # @param user_label_type [String]
401
+ end
402
+
403
+ # @see XTwitterScraper::Models::UserProfile#highlights_info
404
+ class HighlightsInfo < XTwitterScraper::Internal::Type::BaseModel
405
+ # @!attribute can_highlight_tweets
406
+ #
407
+ # @return [Boolean, nil]
408
+ optional :can_highlight_tweets,
409
+ XTwitterScraper::Internal::Type::Boolean,
410
+ api_name: :canHighlightTweets
411
+
412
+ # @!attribute highlighted_tweets
413
+ #
414
+ # @return [String, nil]
415
+ optional :highlighted_tweets, String, api_name: :highlightedTweets
416
+
417
+ # @!method initialize(can_highlight_tweets: nil, highlighted_tweets: nil)
418
+ # Profile highlight availability and count metadata.
419
+ #
420
+ # @param can_highlight_tweets [Boolean]
421
+ # @param highlighted_tweets [String]
422
+ end
423
+
424
+ # @see XTwitterScraper::Models::UserProfile#identity_verification
425
+ class IdentityVerification < XTwitterScraper::Internal::Type::BaseModel
426
+ # @!attribute description
427
+ #
428
+ # @return [String, nil]
429
+ optional :description, String
430
+
431
+ # @!attribute is_identity_verified
432
+ #
433
+ # @return [Boolean, nil]
434
+ optional :is_identity_verified,
435
+ XTwitterScraper::Internal::Type::Boolean,
436
+ api_name: :isIdentityVerified
437
+
438
+ # @!attribute verified_since_msec
439
+ #
440
+ # @return [String, nil]
441
+ optional :verified_since_msec, String, api_name: :verifiedSinceMsec
442
+
443
+ # @!method initialize(description: nil, is_identity_verified: nil, verified_since_msec: nil)
444
+ # Identity verification metadata displayed by X.
445
+ #
446
+ # @param description [String]
447
+ # @param is_identity_verified [Boolean]
448
+ # @param verified_since_msec [String]
449
+ end
260
450
  end
261
451
  end
262
452
  end