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
|
@@ -22,6 +22,13 @@ module XTwitterScraper
|
|
|
22
22
|
sig { returns(String) }
|
|
23
23
|
attr_accessor :id
|
|
24
24
|
|
|
25
|
+
# Match any comma-separated or line-separated bio term, ignoring case.
|
|
26
|
+
sig { returns(T.nilable(String)) }
|
|
27
|
+
attr_reader :bio_contains
|
|
28
|
+
|
|
29
|
+
sig { params(bio_contains: String).void }
|
|
30
|
+
attr_writer :bio_contains
|
|
31
|
+
|
|
25
32
|
# Pagination cursor
|
|
26
33
|
sig { returns(T.nilable(String)) }
|
|
27
34
|
attr_reader :cursor
|
|
@@ -29,6 +36,76 @@ module XTwitterScraper
|
|
|
29
36
|
sig { params(cursor: String).void }
|
|
30
37
|
attr_writer :cursor
|
|
31
38
|
|
|
39
|
+
# Only return profiles with a 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
|
+
# Only return profiles with a website.
|
|
47
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
48
|
+
attr_reader :has_website
|
|
49
|
+
|
|
50
|
+
sig { params(has_website: T::Boolean).void }
|
|
51
|
+
attr_writer :has_website
|
|
52
|
+
|
|
53
|
+
# Match a location substring, ignoring case.
|
|
54
|
+
sig { returns(T.nilable(String)) }
|
|
55
|
+
attr_reader :location_contains
|
|
56
|
+
|
|
57
|
+
sig { params(location_contains: String).void }
|
|
58
|
+
attr_writer :location_contains
|
|
59
|
+
|
|
60
|
+
# Maximum follower count. Missing counts pass this maximum.
|
|
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. maxPosts is also accepted.
|
|
75
|
+
sig { returns(T.nilable(Integer)) }
|
|
76
|
+
attr_reader :max_statuses
|
|
77
|
+
|
|
78
|
+
sig { params(max_statuses: Integer).void }
|
|
79
|
+
attr_writer :max_statuses
|
|
80
|
+
|
|
81
|
+
# Minimum account age in whole days.
|
|
82
|
+
sig { returns(T.nilable(Integer)) }
|
|
83
|
+
attr_reader :min_account_age_days
|
|
84
|
+
|
|
85
|
+
sig { params(min_account_age_days: Integer).void }
|
|
86
|
+
attr_writer :min_account_age_days
|
|
87
|
+
|
|
88
|
+
# Minimum follower count. Filtering happens before billing.
|
|
89
|
+
sig { returns(T.nilable(Integer)) }
|
|
90
|
+
attr_reader :min_followers
|
|
91
|
+
|
|
92
|
+
sig { params(min_followers: Integer).void }
|
|
93
|
+
attr_writer :min_followers
|
|
94
|
+
|
|
95
|
+
# Minimum following count.
|
|
96
|
+
sig { returns(T.nilable(Integer)) }
|
|
97
|
+
attr_reader :min_following
|
|
98
|
+
|
|
99
|
+
sig { params(min_following: Integer).void }
|
|
100
|
+
attr_writer :min_following
|
|
101
|
+
|
|
102
|
+
# Minimum post count. minPosts is also accepted.
|
|
103
|
+
sig { returns(T.nilable(Integer)) }
|
|
104
|
+
attr_reader :min_statuses
|
|
105
|
+
|
|
106
|
+
sig { params(min_statuses: Integer).void }
|
|
107
|
+
attr_writer :min_statuses
|
|
108
|
+
|
|
32
109
|
# Items per page (20-200, default 20). This is an upper bound for paid
|
|
33
110
|
# authenticated calls: remaining credits can reduce the returned page size, and
|
|
34
111
|
# zero affordable results returns 402 insufficient_credits.
|
|
@@ -38,22 +115,85 @@ module XTwitterScraper
|
|
|
38
115
|
sig { params(page_size: Integer).void }
|
|
39
116
|
attr_writer :page_size
|
|
40
117
|
|
|
118
|
+
# Match a username substring, ignoring case.
|
|
119
|
+
sig { returns(T.nilable(String)) }
|
|
120
|
+
attr_reader :username_contains
|
|
121
|
+
|
|
122
|
+
sig { params(username_contains: String).void }
|
|
123
|
+
attr_writer :username_contains
|
|
124
|
+
|
|
125
|
+
# Only return verified profiles.
|
|
126
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
127
|
+
attr_reader :verified_only
|
|
128
|
+
|
|
129
|
+
sig { params(verified_only: T::Boolean).void }
|
|
130
|
+
attr_writer :verified_only
|
|
131
|
+
|
|
132
|
+
# Match the verification type exactly, ignoring case.
|
|
133
|
+
sig { returns(T.nilable(String)) }
|
|
134
|
+
attr_reader :verified_type
|
|
135
|
+
|
|
136
|
+
sig { params(verified_type: String).void }
|
|
137
|
+
attr_writer :verified_type
|
|
138
|
+
|
|
41
139
|
sig do
|
|
42
140
|
params(
|
|
43
141
|
id: String,
|
|
142
|
+
bio_contains: String,
|
|
44
143
|
cursor: String,
|
|
144
|
+
has_location: T::Boolean,
|
|
145
|
+
has_website: T::Boolean,
|
|
146
|
+
location_contains: String,
|
|
147
|
+
max_followers: Integer,
|
|
148
|
+
max_following: Integer,
|
|
149
|
+
max_statuses: Integer,
|
|
150
|
+
min_account_age_days: Integer,
|
|
151
|
+
min_followers: Integer,
|
|
152
|
+
min_following: Integer,
|
|
153
|
+
min_statuses: Integer,
|
|
45
154
|
page_size: Integer,
|
|
155
|
+
username_contains: String,
|
|
156
|
+
verified_only: T::Boolean,
|
|
157
|
+
verified_type: String,
|
|
46
158
|
request_options: XTwitterScraper::RequestOptions::OrHash
|
|
47
159
|
).returns(T.attached_class)
|
|
48
160
|
end
|
|
49
161
|
def self.new(
|
|
50
162
|
id:,
|
|
163
|
+
# Match any comma-separated or line-separated bio term, ignoring case.
|
|
164
|
+
bio_contains: nil,
|
|
51
165
|
# Pagination cursor
|
|
52
166
|
cursor: nil,
|
|
167
|
+
# Only return profiles with a location.
|
|
168
|
+
has_location: nil,
|
|
169
|
+
# Only return profiles with a website.
|
|
170
|
+
has_website: nil,
|
|
171
|
+
# Match a location substring, ignoring case.
|
|
172
|
+
location_contains: nil,
|
|
173
|
+
# Maximum follower count. Missing counts pass this maximum.
|
|
174
|
+
max_followers: nil,
|
|
175
|
+
# Maximum following count.
|
|
176
|
+
max_following: nil,
|
|
177
|
+
# Maximum post count. maxPosts is also accepted.
|
|
178
|
+
max_statuses: nil,
|
|
179
|
+
# Minimum account age in whole days.
|
|
180
|
+
min_account_age_days: nil,
|
|
181
|
+
# Minimum follower count. Filtering happens before billing.
|
|
182
|
+
min_followers: nil,
|
|
183
|
+
# Minimum following count.
|
|
184
|
+
min_following: nil,
|
|
185
|
+
# Minimum post count. minPosts is also accepted.
|
|
186
|
+
min_statuses: nil,
|
|
53
187
|
# Items per page (20-200, default 20). This is an upper bound for paid
|
|
54
188
|
# authenticated calls: remaining credits can reduce the returned page size, and
|
|
55
189
|
# zero affordable results returns 402 insufficient_credits.
|
|
56
190
|
page_size: nil,
|
|
191
|
+
# Match a username substring, ignoring case.
|
|
192
|
+
username_contains: nil,
|
|
193
|
+
# Only return verified profiles.
|
|
194
|
+
verified_only: nil,
|
|
195
|
+
# Match the verification type exactly, ignoring case.
|
|
196
|
+
verified_type: nil,
|
|
57
197
|
request_options: {}
|
|
58
198
|
)
|
|
59
199
|
end
|
|
@@ -62,8 +202,22 @@ module XTwitterScraper
|
|
|
62
202
|
override.returns(
|
|
63
203
|
{
|
|
64
204
|
id: String,
|
|
205
|
+
bio_contains: String,
|
|
65
206
|
cursor: String,
|
|
207
|
+
has_location: T::Boolean,
|
|
208
|
+
has_website: T::Boolean,
|
|
209
|
+
location_contains: String,
|
|
210
|
+
max_followers: Integer,
|
|
211
|
+
max_following: Integer,
|
|
212
|
+
max_statuses: Integer,
|
|
213
|
+
min_account_age_days: Integer,
|
|
214
|
+
min_followers: Integer,
|
|
215
|
+
min_following: Integer,
|
|
216
|
+
min_statuses: Integer,
|
|
66
217
|
page_size: Integer,
|
|
218
|
+
username_contains: String,
|
|
219
|
+
verified_only: T::Boolean,
|
|
220
|
+
verified_type: String,
|
|
67
221
|
request_options: XTwitterScraper::RequestOptions
|
|
68
222
|
}
|
|
69
223
|
)
|
|
@@ -22,6 +22,13 @@ module XTwitterScraper
|
|
|
22
22
|
sig { returns(String) }
|
|
23
23
|
attr_accessor :id
|
|
24
24
|
|
|
25
|
+
# Match any comma-separated or line-separated bio term, ignoring case.
|
|
26
|
+
sig { returns(T.nilable(String)) }
|
|
27
|
+
attr_reader :bio_contains
|
|
28
|
+
|
|
29
|
+
sig { params(bio_contains: String).void }
|
|
30
|
+
attr_writer :bio_contains
|
|
31
|
+
|
|
25
32
|
# Pagination cursor for community moderators
|
|
26
33
|
sig { returns(T.nilable(String)) }
|
|
27
34
|
attr_reader :cursor
|
|
@@ -29,17 +36,150 @@ module XTwitterScraper
|
|
|
29
36
|
sig { params(cursor: String).void }
|
|
30
37
|
attr_writer :cursor
|
|
31
38
|
|
|
39
|
+
# Only return profiles with a 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
|
+
# Only return profiles with a website.
|
|
47
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
48
|
+
attr_reader :has_website
|
|
49
|
+
|
|
50
|
+
sig { params(has_website: T::Boolean).void }
|
|
51
|
+
attr_writer :has_website
|
|
52
|
+
|
|
53
|
+
# Match a location substring, ignoring case.
|
|
54
|
+
sig { returns(T.nilable(String)) }
|
|
55
|
+
attr_reader :location_contains
|
|
56
|
+
|
|
57
|
+
sig { params(location_contains: String).void }
|
|
58
|
+
attr_writer :location_contains
|
|
59
|
+
|
|
60
|
+
# Maximum follower count. Missing counts pass this maximum.
|
|
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. maxPosts is also accepted.
|
|
75
|
+
sig { returns(T.nilable(Integer)) }
|
|
76
|
+
attr_reader :max_statuses
|
|
77
|
+
|
|
78
|
+
sig { params(max_statuses: Integer).void }
|
|
79
|
+
attr_writer :max_statuses
|
|
80
|
+
|
|
81
|
+
# Minimum account age in whole days.
|
|
82
|
+
sig { returns(T.nilable(Integer)) }
|
|
83
|
+
attr_reader :min_account_age_days
|
|
84
|
+
|
|
85
|
+
sig { params(min_account_age_days: Integer).void }
|
|
86
|
+
attr_writer :min_account_age_days
|
|
87
|
+
|
|
88
|
+
# Minimum follower count. Filtering happens before billing.
|
|
89
|
+
sig { returns(T.nilable(Integer)) }
|
|
90
|
+
attr_reader :min_followers
|
|
91
|
+
|
|
92
|
+
sig { params(min_followers: Integer).void }
|
|
93
|
+
attr_writer :min_followers
|
|
94
|
+
|
|
95
|
+
# Minimum following count.
|
|
96
|
+
sig { returns(T.nilable(Integer)) }
|
|
97
|
+
attr_reader :min_following
|
|
98
|
+
|
|
99
|
+
sig { params(min_following: Integer).void }
|
|
100
|
+
attr_writer :min_following
|
|
101
|
+
|
|
102
|
+
# Minimum post count. minPosts is also accepted.
|
|
103
|
+
sig { returns(T.nilable(Integer)) }
|
|
104
|
+
attr_reader :min_statuses
|
|
105
|
+
|
|
106
|
+
sig { params(min_statuses: Integer).void }
|
|
107
|
+
attr_writer :min_statuses
|
|
108
|
+
|
|
109
|
+
# Match a username substring, ignoring case.
|
|
110
|
+
sig { returns(T.nilable(String)) }
|
|
111
|
+
attr_reader :username_contains
|
|
112
|
+
|
|
113
|
+
sig { params(username_contains: String).void }
|
|
114
|
+
attr_writer :username_contains
|
|
115
|
+
|
|
116
|
+
# Only return verified profiles.
|
|
117
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
118
|
+
attr_reader :verified_only
|
|
119
|
+
|
|
120
|
+
sig { params(verified_only: T::Boolean).void }
|
|
121
|
+
attr_writer :verified_only
|
|
122
|
+
|
|
123
|
+
# Match the verification type exactly, ignoring case.
|
|
124
|
+
sig { returns(T.nilable(String)) }
|
|
125
|
+
attr_reader :verified_type
|
|
126
|
+
|
|
127
|
+
sig { params(verified_type: String).void }
|
|
128
|
+
attr_writer :verified_type
|
|
129
|
+
|
|
32
130
|
sig do
|
|
33
131
|
params(
|
|
34
132
|
id: String,
|
|
133
|
+
bio_contains: String,
|
|
35
134
|
cursor: String,
|
|
135
|
+
has_location: T::Boolean,
|
|
136
|
+
has_website: T::Boolean,
|
|
137
|
+
location_contains: String,
|
|
138
|
+
max_followers: Integer,
|
|
139
|
+
max_following: Integer,
|
|
140
|
+
max_statuses: Integer,
|
|
141
|
+
min_account_age_days: Integer,
|
|
142
|
+
min_followers: Integer,
|
|
143
|
+
min_following: Integer,
|
|
144
|
+
min_statuses: Integer,
|
|
145
|
+
username_contains: String,
|
|
146
|
+
verified_only: T::Boolean,
|
|
147
|
+
verified_type: String,
|
|
36
148
|
request_options: XTwitterScraper::RequestOptions::OrHash
|
|
37
149
|
).returns(T.attached_class)
|
|
38
150
|
end
|
|
39
151
|
def self.new(
|
|
40
152
|
id:,
|
|
153
|
+
# Match any comma-separated or line-separated bio term, ignoring case.
|
|
154
|
+
bio_contains: nil,
|
|
41
155
|
# Pagination cursor for community moderators
|
|
42
156
|
cursor: nil,
|
|
157
|
+
# Only return profiles with a location.
|
|
158
|
+
has_location: nil,
|
|
159
|
+
# Only return profiles with a website.
|
|
160
|
+
has_website: nil,
|
|
161
|
+
# Match a location substring, ignoring case.
|
|
162
|
+
location_contains: nil,
|
|
163
|
+
# Maximum follower count. Missing counts pass this maximum.
|
|
164
|
+
max_followers: nil,
|
|
165
|
+
# Maximum following count.
|
|
166
|
+
max_following: nil,
|
|
167
|
+
# Maximum post count. maxPosts is also accepted.
|
|
168
|
+
max_statuses: nil,
|
|
169
|
+
# Minimum account age in whole days.
|
|
170
|
+
min_account_age_days: nil,
|
|
171
|
+
# Minimum follower count. Filtering happens before billing.
|
|
172
|
+
min_followers: nil,
|
|
173
|
+
# Minimum following count.
|
|
174
|
+
min_following: nil,
|
|
175
|
+
# Minimum post count. minPosts is also accepted.
|
|
176
|
+
min_statuses: nil,
|
|
177
|
+
# Match a username substring, ignoring case.
|
|
178
|
+
username_contains: nil,
|
|
179
|
+
# Only return verified profiles.
|
|
180
|
+
verified_only: nil,
|
|
181
|
+
# Match the verification type exactly, ignoring case.
|
|
182
|
+
verified_type: nil,
|
|
43
183
|
request_options: {}
|
|
44
184
|
)
|
|
45
185
|
end
|
|
@@ -48,7 +188,21 @@ module XTwitterScraper
|
|
|
48
188
|
override.returns(
|
|
49
189
|
{
|
|
50
190
|
id: String,
|
|
191
|
+
bio_contains: String,
|
|
51
192
|
cursor: String,
|
|
193
|
+
has_location: T::Boolean,
|
|
194
|
+
has_website: T::Boolean,
|
|
195
|
+
location_contains: String,
|
|
196
|
+
max_followers: Integer,
|
|
197
|
+
max_following: Integer,
|
|
198
|
+
max_statuses: Integer,
|
|
199
|
+
min_account_age_days: Integer,
|
|
200
|
+
min_followers: Integer,
|
|
201
|
+
min_following: Integer,
|
|
202
|
+
min_statuses: Integer,
|
|
203
|
+
username_contains: String,
|
|
204
|
+
verified_only: T::Boolean,
|
|
205
|
+
verified_type: String,
|
|
52
206
|
request_options: XTwitterScraper::RequestOptions
|
|
53
207
|
}
|
|
54
208
|
)
|
|
@@ -22,6 +22,13 @@ module XTwitterScraper
|
|
|
22
22
|
sig { returns(String) }
|
|
23
23
|
attr_accessor :id
|
|
24
24
|
|
|
25
|
+
# Match any comma-separated or line-separated bio term, ignoring case.
|
|
26
|
+
sig { returns(T.nilable(String)) }
|
|
27
|
+
attr_reader :bio_contains
|
|
28
|
+
|
|
29
|
+
sig { params(bio_contains: String).void }
|
|
30
|
+
attr_writer :bio_contains
|
|
31
|
+
|
|
25
32
|
# Pagination cursor for list followers
|
|
26
33
|
sig { returns(T.nilable(String)) }
|
|
27
34
|
attr_reader :cursor
|
|
@@ -29,33 +36,164 @@ module XTwitterScraper
|
|
|
29
36
|
sig { params(cursor: String).void }
|
|
30
37
|
attr_writer :cursor
|
|
31
38
|
|
|
32
|
-
#
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
# Only return profiles with a 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
|
+
# Only return profiles with a website.
|
|
47
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
48
|
+
attr_reader :has_website
|
|
49
|
+
|
|
50
|
+
sig { params(has_website: T::Boolean).void }
|
|
51
|
+
attr_writer :has_website
|
|
52
|
+
|
|
53
|
+
# Match a location substring, ignoring case.
|
|
54
|
+
sig { returns(T.nilable(String)) }
|
|
55
|
+
attr_reader :location_contains
|
|
56
|
+
|
|
57
|
+
sig { params(location_contains: String).void }
|
|
58
|
+
attr_writer :location_contains
|
|
59
|
+
|
|
60
|
+
# Maximum follower count. Missing counts pass this maximum.
|
|
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. maxPosts is also accepted.
|
|
75
|
+
sig { returns(T.nilable(Integer)) }
|
|
76
|
+
attr_reader :max_statuses
|
|
77
|
+
|
|
78
|
+
sig { params(max_statuses: Integer).void }
|
|
79
|
+
attr_writer :max_statuses
|
|
80
|
+
|
|
81
|
+
# Minimum account age in whole days.
|
|
82
|
+
sig { returns(T.nilable(Integer)) }
|
|
83
|
+
attr_reader :min_account_age_days
|
|
84
|
+
|
|
85
|
+
sig { params(min_account_age_days: Integer).void }
|
|
86
|
+
attr_writer :min_account_age_days
|
|
87
|
+
|
|
88
|
+
# Minimum follower count. Filtering happens before billing.
|
|
89
|
+
sig { returns(T.nilable(Integer)) }
|
|
90
|
+
attr_reader :min_followers
|
|
91
|
+
|
|
92
|
+
sig { params(min_followers: Integer).void }
|
|
93
|
+
attr_writer :min_followers
|
|
94
|
+
|
|
95
|
+
# Minimum following count.
|
|
96
|
+
sig { returns(T.nilable(Integer)) }
|
|
97
|
+
attr_reader :min_following
|
|
98
|
+
|
|
99
|
+
sig { params(min_following: Integer).void }
|
|
100
|
+
attr_writer :min_following
|
|
101
|
+
|
|
102
|
+
# Minimum post count. minPosts is also accepted.
|
|
103
|
+
sig { returns(T.nilable(Integer)) }
|
|
104
|
+
attr_reader :min_statuses
|
|
105
|
+
|
|
106
|
+
sig { params(min_statuses: Integer).void }
|
|
107
|
+
attr_writer :min_statuses
|
|
108
|
+
|
|
109
|
+
# Maximum user profiles requested from this page (20-200, default 200). Source,
|
|
110
|
+
# filters, or credits can return fewer profiles. Keep requesting next_cursor while
|
|
111
|
+
# has_next_page is true. Deprecated aliases remain accepted.
|
|
36
112
|
sig { returns(T.nilable(Integer)) }
|
|
37
113
|
attr_reader :page_size
|
|
38
114
|
|
|
39
115
|
sig { params(page_size: Integer).void }
|
|
40
116
|
attr_writer :page_size
|
|
41
117
|
|
|
118
|
+
# Match a username substring, ignoring case.
|
|
119
|
+
sig { returns(T.nilable(String)) }
|
|
120
|
+
attr_reader :username_contains
|
|
121
|
+
|
|
122
|
+
sig { params(username_contains: String).void }
|
|
123
|
+
attr_writer :username_contains
|
|
124
|
+
|
|
125
|
+
# Only return verified profiles.
|
|
126
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
127
|
+
attr_reader :verified_only
|
|
128
|
+
|
|
129
|
+
sig { params(verified_only: T::Boolean).void }
|
|
130
|
+
attr_writer :verified_only
|
|
131
|
+
|
|
132
|
+
# Match the verification type exactly, ignoring case.
|
|
133
|
+
sig { returns(T.nilable(String)) }
|
|
134
|
+
attr_reader :verified_type
|
|
135
|
+
|
|
136
|
+
sig { params(verified_type: String).void }
|
|
137
|
+
attr_writer :verified_type
|
|
138
|
+
|
|
42
139
|
sig do
|
|
43
140
|
params(
|
|
44
141
|
id: String,
|
|
142
|
+
bio_contains: String,
|
|
45
143
|
cursor: String,
|
|
144
|
+
has_location: T::Boolean,
|
|
145
|
+
has_website: T::Boolean,
|
|
146
|
+
location_contains: String,
|
|
147
|
+
max_followers: Integer,
|
|
148
|
+
max_following: Integer,
|
|
149
|
+
max_statuses: Integer,
|
|
150
|
+
min_account_age_days: Integer,
|
|
151
|
+
min_followers: Integer,
|
|
152
|
+
min_following: Integer,
|
|
153
|
+
min_statuses: Integer,
|
|
46
154
|
page_size: Integer,
|
|
155
|
+
username_contains: String,
|
|
156
|
+
verified_only: T::Boolean,
|
|
157
|
+
verified_type: String,
|
|
47
158
|
request_options: XTwitterScraper::RequestOptions::OrHash
|
|
48
159
|
).returns(T.attached_class)
|
|
49
160
|
end
|
|
50
161
|
def self.new(
|
|
51
162
|
id:,
|
|
163
|
+
# Match any comma-separated or line-separated bio term, ignoring case.
|
|
164
|
+
bio_contains: nil,
|
|
52
165
|
# Pagination cursor for list followers
|
|
53
166
|
cursor: nil,
|
|
54
|
-
#
|
|
55
|
-
|
|
56
|
-
#
|
|
57
|
-
|
|
167
|
+
# Only return profiles with a location.
|
|
168
|
+
has_location: nil,
|
|
169
|
+
# Only return profiles with a website.
|
|
170
|
+
has_website: nil,
|
|
171
|
+
# Match a location substring, ignoring case.
|
|
172
|
+
location_contains: nil,
|
|
173
|
+
# Maximum follower count. Missing counts pass this maximum.
|
|
174
|
+
max_followers: nil,
|
|
175
|
+
# Maximum following count.
|
|
176
|
+
max_following: nil,
|
|
177
|
+
# Maximum post count. maxPosts is also accepted.
|
|
178
|
+
max_statuses: nil,
|
|
179
|
+
# Minimum account age in whole days.
|
|
180
|
+
min_account_age_days: nil,
|
|
181
|
+
# Minimum follower count. Filtering happens before billing.
|
|
182
|
+
min_followers: nil,
|
|
183
|
+
# Minimum following count.
|
|
184
|
+
min_following: nil,
|
|
185
|
+
# Minimum post count. minPosts is also accepted.
|
|
186
|
+
min_statuses: nil,
|
|
187
|
+
# Maximum user profiles requested from this page (20-200, default 200). Source,
|
|
188
|
+
# filters, or credits can return fewer profiles. Keep requesting next_cursor while
|
|
189
|
+
# has_next_page is true. Deprecated aliases remain accepted.
|
|
58
190
|
page_size: nil,
|
|
191
|
+
# Match a username substring, ignoring case.
|
|
192
|
+
username_contains: nil,
|
|
193
|
+
# Only return verified profiles.
|
|
194
|
+
verified_only: nil,
|
|
195
|
+
# Match the verification type exactly, ignoring case.
|
|
196
|
+
verified_type: nil,
|
|
59
197
|
request_options: {}
|
|
60
198
|
)
|
|
61
199
|
end
|
|
@@ -64,8 +202,22 @@ module XTwitterScraper
|
|
|
64
202
|
override.returns(
|
|
65
203
|
{
|
|
66
204
|
id: String,
|
|
205
|
+
bio_contains: String,
|
|
67
206
|
cursor: String,
|
|
207
|
+
has_location: T::Boolean,
|
|
208
|
+
has_website: T::Boolean,
|
|
209
|
+
location_contains: String,
|
|
210
|
+
max_followers: Integer,
|
|
211
|
+
max_following: Integer,
|
|
212
|
+
max_statuses: Integer,
|
|
213
|
+
min_account_age_days: Integer,
|
|
214
|
+
min_followers: Integer,
|
|
215
|
+
min_following: Integer,
|
|
216
|
+
min_statuses: Integer,
|
|
68
217
|
page_size: Integer,
|
|
218
|
+
username_contains: String,
|
|
219
|
+
verified_only: T::Boolean,
|
|
220
|
+
verified_type: String,
|
|
69
221
|
request_options: XTwitterScraper::RequestOptions
|
|
70
222
|
}
|
|
71
223
|
)
|