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
|
@@ -30,6 +30,20 @@ module XTwitterScraper
|
|
|
30
30
|
sig { params(any_words: String).void }
|
|
31
31
|
attr_writer :any_words
|
|
32
32
|
|
|
33
|
+
# Only return tweets from Blue-verified authors.
|
|
34
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
35
|
+
attr_reader :blue_verified_only
|
|
36
|
+
|
|
37
|
+
sig { params(blue_verified_only: T::Boolean).void }
|
|
38
|
+
attr_writer :blue_verified_only
|
|
39
|
+
|
|
40
|
+
# Match the Tweet card name.
|
|
41
|
+
sig { returns(T.nilable(String)) }
|
|
42
|
+
attr_reader :card_name
|
|
43
|
+
|
|
44
|
+
sig { params(card_name: String).void }
|
|
45
|
+
attr_writer :card_name
|
|
46
|
+
|
|
33
47
|
# Cashtags separated by spaces, commas, or lines.
|
|
34
48
|
sig { returns(T.nilable(String)) }
|
|
35
49
|
attr_reader :cashtags
|
|
@@ -44,7 +58,8 @@ module XTwitterScraper
|
|
|
44
58
|
sig { params(conversation_id: String).void }
|
|
45
59
|
attr_writer :conversation_id
|
|
46
60
|
|
|
47
|
-
#
|
|
61
|
+
# Cursor from the previous response. Xquik cursors resume automatic coverage.
|
|
62
|
+
# Existing unprefixed cursors keep legacy standard behavior.
|
|
48
63
|
sig { returns(T.nilable(String)) }
|
|
49
64
|
attr_reader :cursor
|
|
50
65
|
|
|
@@ -58,6 +73,20 @@ module XTwitterScraper
|
|
|
58
73
|
sig { params(exact_phrase: String).void }
|
|
59
74
|
attr_writer :exact_phrase
|
|
60
75
|
|
|
76
|
+
# Exclude replies written by the source-post author.
|
|
77
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
78
|
+
attr_reader :exclude_original_author
|
|
79
|
+
|
|
80
|
+
sig { params(exclude_original_author: T::Boolean).void }
|
|
81
|
+
attr_writer :exclude_original_author
|
|
82
|
+
|
|
83
|
+
# Exclude a source application.
|
|
84
|
+
sig { returns(T.nilable(String)) }
|
|
85
|
+
attr_reader :exclude_source
|
|
86
|
+
|
|
87
|
+
sig { params(exclude_source: String).void }
|
|
88
|
+
attr_writer :exclude_source
|
|
89
|
+
|
|
61
90
|
# Words or quoted phrases to exclude. Separate with spaces, commas, or lines.
|
|
62
91
|
sig { returns(T.nilable(String)) }
|
|
63
92
|
attr_reader :exclude_words
|
|
@@ -72,6 +101,13 @@ module XTwitterScraper
|
|
|
72
101
|
sig { params(from_user: String).void }
|
|
73
102
|
attr_writer :from_user
|
|
74
103
|
|
|
104
|
+
# Match latitude, longitude, and radius.
|
|
105
|
+
sig { returns(T.nilable(String)) }
|
|
106
|
+
attr_reader :geocode
|
|
107
|
+
|
|
108
|
+
sig { params(geocode: String).void }
|
|
109
|
+
attr_writer :geocode
|
|
110
|
+
|
|
75
111
|
# Hashtags separated by spaces, commas, or lines.
|
|
76
112
|
sig { returns(T.nilable(String)) }
|
|
77
113
|
attr_reader :hashtags
|
|
@@ -79,6 +115,20 @@ module XTwitterScraper
|
|
|
79
115
|
sig { params(hashtags: String).void }
|
|
80
116
|
attr_writer :hashtags
|
|
81
117
|
|
|
118
|
+
# Only return replies containing media.
|
|
119
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
120
|
+
attr_reader :has_media_only
|
|
121
|
+
|
|
122
|
+
sig { params(has_media_only: T::Boolean).void }
|
|
123
|
+
attr_writer :has_media_only
|
|
124
|
+
|
|
125
|
+
# Include the source post and count it toward limit.
|
|
126
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
127
|
+
attr_reader :include_original_post
|
|
128
|
+
|
|
129
|
+
sig { params(include_original_post: T::Boolean).void }
|
|
130
|
+
attr_writer :include_original_post
|
|
131
|
+
|
|
82
132
|
# Only replies to this tweet ID.
|
|
83
133
|
sig { returns(T.nilable(String)) }
|
|
84
134
|
attr_reader :in_reply_to_tweet_id
|
|
@@ -93,15 +143,57 @@ module XTwitterScraper
|
|
|
93
143
|
sig { params(language: String).void }
|
|
94
144
|
attr_writer :language
|
|
95
145
|
|
|
96
|
-
# With mode=complete, maximum combined direct and nested reply rows (1-25000
|
|
97
|
-
#
|
|
98
|
-
#
|
|
146
|
+
# With mode=complete, maximum combined direct and nested reply rows (1-25000,
|
|
147
|
+
# default 25000). Automatic pages accept 1-300. Standard pages accept 1-100.
|
|
148
|
+
# Prefer pageSize outside complete mode.
|
|
99
149
|
sig { returns(T.nilable(Integer)) }
|
|
100
150
|
attr_reader :limit
|
|
101
151
|
|
|
102
152
|
sig { params(limit: Integer).void }
|
|
103
153
|
attr_writer :limit
|
|
104
154
|
|
|
155
|
+
# Maximum reply depth from the source post.
|
|
156
|
+
sig { returns(T.nilable(Integer)) }
|
|
157
|
+
attr_reader :max_depth
|
|
158
|
+
|
|
159
|
+
sig { params(max_depth: Integer).void }
|
|
160
|
+
attr_writer :max_depth
|
|
161
|
+
|
|
162
|
+
# Maximum likes threshold. maxLikes is also accepted.
|
|
163
|
+
sig { returns(T.nilable(Integer)) }
|
|
164
|
+
attr_reader :max_faves
|
|
165
|
+
|
|
166
|
+
sig { params(max_faves: Integer).void }
|
|
167
|
+
attr_writer :max_faves
|
|
168
|
+
|
|
169
|
+
# Return Tweets older than this Tweet ID.
|
|
170
|
+
sig { returns(T.nilable(String)) }
|
|
171
|
+
attr_reader :max_id
|
|
172
|
+
|
|
173
|
+
sig { params(max_id: String).void }
|
|
174
|
+
attr_writer :max_id
|
|
175
|
+
|
|
176
|
+
# Maximum quotes threshold.
|
|
177
|
+
sig { returns(T.nilable(Integer)) }
|
|
178
|
+
attr_reader :max_quotes
|
|
179
|
+
|
|
180
|
+
sig { params(max_quotes: Integer).void }
|
|
181
|
+
attr_writer :max_quotes
|
|
182
|
+
|
|
183
|
+
# Maximum replies threshold.
|
|
184
|
+
sig { returns(T.nilable(Integer)) }
|
|
185
|
+
attr_reader :max_replies
|
|
186
|
+
|
|
187
|
+
sig { params(max_replies: Integer).void }
|
|
188
|
+
attr_writer :max_replies
|
|
189
|
+
|
|
190
|
+
# Maximum retweets threshold.
|
|
191
|
+
sig { returns(T.nilable(Integer)) }
|
|
192
|
+
attr_reader :max_retweets
|
|
193
|
+
|
|
194
|
+
sig { params(max_retweets: Integer).void }
|
|
195
|
+
attr_writer :max_retweets
|
|
196
|
+
|
|
105
197
|
# Filter by media type.
|
|
106
198
|
sig do
|
|
107
199
|
returns(
|
|
@@ -127,6 +219,13 @@ module XTwitterScraper
|
|
|
127
219
|
sig { params(mentioning: String).void }
|
|
128
220
|
attr_writer :mentioning
|
|
129
221
|
|
|
222
|
+
# Minimum bookmark count threshold.
|
|
223
|
+
sig { returns(T.nilable(Integer)) }
|
|
224
|
+
attr_reader :min_bookmarks
|
|
225
|
+
|
|
226
|
+
sig { params(min_bookmarks: Integer).void }
|
|
227
|
+
attr_writer :min_bookmarks
|
|
228
|
+
|
|
130
229
|
# Minimum likes threshold.
|
|
131
230
|
sig { returns(T.nilable(Integer)) }
|
|
132
231
|
attr_reader :min_faves
|
|
@@ -155,8 +254,17 @@ module XTwitterScraper
|
|
|
155
254
|
sig { params(min_retweets: Integer).void }
|
|
156
255
|
attr_writer :min_retweets
|
|
157
256
|
|
|
158
|
-
#
|
|
159
|
-
|
|
257
|
+
# Minimum view count threshold.
|
|
258
|
+
sig { returns(T.nilable(Integer)) }
|
|
259
|
+
attr_reader :min_views
|
|
260
|
+
|
|
261
|
+
sig { params(min_views: Integer).void }
|
|
262
|
+
attr_writer :min_views
|
|
263
|
+
|
|
264
|
+
# Optional advanced override. Omit mode for automatic maximum direct reply
|
|
265
|
+
# coverage with pagination. Standard keeps legacy pagination. Complete returns
|
|
266
|
+
# direct and nested replies with diagnostics, scope, depth, sorting, and
|
|
267
|
+
# original-post controls.
|
|
160
268
|
sig do
|
|
161
269
|
returns(
|
|
162
270
|
T.nilable(XTwitterScraper::X::TweetGetRepliesParams::Mode::OrSymbol)
|
|
@@ -171,9 +279,29 @@ module XTwitterScraper
|
|
|
171
279
|
end
|
|
172
280
|
attr_writer :mode
|
|
173
281
|
|
|
174
|
-
#
|
|
175
|
-
|
|
176
|
-
|
|
282
|
+
# Only return native reposts.
|
|
283
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
284
|
+
attr_reader :native_retweets
|
|
285
|
+
|
|
286
|
+
sig { params(native_retweets: T::Boolean).void }
|
|
287
|
+
attr_writer :native_retweets
|
|
288
|
+
|
|
289
|
+
# Match a place name.
|
|
290
|
+
sig { returns(T.nilable(String)) }
|
|
291
|
+
attr_reader :near
|
|
292
|
+
|
|
293
|
+
sig { params(near: String).void }
|
|
294
|
+
attr_writer :near
|
|
295
|
+
|
|
296
|
+
# Only return news results.
|
|
297
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
298
|
+
attr_reader :news
|
|
299
|
+
|
|
300
|
+
sig { params(news: T::Boolean).void }
|
|
301
|
+
attr_writer :news
|
|
302
|
+
|
|
303
|
+
# Automatic pages accept 1-300 Tweets. Standard pages keep 1-100. Default 20.
|
|
304
|
+
# Continue while has_next_page is true. Deprecated aliases remain accepted.
|
|
177
305
|
sig { returns(T.nilable(Integer)) }
|
|
178
306
|
attr_reader :page_size
|
|
179
307
|
|
|
@@ -247,6 +375,30 @@ module XTwitterScraper
|
|
|
247
375
|
sig { params(retweets_of_tweet_id: String).void }
|
|
248
376
|
attr_writer :retweets_of_tweet_id
|
|
249
377
|
|
|
378
|
+
# Enable the safe-search filter.
|
|
379
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
380
|
+
attr_reader :safe
|
|
381
|
+
|
|
382
|
+
sig { params(safe: T::Boolean).void }
|
|
383
|
+
attr_writer :safe
|
|
384
|
+
|
|
385
|
+
# Select all replies, direct replies, or nested replies.
|
|
386
|
+
sig do
|
|
387
|
+
returns(
|
|
388
|
+
T.nilable(
|
|
389
|
+
XTwitterScraper::X::TweetGetRepliesParams::Scope::OrSymbol
|
|
390
|
+
)
|
|
391
|
+
)
|
|
392
|
+
end
|
|
393
|
+
attr_reader :scope
|
|
394
|
+
|
|
395
|
+
sig do
|
|
396
|
+
params(
|
|
397
|
+
scope: XTwitterScraper::X::TweetGetRepliesParams::Scope::OrSymbol
|
|
398
|
+
).void
|
|
399
|
+
end
|
|
400
|
+
attr_writer :scope
|
|
401
|
+
|
|
250
402
|
# Start date in YYYY-MM-DD format.
|
|
251
403
|
sig { returns(T.nilable(Date)) }
|
|
252
404
|
attr_reader :since_date
|
|
@@ -254,6 +406,13 @@ module XTwitterScraper
|
|
|
254
406
|
sig { params(since_date: Date).void }
|
|
255
407
|
attr_writer :since_date
|
|
256
408
|
|
|
409
|
+
# Return Tweets newer than this Tweet ID.
|
|
410
|
+
sig { returns(T.nilable(String)) }
|
|
411
|
+
attr_reader :since_id
|
|
412
|
+
|
|
413
|
+
sig { params(since_id: String).void }
|
|
414
|
+
attr_writer :since_id
|
|
415
|
+
|
|
257
416
|
# Unix timestamp - return replies posted after this time
|
|
258
417
|
sig { returns(T.nilable(String)) }
|
|
259
418
|
attr_reader :since_time
|
|
@@ -261,6 +420,28 @@ module XTwitterScraper
|
|
|
261
420
|
sig { params(since_time: String).void }
|
|
262
421
|
attr_writer :since_time
|
|
263
422
|
|
|
423
|
+
# Sort the selected replies before applying limit.
|
|
424
|
+
sig do
|
|
425
|
+
returns(
|
|
426
|
+
T.nilable(XTwitterScraper::X::TweetGetRepliesParams::Sort::OrSymbol)
|
|
427
|
+
)
|
|
428
|
+
end
|
|
429
|
+
attr_reader :sort
|
|
430
|
+
|
|
431
|
+
sig do
|
|
432
|
+
params(
|
|
433
|
+
sort: XTwitterScraper::X::TweetGetRepliesParams::Sort::OrSymbol
|
|
434
|
+
).void
|
|
435
|
+
end
|
|
436
|
+
attr_writer :sort
|
|
437
|
+
|
|
438
|
+
# Match the source application.
|
|
439
|
+
sig { returns(T.nilable(String)) }
|
|
440
|
+
attr_reader :source
|
|
441
|
+
|
|
442
|
+
sig { params(source: String).void }
|
|
443
|
+
attr_writer :source
|
|
444
|
+
|
|
264
445
|
# Filter replies sent to a username.
|
|
265
446
|
sig { returns(T.nilable(String)) }
|
|
266
447
|
attr_reader :to_user
|
|
@@ -296,28 +477,60 @@ module XTwitterScraper
|
|
|
296
477
|
sig { params(verified_only: T::Boolean).void }
|
|
297
478
|
attr_writer :verified_only
|
|
298
479
|
|
|
480
|
+
# Set the radius for the near filter.
|
|
481
|
+
sig { returns(T.nilable(String)) }
|
|
482
|
+
attr_reader :within
|
|
483
|
+
|
|
484
|
+
sig { params(within: String).void }
|
|
485
|
+
attr_writer :within
|
|
486
|
+
|
|
487
|
+
# Match Tweets inside a recent time window.
|
|
488
|
+
sig { returns(T.nilable(String)) }
|
|
489
|
+
attr_reader :within_time
|
|
490
|
+
|
|
491
|
+
sig { params(within_time: String).void }
|
|
492
|
+
attr_writer :within_time
|
|
493
|
+
|
|
299
494
|
sig do
|
|
300
495
|
params(
|
|
301
496
|
id: String,
|
|
302
497
|
any_words: String,
|
|
498
|
+
blue_verified_only: T::Boolean,
|
|
499
|
+
card_name: String,
|
|
303
500
|
cashtags: String,
|
|
304
501
|
conversation_id: String,
|
|
305
502
|
cursor: String,
|
|
306
503
|
exact_phrase: String,
|
|
504
|
+
exclude_original_author: T::Boolean,
|
|
505
|
+
exclude_source: String,
|
|
307
506
|
exclude_words: String,
|
|
308
507
|
from_user: String,
|
|
508
|
+
geocode: String,
|
|
309
509
|
hashtags: String,
|
|
510
|
+
has_media_only: T::Boolean,
|
|
511
|
+
include_original_post: T::Boolean,
|
|
310
512
|
in_reply_to_tweet_id: String,
|
|
311
513
|
language: String,
|
|
312
514
|
limit: Integer,
|
|
515
|
+
max_depth: Integer,
|
|
516
|
+
max_faves: Integer,
|
|
517
|
+
max_id: String,
|
|
518
|
+
max_quotes: Integer,
|
|
519
|
+
max_replies: Integer,
|
|
520
|
+
max_retweets: Integer,
|
|
313
521
|
media_type:
|
|
314
522
|
XTwitterScraper::X::TweetGetRepliesParams::MediaType::OrSymbol,
|
|
315
523
|
mentioning: String,
|
|
524
|
+
min_bookmarks: Integer,
|
|
316
525
|
min_faves: Integer,
|
|
317
526
|
min_quotes: Integer,
|
|
318
527
|
min_replies: Integer,
|
|
319
528
|
min_retweets: Integer,
|
|
529
|
+
min_views: Integer,
|
|
320
530
|
mode: XTwitterScraper::X::TweetGetRepliesParams::Mode::OrSymbol,
|
|
531
|
+
native_retweets: T::Boolean,
|
|
532
|
+
near: String,
|
|
533
|
+
news: T::Boolean,
|
|
321
534
|
page_size: Integer,
|
|
322
535
|
quotes: XTwitterScraper::X::TweetGetRepliesParams::Quotes::OrSymbol,
|
|
323
536
|
quotes_of_tweet_id: String,
|
|
@@ -326,13 +539,20 @@ module XTwitterScraper
|
|
|
326
539
|
retweets:
|
|
327
540
|
XTwitterScraper::X::TweetGetRepliesParams::Retweets::OrSymbol,
|
|
328
541
|
retweets_of_tweet_id: String,
|
|
542
|
+
safe: T::Boolean,
|
|
543
|
+
scope: XTwitterScraper::X::TweetGetRepliesParams::Scope::OrSymbol,
|
|
329
544
|
since_date: Date,
|
|
545
|
+
since_id: String,
|
|
330
546
|
since_time: String,
|
|
547
|
+
sort: XTwitterScraper::X::TweetGetRepliesParams::Sort::OrSymbol,
|
|
548
|
+
source: String,
|
|
331
549
|
to_user: String,
|
|
332
550
|
until_date: Date,
|
|
333
551
|
until_time: String,
|
|
334
552
|
url: String,
|
|
335
553
|
verified_only: T::Boolean,
|
|
554
|
+
within: String,
|
|
555
|
+
within_time: String,
|
|
336
556
|
request_options: XTwitterScraper::RequestOptions::OrHash
|
|
337
557
|
).returns(T.attached_class)
|
|
338
558
|
end
|
|
@@ -341,32 +561,61 @@ module XTwitterScraper
|
|
|
341
561
|
# Words or quoted phrases where any one can match. Separate with spaces, commas,
|
|
342
562
|
# or lines.
|
|
343
563
|
any_words: nil,
|
|
564
|
+
# Only return tweets from Blue-verified authors.
|
|
565
|
+
blue_verified_only: nil,
|
|
566
|
+
# Match the Tweet card name.
|
|
567
|
+
card_name: nil,
|
|
344
568
|
# Cashtags separated by spaces, commas, or lines.
|
|
345
569
|
cashtags: nil,
|
|
346
570
|
# Conversation ID filter.
|
|
347
571
|
conversation_id: nil,
|
|
348
|
-
#
|
|
572
|
+
# Cursor from the previous response. Xquik cursors resume automatic coverage.
|
|
573
|
+
# Existing unprefixed cursors keep legacy standard behavior.
|
|
349
574
|
cursor: nil,
|
|
350
575
|
# Exact phrase to match.
|
|
351
576
|
exact_phrase: nil,
|
|
577
|
+
# Exclude replies written by the source-post author.
|
|
578
|
+
exclude_original_author: nil,
|
|
579
|
+
# Exclude a source application.
|
|
580
|
+
exclude_source: nil,
|
|
352
581
|
# Words or quoted phrases to exclude. Separate with spaces, commas, or lines.
|
|
353
582
|
exclude_words: nil,
|
|
354
583
|
# Filter by author username.
|
|
355
584
|
from_user: nil,
|
|
585
|
+
# Match latitude, longitude, and radius.
|
|
586
|
+
geocode: nil,
|
|
356
587
|
# Hashtags separated by spaces, commas, or lines.
|
|
357
588
|
hashtags: nil,
|
|
589
|
+
# Only return replies containing media.
|
|
590
|
+
has_media_only: nil,
|
|
591
|
+
# Include the source post and count it toward limit.
|
|
592
|
+
include_original_post: nil,
|
|
358
593
|
# Only replies to this tweet ID.
|
|
359
594
|
in_reply_to_tweet_id: nil,
|
|
360
595
|
# Language code filter, e.g. en or tr.
|
|
361
596
|
language: nil,
|
|
362
|
-
# With mode=complete, maximum combined direct and nested reply rows (1-25000
|
|
363
|
-
#
|
|
364
|
-
#
|
|
597
|
+
# With mode=complete, maximum combined direct and nested reply rows (1-25000,
|
|
598
|
+
# default 25000). Automatic pages accept 1-300. Standard pages accept 1-100.
|
|
599
|
+
# Prefer pageSize outside complete mode.
|
|
365
600
|
limit: nil,
|
|
601
|
+
# Maximum reply depth from the source post.
|
|
602
|
+
max_depth: nil,
|
|
603
|
+
# Maximum likes threshold. maxLikes is also accepted.
|
|
604
|
+
max_faves: nil,
|
|
605
|
+
# Return Tweets older than this Tweet ID.
|
|
606
|
+
max_id: nil,
|
|
607
|
+
# Maximum quotes threshold.
|
|
608
|
+
max_quotes: nil,
|
|
609
|
+
# Maximum replies threshold.
|
|
610
|
+
max_replies: nil,
|
|
611
|
+
# Maximum retweets threshold.
|
|
612
|
+
max_retweets: nil,
|
|
366
613
|
# Filter by media type.
|
|
367
614
|
media_type: nil,
|
|
368
615
|
# Filter tweets mentioning a username.
|
|
369
616
|
mentioning: nil,
|
|
617
|
+
# Minimum bookmark count threshold.
|
|
618
|
+
min_bookmarks: nil,
|
|
370
619
|
# Minimum likes threshold.
|
|
371
620
|
min_faves: nil,
|
|
372
621
|
# Minimum quote count threshold.
|
|
@@ -375,12 +624,21 @@ module XTwitterScraper
|
|
|
375
624
|
min_replies: nil,
|
|
376
625
|
# Minimum retweets threshold.
|
|
377
626
|
min_retweets: nil,
|
|
378
|
-
#
|
|
379
|
-
|
|
627
|
+
# Minimum view count threshold.
|
|
628
|
+
min_views: nil,
|
|
629
|
+
# Optional advanced override. Omit mode for automatic maximum direct reply
|
|
630
|
+
# coverage with pagination. Standard keeps legacy pagination. Complete returns
|
|
631
|
+
# direct and nested replies with diagnostics, scope, depth, sorting, and
|
|
632
|
+
# original-post controls.
|
|
380
633
|
mode: nil,
|
|
381
|
-
#
|
|
382
|
-
|
|
383
|
-
#
|
|
634
|
+
# Only return native reposts.
|
|
635
|
+
native_retweets: nil,
|
|
636
|
+
# Match a place name.
|
|
637
|
+
near: nil,
|
|
638
|
+
# Only return news results.
|
|
639
|
+
news: nil,
|
|
640
|
+
# Automatic pages accept 1-300 Tweets. Standard pages keep 1-100. Default 20.
|
|
641
|
+
# Continue while has_next_page is true. Deprecated aliases remain accepted.
|
|
384
642
|
page_size: nil,
|
|
385
643
|
# Quote mode.
|
|
386
644
|
quotes: nil,
|
|
@@ -392,10 +650,20 @@ module XTwitterScraper
|
|
|
392
650
|
retweets: nil,
|
|
393
651
|
# Only retweets of this tweet ID.
|
|
394
652
|
retweets_of_tweet_id: nil,
|
|
653
|
+
# Enable the safe-search filter.
|
|
654
|
+
safe: nil,
|
|
655
|
+
# Select all replies, direct replies, or nested replies.
|
|
656
|
+
scope: nil,
|
|
395
657
|
# Start date in YYYY-MM-DD format.
|
|
396
658
|
since_date: nil,
|
|
659
|
+
# Return Tweets newer than this Tweet ID.
|
|
660
|
+
since_id: nil,
|
|
397
661
|
# Unix timestamp - return replies posted after this time
|
|
398
662
|
since_time: nil,
|
|
663
|
+
# Sort the selected replies before applying limit.
|
|
664
|
+
sort: nil,
|
|
665
|
+
# Match the source application.
|
|
666
|
+
source: nil,
|
|
399
667
|
# Filter replies sent to a username.
|
|
400
668
|
to_user: nil,
|
|
401
669
|
# End date in YYYY-MM-DD format.
|
|
@@ -406,6 +674,10 @@ module XTwitterScraper
|
|
|
406
674
|
url: nil,
|
|
407
675
|
# Only return tweets from verified authors.
|
|
408
676
|
verified_only: nil,
|
|
677
|
+
# Set the radius for the near filter.
|
|
678
|
+
within: nil,
|
|
679
|
+
# Match Tweets inside a recent time window.
|
|
680
|
+
within_time: nil,
|
|
409
681
|
request_options: {}
|
|
410
682
|
)
|
|
411
683
|
end
|
|
@@ -415,24 +687,42 @@ module XTwitterScraper
|
|
|
415
687
|
{
|
|
416
688
|
id: String,
|
|
417
689
|
any_words: String,
|
|
690
|
+
blue_verified_only: T::Boolean,
|
|
691
|
+
card_name: String,
|
|
418
692
|
cashtags: String,
|
|
419
693
|
conversation_id: String,
|
|
420
694
|
cursor: String,
|
|
421
695
|
exact_phrase: String,
|
|
696
|
+
exclude_original_author: T::Boolean,
|
|
697
|
+
exclude_source: String,
|
|
422
698
|
exclude_words: String,
|
|
423
699
|
from_user: String,
|
|
700
|
+
geocode: String,
|
|
424
701
|
hashtags: String,
|
|
702
|
+
has_media_only: T::Boolean,
|
|
703
|
+
include_original_post: T::Boolean,
|
|
425
704
|
in_reply_to_tweet_id: String,
|
|
426
705
|
language: String,
|
|
427
706
|
limit: Integer,
|
|
707
|
+
max_depth: Integer,
|
|
708
|
+
max_faves: Integer,
|
|
709
|
+
max_id: String,
|
|
710
|
+
max_quotes: Integer,
|
|
711
|
+
max_replies: Integer,
|
|
712
|
+
max_retweets: Integer,
|
|
428
713
|
media_type:
|
|
429
714
|
XTwitterScraper::X::TweetGetRepliesParams::MediaType::OrSymbol,
|
|
430
715
|
mentioning: String,
|
|
716
|
+
min_bookmarks: Integer,
|
|
431
717
|
min_faves: Integer,
|
|
432
718
|
min_quotes: Integer,
|
|
433
719
|
min_replies: Integer,
|
|
434
720
|
min_retweets: Integer,
|
|
721
|
+
min_views: Integer,
|
|
435
722
|
mode: XTwitterScraper::X::TweetGetRepliesParams::Mode::OrSymbol,
|
|
723
|
+
native_retweets: T::Boolean,
|
|
724
|
+
near: String,
|
|
725
|
+
news: T::Boolean,
|
|
436
726
|
page_size: Integer,
|
|
437
727
|
quotes:
|
|
438
728
|
XTwitterScraper::X::TweetGetRepliesParams::Quotes::OrSymbol,
|
|
@@ -442,13 +732,20 @@ module XTwitterScraper
|
|
|
442
732
|
retweets:
|
|
443
733
|
XTwitterScraper::X::TweetGetRepliesParams::Retweets::OrSymbol,
|
|
444
734
|
retweets_of_tweet_id: String,
|
|
735
|
+
safe: T::Boolean,
|
|
736
|
+
scope: XTwitterScraper::X::TweetGetRepliesParams::Scope::OrSymbol,
|
|
445
737
|
since_date: Date,
|
|
738
|
+
since_id: String,
|
|
446
739
|
since_time: String,
|
|
740
|
+
sort: XTwitterScraper::X::TweetGetRepliesParams::Sort::OrSymbol,
|
|
741
|
+
source: String,
|
|
447
742
|
to_user: String,
|
|
448
743
|
until_date: Date,
|
|
449
744
|
until_time: String,
|
|
450
745
|
url: String,
|
|
451
746
|
verified_only: T::Boolean,
|
|
747
|
+
within: String,
|
|
748
|
+
within_time: String,
|
|
452
749
|
request_options: XTwitterScraper::RequestOptions
|
|
453
750
|
}
|
|
454
751
|
)
|
|
@@ -511,8 +808,10 @@ module XTwitterScraper
|
|
|
511
808
|
end
|
|
512
809
|
end
|
|
513
810
|
|
|
514
|
-
#
|
|
515
|
-
#
|
|
811
|
+
# Optional advanced override. Omit mode for automatic maximum direct reply
|
|
812
|
+
# coverage with pagination. Standard keeps legacy pagination. Complete returns
|
|
813
|
+
# direct and nested replies with diagnostics, scope, depth, sorting, and
|
|
814
|
+
# original-post controls.
|
|
516
815
|
module Mode
|
|
517
816
|
extend XTwitterScraper::Internal::Type::Enum
|
|
518
817
|
|
|
@@ -522,6 +821,11 @@ module XTwitterScraper
|
|
|
522
821
|
end
|
|
523
822
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
524
823
|
|
|
824
|
+
STANDARD =
|
|
825
|
+
T.let(
|
|
826
|
+
:standard,
|
|
827
|
+
XTwitterScraper::X::TweetGetRepliesParams::Mode::TaggedSymbol
|
|
828
|
+
)
|
|
525
829
|
COMPLETE =
|
|
526
830
|
T.let(
|
|
527
831
|
:complete,
|
|
@@ -649,6 +953,85 @@ module XTwitterScraper
|
|
|
649
953
|
def self.values
|
|
650
954
|
end
|
|
651
955
|
end
|
|
956
|
+
|
|
957
|
+
# Select all replies, direct replies, or nested replies.
|
|
958
|
+
module Scope
|
|
959
|
+
extend XTwitterScraper::Internal::Type::Enum
|
|
960
|
+
|
|
961
|
+
TaggedSymbol =
|
|
962
|
+
T.type_alias do
|
|
963
|
+
T.all(Symbol, XTwitterScraper::X::TweetGetRepliesParams::Scope)
|
|
964
|
+
end
|
|
965
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
966
|
+
|
|
967
|
+
ALL =
|
|
968
|
+
T.let(
|
|
969
|
+
:all,
|
|
970
|
+
XTwitterScraper::X::TweetGetRepliesParams::Scope::TaggedSymbol
|
|
971
|
+
)
|
|
972
|
+
DIRECT =
|
|
973
|
+
T.let(
|
|
974
|
+
:direct,
|
|
975
|
+
XTwitterScraper::X::TweetGetRepliesParams::Scope::TaggedSymbol
|
|
976
|
+
)
|
|
977
|
+
NESTED =
|
|
978
|
+
T.let(
|
|
979
|
+
:nested,
|
|
980
|
+
XTwitterScraper::X::TweetGetRepliesParams::Scope::TaggedSymbol
|
|
981
|
+
)
|
|
982
|
+
|
|
983
|
+
sig do
|
|
984
|
+
override.returns(
|
|
985
|
+
T::Array[
|
|
986
|
+
XTwitterScraper::X::TweetGetRepliesParams::Scope::TaggedSymbol
|
|
987
|
+
]
|
|
988
|
+
)
|
|
989
|
+
end
|
|
990
|
+
def self.values
|
|
991
|
+
end
|
|
992
|
+
end
|
|
993
|
+
|
|
994
|
+
# Sort the selected replies before applying limit.
|
|
995
|
+
module Sort
|
|
996
|
+
extend XTwitterScraper::Internal::Type::Enum
|
|
997
|
+
|
|
998
|
+
TaggedSymbol =
|
|
999
|
+
T.type_alias do
|
|
1000
|
+
T.all(Symbol, XTwitterScraper::X::TweetGetRepliesParams::Sort)
|
|
1001
|
+
end
|
|
1002
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1003
|
+
|
|
1004
|
+
RELEVANCE =
|
|
1005
|
+
T.let(
|
|
1006
|
+
:relevance,
|
|
1007
|
+
XTwitterScraper::X::TweetGetRepliesParams::Sort::TaggedSymbol
|
|
1008
|
+
)
|
|
1009
|
+
LATEST =
|
|
1010
|
+
T.let(
|
|
1011
|
+
:latest,
|
|
1012
|
+
XTwitterScraper::X::TweetGetRepliesParams::Sort::TaggedSymbol
|
|
1013
|
+
)
|
|
1014
|
+
OLDEST =
|
|
1015
|
+
T.let(
|
|
1016
|
+
:oldest,
|
|
1017
|
+
XTwitterScraper::X::TweetGetRepliesParams::Sort::TaggedSymbol
|
|
1018
|
+
)
|
|
1019
|
+
LIKES =
|
|
1020
|
+
T.let(
|
|
1021
|
+
:likes,
|
|
1022
|
+
XTwitterScraper::X::TweetGetRepliesParams::Sort::TaggedSymbol
|
|
1023
|
+
)
|
|
1024
|
+
|
|
1025
|
+
sig do
|
|
1026
|
+
override.returns(
|
|
1027
|
+
T::Array[
|
|
1028
|
+
XTwitterScraper::X::TweetGetRepliesParams::Sort::TaggedSymbol
|
|
1029
|
+
]
|
|
1030
|
+
)
|
|
1031
|
+
end
|
|
1032
|
+
def self.values
|
|
1033
|
+
end
|
|
1034
|
+
end
|
|
652
1035
|
end
|
|
653
1036
|
end
|
|
654
1037
|
end
|
|
@@ -41,8 +41,9 @@ module XTwitterScraper
|
|
|
41
41
|
end
|
|
42
42
|
attr_writer :nested_replies
|
|
43
43
|
|
|
44
|
-
#
|
|
45
|
-
#
|
|
44
|
+
# Direct reply rows. No-mode requests use resumable automatic coverage. Complete
|
|
45
|
+
# mode also returns nested replies and coverage diagnostics. Keep nested replies
|
|
46
|
+
# separate from direct coverage.
|
|
46
47
|
sig do
|
|
47
48
|
params(
|
|
48
49
|
diagnostic:
|