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 for list members
|
|
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
|
# Members per page (20-200, default 20)
|
|
33
110
|
sig { returns(T.nilable(Integer)) }
|
|
34
111
|
attr_reader :page_size
|
|
@@ -36,20 +113,83 @@ module XTwitterScraper
|
|
|
36
113
|
sig { params(page_size: Integer).void }
|
|
37
114
|
attr_writer :page_size
|
|
38
115
|
|
|
116
|
+
# Match a username substring, ignoring case.
|
|
117
|
+
sig { returns(T.nilable(String)) }
|
|
118
|
+
attr_reader :username_contains
|
|
119
|
+
|
|
120
|
+
sig { params(username_contains: String).void }
|
|
121
|
+
attr_writer :username_contains
|
|
122
|
+
|
|
123
|
+
# Only return verified profiles.
|
|
124
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
125
|
+
attr_reader :verified_only
|
|
126
|
+
|
|
127
|
+
sig { params(verified_only: T::Boolean).void }
|
|
128
|
+
attr_writer :verified_only
|
|
129
|
+
|
|
130
|
+
# Match the verification type exactly, ignoring case.
|
|
131
|
+
sig { returns(T.nilable(String)) }
|
|
132
|
+
attr_reader :verified_type
|
|
133
|
+
|
|
134
|
+
sig { params(verified_type: String).void }
|
|
135
|
+
attr_writer :verified_type
|
|
136
|
+
|
|
39
137
|
sig do
|
|
40
138
|
params(
|
|
41
139
|
id: String,
|
|
140
|
+
bio_contains: String,
|
|
42
141
|
cursor: String,
|
|
142
|
+
has_location: T::Boolean,
|
|
143
|
+
has_website: T::Boolean,
|
|
144
|
+
location_contains: String,
|
|
145
|
+
max_followers: Integer,
|
|
146
|
+
max_following: Integer,
|
|
147
|
+
max_statuses: Integer,
|
|
148
|
+
min_account_age_days: Integer,
|
|
149
|
+
min_followers: Integer,
|
|
150
|
+
min_following: Integer,
|
|
151
|
+
min_statuses: Integer,
|
|
43
152
|
page_size: Integer,
|
|
153
|
+
username_contains: String,
|
|
154
|
+
verified_only: T::Boolean,
|
|
155
|
+
verified_type: String,
|
|
44
156
|
request_options: XTwitterScraper::RequestOptions::OrHash
|
|
45
157
|
).returns(T.attached_class)
|
|
46
158
|
end
|
|
47
159
|
def self.new(
|
|
48
160
|
id:,
|
|
161
|
+
# Match any comma-separated or line-separated bio term, ignoring case.
|
|
162
|
+
bio_contains: nil,
|
|
49
163
|
# Pagination cursor for list members
|
|
50
164
|
cursor: nil,
|
|
165
|
+
# Only return profiles with a location.
|
|
166
|
+
has_location: nil,
|
|
167
|
+
# Only return profiles with a website.
|
|
168
|
+
has_website: nil,
|
|
169
|
+
# Match a location substring, ignoring case.
|
|
170
|
+
location_contains: nil,
|
|
171
|
+
# Maximum follower count. Missing counts pass this maximum.
|
|
172
|
+
max_followers: nil,
|
|
173
|
+
# Maximum following count.
|
|
174
|
+
max_following: nil,
|
|
175
|
+
# Maximum post count. maxPosts is also accepted.
|
|
176
|
+
max_statuses: nil,
|
|
177
|
+
# Minimum account age in whole days.
|
|
178
|
+
min_account_age_days: nil,
|
|
179
|
+
# Minimum follower count. Filtering happens before billing.
|
|
180
|
+
min_followers: nil,
|
|
181
|
+
# Minimum following count.
|
|
182
|
+
min_following: nil,
|
|
183
|
+
# Minimum post count. minPosts is also accepted.
|
|
184
|
+
min_statuses: nil,
|
|
51
185
|
# Members per page (20-200, default 20)
|
|
52
186
|
page_size: nil,
|
|
187
|
+
# Match a username substring, ignoring case.
|
|
188
|
+
username_contains: nil,
|
|
189
|
+
# Only return verified profiles.
|
|
190
|
+
verified_only: nil,
|
|
191
|
+
# Match the verification type exactly, ignoring case.
|
|
192
|
+
verified_type: nil,
|
|
53
193
|
request_options: {}
|
|
54
194
|
)
|
|
55
195
|
end
|
|
@@ -58,8 +198,22 @@ module XTwitterScraper
|
|
|
58
198
|
override.returns(
|
|
59
199
|
{
|
|
60
200
|
id: String,
|
|
201
|
+
bio_contains: String,
|
|
61
202
|
cursor: String,
|
|
203
|
+
has_location: T::Boolean,
|
|
204
|
+
has_website: T::Boolean,
|
|
205
|
+
location_contains: String,
|
|
206
|
+
max_followers: Integer,
|
|
207
|
+
max_following: Integer,
|
|
208
|
+
max_statuses: Integer,
|
|
209
|
+
min_account_age_days: Integer,
|
|
210
|
+
min_followers: Integer,
|
|
211
|
+
min_following: Integer,
|
|
212
|
+
min_statuses: Integer,
|
|
62
213
|
page_size: Integer,
|
|
214
|
+
username_contains: String,
|
|
215
|
+
verified_only: T::Boolean,
|
|
216
|
+
verified_type: String,
|
|
63
217
|
request_options: XTwitterScraper::RequestOptions
|
|
64
218
|
}
|
|
65
219
|
)
|
|
@@ -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 favoriters
|
|
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 favoriters
|
|
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
|
)
|