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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +1 -1
- data/lib/x_twitter_scraper/internal/type/union.rb +25 -9
- data/lib/x_twitter_scraper/models/content_disclosure.rb +1 -9
- data/lib/x_twitter_scraper/models/embedded_tweet.rb +389 -1
- data/lib/x_twitter_scraper/models/paginated_tweets.rb +4 -5
- data/lib/x_twitter_scraper/models/search_tweet.rb +371 -1
- data/lib/x_twitter_scraper/models/support/ticket_list_response.rb +30 -17
- data/lib/x_twitter_scraper/models/support/ticket_retrieve_response.rb +49 -24
- data/lib/x_twitter_scraper/models/support/ticket_update_response.rb +18 -6
- data/lib/x_twitter_scraper/models/trend_list_response.rb +28 -1
- data/lib/x_twitter_scraper/models/tweet_media.rb +213 -1
- data/lib/x_twitter_scraper/models/user_profile.rb +211 -21
- data/lib/x_twitter_scraper/models/x/account_connection_attempt_retrieve_response.rb +60 -26
- data/lib/x_twitter_scraper/models/x/account_connection_challenge_submit_response.rb +4 -4
- data/lib/x_twitter_scraper/models/x/account_create_response.rb +149 -2
- data/lib/x_twitter_scraper/models/x/account_reauth_response.rb +4 -4
- data/lib/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/communities/tweet_list_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/community_retrieve_info_response.rb +1 -17
- data/lib/x_twitter_scraper/models/x/community_retrieve_search_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/list_retrieve_tweets_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/tweet_author.rb +14 -1
- data/lib/x_twitter_scraper/models/x/tweet_detail.rb +373 -1
- data/lib/x_twitter_scraper/models/x/tweet_get_quotes_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/tweet_get_replies_params.rb +34 -6
- data/lib/x_twitter_scraper/models/x/tweet_get_replies_response.rb +345 -0
- data/lib/x_twitter_scraper/models/x/tweet_get_thread_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/user_retrieve_likes_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/user_retrieve_media_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/user_retrieve_mentions_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/user_retrieve_replies_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/user_retrieve_tweets_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x_get_article_response.rb +1 -7
- data/lib/x_twitter_scraper/models/x_get_trends_response.rb +28 -1
- data/lib/x_twitter_scraper/resources/x/account_connection_attempts.rb +1 -1
- data/lib/x_twitter_scraper/resources/x/accounts.rb +2 -2
- data/lib/x_twitter_scraper/resources/x/communities/tweets.rb +2 -2
- data/lib/x_twitter_scraper/resources/x/communities.rb +1 -1
- data/lib/x_twitter_scraper/resources/x/lists.rb +1 -1
- data/lib/x_twitter_scraper/resources/x/tweets.rb +14 -11
- data/lib/x_twitter_scraper/resources/x/users.rb +5 -5
- data/lib/x_twitter_scraper/version.rb +1 -1
- data/lib/x_twitter_scraper.rb +2 -1
- data/rbi/x_twitter_scraper/models/content_disclosure.rbi +1 -15
- data/rbi/x_twitter_scraper/models/embedded_tweet.rbi +708 -3
- data/rbi/x_twitter_scraper/models/paginated_tweets.rbi +4 -5
- data/rbi/x_twitter_scraper/models/search_tweet.rbi +674 -3
- data/rbi/x_twitter_scraper/models/support/ticket_list_response.rbi +75 -55
- data/rbi/x_twitter_scraper/models/support/ticket_retrieve_response.rbi +129 -87
- data/rbi/x_twitter_scraper/models/support/ticket_update_response.rbi +62 -13
- data/rbi/x_twitter_scraper/models/trend_list_response.rbi +40 -3
- data/rbi/x_twitter_scraper/models/tweet_media.rbi +313 -3
- data/rbi/x_twitter_scraper/models/user_profile.rbi +340 -29
- data/rbi/x_twitter_scraper/models/x/account_connection_attempt_retrieve_response.rbi +61 -83
- data/rbi/x_twitter_scraper/models/x/account_connection_challenge_submit_response.rbi +6 -6
- data/rbi/x_twitter_scraper/models/x/account_create_response.rbi +264 -2
- data/rbi/x_twitter_scraper/models/x/account_reauth_response.rbi +6 -6
- data/rbi/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/communities/tweet_list_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/community_retrieve_info_response.rbi +0 -22
- data/rbi/x_twitter_scraper/models/x/community_retrieve_search_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/list_retrieve_tweets_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/tweet_author.rbi +13 -3
- data/rbi/x_twitter_scraper/models/x/tweet_detail.rbi +690 -3
- data/rbi/x_twitter_scraper/models/x/tweet_get_quotes_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/tweet_get_replies_params.rbi +68 -8
- data/rbi/x_twitter_scraper/models/x/tweet_get_replies_response.rbi +527 -0
- data/rbi/x_twitter_scraper/models/x/tweet_get_thread_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/user_retrieve_likes_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/user_retrieve_media_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/user_retrieve_mentions_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/user_retrieve_replies_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x_get_article_response.rbi +0 -9
- data/rbi/x_twitter_scraper/models/x_get_trends_response.rbi +40 -3
- data/rbi/x_twitter_scraper/resources/x/accounts.rbi +1 -1
- data/rbi/x_twitter_scraper/resources/x/communities/tweets.rbi +4 -8
- data/rbi/x_twitter_scraper/resources/x/communities.rbi +2 -4
- data/rbi/x_twitter_scraper/resources/x/lists.rbi +2 -4
- data/rbi/x_twitter_scraper/resources/x/tweets.rbi +20 -18
- data/rbi/x_twitter_scraper/resources/x/users.rbi +10 -20
- data/sig/x_twitter_scraper/models/content_disclosure.rbs +1 -11
- data/sig/x_twitter_scraper/models/embedded_tweet.rbs +343 -62
- data/sig/x_twitter_scraper/models/search_tweet.rbs +333 -70
- data/sig/x_twitter_scraper/models/support/ticket_list_response.rbs +29 -32
- data/sig/x_twitter_scraper/models/support/ticket_retrieve_response.rbs +49 -48
- data/sig/x_twitter_scraper/models/support/ticket_update_response.rbs +25 -7
- data/sig/x_twitter_scraper/models/trend_list_response.rbs +16 -20
- data/sig/x_twitter_scraper/models/tweet_media.rbs +146 -15
- data/sig/x_twitter_scraper/models/user_profile.rbs +164 -86
- data/sig/x_twitter_scraper/models/x/account_connection_attempt_retrieve_response.rbs +50 -33
- data/sig/x_twitter_scraper/models/x/account_connection_challenge_submit_response.rbs +5 -5
- data/sig/x_twitter_scraper/models/x/account_create_response.rbs +147 -1
- data/sig/x_twitter_scraper/models/x/account_reauth_response.rbs +5 -5
- data/sig/x_twitter_scraper/models/x/community_retrieve_info_response.rbs +0 -14
- data/sig/x_twitter_scraper/models/x/tweet_author.rbs +11 -3
- data/sig/x_twitter_scraper/models/x/tweet_detail.rbs +333 -70
- data/sig/x_twitter_scraper/models/x/tweet_get_replies_params.rbs +26 -0
- data/sig/x_twitter_scraper/models/x/tweet_get_replies_response.rbs +274 -0
- data/sig/x_twitter_scraper/models/x_get_article_response.rbs +0 -7
- data/sig/x_twitter_scraper/models/x_get_trends_response.rbs +25 -3
- data/sig/x_twitter_scraper/resources/x/accounts.rbs +1 -1
- data/sig/x_twitter_scraper/resources/x/tweets.rbs +3 -1
- metadata +4 -1
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module XTwitterScraper
|
|
4
|
+
module Models
|
|
5
|
+
module X
|
|
6
|
+
# @see XTwitterScraper::Resources::X::Tweets#get_replies
|
|
7
|
+
class TweetGetRepliesResponse < XTwitterScraper::Models::PaginatedTweets
|
|
8
|
+
# @!attribute diagnostic
|
|
9
|
+
# Evidence for direct-reply coverage and collector behavior.
|
|
10
|
+
#
|
|
11
|
+
# @return [XTwitterScraper::Models::X::TweetGetRepliesResponse::Diagnostic, nil]
|
|
12
|
+
optional :diagnostic, -> { XTwitterScraper::Models::X::TweetGetRepliesResponse::Diagnostic }
|
|
13
|
+
|
|
14
|
+
# @!attribute nested_replies
|
|
15
|
+
# Nested replies. Excluded from direct coverage.
|
|
16
|
+
#
|
|
17
|
+
# @return [Array<XTwitterScraper::Models::SearchTweet>, nil]
|
|
18
|
+
optional :nested_replies, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::SearchTweet] }
|
|
19
|
+
|
|
20
|
+
# @!method initialize(diagnostic: nil, nested_replies: nil)
|
|
21
|
+
# Reply rows. Complete mode also returns nested replies and coverage diagnostics.
|
|
22
|
+
# Keep nested replies separate from direct coverage.
|
|
23
|
+
#
|
|
24
|
+
# @param diagnostic [XTwitterScraper::Models::X::TweetGetRepliesResponse::Diagnostic] Evidence for direct-reply coverage and collector behavior.
|
|
25
|
+
#
|
|
26
|
+
# @param nested_replies [Array<XTwitterScraper::Models::SearchTweet>] Nested replies. Excluded from direct coverage.
|
|
27
|
+
|
|
28
|
+
class Diagnostic < XTwitterScraper::Internal::Type::BaseModel
|
|
29
|
+
# @!attribute complete
|
|
30
|
+
# Whether coverage met the target without truncation.
|
|
31
|
+
#
|
|
32
|
+
# @return [Boolean]
|
|
33
|
+
required :complete, XTwitterScraper::Internal::Type::Boolean
|
|
34
|
+
|
|
35
|
+
# @!attribute coverage_percentage
|
|
36
|
+
# Unique direct replies as a percentage of the reported count.
|
|
37
|
+
#
|
|
38
|
+
# @return [Float]
|
|
39
|
+
required :coverage_percentage, Float, api_name: :coveragePercentage
|
|
40
|
+
|
|
41
|
+
# @!attribute cursor_failures
|
|
42
|
+
# Cursor requests that failed.
|
|
43
|
+
#
|
|
44
|
+
# @return [Integer]
|
|
45
|
+
required :cursor_failures, Integer, api_name: :cursorFailures
|
|
46
|
+
|
|
47
|
+
# @!attribute duplicate_count
|
|
48
|
+
# Duplicate tweet IDs removed across pages and strategies.
|
|
49
|
+
#
|
|
50
|
+
# @return [Integer]
|
|
51
|
+
required :duplicate_count, Integer, api_name: :duplicateCount
|
|
52
|
+
|
|
53
|
+
# @!attribute empty_false_progress_pages
|
|
54
|
+
# Empty pages rejected because they did not make progress.
|
|
55
|
+
#
|
|
56
|
+
# @return [Integer]
|
|
57
|
+
required :empty_false_progress_pages, Integer, api_name: :emptyFalseProgressPages
|
|
58
|
+
|
|
59
|
+
# @!attribute malformed_count
|
|
60
|
+
# Malformed response items rejected.
|
|
61
|
+
#
|
|
62
|
+
# @return [Integer]
|
|
63
|
+
required :malformed_count, Integer, api_name: :malformedCount
|
|
64
|
+
|
|
65
|
+
# @!attribute missing_response_modules_or_fields
|
|
66
|
+
# Expected response modules or fields missing from X.
|
|
67
|
+
#
|
|
68
|
+
# @return [Array<String>]
|
|
69
|
+
required :missing_response_modules_or_fields,
|
|
70
|
+
XTwitterScraper::Internal::Type::ArrayOf[String],
|
|
71
|
+
api_name: :missingResponseModulesOrFields
|
|
72
|
+
|
|
73
|
+
# @!attribute nested_reply_count
|
|
74
|
+
# Unique nested replies kept outside direct coverage.
|
|
75
|
+
#
|
|
76
|
+
# @return [Integer]
|
|
77
|
+
required :nested_reply_count, Integer, api_name: :nestedReplyCount
|
|
78
|
+
|
|
79
|
+
# @!attribute pages_attempted
|
|
80
|
+
# Total pages attempted across all strategies.
|
|
81
|
+
#
|
|
82
|
+
# @return [Integer]
|
|
83
|
+
required :pages_attempted, Integer, api_name: :pagesAttempted
|
|
84
|
+
|
|
85
|
+
# @!attribute recommended_fallback
|
|
86
|
+
# Recommended next action when coverage is incomplete.
|
|
87
|
+
#
|
|
88
|
+
# @return [String]
|
|
89
|
+
required :recommended_fallback, String, api_name: :recommendedFallback
|
|
90
|
+
|
|
91
|
+
# @!attribute repeated_cursor_count
|
|
92
|
+
# Repeated cursors rejected to prevent loops.
|
|
93
|
+
#
|
|
94
|
+
# @return [Integer]
|
|
95
|
+
required :repeated_cursor_count, Integer, api_name: :repeatedCursorCount
|
|
96
|
+
|
|
97
|
+
# @!attribute reported_reply_count
|
|
98
|
+
# Reply count reported on the source post.
|
|
99
|
+
#
|
|
100
|
+
# @return [Integer]
|
|
101
|
+
required :reported_reply_count, Integer, api_name: :reportedReplyCount
|
|
102
|
+
|
|
103
|
+
# @!attribute response_truncated
|
|
104
|
+
# Whether the requested row limit truncated safe results.
|
|
105
|
+
#
|
|
106
|
+
# @return [Boolean]
|
|
107
|
+
required :response_truncated, XTwitterScraper::Internal::Type::Boolean, api_name: :responseTruncated
|
|
108
|
+
|
|
109
|
+
# @!attribute richness
|
|
110
|
+
# Field-presence counts across the collected direct replies.
|
|
111
|
+
#
|
|
112
|
+
# @return [XTwitterScraper::Models::X::TweetGetRepliesResponse::Diagnostic::Richness]
|
|
113
|
+
required :richness, -> { XTwitterScraper::Models::X::TweetGetRepliesResponse::Diagnostic::Richness }
|
|
114
|
+
|
|
115
|
+
# @!attribute strategies_attempted
|
|
116
|
+
# Per-strategy pagination and contribution evidence.
|
|
117
|
+
#
|
|
118
|
+
# @return [Array<XTwitterScraper::Models::X::TweetGetRepliesResponse::Diagnostic::StrategiesAttempted>]
|
|
119
|
+
required :strategies_attempted,
|
|
120
|
+
-> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetGetRepliesResponse::Diagnostic::StrategiesAttempted] },
|
|
121
|
+
api_name: :strategiesAttempted
|
|
122
|
+
|
|
123
|
+
# @!attribute target_direct_replies
|
|
124
|
+
# Minimum direct replies required for the coverage target.
|
|
125
|
+
#
|
|
126
|
+
# @return [Integer]
|
|
127
|
+
required :target_direct_replies, Integer, api_name: :targetDirectReplies
|
|
128
|
+
|
|
129
|
+
# @!attribute unique_direct_replies
|
|
130
|
+
# Unique replies whose parent ID equals the source post ID.
|
|
131
|
+
#
|
|
132
|
+
# @return [Integer]
|
|
133
|
+
required :unique_direct_replies, Integer, api_name: :uniqueDirectReplies
|
|
134
|
+
|
|
135
|
+
# @!attribute unrelated_count
|
|
136
|
+
# Tweets rejected because they belonged elsewhere.
|
|
137
|
+
#
|
|
138
|
+
# @return [Integer]
|
|
139
|
+
required :unrelated_count, Integer, api_name: :unrelatedCount
|
|
140
|
+
|
|
141
|
+
# @!method initialize(complete:, coverage_percentage:, cursor_failures:, duplicate_count:, empty_false_progress_pages:, malformed_count:, missing_response_modules_or_fields:, nested_reply_count:, pages_attempted:, recommended_fallback:, repeated_cursor_count:, reported_reply_count:, response_truncated:, richness:, strategies_attempted:, target_direct_replies:, unique_direct_replies:, unrelated_count:)
|
|
142
|
+
# Evidence for direct-reply coverage and collector behavior.
|
|
143
|
+
#
|
|
144
|
+
# @param complete [Boolean] Whether coverage met the target without truncation.
|
|
145
|
+
#
|
|
146
|
+
# @param coverage_percentage [Float] Unique direct replies as a percentage of the reported count.
|
|
147
|
+
#
|
|
148
|
+
# @param cursor_failures [Integer] Cursor requests that failed.
|
|
149
|
+
#
|
|
150
|
+
# @param duplicate_count [Integer] Duplicate tweet IDs removed across pages and strategies.
|
|
151
|
+
#
|
|
152
|
+
# @param empty_false_progress_pages [Integer] Empty pages rejected because they did not make progress.
|
|
153
|
+
#
|
|
154
|
+
# @param malformed_count [Integer] Malformed response items rejected.
|
|
155
|
+
#
|
|
156
|
+
# @param missing_response_modules_or_fields [Array<String>] Expected response modules or fields missing from X.
|
|
157
|
+
#
|
|
158
|
+
# @param nested_reply_count [Integer] Unique nested replies kept outside direct coverage.
|
|
159
|
+
#
|
|
160
|
+
# @param pages_attempted [Integer] Total pages attempted across all strategies.
|
|
161
|
+
#
|
|
162
|
+
# @param recommended_fallback [String] Recommended next action when coverage is incomplete.
|
|
163
|
+
#
|
|
164
|
+
# @param repeated_cursor_count [Integer] Repeated cursors rejected to prevent loops.
|
|
165
|
+
#
|
|
166
|
+
# @param reported_reply_count [Integer] Reply count reported on the source post.
|
|
167
|
+
#
|
|
168
|
+
# @param response_truncated [Boolean] Whether the requested row limit truncated safe results.
|
|
169
|
+
#
|
|
170
|
+
# @param richness [XTwitterScraper::Models::X::TweetGetRepliesResponse::Diagnostic::Richness] Field-presence counts across the collected direct replies.
|
|
171
|
+
#
|
|
172
|
+
# @param strategies_attempted [Array<XTwitterScraper::Models::X::TweetGetRepliesResponse::Diagnostic::StrategiesAttempted>] Per-strategy pagination and contribution evidence.
|
|
173
|
+
#
|
|
174
|
+
# @param target_direct_replies [Integer] Minimum direct replies required for the coverage target.
|
|
175
|
+
#
|
|
176
|
+
# @param unique_direct_replies [Integer] Unique replies whose parent ID equals the source post ID.
|
|
177
|
+
#
|
|
178
|
+
# @param unrelated_count [Integer] Tweets rejected because they belonged elsewhere.
|
|
179
|
+
|
|
180
|
+
# @see XTwitterScraper::Models::X::TweetGetRepliesResponse::Diagnostic#richness
|
|
181
|
+
class Richness < XTwitterScraper::Internal::Type::BaseModel
|
|
182
|
+
# @!attribute article
|
|
183
|
+
# Replies with article content.
|
|
184
|
+
#
|
|
185
|
+
# @return [Integer]
|
|
186
|
+
required :article, Integer
|
|
187
|
+
|
|
188
|
+
# @!attribute author
|
|
189
|
+
# Replies with author details.
|
|
190
|
+
#
|
|
191
|
+
# @return [Integer]
|
|
192
|
+
required :author, Integer
|
|
193
|
+
|
|
194
|
+
# @!attribute card
|
|
195
|
+
# Replies with card metadata.
|
|
196
|
+
#
|
|
197
|
+
# @return [Integer]
|
|
198
|
+
required :card, Integer
|
|
199
|
+
|
|
200
|
+
# @!attribute community_note
|
|
201
|
+
# Replies with community-note data.
|
|
202
|
+
#
|
|
203
|
+
# @return [Integer]
|
|
204
|
+
required :community_note, Integer, api_name: :communityNote
|
|
205
|
+
|
|
206
|
+
# @!attribute created_at
|
|
207
|
+
# Replies with a creation timestamp.
|
|
208
|
+
#
|
|
209
|
+
# @return [Integer]
|
|
210
|
+
required :created_at, Integer, api_name: :createdAt
|
|
211
|
+
|
|
212
|
+
# @!attribute engagement_counts
|
|
213
|
+
# Replies with engagement counts.
|
|
214
|
+
#
|
|
215
|
+
# @return [Integer]
|
|
216
|
+
required :engagement_counts, Integer, api_name: :engagementCounts
|
|
217
|
+
|
|
218
|
+
# @!attribute entities
|
|
219
|
+
# Replies with entity metadata.
|
|
220
|
+
#
|
|
221
|
+
# @return [Integer]
|
|
222
|
+
required :entities, Integer
|
|
223
|
+
|
|
224
|
+
# @!attribute language
|
|
225
|
+
# Replies with a language value.
|
|
226
|
+
#
|
|
227
|
+
# @return [Integer]
|
|
228
|
+
required :language, Integer
|
|
229
|
+
|
|
230
|
+
# @!attribute media
|
|
231
|
+
# Replies with media metadata.
|
|
232
|
+
#
|
|
233
|
+
# @return [Integer]
|
|
234
|
+
required :media, Integer
|
|
235
|
+
|
|
236
|
+
# @!attribute quoted_or_reposted_tweet
|
|
237
|
+
# Replies with quoted or reposted tweet data.
|
|
238
|
+
#
|
|
239
|
+
# @return [Integer]
|
|
240
|
+
required :quoted_or_reposted_tweet, Integer, api_name: :quotedOrRepostedTweet
|
|
241
|
+
|
|
242
|
+
# @!attribute text
|
|
243
|
+
# Replies with text.
|
|
244
|
+
#
|
|
245
|
+
# @return [Integer]
|
|
246
|
+
required :text, Integer
|
|
247
|
+
|
|
248
|
+
# @!attribute total_replies
|
|
249
|
+
# Total unique direct replies evaluated for richness.
|
|
250
|
+
#
|
|
251
|
+
# @return [Integer]
|
|
252
|
+
required :total_replies, Integer, api_name: :totalReplies
|
|
253
|
+
|
|
254
|
+
# @!attribute url
|
|
255
|
+
# Replies with a canonical URL.
|
|
256
|
+
#
|
|
257
|
+
# @return [Integer]
|
|
258
|
+
required :url, Integer
|
|
259
|
+
|
|
260
|
+
# @!method initialize(article:, author:, card:, community_note:, created_at:, engagement_counts:, entities:, language:, media:, quoted_or_reposted_tweet:, text:, total_replies:, url:)
|
|
261
|
+
# Field-presence counts across the collected direct replies.
|
|
262
|
+
#
|
|
263
|
+
# @param article [Integer] Replies with article content.
|
|
264
|
+
#
|
|
265
|
+
# @param author [Integer] Replies with author details.
|
|
266
|
+
#
|
|
267
|
+
# @param card [Integer] Replies with card metadata.
|
|
268
|
+
#
|
|
269
|
+
# @param community_note [Integer] Replies with community-note data.
|
|
270
|
+
#
|
|
271
|
+
# @param created_at [Integer] Replies with a creation timestamp.
|
|
272
|
+
#
|
|
273
|
+
# @param engagement_counts [Integer] Replies with engagement counts.
|
|
274
|
+
#
|
|
275
|
+
# @param entities [Integer] Replies with entity metadata.
|
|
276
|
+
#
|
|
277
|
+
# @param language [Integer] Replies with a language value.
|
|
278
|
+
#
|
|
279
|
+
# @param media [Integer] Replies with media metadata.
|
|
280
|
+
#
|
|
281
|
+
# @param quoted_or_reposted_tweet [Integer] Replies with quoted or reposted tweet data.
|
|
282
|
+
#
|
|
283
|
+
# @param text [Integer] Replies with text.
|
|
284
|
+
#
|
|
285
|
+
# @param total_replies [Integer] Total unique direct replies evaluated for richness.
|
|
286
|
+
#
|
|
287
|
+
# @param url [Integer] Replies with a canonical URL.
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
class StrategiesAttempted < XTwitterScraper::Internal::Type::BaseModel
|
|
291
|
+
# @!attribute name
|
|
292
|
+
#
|
|
293
|
+
# @return [String]
|
|
294
|
+
required :name, String
|
|
295
|
+
|
|
296
|
+
# @!attribute new_direct_replies
|
|
297
|
+
#
|
|
298
|
+
# @return [Integer]
|
|
299
|
+
required :new_direct_replies, Integer, api_name: :newDirectReplies
|
|
300
|
+
|
|
301
|
+
# @!attribute new_nested_replies
|
|
302
|
+
#
|
|
303
|
+
# @return [Integer]
|
|
304
|
+
required :new_nested_replies, Integer, api_name: :newNestedReplies
|
|
305
|
+
|
|
306
|
+
# @!attribute pages_attempted
|
|
307
|
+
#
|
|
308
|
+
# @return [Integer]
|
|
309
|
+
required :pages_attempted, Integer, api_name: :pagesAttempted
|
|
310
|
+
|
|
311
|
+
# @!attribute stop_reason
|
|
312
|
+
#
|
|
313
|
+
# @return [Symbol, XTwitterScraper::Models::X::TweetGetRepliesResponse::Diagnostic::StrategiesAttempted::StopReason]
|
|
314
|
+
required :stop_reason,
|
|
315
|
+
enum: -> { XTwitterScraper::Models::X::TweetGetRepliesResponse::Diagnostic::StrategiesAttempted::StopReason },
|
|
316
|
+
api_name: :stopReason
|
|
317
|
+
|
|
318
|
+
# @!method initialize(name:, new_direct_replies:, new_nested_replies:, pages_attempted:, stop_reason:)
|
|
319
|
+
# @param name [String]
|
|
320
|
+
# @param new_direct_replies [Integer]
|
|
321
|
+
# @param new_nested_replies [Integer]
|
|
322
|
+
# @param pages_attempted [Integer]
|
|
323
|
+
# @param stop_reason [Symbol, XTwitterScraper::Models::X::TweetGetRepliesResponse::Diagnostic::StrategiesAttempted::StopReason]
|
|
324
|
+
|
|
325
|
+
# @see XTwitterScraper::Models::X::TweetGetRepliesResponse::Diagnostic::StrategiesAttempted#stop_reason
|
|
326
|
+
module StopReason
|
|
327
|
+
extend XTwitterScraper::Internal::Type::Enum
|
|
328
|
+
|
|
329
|
+
DEADLINE = :deadline
|
|
330
|
+
EMPTY_PAGES = :empty_pages
|
|
331
|
+
ERROR = :error
|
|
332
|
+
MISSING_CURSOR = :missing_cursor
|
|
333
|
+
NO_NEXT_PAGE = :no_next_page
|
|
334
|
+
PAGE_CAP = :page_cap
|
|
335
|
+
REPEATED_CURSOR = :repeated_cursor
|
|
336
|
+
|
|
337
|
+
# @!method self.values
|
|
338
|
+
# @return [Array<Symbol>]
|
|
339
|
+
end
|
|
340
|
+
end
|
|
341
|
+
end
|
|
342
|
+
end
|
|
343
|
+
end
|
|
344
|
+
end
|
|
345
|
+
end
|
|
@@ -24,10 +24,8 @@ module XTwitterScraper
|
|
|
24
24
|
optional :cursor, String
|
|
25
25
|
|
|
26
26
|
# @!attribute page_size
|
|
27
|
-
# Maximum items
|
|
28
|
-
#
|
|
29
|
-
# remaining credits cover fewer results. Keep requesting next_cursor while
|
|
30
|
-
# has_next_page is true, even when a page is empty. The deprecated limit and count
|
|
27
|
+
# Maximum page items (1-100, default 20). Source, filters, or credits can reduce
|
|
28
|
+
# results. Continue while has_next_page is true. Deprecated limit and count
|
|
31
29
|
# aliases remain accepted.
|
|
32
30
|
#
|
|
33
31
|
# @return [Integer, nil]
|
|
@@ -41,7 +39,7 @@ module XTwitterScraper
|
|
|
41
39
|
#
|
|
42
40
|
# @param cursor [String] Pagination cursor for thread tweets
|
|
43
41
|
#
|
|
44
|
-
# @param page_size [Integer] Maximum items
|
|
42
|
+
# @param page_size [Integer] Maximum page items (1-100, default 20). Source, filters, or credits can reduce r
|
|
45
43
|
#
|
|
46
44
|
# @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}]
|
|
47
45
|
end
|
|
@@ -115,10 +115,8 @@ module XTwitterScraper
|
|
|
115
115
|
optional :min_retweets, Integer
|
|
116
116
|
|
|
117
117
|
# @!attribute page_size
|
|
118
|
-
# Maximum items
|
|
119
|
-
#
|
|
120
|
-
# remaining credits cover fewer results. Keep requesting next_cursor while
|
|
121
|
-
# has_next_page is true, even when a page is empty. The deprecated limit and count
|
|
118
|
+
# Maximum page items (1-100, default 20). Source, filters, or credits can reduce
|
|
119
|
+
# results. Continue while has_next_page is true. Deprecated limit and count
|
|
122
120
|
# aliases remain accepted.
|
|
123
121
|
#
|
|
124
122
|
# @return [Integer, nil]
|
|
@@ -222,7 +220,7 @@ module XTwitterScraper
|
|
|
222
220
|
#
|
|
223
221
|
# @param min_retweets [Integer] Minimum retweets threshold.
|
|
224
222
|
#
|
|
225
|
-
# @param page_size [Integer] Maximum items
|
|
223
|
+
# @param page_size [Integer] Maximum page items (1-100, default 20). Source, filters, or credits can reduce r
|
|
226
224
|
#
|
|
227
225
|
# @param quotes [Symbol, XTwitterScraper::Models::X::UserRetrieveLikesParams::Quotes] Quote mode.
|
|
228
226
|
#
|
|
@@ -115,10 +115,8 @@ module XTwitterScraper
|
|
|
115
115
|
optional :min_retweets, Integer
|
|
116
116
|
|
|
117
117
|
# @!attribute page_size
|
|
118
|
-
# Maximum items
|
|
119
|
-
#
|
|
120
|
-
# remaining credits cover fewer results. Keep requesting next_cursor while
|
|
121
|
-
# has_next_page is true, even when a page is empty. The deprecated limit and count
|
|
118
|
+
# Maximum page items (1-100, default 20). Source, filters, or credits can reduce
|
|
119
|
+
# results. Continue while has_next_page is true. Deprecated limit and count
|
|
122
120
|
# aliases remain accepted.
|
|
123
121
|
#
|
|
124
122
|
# @return [Integer, nil]
|
|
@@ -222,7 +220,7 @@ module XTwitterScraper
|
|
|
222
220
|
#
|
|
223
221
|
# @param min_retweets [Integer] Minimum retweets threshold.
|
|
224
222
|
#
|
|
225
|
-
# @param page_size [Integer] Maximum items
|
|
223
|
+
# @param page_size [Integer] Maximum page items (1-100, default 20). Source, filters, or credits can reduce r
|
|
226
224
|
#
|
|
227
225
|
# @param quotes [Symbol, XTwitterScraper::Models::X::UserRetrieveMediaParams::Quotes] Quote mode.
|
|
228
226
|
#
|
|
@@ -115,10 +115,8 @@ module XTwitterScraper
|
|
|
115
115
|
optional :min_retweets, Integer
|
|
116
116
|
|
|
117
117
|
# @!attribute page_size
|
|
118
|
-
# Maximum items
|
|
119
|
-
#
|
|
120
|
-
# remaining credits cover fewer results. Keep requesting next_cursor while
|
|
121
|
-
# has_next_page is true, even when a page is empty. The deprecated limit and count
|
|
118
|
+
# Maximum page items (1-100, default 20). Source, filters, or credits can reduce
|
|
119
|
+
# results. Continue while has_next_page is true. Deprecated limit and count
|
|
122
120
|
# aliases remain accepted.
|
|
123
121
|
#
|
|
124
122
|
# @return [Integer, nil]
|
|
@@ -234,7 +232,7 @@ module XTwitterScraper
|
|
|
234
232
|
#
|
|
235
233
|
# @param min_retweets [Integer] Minimum retweets threshold.
|
|
236
234
|
#
|
|
237
|
-
# @param page_size [Integer] Maximum items
|
|
235
|
+
# @param page_size [Integer] Maximum page items (1-100, default 20). Source, filters, or credits can reduce r
|
|
238
236
|
#
|
|
239
237
|
# @param quotes [Symbol, XTwitterScraper::Models::X::UserRetrieveMentionsParams::Quotes] Quote mode.
|
|
240
238
|
#
|
|
@@ -121,10 +121,8 @@ module XTwitterScraper
|
|
|
121
121
|
optional :min_retweets, Integer
|
|
122
122
|
|
|
123
123
|
# @!attribute page_size
|
|
124
|
-
# Maximum items
|
|
125
|
-
#
|
|
126
|
-
# remaining credits cover fewer results. Keep requesting next_cursor while
|
|
127
|
-
# has_next_page is true, even when a page is empty. The deprecated limit and count
|
|
124
|
+
# Maximum page items (1-100, default 20). Source, filters, or credits can reduce
|
|
125
|
+
# results. Continue while has_next_page is true. Deprecated limit and count
|
|
128
126
|
# aliases remain accepted.
|
|
129
127
|
#
|
|
130
128
|
# @return [Integer, nil]
|
|
@@ -230,7 +228,7 @@ module XTwitterScraper
|
|
|
230
228
|
#
|
|
231
229
|
# @param min_retweets [Integer] Minimum retweets threshold.
|
|
232
230
|
#
|
|
233
|
-
# @param page_size [Integer] Maximum items
|
|
231
|
+
# @param page_size [Integer] Maximum page items (1-100, default 20). Source, filters, or credits can reduce r
|
|
234
232
|
#
|
|
235
233
|
# @param quotes [Symbol, XTwitterScraper::Models::X::UserRetrieveRepliesParams::Quotes] Quote mode.
|
|
236
234
|
#
|
|
@@ -127,10 +127,8 @@ module XTwitterScraper
|
|
|
127
127
|
optional :min_retweets, Integer
|
|
128
128
|
|
|
129
129
|
# @!attribute page_size
|
|
130
|
-
# Maximum items
|
|
131
|
-
#
|
|
132
|
-
# remaining credits cover fewer results. Keep requesting next_cursor while
|
|
133
|
-
# has_next_page is true, even when a page is empty. The deprecated limit and count
|
|
130
|
+
# Maximum page items (1-100, default 20). Source, filters, or credits can reduce
|
|
131
|
+
# results. Continue while has_next_page is true. Deprecated limit and count
|
|
134
132
|
# aliases remain accepted.
|
|
135
133
|
#
|
|
136
134
|
# @return [Integer, nil]
|
|
@@ -238,7 +236,7 @@ module XTwitterScraper
|
|
|
238
236
|
#
|
|
239
237
|
# @param min_retweets [Integer] Minimum retweets threshold.
|
|
240
238
|
#
|
|
241
|
-
# @param page_size [Integer] Maximum items
|
|
239
|
+
# @param page_size [Integer] Maximum page items (1-100, default 20). Source, filters, or credits can reduce r
|
|
242
240
|
#
|
|
243
241
|
# @param quotes [Symbol, XTwitterScraper::Models::X::UserRetrieveTweetsParams::Quotes] Quote mode.
|
|
244
242
|
#
|
|
@@ -203,11 +203,6 @@ module XTwitterScraper
|
|
|
203
203
|
# @return [String]
|
|
204
204
|
required :username, String
|
|
205
205
|
|
|
206
|
-
# @!attribute can_dm
|
|
207
|
-
#
|
|
208
|
-
# @return [Boolean, nil]
|
|
209
|
-
optional :can_dm, XTwitterScraper::Internal::Type::Boolean, api_name: :canDm
|
|
210
|
-
|
|
211
206
|
# @!attribute created_at
|
|
212
207
|
#
|
|
213
208
|
# @return [String, nil]
|
|
@@ -283,13 +278,12 @@ module XTwitterScraper
|
|
|
283
278
|
# @return [String, nil]
|
|
284
279
|
optional :url, String
|
|
285
280
|
|
|
286
|
-
# @!method initialize(id:, name:, username:,
|
|
281
|
+
# @!method initialize(id:, name:, username:, created_at: nil, description: nil, favourites_count: nil, followers_count: nil, following_count: nil, is_blue_verified: nil, is_translator: nil, is_verified: nil, location: nil, media_count: nil, profile_banner_url: nil, profile_picture: nil, protected: nil, statuses_count: nil, url: nil)
|
|
287
282
|
# X Article author profile fields returned when available.
|
|
288
283
|
#
|
|
289
284
|
# @param id [String]
|
|
290
285
|
# @param name [String]
|
|
291
286
|
# @param username [String]
|
|
292
|
-
# @param can_dm [Boolean]
|
|
293
287
|
# @param created_at [String]
|
|
294
288
|
# @param description [String]
|
|
295
289
|
# @param favourites_count [Integer]
|
|
@@ -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
|
-
# @!
|
|
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
|
|
@@ -13,7 +13,7 @@ module XTwitterScraper
|
|
|
13
13
|
#
|
|
14
14
|
# @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
15
15
|
#
|
|
16
|
-
# @return [XTwitterScraper::Models::X::AccountConnectionAttemptRetrieveResponse::
|
|
16
|
+
# @return [XTwitterScraper::Models::X::AccountConnectionAttemptRetrieveResponse::Pending, XTwitterScraper::Models::X::AccountConnectionAttemptRetrieveResponse::Success, XTwitterScraper::Models::X::AccountConnectionAttemptRetrieveResponse::Failed, XTwitterScraper::Models::X::AccountConnectionAttemptRetrieveResponse::RequiresEmailCode]
|
|
17
17
|
#
|
|
18
18
|
# @see XTwitterScraper::Models::X::AccountConnectionAttemptRetrieveParams
|
|
19
19
|
def retrieve(id, params = {})
|
|
@@ -23,7 +23,7 @@ module XTwitterScraper
|
|
|
23
23
|
#
|
|
24
24
|
# @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
25
25
|
#
|
|
26
|
-
# @return [
|
|
26
|
+
# @return [XTwitterScraper::Models::X::AccountCreateResponse::SanitizedXAccount, XTwitterScraper::Models::X::AccountCreateResponse::XAccountConnectionAttemptPending, XTwitterScraper::Models::X::AccountCreateResponse::XAccountConnectionChallenge]
|
|
27
27
|
#
|
|
28
28
|
# @see XTwitterScraper::Models::X::AccountCreateParams
|
|
29
29
|
def create(params)
|
|
@@ -32,7 +32,7 @@ module XTwitterScraper
|
|
|
32
32
|
method: :post,
|
|
33
33
|
path: "x/accounts",
|
|
34
34
|
body: parsed,
|
|
35
|
-
model: XTwitterScraper::
|
|
35
|
+
model: XTwitterScraper::Models::X::AccountCreateResponse,
|
|
36
36
|
options: options
|
|
37
37
|
)
|
|
38
38
|
end
|
|
@@ -23,7 +23,7 @@ module XTwitterScraper
|
|
|
23
23
|
#
|
|
24
24
|
# @param cursor [String] Pagination cursor for community results
|
|
25
25
|
#
|
|
26
|
-
# @param page_size [Integer] Maximum items
|
|
26
|
+
# @param page_size [Integer] Maximum page items (1-100, default 20). Source, filters, or credits can reduce r
|
|
27
27
|
#
|
|
28
28
|
# @param query_type [Symbol, XTwitterScraper::Models::X::Communities::TweetListParams::QueryType] Sort order for community results (Latest or Top)
|
|
29
29
|
#
|
|
@@ -60,7 +60,7 @@ module XTwitterScraper
|
|
|
60
60
|
#
|
|
61
61
|
# @param cursor [String] Pagination cursor for community tweets
|
|
62
62
|
#
|
|
63
|
-
# @param page_size [Integer] Maximum items
|
|
63
|
+
# @param page_size [Integer] Maximum page items (1-100, default 20). Source, filters, or credits can reduce r
|
|
64
64
|
#
|
|
65
65
|
# @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
66
66
|
#
|
|
@@ -170,7 +170,7 @@ module XTwitterScraper
|
|
|
170
170
|
#
|
|
171
171
|
# @param cursor [String] Pagination cursor for community search
|
|
172
172
|
#
|
|
173
|
-
# @param page_size [Integer] Maximum items
|
|
173
|
+
# @param page_size [Integer] Maximum page items (1-100, default 20). The source, filters, or credits can reduce results.
|
|
174
174
|
#
|
|
175
175
|
# @param query_type [Symbol, XTwitterScraper::Models::X::CommunityRetrieveSearchParams::QueryType] Sort order (Latest or Top)
|
|
176
176
|
#
|
|
@@ -79,7 +79,7 @@ module XTwitterScraper
|
|
|
79
79
|
#
|
|
80
80
|
# @param include_replies [Boolean] Include replies (default false)
|
|
81
81
|
#
|
|
82
|
-
# @param page_size [Integer] Maximum items
|
|
82
|
+
# @param page_size [Integer] Maximum page items (1-100, default 20). Source, filters, or credits can reduce r
|
|
83
83
|
#
|
|
84
84
|
# @param since_time [String] Unix timestamp - filter after
|
|
85
85
|
#
|