x-twitter-scraper 0.7.2 → 0.9.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 +24 -0
- data/README.md +3 -3
- data/lib/x_twitter_scraper/models/credit_topup_balance_response.rb +5 -5
- data/lib/x_twitter_scraper/models/draw_export_params.rb +8 -3
- data/lib/x_twitter_scraper/models/draw_list_params.rb +2 -2
- data/lib/x_twitter_scraper/models/error.rb +8 -0
- data/lib/x_twitter_scraper/models/event_list_params.rb +13 -5
- data/lib/x_twitter_scraper/models/extraction_estimate_cost_params.rb +731 -82
- data/lib/x_twitter_scraper/models/extraction_estimate_cost_response.rb +1 -0
- data/lib/x_twitter_scraper/models/extraction_export_results_params.rb +145 -1
- data/lib/x_twitter_scraper/models/extraction_list_params.rb +2 -2
- data/lib/x_twitter_scraper/models/extraction_retrieve_params.rb +70 -3
- data/lib/x_twitter_scraper/models/extraction_run_params.rb +662 -1
- data/lib/x_twitter_scraper/models/extraction_run_response.rb +27 -48
- data/lib/x_twitter_scraper/models/guest_wallet_create_response.rb +8 -8
- data/lib/x_twitter_scraper/models/guest_wallet_topup_response.rb +9 -9
- data/lib/x_twitter_scraper/models/monitor.rb +29 -1
- data/lib/x_twitter_scraper/models/paginated_tweets.rb +4 -4
- data/lib/x_twitter_scraper/models/paginated_users.rb +5 -5
- data/lib/x_twitter_scraper/models/support/attachment_download_params.rb +28 -0
- data/lib/x_twitter_scraper/models/x/community_retrieve_members_params.rb +113 -1
- data/lib/x_twitter_scraper/models/x/community_retrieve_moderators_params.rb +117 -1
- data/lib/x_twitter_scraper/models/x/list_retrieve_followers_params.rb +117 -6
- data/lib/x_twitter_scraper/models/x/list_retrieve_members_params.rb +116 -1
- data/lib/x_twitter_scraper/models/x/tweet_get_favoriters_params.rb +117 -6
- data/lib/x_twitter_scraper/models/x/tweet_get_quotes_params.rb +153 -1
- data/lib/x_twitter_scraper/models/x/tweet_get_replies_params.rb +246 -16
- data/lib/x_twitter_scraper/models/x/tweet_get_replies_response.rb +3 -2
- data/lib/x_twitter_scraper/models/x/tweet_get_retweeters_params.rb +117 -6
- data/lib/x_twitter_scraper/models/x/tweet_search_params.rb +187 -14
- data/lib/x_twitter_scraper/models/x/tweet_search_response.rb +299 -0
- data/lib/x_twitter_scraper/models/x/user_retrieve_followers_params.rb +143 -10
- data/lib/x_twitter_scraper/models/x/user_retrieve_followers_response.rb +241 -0
- data/lib/x_twitter_scraper/models/x/user_retrieve_followers_you_know_params.rb +117 -6
- data/lib/x_twitter_scraper/models/x/user_retrieve_following_params.rb +143 -10
- data/lib/x_twitter_scraper/models/x/user_retrieve_following_response.rb +241 -0
- data/lib/x_twitter_scraper/models/x/user_retrieve_likes_params.rb +153 -1
- data/lib/x_twitter_scraper/models/x/user_retrieve_media_params.rb +153 -1
- data/lib/x_twitter_scraper/models/x/user_retrieve_mentions_params.rb +153 -1
- data/lib/x_twitter_scraper/models/x/user_retrieve_replies_params.rb +159 -7
- data/lib/x_twitter_scraper/models/x/user_retrieve_search_params.rb +116 -1
- data/lib/x_twitter_scraper/models/x/user_retrieve_tweets_params.rb +159 -7
- data/lib/x_twitter_scraper/models/x/user_retrieve_verified_followers_params.rb +157 -8
- data/lib/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rb +245 -0
- data/lib/x_twitter_scraper/models/x/x_account.rb +7 -11
- data/lib/x_twitter_scraper/resources/credits.rb +2 -2
- data/lib/x_twitter_scraper/resources/draws.rb +5 -2
- data/lib/x_twitter_scraper/resources/events.rb +10 -4
- data/lib/x_twitter_scraper/resources/extractions.rb +383 -84
- data/lib/x_twitter_scraper/resources/guest_wallets.rb +9 -13
- data/lib/x_twitter_scraper/resources/support/attachments.rb +42 -0
- data/lib/x_twitter_scraper/resources/support.rb +5 -0
- data/lib/x_twitter_scraper/resources/x/communities.rb +95 -4
- data/lib/x_twitter_scraper/resources/x/lists.rb +96 -5
- data/lib/x_twitter_scraper/resources/x/tweets.rb +286 -28
- data/lib/x_twitter_scraper/resources/x/users.rb +531 -41
- data/lib/x_twitter_scraper/version.rb +1 -1
- data/lib/x_twitter_scraper.rb +7 -1
- data/rbi/x_twitter_scraper/models/credit_topup_balance_response.rbi +6 -6
- data/rbi/x_twitter_scraper/models/draw_export_params.rbi +6 -3
- data/rbi/x_twitter_scraper/models/draw_list_params.rbi +2 -2
- data/rbi/x_twitter_scraper/models/error.rbi +40 -0
- data/rbi/x_twitter_scraper/models/event_list_params.rbi +15 -4
- data/rbi/x_twitter_scraper/models/extraction_estimate_cost_params.rbi +1338 -86
- data/rbi/x_twitter_scraper/models/extraction_estimate_cost_response.rbi +5 -0
- data/rbi/x_twitter_scraper/models/extraction_export_results_params.rbi +198 -0
- data/rbi/x_twitter_scraper/models/extraction_list_params.rbi +2 -2
- data/rbi/x_twitter_scraper/models/extraction_retrieve_params.rbi +194 -2
- data/rbi/x_twitter_scraper/models/extraction_run_params.rbi +1221 -0
- data/rbi/x_twitter_scraper/models/extraction_run_response.rbi +35 -162
- data/rbi/x_twitter_scraper/models/guest_wallet_create_response.rbi +8 -6
- data/rbi/x_twitter_scraper/models/guest_wallet_topup_response.rbi +9 -7
- data/rbi/x_twitter_scraper/models/monitor.rbi +54 -3
- data/rbi/x_twitter_scraper/models/paginated_tweets.rbi +4 -4
- data/rbi/x_twitter_scraper/models/paginated_users.rbi +5 -5
- data/rbi/x_twitter_scraper/models/support/attachment_download_params.rbi +51 -0
- data/rbi/x_twitter_scraper/models/x/community_retrieve_members_params.rbi +154 -0
- data/rbi/x_twitter_scraper/models/x/community_retrieve_moderators_params.rbi +154 -0
- data/rbi/x_twitter_scraper/models/x/list_retrieve_followers_params.rbi +160 -8
- data/rbi/x_twitter_scraper/models/x/list_retrieve_members_params.rbi +154 -0
- data/rbi/x_twitter_scraper/models/x/tweet_get_favoriters_params.rbi +160 -8
- data/rbi/x_twitter_scraper/models/x/tweet_get_quotes_params.rbi +209 -0
- data/rbi/x_twitter_scraper/models/x/tweet_get_replies_params.rbi +403 -20
- data/rbi/x_twitter_scraper/models/x/tweet_get_replies_response.rbi +3 -2
- data/rbi/x_twitter_scraper/models/x/tweet_get_retweeters_params.rbi +160 -8
- data/rbi/x_twitter_scraper/models/x/tweet_search_params.rbi +279 -16
- data/rbi/x_twitter_scraper/models/x/tweet_search_response.rbi +543 -0
- data/rbi/x_twitter_scraper/models/x/user_retrieve_followers_params.rbi +228 -12
- data/rbi/x_twitter_scraper/models/x/user_retrieve_followers_response.rbi +440 -0
- data/rbi/x_twitter_scraper/models/x/user_retrieve_followers_you_know_params.rbi +160 -8
- data/rbi/x_twitter_scraper/models/x/user_retrieve_following_params.rbi +228 -12
- data/rbi/x_twitter_scraper/models/x/user_retrieve_following_response.rbi +440 -0
- data/rbi/x_twitter_scraper/models/x/user_retrieve_likes_params.rbi +209 -0
- data/rbi/x_twitter_scraper/models/x/user_retrieve_media_params.rbi +209 -0
- data/rbi/x_twitter_scraper/models/x/user_retrieve_mentions_params.rbi +209 -0
- data/rbi/x_twitter_scraper/models/x/user_retrieve_replies_params.rbi +217 -8
- data/rbi/x_twitter_scraper/models/x/user_retrieve_search_params.rbi +154 -0
- data/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_params.rbi +217 -8
- data/rbi/x_twitter_scraper/models/x/user_retrieve_verified_followers_params.rbi +248 -10
- data/rbi/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rbi +440 -0
- data/rbi/x_twitter_scraper/models/x/x_account.rbi +9 -15
- data/rbi/x_twitter_scraper/resources/credits.rbi +2 -2
- data/rbi/x_twitter_scraper/resources/draws.rbi +3 -2
- data/rbi/x_twitter_scraper/resources/events.rbi +5 -2
- data/rbi/x_twitter_scraper/resources/extractions.rbi +525 -83
- data/rbi/x_twitter_scraper/resources/guest_wallets.rbi +9 -13
- data/rbi/x_twitter_scraper/resources/support/attachments.rbi +35 -0
- data/rbi/x_twitter_scraper/resources/support.rbi +4 -0
- data/rbi/x_twitter_scraper/resources/x/communities.rbi +84 -0
- data/rbi/x_twitter_scraper/resources/x/lists.rbi +87 -4
- data/rbi/x_twitter_scraper/resources/x/tweets.rbi +307 -31
- data/rbi/x_twitter_scraper/resources/x/users.rbi +558 -34
- data/sig/x_twitter_scraper/models/error.rbs +16 -0
- data/sig/x_twitter_scraper/models/event_list_params.rbs +7 -0
- data/sig/x_twitter_scraper/models/extraction_estimate_cost_params.rbs +605 -1
- data/sig/x_twitter_scraper/models/extraction_estimate_cost_response.rbs +2 -0
- data/sig/x_twitter_scraper/models/extraction_export_results_params.rbs +127 -1
- data/sig/x_twitter_scraper/models/extraction_retrieve_params.rbs +74 -1
- data/sig/x_twitter_scraper/models/extraction_run_params.rbs +611 -1
- data/sig/x_twitter_scraper/models/extraction_run_response.rbs +29 -67
- data/sig/x_twitter_scraper/models/guest_wallet_create_response.rbs +4 -4
- data/sig/x_twitter_scraper/models/guest_wallet_topup_response.rbs +4 -4
- data/sig/x_twitter_scraper/models/monitor.rbs +29 -3
- data/sig/x_twitter_scraper/models/support/attachment_download_params.rbs +32 -0
- data/sig/x_twitter_scraper/models/x/community_retrieve_members_params.rbs +103 -1
- data/sig/x_twitter_scraper/models/x/community_retrieve_moderators_params.rbs +102 -1
- data/sig/x_twitter_scraper/models/x/list_retrieve_followers_params.rbs +103 -1
- data/sig/x_twitter_scraper/models/x/list_retrieve_members_params.rbs +103 -1
- data/sig/x_twitter_scraper/models/x/tweet_get_favoriters_params.rbs +103 -1
- data/sig/x_twitter_scraper/models/x/tweet_get_quotes_params.rbs +134 -1
- data/sig/x_twitter_scraper/models/x/tweet_get_replies_params.rbs +207 -2
- data/sig/x_twitter_scraper/models/x/tweet_get_retweeters_params.rbs +103 -1
- data/sig/x_twitter_scraper/models/x/tweet_search_params.rbs +154 -1
- data/sig/x_twitter_scraper/models/x/tweet_search_response.rbs +258 -0
- data/sig/x_twitter_scraper/models/x/user_retrieve_followers_params.rbs +119 -1
- data/sig/x_twitter_scraper/models/x/user_retrieve_followers_response.rbs +216 -0
- data/sig/x_twitter_scraper/models/x/user_retrieve_followers_you_know_params.rbs +103 -1
- data/sig/x_twitter_scraper/models/x/user_retrieve_following_params.rbs +119 -1
- data/sig/x_twitter_scraper/models/x/user_retrieve_following_response.rbs +216 -0
- data/sig/x_twitter_scraper/models/x/user_retrieve_likes_params.rbs +134 -1
- data/sig/x_twitter_scraper/models/x/user_retrieve_media_params.rbs +134 -1
- data/sig/x_twitter_scraper/models/x/user_retrieve_mentions_params.rbs +134 -1
- data/sig/x_twitter_scraper/models/x/user_retrieve_replies_params.rbs +134 -1
- data/sig/x_twitter_scraper/models/x/user_retrieve_search_params.rbs +102 -1
- data/sig/x_twitter_scraper/models/x/user_retrieve_tweets_params.rbs +134 -1
- data/sig/x_twitter_scraper/models/x/user_retrieve_verified_followers_params.rbs +137 -1
- data/sig/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rbs +216 -0
- data/sig/x_twitter_scraper/resources/events.rbs +1 -0
- data/sig/x_twitter_scraper/resources/extractions.rbs +137 -0
- data/sig/x_twitter_scraper/resources/support/attachments.rbs +15 -0
- data/sig/x_twitter_scraper/resources/support.rbs +2 -0
- data/sig/x_twitter_scraper/resources/x/communities.rbs +28 -0
- data/sig/x_twitter_scraper/resources/x/lists.rbs +28 -0
- data/sig/x_twitter_scraper/resources/x/tweets.rbs +93 -1
- data/sig/x_twitter_scraper/resources/x/users.rbs +173 -3
- metadata +19 -1
|
@@ -19,7 +19,7 @@ module XTwitterScraper
|
|
|
19
19
|
)
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
-
#
|
|
22
|
+
# Query, Tweet ID, or status URL. Valid inline bounds apply per page.
|
|
23
23
|
sig { returns(String) }
|
|
24
24
|
attr_accessor :q
|
|
25
25
|
|
|
@@ -38,6 +38,13 @@ module XTwitterScraper
|
|
|
38
38
|
sig { params(any_words: String).void }
|
|
39
39
|
attr_writer :any_words
|
|
40
40
|
|
|
41
|
+
# Only return tweets from Blue-verified authors.
|
|
42
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
43
|
+
attr_reader :blue_verified_only
|
|
44
|
+
|
|
45
|
+
sig { params(blue_verified_only: T::Boolean).void }
|
|
46
|
+
attr_writer :blue_verified_only
|
|
47
|
+
|
|
41
48
|
# Geo bounding box, e.g. -74.1 40.6 -73.9 40.8.
|
|
42
49
|
sig { returns(T.nilable(String)) }
|
|
43
50
|
attr_reader :bounding_box
|
|
@@ -45,6 +52,13 @@ module XTwitterScraper
|
|
|
45
52
|
sig { params(bounding_box: String).void }
|
|
46
53
|
attr_writer :bounding_box
|
|
47
54
|
|
|
55
|
+
# Match the Tweet card name.
|
|
56
|
+
sig { returns(T.nilable(String)) }
|
|
57
|
+
attr_reader :card_name
|
|
58
|
+
|
|
59
|
+
sig { params(card_name: String).void }
|
|
60
|
+
attr_writer :card_name
|
|
61
|
+
|
|
48
62
|
# Cashtags separated by spaces, commas, or lines.
|
|
49
63
|
sig { returns(T.nilable(String)) }
|
|
50
64
|
attr_reader :cashtags
|
|
@@ -59,7 +73,8 @@ module XTwitterScraper
|
|
|
59
73
|
sig { params(conversation_id: String).void }
|
|
60
74
|
attr_writer :conversation_id
|
|
61
75
|
|
|
62
|
-
#
|
|
76
|
+
# Cursor from the previous response. Xquik cursors resume automatic coverage.
|
|
77
|
+
# Existing unprefixed cursors keep legacy standard behavior.
|
|
63
78
|
sig { returns(T.nilable(String)) }
|
|
64
79
|
attr_reader :cursor
|
|
65
80
|
|
|
@@ -73,6 +88,13 @@ module XTwitterScraper
|
|
|
73
88
|
sig { params(exact_phrase: String).void }
|
|
74
89
|
attr_writer :exact_phrase
|
|
75
90
|
|
|
91
|
+
# Exclude a source application.
|
|
92
|
+
sig { returns(T.nilable(String)) }
|
|
93
|
+
attr_reader :exclude_source
|
|
94
|
+
|
|
95
|
+
sig { params(exclude_source: String).void }
|
|
96
|
+
attr_writer :exclude_source
|
|
97
|
+
|
|
76
98
|
# Words or quoted phrases to exclude. Separate with spaces, commas, or lines.
|
|
77
99
|
sig { returns(T.nilable(String)) }
|
|
78
100
|
attr_reader :exclude_words
|
|
@@ -87,6 +109,13 @@ module XTwitterScraper
|
|
|
87
109
|
sig { params(from_user: String).void }
|
|
88
110
|
attr_writer :from_user
|
|
89
111
|
|
|
112
|
+
# Match latitude, longitude, and radius.
|
|
113
|
+
sig { returns(T.nilable(String)) }
|
|
114
|
+
attr_reader :geocode
|
|
115
|
+
|
|
116
|
+
sig { params(geocode: String).void }
|
|
117
|
+
attr_writer :geocode
|
|
118
|
+
|
|
90
119
|
# Hashtags separated by spaces, commas, or lines.
|
|
91
120
|
sig { returns(T.nilable(String)) }
|
|
92
121
|
attr_reader :hashtags
|
|
@@ -108,10 +137,9 @@ module XTwitterScraper
|
|
|
108
137
|
sig { params(language: String).void }
|
|
109
138
|
attr_writer :language
|
|
110
139
|
|
|
111
|
-
#
|
|
112
|
-
#
|
|
113
|
-
# reduce
|
|
114
|
-
# insufficient_credits.
|
|
140
|
+
# Result upper bound. Omit it for the existing 20-row page size. Explicit coverage
|
|
141
|
+
# defaults to 2000 and allows 10000. For paid requests, remaining credits can
|
|
142
|
+
# reduce results. Zero affordable results returns 402.
|
|
115
143
|
sig { returns(T.nilable(Integer)) }
|
|
116
144
|
attr_reader :limit
|
|
117
145
|
|
|
@@ -125,6 +153,41 @@ module XTwitterScraper
|
|
|
125
153
|
sig { params(list_id: String).void }
|
|
126
154
|
attr_writer :list_id
|
|
127
155
|
|
|
156
|
+
# Maximum likes threshold. maxLikes is also accepted.
|
|
157
|
+
sig { returns(T.nilable(Integer)) }
|
|
158
|
+
attr_reader :max_faves
|
|
159
|
+
|
|
160
|
+
sig { params(max_faves: Integer).void }
|
|
161
|
+
attr_writer :max_faves
|
|
162
|
+
|
|
163
|
+
# Return Tweets older than this Tweet ID.
|
|
164
|
+
sig { returns(T.nilable(String)) }
|
|
165
|
+
attr_reader :max_id
|
|
166
|
+
|
|
167
|
+
sig { params(max_id: String).void }
|
|
168
|
+
attr_writer :max_id
|
|
169
|
+
|
|
170
|
+
# Maximum quotes threshold.
|
|
171
|
+
sig { returns(T.nilable(Integer)) }
|
|
172
|
+
attr_reader :max_quotes
|
|
173
|
+
|
|
174
|
+
sig { params(max_quotes: Integer).void }
|
|
175
|
+
attr_writer :max_quotes
|
|
176
|
+
|
|
177
|
+
# Maximum replies threshold.
|
|
178
|
+
sig { returns(T.nilable(Integer)) }
|
|
179
|
+
attr_reader :max_replies
|
|
180
|
+
|
|
181
|
+
sig { params(max_replies: Integer).void }
|
|
182
|
+
attr_writer :max_replies
|
|
183
|
+
|
|
184
|
+
# Maximum retweets threshold.
|
|
185
|
+
sig { returns(T.nilable(Integer)) }
|
|
186
|
+
attr_reader :max_retweets
|
|
187
|
+
|
|
188
|
+
sig { params(max_retweets: Integer).void }
|
|
189
|
+
attr_writer :max_retweets
|
|
190
|
+
|
|
128
191
|
# Filter by media type.
|
|
129
192
|
sig do
|
|
130
193
|
returns(
|
|
@@ -150,6 +213,13 @@ module XTwitterScraper
|
|
|
150
213
|
sig { params(mentioning: String).void }
|
|
151
214
|
attr_writer :mentioning
|
|
152
215
|
|
|
216
|
+
# Minimum bookmark count threshold.
|
|
217
|
+
sig { returns(T.nilable(Integer)) }
|
|
218
|
+
attr_reader :min_bookmarks
|
|
219
|
+
|
|
220
|
+
sig { params(min_bookmarks: Integer).void }
|
|
221
|
+
attr_writer :min_bookmarks
|
|
222
|
+
|
|
153
223
|
# Minimum likes threshold.
|
|
154
224
|
sig { returns(T.nilable(Integer)) }
|
|
155
225
|
attr_reader :min_faves
|
|
@@ -178,6 +248,50 @@ module XTwitterScraper
|
|
|
178
248
|
sig { params(min_retweets: Integer).void }
|
|
179
249
|
attr_writer :min_retweets
|
|
180
250
|
|
|
251
|
+
# Minimum view count threshold.
|
|
252
|
+
sig { returns(T.nilable(Integer)) }
|
|
253
|
+
attr_reader :min_views
|
|
254
|
+
|
|
255
|
+
sig { params(min_views: Integer).void }
|
|
256
|
+
attr_writer :min_views
|
|
257
|
+
|
|
258
|
+
# Omit mode for resumable maximum coverage. Standard keeps legacy pagination.
|
|
259
|
+
# Coverage returns diagnostics once and rejects cursors.
|
|
260
|
+
sig do
|
|
261
|
+
returns(
|
|
262
|
+
T.nilable(XTwitterScraper::X::TweetSearchParams::Mode::OrSymbol)
|
|
263
|
+
)
|
|
264
|
+
end
|
|
265
|
+
attr_reader :mode
|
|
266
|
+
|
|
267
|
+
sig do
|
|
268
|
+
params(
|
|
269
|
+
mode: XTwitterScraper::X::TweetSearchParams::Mode::OrSymbol
|
|
270
|
+
).void
|
|
271
|
+
end
|
|
272
|
+
attr_writer :mode
|
|
273
|
+
|
|
274
|
+
# Only return native reposts.
|
|
275
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
276
|
+
attr_reader :native_retweets
|
|
277
|
+
|
|
278
|
+
sig { params(native_retweets: T::Boolean).void }
|
|
279
|
+
attr_writer :native_retweets
|
|
280
|
+
|
|
281
|
+
# Match a place name.
|
|
282
|
+
sig { returns(T.nilable(String)) }
|
|
283
|
+
attr_reader :near
|
|
284
|
+
|
|
285
|
+
sig { params(near: String).void }
|
|
286
|
+
attr_writer :near
|
|
287
|
+
|
|
288
|
+
# Only return news results.
|
|
289
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
290
|
+
attr_reader :news
|
|
291
|
+
|
|
292
|
+
sig { params(news: T::Boolean).void }
|
|
293
|
+
attr_writer :news
|
|
294
|
+
|
|
181
295
|
# Search within a place ID.
|
|
182
296
|
sig { returns(T.nilable(String)) }
|
|
183
297
|
attr_reader :place
|
|
@@ -276,6 +390,13 @@ module XTwitterScraper
|
|
|
276
390
|
sig { params(retweets_of_tweet_id: String).void }
|
|
277
391
|
attr_writer :retweets_of_tweet_id
|
|
278
392
|
|
|
393
|
+
# Enable the safe-search filter.
|
|
394
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
395
|
+
attr_reader :safe
|
|
396
|
+
|
|
397
|
+
sig { params(safe: T::Boolean).void }
|
|
398
|
+
attr_writer :safe
|
|
399
|
+
|
|
279
400
|
# Start date in YYYY-MM-DD format.
|
|
280
401
|
sig { returns(T.nilable(Date)) }
|
|
281
402
|
attr_reader :since_date
|
|
@@ -283,13 +404,27 @@ module XTwitterScraper
|
|
|
283
404
|
sig { params(since_date: Date).void }
|
|
284
405
|
attr_writer :since_date
|
|
285
406
|
|
|
286
|
-
#
|
|
407
|
+
# Return Tweets newer than this Tweet ID.
|
|
408
|
+
sig { returns(T.nilable(String)) }
|
|
409
|
+
attr_reader :since_id
|
|
410
|
+
|
|
411
|
+
sig { params(since_id: String).void }
|
|
412
|
+
attr_writer :since_id
|
|
413
|
+
|
|
414
|
+
# Inclusive ISO bound.
|
|
287
415
|
sig { returns(T.nilable(String)) }
|
|
288
416
|
attr_reader :since_time
|
|
289
417
|
|
|
290
418
|
sig { params(since_time: String).void }
|
|
291
419
|
attr_writer :since_time
|
|
292
420
|
|
|
421
|
+
# Match the source application.
|
|
422
|
+
sig { returns(T.nilable(String)) }
|
|
423
|
+
attr_reader :source
|
|
424
|
+
|
|
425
|
+
sig { params(source: String).void }
|
|
426
|
+
attr_writer :source
|
|
427
|
+
|
|
293
428
|
# Filter replies sent to a username.
|
|
294
429
|
sig { returns(T.nilable(String)) }
|
|
295
430
|
attr_reader :to_user
|
|
@@ -304,7 +439,7 @@ module XTwitterScraper
|
|
|
304
439
|
sig { params(until_date: Date).void }
|
|
305
440
|
attr_writer :until_date
|
|
306
441
|
|
|
307
|
-
# ISO
|
|
442
|
+
# Exclusive ISO bound.
|
|
308
443
|
sig { returns(T.nilable(String)) }
|
|
309
444
|
attr_reader :until_time
|
|
310
445
|
|
|
@@ -325,30 +460,59 @@ module XTwitterScraper
|
|
|
325
460
|
sig { params(verified_only: T::Boolean).void }
|
|
326
461
|
attr_writer :verified_only
|
|
327
462
|
|
|
463
|
+
# Set the radius for the near filter.
|
|
464
|
+
sig { returns(T.nilable(String)) }
|
|
465
|
+
attr_reader :within
|
|
466
|
+
|
|
467
|
+
sig { params(within: String).void }
|
|
468
|
+
attr_writer :within
|
|
469
|
+
|
|
470
|
+
# Match Tweets inside a recent time window.
|
|
471
|
+
sig { returns(T.nilable(String)) }
|
|
472
|
+
attr_reader :within_time
|
|
473
|
+
|
|
474
|
+
sig { params(within_time: String).void }
|
|
475
|
+
attr_writer :within_time
|
|
476
|
+
|
|
328
477
|
sig do
|
|
329
478
|
params(
|
|
330
479
|
q: String,
|
|
331
480
|
advanced_query: String,
|
|
332
481
|
any_words: String,
|
|
482
|
+
blue_verified_only: T::Boolean,
|
|
333
483
|
bounding_box: String,
|
|
484
|
+
card_name: String,
|
|
334
485
|
cashtags: String,
|
|
335
486
|
conversation_id: String,
|
|
336
487
|
cursor: String,
|
|
337
488
|
exact_phrase: String,
|
|
489
|
+
exclude_source: String,
|
|
338
490
|
exclude_words: String,
|
|
339
491
|
from_user: String,
|
|
492
|
+
geocode: String,
|
|
340
493
|
hashtags: String,
|
|
341
494
|
in_reply_to_tweet_id: String,
|
|
342
495
|
language: String,
|
|
343
496
|
limit: Integer,
|
|
344
497
|
list_id: String,
|
|
498
|
+
max_faves: Integer,
|
|
499
|
+
max_id: String,
|
|
500
|
+
max_quotes: Integer,
|
|
501
|
+
max_replies: Integer,
|
|
502
|
+
max_retweets: Integer,
|
|
345
503
|
media_type:
|
|
346
504
|
XTwitterScraper::X::TweetSearchParams::MediaType::OrSymbol,
|
|
347
505
|
mentioning: String,
|
|
506
|
+
min_bookmarks: Integer,
|
|
348
507
|
min_faves: Integer,
|
|
349
508
|
min_quotes: Integer,
|
|
350
509
|
min_replies: Integer,
|
|
351
510
|
min_retweets: Integer,
|
|
511
|
+
min_views: Integer,
|
|
512
|
+
mode: XTwitterScraper::X::TweetSearchParams::Mode::OrSymbol,
|
|
513
|
+
native_retweets: T::Boolean,
|
|
514
|
+
near: String,
|
|
515
|
+
news: T::Boolean,
|
|
352
516
|
place: String,
|
|
353
517
|
place_country: String,
|
|
354
518
|
point_radius: String,
|
|
@@ -359,55 +523,80 @@ module XTwitterScraper
|
|
|
359
523
|
replies: XTwitterScraper::X::TweetSearchParams::Replies::OrSymbol,
|
|
360
524
|
retweets: XTwitterScraper::X::TweetSearchParams::Retweets::OrSymbol,
|
|
361
525
|
retweets_of_tweet_id: String,
|
|
526
|
+
safe: T::Boolean,
|
|
362
527
|
since_date: Date,
|
|
528
|
+
since_id: String,
|
|
363
529
|
since_time: String,
|
|
530
|
+
source: String,
|
|
364
531
|
to_user: String,
|
|
365
532
|
until_date: Date,
|
|
366
533
|
until_time: String,
|
|
367
534
|
url: String,
|
|
368
535
|
verified_only: T::Boolean,
|
|
536
|
+
within: String,
|
|
537
|
+
within_time: String,
|
|
369
538
|
request_options: XTwitterScraper::RequestOptions::OrHash
|
|
370
539
|
).returns(T.attached_class)
|
|
371
540
|
end
|
|
372
541
|
def self.new(
|
|
373
|
-
#
|
|
542
|
+
# Query, Tweet ID, or status URL. Valid inline bounds apply per page.
|
|
374
543
|
q:,
|
|
375
544
|
# Raw advanced search query appended as-is.
|
|
376
545
|
advanced_query: nil,
|
|
377
546
|
# Words or quoted phrases where any one can match. Separate with spaces, commas,
|
|
378
547
|
# or lines.
|
|
379
548
|
any_words: nil,
|
|
549
|
+
# Only return tweets from Blue-verified authors.
|
|
550
|
+
blue_verified_only: nil,
|
|
380
551
|
# Geo bounding box, e.g. -74.1 40.6 -73.9 40.8.
|
|
381
552
|
bounding_box: nil,
|
|
553
|
+
# Match the Tweet card name.
|
|
554
|
+
card_name: nil,
|
|
382
555
|
# Cashtags separated by spaces, commas, or lines.
|
|
383
556
|
cashtags: nil,
|
|
384
557
|
# Conversation ID filter.
|
|
385
558
|
conversation_id: nil,
|
|
386
|
-
#
|
|
559
|
+
# Cursor from the previous response. Xquik cursors resume automatic coverage.
|
|
560
|
+
# Existing unprefixed cursors keep legacy standard behavior.
|
|
387
561
|
cursor: nil,
|
|
388
562
|
# Exact phrase to match.
|
|
389
563
|
exact_phrase: nil,
|
|
564
|
+
# Exclude a source application.
|
|
565
|
+
exclude_source: nil,
|
|
390
566
|
# Words or quoted phrases to exclude. Separate with spaces, commas, or lines.
|
|
391
567
|
exclude_words: nil,
|
|
392
568
|
# Filter by author username.
|
|
393
569
|
from_user: nil,
|
|
570
|
+
# Match latitude, longitude, and radius.
|
|
571
|
+
geocode: nil,
|
|
394
572
|
# Hashtags separated by spaces, commas, or lines.
|
|
395
573
|
hashtags: nil,
|
|
396
574
|
# Only replies to this tweet ID.
|
|
397
575
|
in_reply_to_tweet_id: nil,
|
|
398
576
|
# Language code filter, e.g. en or tr.
|
|
399
577
|
language: nil,
|
|
400
|
-
#
|
|
401
|
-
#
|
|
402
|
-
# reduce
|
|
403
|
-
# insufficient_credits.
|
|
578
|
+
# Result upper bound. Omit it for the existing 20-row page size. Explicit coverage
|
|
579
|
+
# defaults to 2000 and allows 10000. For paid requests, remaining credits can
|
|
580
|
+
# reduce results. Zero affordable results returns 402.
|
|
404
581
|
limit: nil,
|
|
405
582
|
# Search within a list ID.
|
|
406
583
|
list_id: nil,
|
|
584
|
+
# Maximum likes threshold. maxLikes is also accepted.
|
|
585
|
+
max_faves: nil,
|
|
586
|
+
# Return Tweets older than this Tweet ID.
|
|
587
|
+
max_id: nil,
|
|
588
|
+
# Maximum quotes threshold.
|
|
589
|
+
max_quotes: nil,
|
|
590
|
+
# Maximum replies threshold.
|
|
591
|
+
max_replies: nil,
|
|
592
|
+
# Maximum retweets threshold.
|
|
593
|
+
max_retweets: nil,
|
|
407
594
|
# Filter by media type.
|
|
408
595
|
media_type: nil,
|
|
409
596
|
# Filter tweets mentioning a username.
|
|
410
597
|
mentioning: nil,
|
|
598
|
+
# Minimum bookmark count threshold.
|
|
599
|
+
min_bookmarks: nil,
|
|
411
600
|
# Minimum likes threshold.
|
|
412
601
|
min_faves: nil,
|
|
413
602
|
# Minimum quote count threshold.
|
|
@@ -416,6 +605,17 @@ module XTwitterScraper
|
|
|
416
605
|
min_replies: nil,
|
|
417
606
|
# Minimum retweets threshold.
|
|
418
607
|
min_retweets: nil,
|
|
608
|
+
# Minimum view count threshold.
|
|
609
|
+
min_views: nil,
|
|
610
|
+
# Omit mode for resumable maximum coverage. Standard keeps legacy pagination.
|
|
611
|
+
# Coverage returns diagnostics once and rejects cursors.
|
|
612
|
+
mode: nil,
|
|
613
|
+
# Only return native reposts.
|
|
614
|
+
native_retweets: nil,
|
|
615
|
+
# Match a place name.
|
|
616
|
+
near: nil,
|
|
617
|
+
# Only return news results.
|
|
618
|
+
news: nil,
|
|
419
619
|
# Search within a place ID.
|
|
420
620
|
place: nil,
|
|
421
621
|
# Search within a country code.
|
|
@@ -434,20 +634,30 @@ module XTwitterScraper
|
|
|
434
634
|
retweets: nil,
|
|
435
635
|
# Only retweets of this tweet ID.
|
|
436
636
|
retweets_of_tweet_id: nil,
|
|
637
|
+
# Enable the safe-search filter.
|
|
638
|
+
safe: nil,
|
|
437
639
|
# Start date in YYYY-MM-DD format.
|
|
438
640
|
since_date: nil,
|
|
439
|
-
#
|
|
641
|
+
# Return Tweets newer than this Tweet ID.
|
|
642
|
+
since_id: nil,
|
|
643
|
+
# Inclusive ISO bound.
|
|
440
644
|
since_time: nil,
|
|
645
|
+
# Match the source application.
|
|
646
|
+
source: nil,
|
|
441
647
|
# Filter replies sent to a username.
|
|
442
648
|
to_user: nil,
|
|
443
649
|
# End date in YYYY-MM-DD format.
|
|
444
650
|
until_date: nil,
|
|
445
|
-
# ISO
|
|
651
|
+
# Exclusive ISO bound.
|
|
446
652
|
until_time: nil,
|
|
447
653
|
# URL substring or domain filter.
|
|
448
654
|
url: nil,
|
|
449
655
|
# Only return tweets from verified authors.
|
|
450
656
|
verified_only: nil,
|
|
657
|
+
# Set the radius for the near filter.
|
|
658
|
+
within: nil,
|
|
659
|
+
# Match Tweets inside a recent time window.
|
|
660
|
+
within_time: nil,
|
|
451
661
|
request_options: {}
|
|
452
662
|
)
|
|
453
663
|
end
|
|
@@ -458,25 +668,40 @@ module XTwitterScraper
|
|
|
458
668
|
q: String,
|
|
459
669
|
advanced_query: String,
|
|
460
670
|
any_words: String,
|
|
671
|
+
blue_verified_only: T::Boolean,
|
|
461
672
|
bounding_box: String,
|
|
673
|
+
card_name: String,
|
|
462
674
|
cashtags: String,
|
|
463
675
|
conversation_id: String,
|
|
464
676
|
cursor: String,
|
|
465
677
|
exact_phrase: String,
|
|
678
|
+
exclude_source: String,
|
|
466
679
|
exclude_words: String,
|
|
467
680
|
from_user: String,
|
|
681
|
+
geocode: String,
|
|
468
682
|
hashtags: String,
|
|
469
683
|
in_reply_to_tweet_id: String,
|
|
470
684
|
language: String,
|
|
471
685
|
limit: Integer,
|
|
472
686
|
list_id: String,
|
|
687
|
+
max_faves: Integer,
|
|
688
|
+
max_id: String,
|
|
689
|
+
max_quotes: Integer,
|
|
690
|
+
max_replies: Integer,
|
|
691
|
+
max_retweets: Integer,
|
|
473
692
|
media_type:
|
|
474
693
|
XTwitterScraper::X::TweetSearchParams::MediaType::OrSymbol,
|
|
475
694
|
mentioning: String,
|
|
695
|
+
min_bookmarks: Integer,
|
|
476
696
|
min_faves: Integer,
|
|
477
697
|
min_quotes: Integer,
|
|
478
698
|
min_replies: Integer,
|
|
479
699
|
min_retweets: Integer,
|
|
700
|
+
min_views: Integer,
|
|
701
|
+
mode: XTwitterScraper::X::TweetSearchParams::Mode::OrSymbol,
|
|
702
|
+
native_retweets: T::Boolean,
|
|
703
|
+
near: String,
|
|
704
|
+
news: T::Boolean,
|
|
480
705
|
place: String,
|
|
481
706
|
place_country: String,
|
|
482
707
|
point_radius: String,
|
|
@@ -488,13 +713,18 @@ module XTwitterScraper
|
|
|
488
713
|
retweets:
|
|
489
714
|
XTwitterScraper::X::TweetSearchParams::Retweets::OrSymbol,
|
|
490
715
|
retweets_of_tweet_id: String,
|
|
716
|
+
safe: T::Boolean,
|
|
491
717
|
since_date: Date,
|
|
718
|
+
since_id: String,
|
|
492
719
|
since_time: String,
|
|
720
|
+
source: String,
|
|
493
721
|
to_user: String,
|
|
494
722
|
until_date: Date,
|
|
495
723
|
until_time: String,
|
|
496
724
|
url: String,
|
|
497
725
|
verified_only: T::Boolean,
|
|
726
|
+
within: String,
|
|
727
|
+
within_time: String,
|
|
498
728
|
request_options: XTwitterScraper::RequestOptions
|
|
499
729
|
}
|
|
500
730
|
)
|
|
@@ -554,6 +784,39 @@ module XTwitterScraper
|
|
|
554
784
|
end
|
|
555
785
|
end
|
|
556
786
|
|
|
787
|
+
# Omit mode for resumable maximum coverage. Standard keeps legacy pagination.
|
|
788
|
+
# Coverage returns diagnostics once and rejects cursors.
|
|
789
|
+
module Mode
|
|
790
|
+
extend XTwitterScraper::Internal::Type::Enum
|
|
791
|
+
|
|
792
|
+
TaggedSymbol =
|
|
793
|
+
T.type_alias do
|
|
794
|
+
T.all(Symbol, XTwitterScraper::X::TweetSearchParams::Mode)
|
|
795
|
+
end
|
|
796
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
797
|
+
|
|
798
|
+
STANDARD =
|
|
799
|
+
T.let(
|
|
800
|
+
:standard,
|
|
801
|
+
XTwitterScraper::X::TweetSearchParams::Mode::TaggedSymbol
|
|
802
|
+
)
|
|
803
|
+
COVERAGE =
|
|
804
|
+
T.let(
|
|
805
|
+
:coverage,
|
|
806
|
+
XTwitterScraper::X::TweetSearchParams::Mode::TaggedSymbol
|
|
807
|
+
)
|
|
808
|
+
|
|
809
|
+
sig do
|
|
810
|
+
override.returns(
|
|
811
|
+
T::Array[
|
|
812
|
+
XTwitterScraper::X::TweetSearchParams::Mode::TaggedSymbol
|
|
813
|
+
]
|
|
814
|
+
)
|
|
815
|
+
end
|
|
816
|
+
def self.values
|
|
817
|
+
end
|
|
818
|
+
end
|
|
819
|
+
|
|
557
820
|
# Sort order - Latest (chronological) or Top (engagement-ranked)
|
|
558
821
|
module QueryType
|
|
559
822
|
extend XTwitterScraper::Internal::Type::Enum
|