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
|
@@ -99,6 +99,11 @@ module XTwitterScraper
|
|
|
99
99
|
:following,
|
|
100
100
|
XTwitterScraper::Models::ExtractionEstimateCostResponse::Source::TaggedSymbol
|
|
101
101
|
)
|
|
102
|
+
COLLECTION =
|
|
103
|
+
T.let(
|
|
104
|
+
:collection,
|
|
105
|
+
XTwitterScraper::Models::ExtractionEstimateCostResponse::Source::TaggedSymbol
|
|
106
|
+
)
|
|
102
107
|
PAGINATION_CAP =
|
|
103
108
|
T.let(
|
|
104
109
|
:paginationCap,
|
|
@@ -29,11 +29,155 @@ module XTwitterScraper
|
|
|
29
29
|
end
|
|
30
30
|
attr_accessor :format_
|
|
31
31
|
|
|
32
|
+
# Require a non-empty description.
|
|
33
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
34
|
+
attr_reader :has_description
|
|
35
|
+
|
|
36
|
+
sig { params(has_description: T::Boolean).void }
|
|
37
|
+
attr_writer :has_description
|
|
38
|
+
|
|
39
|
+
# Require a non-empty location.
|
|
40
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
41
|
+
attr_reader :has_location
|
|
42
|
+
|
|
43
|
+
sig { params(has_location: T::Boolean).void }
|
|
44
|
+
attr_writer :has_location
|
|
45
|
+
|
|
46
|
+
# Require media.
|
|
47
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
48
|
+
attr_reader :has_media
|
|
49
|
+
|
|
50
|
+
sig { params(has_media: T::Boolean).void }
|
|
51
|
+
attr_writer :has_media
|
|
52
|
+
|
|
53
|
+
# Filter by language code.
|
|
54
|
+
sig { returns(T.nilable(String)) }
|
|
55
|
+
attr_reader :lang
|
|
56
|
+
|
|
57
|
+
sig { params(lang: String).void }
|
|
58
|
+
attr_writer :lang
|
|
59
|
+
|
|
60
|
+
# Maximum follower count.
|
|
61
|
+
sig { returns(T.nilable(Integer)) }
|
|
62
|
+
attr_reader :max_followers
|
|
63
|
+
|
|
64
|
+
sig { params(max_followers: Integer).void }
|
|
65
|
+
attr_writer :max_followers
|
|
66
|
+
|
|
67
|
+
# Maximum following count.
|
|
68
|
+
sig { returns(T.nilable(Integer)) }
|
|
69
|
+
attr_reader :max_following
|
|
70
|
+
|
|
71
|
+
sig { params(max_following: Integer).void }
|
|
72
|
+
attr_writer :max_following
|
|
73
|
+
|
|
74
|
+
# Maximum post count.
|
|
75
|
+
sig { returns(T.nilable(Integer)) }
|
|
76
|
+
attr_reader :max_posts
|
|
77
|
+
|
|
78
|
+
sig { params(max_posts: Integer).void }
|
|
79
|
+
attr_writer :max_posts
|
|
80
|
+
|
|
81
|
+
# Minimum follower count.
|
|
82
|
+
sig { returns(T.nilable(Integer)) }
|
|
83
|
+
attr_reader :min_followers
|
|
84
|
+
|
|
85
|
+
sig { params(min_followers: Integer).void }
|
|
86
|
+
attr_writer :min_followers
|
|
87
|
+
|
|
88
|
+
# Minimum following count.
|
|
89
|
+
sig { returns(T.nilable(Integer)) }
|
|
90
|
+
attr_reader :min_following
|
|
91
|
+
|
|
92
|
+
sig { params(min_following: Integer).void }
|
|
93
|
+
attr_writer :min_following
|
|
94
|
+
|
|
95
|
+
# Minimum like count.
|
|
96
|
+
sig { returns(T.nilable(Integer)) }
|
|
97
|
+
attr_reader :min_likes
|
|
98
|
+
|
|
99
|
+
sig { params(min_likes: Integer).void }
|
|
100
|
+
attr_writer :min_likes
|
|
101
|
+
|
|
102
|
+
# Minimum post count.
|
|
103
|
+
sig { returns(T.nilable(Integer)) }
|
|
104
|
+
attr_reader :min_posts
|
|
105
|
+
|
|
106
|
+
sig { params(min_posts: Integer).void }
|
|
107
|
+
attr_writer :min_posts
|
|
108
|
+
|
|
109
|
+
# Minimum reply count.
|
|
110
|
+
sig { returns(T.nilable(Integer)) }
|
|
111
|
+
attr_reader :min_replies
|
|
112
|
+
|
|
113
|
+
sig { params(min_replies: Integer).void }
|
|
114
|
+
attr_writer :min_replies
|
|
115
|
+
|
|
116
|
+
# Minimum repost count.
|
|
117
|
+
sig { returns(T.nilable(Integer)) }
|
|
118
|
+
attr_reader :min_retweets
|
|
119
|
+
|
|
120
|
+
sig { params(min_retweets: Integer).void }
|
|
121
|
+
attr_writer :min_retweets
|
|
122
|
+
|
|
123
|
+
# Minimum view count.
|
|
124
|
+
sig { returns(T.nilable(Integer)) }
|
|
125
|
+
attr_reader :min_views
|
|
126
|
+
|
|
127
|
+
sig { params(min_views: Integer).void }
|
|
128
|
+
attr_writer :min_views
|
|
129
|
+
|
|
130
|
+
# Search exported result text.
|
|
131
|
+
sig { returns(T.nilable(String)) }
|
|
132
|
+
attr_reader :search
|
|
133
|
+
|
|
134
|
+
sig { params(search: String).void }
|
|
135
|
+
attr_writer :search
|
|
136
|
+
|
|
137
|
+
# Include results on or after this date.
|
|
138
|
+
sig { returns(T.nilable(Date)) }
|
|
139
|
+
attr_reader :since_date
|
|
140
|
+
|
|
141
|
+
sig { params(since_date: Date).void }
|
|
142
|
+
attr_writer :since_date
|
|
143
|
+
|
|
144
|
+
# Include results on or before this date.
|
|
145
|
+
sig { returns(T.nilable(Date)) }
|
|
146
|
+
attr_reader :until_date
|
|
147
|
+
|
|
148
|
+
sig { params(until_date: Date).void }
|
|
149
|
+
attr_writer :until_date
|
|
150
|
+
|
|
151
|
+
# Filter by verified status.
|
|
152
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
153
|
+
attr_reader :verified
|
|
154
|
+
|
|
155
|
+
sig { params(verified: T::Boolean).void }
|
|
156
|
+
attr_writer :verified
|
|
157
|
+
|
|
32
158
|
sig do
|
|
33
159
|
params(
|
|
34
160
|
id: String,
|
|
35
161
|
format_:
|
|
36
162
|
XTwitterScraper::ExtractionExportResultsParams::Format::OrSymbol,
|
|
163
|
+
has_description: T::Boolean,
|
|
164
|
+
has_location: T::Boolean,
|
|
165
|
+
has_media: T::Boolean,
|
|
166
|
+
lang: String,
|
|
167
|
+
max_followers: Integer,
|
|
168
|
+
max_following: Integer,
|
|
169
|
+
max_posts: Integer,
|
|
170
|
+
min_followers: Integer,
|
|
171
|
+
min_following: Integer,
|
|
172
|
+
min_likes: Integer,
|
|
173
|
+
min_posts: Integer,
|
|
174
|
+
min_replies: Integer,
|
|
175
|
+
min_retweets: Integer,
|
|
176
|
+
min_views: Integer,
|
|
177
|
+
search: String,
|
|
178
|
+
since_date: Date,
|
|
179
|
+
until_date: Date,
|
|
180
|
+
verified: T::Boolean,
|
|
37
181
|
request_options: XTwitterScraper::RequestOptions::OrHash
|
|
38
182
|
).returns(T.attached_class)
|
|
39
183
|
end
|
|
@@ -41,6 +185,42 @@ module XTwitterScraper
|
|
|
41
185
|
id:,
|
|
42
186
|
# Export file format
|
|
43
187
|
format_:,
|
|
188
|
+
# Require a non-empty description.
|
|
189
|
+
has_description: nil,
|
|
190
|
+
# Require a non-empty location.
|
|
191
|
+
has_location: nil,
|
|
192
|
+
# Require media.
|
|
193
|
+
has_media: nil,
|
|
194
|
+
# Filter by language code.
|
|
195
|
+
lang: nil,
|
|
196
|
+
# Maximum follower count.
|
|
197
|
+
max_followers: nil,
|
|
198
|
+
# Maximum following count.
|
|
199
|
+
max_following: nil,
|
|
200
|
+
# Maximum post count.
|
|
201
|
+
max_posts: nil,
|
|
202
|
+
# Minimum follower count.
|
|
203
|
+
min_followers: nil,
|
|
204
|
+
# Minimum following count.
|
|
205
|
+
min_following: nil,
|
|
206
|
+
# Minimum like count.
|
|
207
|
+
min_likes: nil,
|
|
208
|
+
# Minimum post count.
|
|
209
|
+
min_posts: nil,
|
|
210
|
+
# Minimum reply count.
|
|
211
|
+
min_replies: nil,
|
|
212
|
+
# Minimum repost count.
|
|
213
|
+
min_retweets: nil,
|
|
214
|
+
# Minimum view count.
|
|
215
|
+
min_views: nil,
|
|
216
|
+
# Search exported result text.
|
|
217
|
+
search: nil,
|
|
218
|
+
# Include results on or after this date.
|
|
219
|
+
since_date: nil,
|
|
220
|
+
# Include results on or before this date.
|
|
221
|
+
until_date: nil,
|
|
222
|
+
# Filter by verified status.
|
|
223
|
+
verified: nil,
|
|
44
224
|
request_options: {}
|
|
45
225
|
)
|
|
46
226
|
end
|
|
@@ -51,6 +231,24 @@ module XTwitterScraper
|
|
|
51
231
|
id: String,
|
|
52
232
|
format_:
|
|
53
233
|
XTwitterScraper::ExtractionExportResultsParams::Format::OrSymbol,
|
|
234
|
+
has_description: T::Boolean,
|
|
235
|
+
has_location: T::Boolean,
|
|
236
|
+
has_media: T::Boolean,
|
|
237
|
+
lang: String,
|
|
238
|
+
max_followers: Integer,
|
|
239
|
+
max_following: Integer,
|
|
240
|
+
max_posts: Integer,
|
|
241
|
+
min_followers: Integer,
|
|
242
|
+
min_following: Integer,
|
|
243
|
+
min_likes: Integer,
|
|
244
|
+
min_posts: Integer,
|
|
245
|
+
min_replies: Integer,
|
|
246
|
+
min_retweets: Integer,
|
|
247
|
+
min_views: Integer,
|
|
248
|
+
search: String,
|
|
249
|
+
since_date: Date,
|
|
250
|
+
until_date: Date,
|
|
251
|
+
verified: T::Boolean,
|
|
54
252
|
request_options: XTwitterScraper::RequestOptions
|
|
55
253
|
}
|
|
56
254
|
)
|
|
@@ -18,7 +18,7 @@ module XTwitterScraper
|
|
|
18
18
|
)
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
#
|
|
21
|
+
# Previous nextCursor.
|
|
22
22
|
sig { returns(T.nilable(String)) }
|
|
23
23
|
attr_reader :cursor
|
|
24
24
|
|
|
@@ -75,7 +75,7 @@ module XTwitterScraper
|
|
|
75
75
|
).returns(T.attached_class)
|
|
76
76
|
end
|
|
77
77
|
def self.new(
|
|
78
|
-
#
|
|
78
|
+
# Previous nextCursor.
|
|
79
79
|
cursor: nil,
|
|
80
80
|
# Maximum number of items to return (1-100, default 50). For paid per-result
|
|
81
81
|
# endpoints, the returned count may be lower when remaining credits cannot cover
|
|
@@ -21,13 +21,38 @@ module XTwitterScraper
|
|
|
21
21
|
sig { returns(String) }
|
|
22
22
|
attr_accessor :id
|
|
23
23
|
|
|
24
|
-
#
|
|
24
|
+
# Previous nextCursor.
|
|
25
25
|
sig { returns(T.nilable(String)) }
|
|
26
26
|
attr_reader :cursor
|
|
27
27
|
|
|
28
28
|
sig { params(cursor: String).void }
|
|
29
29
|
attr_writer :cursor
|
|
30
30
|
|
|
31
|
+
# Preserve source keys or convert result field names.
|
|
32
|
+
sig do
|
|
33
|
+
returns(
|
|
34
|
+
T.nilable(
|
|
35
|
+
XTwitterScraper::ExtractionRetrieveParams::FieldStyle::OrSymbol
|
|
36
|
+
)
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
attr_reader :field_style
|
|
40
|
+
|
|
41
|
+
sig do
|
|
42
|
+
params(
|
|
43
|
+
field_style:
|
|
44
|
+
XTwitterScraper::ExtractionRetrieveParams::FieldStyle::OrSymbol
|
|
45
|
+
).void
|
|
46
|
+
end
|
|
47
|
+
attr_writer :field_style
|
|
48
|
+
|
|
49
|
+
# Use outputMode=raw instead.
|
|
50
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
51
|
+
attr_reader :include_raw
|
|
52
|
+
|
|
53
|
+
sig { params(include_raw: T::Boolean).void }
|
|
54
|
+
attr_writer :include_raw
|
|
55
|
+
|
|
31
56
|
# Maximum number of results to return (1-1000, default 100)
|
|
32
57
|
sig { returns(T.nilable(Integer)) }
|
|
33
58
|
attr_reader :limit
|
|
@@ -35,20 +60,71 @@ module XTwitterScraper
|
|
|
35
60
|
sig { params(limit: Integer).void }
|
|
36
61
|
attr_writer :limit
|
|
37
62
|
|
|
63
|
+
# Select compact, full, or raw-compatible result fields.
|
|
64
|
+
sig do
|
|
65
|
+
returns(
|
|
66
|
+
T.nilable(
|
|
67
|
+
XTwitterScraper::ExtractionRetrieveParams::OutputMode::OrSymbol
|
|
68
|
+
)
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
attr_reader :output_mode
|
|
72
|
+
|
|
73
|
+
sig do
|
|
74
|
+
params(
|
|
75
|
+
output_mode:
|
|
76
|
+
XTwitterScraper::ExtractionRetrieveParams::OutputMode::OrSymbol
|
|
77
|
+
).void
|
|
78
|
+
end
|
|
79
|
+
attr_writer :output_mode
|
|
80
|
+
|
|
81
|
+
# Keep enrichment nested or merge it into each result.
|
|
82
|
+
sig do
|
|
83
|
+
returns(
|
|
84
|
+
T.nilable(
|
|
85
|
+
XTwitterScraper::ExtractionRetrieveParams::OutputPreset::OrSymbol
|
|
86
|
+
)
|
|
87
|
+
)
|
|
88
|
+
end
|
|
89
|
+
attr_reader :output_preset
|
|
90
|
+
|
|
91
|
+
sig do
|
|
92
|
+
params(
|
|
93
|
+
output_preset:
|
|
94
|
+
XTwitterScraper::ExtractionRetrieveParams::OutputPreset::OrSymbol
|
|
95
|
+
).void
|
|
96
|
+
end
|
|
97
|
+
attr_writer :output_preset
|
|
98
|
+
|
|
38
99
|
sig do
|
|
39
100
|
params(
|
|
40
101
|
id: String,
|
|
41
102
|
cursor: String,
|
|
103
|
+
field_style:
|
|
104
|
+
XTwitterScraper::ExtractionRetrieveParams::FieldStyle::OrSymbol,
|
|
105
|
+
include_raw: T::Boolean,
|
|
42
106
|
limit: Integer,
|
|
107
|
+
output_mode:
|
|
108
|
+
XTwitterScraper::ExtractionRetrieveParams::OutputMode::OrSymbol,
|
|
109
|
+
output_preset:
|
|
110
|
+
XTwitterScraper::ExtractionRetrieveParams::OutputPreset::OrSymbol,
|
|
43
111
|
request_options: XTwitterScraper::RequestOptions::OrHash
|
|
44
112
|
).returns(T.attached_class)
|
|
45
113
|
end
|
|
46
114
|
def self.new(
|
|
47
115
|
id:,
|
|
48
|
-
#
|
|
116
|
+
# Previous nextCursor.
|
|
49
117
|
cursor: nil,
|
|
118
|
+
# Preserve source keys or convert result field names.
|
|
119
|
+
field_style: nil,
|
|
120
|
+
# Use outputMode=raw instead.
|
|
121
|
+
include_raw: nil,
|
|
50
122
|
# Maximum number of results to return (1-1000, default 100)
|
|
51
123
|
limit: nil,
|
|
124
|
+
# Select compact, full, or raw-compatible result fields.
|
|
125
|
+
output_mode: nil,
|
|
126
|
+
# Keep enrichment nested or merge it into each result.
|
|
127
|
+
output_preset: nil,
|
|
52
128
|
request_options: {}
|
|
53
129
|
)
|
|
54
130
|
end
|
|
@@ -58,13 +134,129 @@ module XTwitterScraper
|
|
|
58
134
|
{
|
|
59
135
|
id: String,
|
|
60
136
|
cursor: String,
|
|
137
|
+
field_style:
|
|
138
|
+
XTwitterScraper::ExtractionRetrieveParams::FieldStyle::OrSymbol,
|
|
139
|
+
include_raw: T::Boolean,
|
|
61
140
|
limit: Integer,
|
|
141
|
+
output_mode:
|
|
142
|
+
XTwitterScraper::ExtractionRetrieveParams::OutputMode::OrSymbol,
|
|
143
|
+
output_preset:
|
|
144
|
+
XTwitterScraper::ExtractionRetrieveParams::OutputPreset::OrSymbol,
|
|
62
145
|
request_options: XTwitterScraper::RequestOptions
|
|
63
146
|
}
|
|
64
147
|
)
|
|
65
148
|
end
|
|
66
149
|
def to_hash
|
|
67
150
|
end
|
|
151
|
+
|
|
152
|
+
# Preserve source keys or convert result field names.
|
|
153
|
+
module FieldStyle
|
|
154
|
+
extend XTwitterScraper::Internal::Type::Enum
|
|
155
|
+
|
|
156
|
+
TaggedSymbol =
|
|
157
|
+
T.type_alias do
|
|
158
|
+
T.all(Symbol, XTwitterScraper::ExtractionRetrieveParams::FieldStyle)
|
|
159
|
+
end
|
|
160
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
161
|
+
|
|
162
|
+
SOURCE =
|
|
163
|
+
T.let(
|
|
164
|
+
:source,
|
|
165
|
+
XTwitterScraper::ExtractionRetrieveParams::FieldStyle::TaggedSymbol
|
|
166
|
+
)
|
|
167
|
+
CAMEL_CASE =
|
|
168
|
+
T.let(
|
|
169
|
+
:camelCase,
|
|
170
|
+
XTwitterScraper::ExtractionRetrieveParams::FieldStyle::TaggedSymbol
|
|
171
|
+
)
|
|
172
|
+
SNAKE_CASE =
|
|
173
|
+
T.let(
|
|
174
|
+
:snake_case,
|
|
175
|
+
XTwitterScraper::ExtractionRetrieveParams::FieldStyle::TaggedSymbol
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
sig do
|
|
179
|
+
override.returns(
|
|
180
|
+
T::Array[
|
|
181
|
+
XTwitterScraper::ExtractionRetrieveParams::FieldStyle::TaggedSymbol
|
|
182
|
+
]
|
|
183
|
+
)
|
|
184
|
+
end
|
|
185
|
+
def self.values
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Select compact, full, or raw-compatible result fields.
|
|
190
|
+
module OutputMode
|
|
191
|
+
extend XTwitterScraper::Internal::Type::Enum
|
|
192
|
+
|
|
193
|
+
TaggedSymbol =
|
|
194
|
+
T.type_alias do
|
|
195
|
+
T.all(Symbol, XTwitterScraper::ExtractionRetrieveParams::OutputMode)
|
|
196
|
+
end
|
|
197
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
198
|
+
|
|
199
|
+
COMPACT =
|
|
200
|
+
T.let(
|
|
201
|
+
:compact,
|
|
202
|
+
XTwitterScraper::ExtractionRetrieveParams::OutputMode::TaggedSymbol
|
|
203
|
+
)
|
|
204
|
+
FULL =
|
|
205
|
+
T.let(
|
|
206
|
+
:full,
|
|
207
|
+
XTwitterScraper::ExtractionRetrieveParams::OutputMode::TaggedSymbol
|
|
208
|
+
)
|
|
209
|
+
RAW =
|
|
210
|
+
T.let(
|
|
211
|
+
:raw,
|
|
212
|
+
XTwitterScraper::ExtractionRetrieveParams::OutputMode::TaggedSymbol
|
|
213
|
+
)
|
|
214
|
+
|
|
215
|
+
sig do
|
|
216
|
+
override.returns(
|
|
217
|
+
T::Array[
|
|
218
|
+
XTwitterScraper::ExtractionRetrieveParams::OutputMode::TaggedSymbol
|
|
219
|
+
]
|
|
220
|
+
)
|
|
221
|
+
end
|
|
222
|
+
def self.values
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Keep enrichment nested or merge it into each result.
|
|
227
|
+
module OutputPreset
|
|
228
|
+
extend XTwitterScraper::Internal::Type::Enum
|
|
229
|
+
|
|
230
|
+
TaggedSymbol =
|
|
231
|
+
T.type_alias do
|
|
232
|
+
T.all(
|
|
233
|
+
Symbol,
|
|
234
|
+
XTwitterScraper::ExtractionRetrieveParams::OutputPreset
|
|
235
|
+
)
|
|
236
|
+
end
|
|
237
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
238
|
+
|
|
239
|
+
NESTED =
|
|
240
|
+
T.let(
|
|
241
|
+
:nested,
|
|
242
|
+
XTwitterScraper::ExtractionRetrieveParams::OutputPreset::TaggedSymbol
|
|
243
|
+
)
|
|
244
|
+
FLAT =
|
|
245
|
+
T.let(
|
|
246
|
+
:flat,
|
|
247
|
+
XTwitterScraper::ExtractionRetrieveParams::OutputPreset::TaggedSymbol
|
|
248
|
+
)
|
|
249
|
+
|
|
250
|
+
sig do
|
|
251
|
+
override.returns(
|
|
252
|
+
T::Array[
|
|
253
|
+
XTwitterScraper::ExtractionRetrieveParams::OutputPreset::TaggedSymbol
|
|
254
|
+
]
|
|
255
|
+
)
|
|
256
|
+
end
|
|
257
|
+
def self.values
|
|
258
|
+
end
|
|
259
|
+
end
|
|
68
260
|
end
|
|
69
261
|
end
|
|
70
262
|
end
|