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
|
@@ -8,11 +8,9 @@ module XTwitterScraper
|
|
|
8
8
|
module Resources
|
|
9
9
|
# Accountless prepaid access for paid read endpoints
|
|
10
10
|
class GuestWallets
|
|
11
|
-
# Create a one-use
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
# requiring an Xquik account, email, dashboard, or Xquik web page. An idempotent
|
|
15
|
-
# replay returns the same key.
|
|
11
|
+
# Create a one-use hosted checkout after the user confirms $10-$250 USD. The
|
|
12
|
+
# request creates no charge. It returns a paid-read API key without an Xquik
|
|
13
|
+
# account. Replays return the same key.
|
|
16
14
|
sig do
|
|
17
15
|
params(
|
|
18
16
|
amount_minor: Integer,
|
|
@@ -34,10 +32,9 @@ module XTwitterScraper
|
|
|
34
32
|
)
|
|
35
33
|
end
|
|
36
34
|
|
|
37
|
-
# Poll after
|
|
38
|
-
#
|
|
39
|
-
#
|
|
40
|
-
# Authorization: Bearer.
|
|
35
|
+
# Poll after payment. Use usable to decide whether paid reads can run. An active
|
|
36
|
+
# wallet can remain usable while a top-up is pending. A new wallet becomes usable
|
|
37
|
+
# only after payment is verified. Send the guest key as Authorization: Bearer.
|
|
41
38
|
sig do
|
|
42
39
|
params(
|
|
43
40
|
request_options: XTwitterScraper::RequestOptions::OrHash
|
|
@@ -46,10 +43,9 @@ module XTwitterScraper
|
|
|
46
43
|
def retrieve_status(request_options: {})
|
|
47
44
|
end
|
|
48
45
|
|
|
49
|
-
# Create a one-use
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
-
# Xquik web page.
|
|
46
|
+
# Create a one-use hosted checkout after the user confirms a $10-$250 USD amount
|
|
47
|
+
# for an existing paid-read guest key. The key remains the same. This request
|
|
48
|
+
# creates no charge and never redirects through Xquik.
|
|
53
49
|
sig do
|
|
54
50
|
params(
|
|
55
51
|
amount_minor: Integer,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module XTwitterScraper
|
|
4
|
+
module Resources
|
|
5
|
+
class Support
|
|
6
|
+
# Support ticket management
|
|
7
|
+
class Attachments
|
|
8
|
+
# Streams an authenticated user's support image or video. Video requests support
|
|
9
|
+
# one standard byte range for seeking and resumable playback.
|
|
10
|
+
sig do
|
|
11
|
+
params(
|
|
12
|
+
id: String,
|
|
13
|
+
range: String,
|
|
14
|
+
request_options: XTwitterScraper::RequestOptions::OrHash
|
|
15
|
+
).returns(StringIO)
|
|
16
|
+
end
|
|
17
|
+
def download(
|
|
18
|
+
# Support attachment public ID
|
|
19
|
+
id,
|
|
20
|
+
# Optional single byte range
|
|
21
|
+
range: nil,
|
|
22
|
+
request_options: {}
|
|
23
|
+
)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# @api private
|
|
27
|
+
sig do
|
|
28
|
+
params(client: XTwitterScraper::Client).returns(T.attached_class)
|
|
29
|
+
end
|
|
30
|
+
def self.new(client:)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
module XTwitterScraper
|
|
8
8
|
module Resources
|
|
9
9
|
class Support
|
|
10
|
+
# Support ticket management
|
|
11
|
+
sig { returns(XTwitterScraper::Resources::Support::Attachments) }
|
|
12
|
+
attr_reader :attachments
|
|
13
|
+
|
|
10
14
|
# Support ticket management
|
|
11
15
|
sig { returns(XTwitterScraper::Resources::Support::Tickets) }
|
|
12
16
|
attr_reader :tickets
|
|
@@ -86,20 +86,62 @@ module XTwitterScraper
|
|
|
86
86
|
sig do
|
|
87
87
|
params(
|
|
88
88
|
id: String,
|
|
89
|
+
bio_contains: String,
|
|
89
90
|
cursor: String,
|
|
91
|
+
has_location: T::Boolean,
|
|
92
|
+
has_website: T::Boolean,
|
|
93
|
+
location_contains: String,
|
|
94
|
+
max_followers: Integer,
|
|
95
|
+
max_following: Integer,
|
|
96
|
+
max_statuses: Integer,
|
|
97
|
+
min_account_age_days: Integer,
|
|
98
|
+
min_followers: Integer,
|
|
99
|
+
min_following: Integer,
|
|
100
|
+
min_statuses: Integer,
|
|
90
101
|
page_size: Integer,
|
|
102
|
+
username_contains: String,
|
|
103
|
+
verified_only: T::Boolean,
|
|
104
|
+
verified_type: String,
|
|
91
105
|
request_options: XTwitterScraper::RequestOptions::OrHash
|
|
92
106
|
).returns(XTwitterScraper::PaginatedUsers)
|
|
93
107
|
end
|
|
94
108
|
def retrieve_members(
|
|
95
109
|
# Community ID for member lookup
|
|
96
110
|
id,
|
|
111
|
+
# Match any comma-separated or line-separated bio term, ignoring case.
|
|
112
|
+
bio_contains: nil,
|
|
97
113
|
# Pagination cursor
|
|
98
114
|
cursor: nil,
|
|
115
|
+
# Only return profiles with a location.
|
|
116
|
+
has_location: nil,
|
|
117
|
+
# Only return profiles with a website.
|
|
118
|
+
has_website: nil,
|
|
119
|
+
# Match a location substring, ignoring case.
|
|
120
|
+
location_contains: nil,
|
|
121
|
+
# Maximum follower count. Missing counts pass this maximum.
|
|
122
|
+
max_followers: nil,
|
|
123
|
+
# Maximum following count.
|
|
124
|
+
max_following: nil,
|
|
125
|
+
# Maximum post count. maxPosts is also accepted.
|
|
126
|
+
max_statuses: nil,
|
|
127
|
+
# Minimum account age in whole days.
|
|
128
|
+
min_account_age_days: nil,
|
|
129
|
+
# Minimum follower count. Filtering happens before billing.
|
|
130
|
+
min_followers: nil,
|
|
131
|
+
# Minimum following count.
|
|
132
|
+
min_following: nil,
|
|
133
|
+
# Minimum post count. minPosts is also accepted.
|
|
134
|
+
min_statuses: nil,
|
|
99
135
|
# Items per page (20-200, default 20). This is an upper bound for paid
|
|
100
136
|
# authenticated calls: remaining credits can reduce the returned page size, and
|
|
101
137
|
# zero affordable results returns 402 insufficient_credits.
|
|
102
138
|
page_size: nil,
|
|
139
|
+
# Match a username substring, ignoring case.
|
|
140
|
+
username_contains: nil,
|
|
141
|
+
# Only return verified profiles.
|
|
142
|
+
verified_only: nil,
|
|
143
|
+
# Match the verification type exactly, ignoring case.
|
|
144
|
+
verified_type: nil,
|
|
103
145
|
request_options: {}
|
|
104
146
|
)
|
|
105
147
|
end
|
|
@@ -108,15 +150,57 @@ module XTwitterScraper
|
|
|
108
150
|
sig do
|
|
109
151
|
params(
|
|
110
152
|
id: String,
|
|
153
|
+
bio_contains: String,
|
|
111
154
|
cursor: String,
|
|
155
|
+
has_location: T::Boolean,
|
|
156
|
+
has_website: T::Boolean,
|
|
157
|
+
location_contains: String,
|
|
158
|
+
max_followers: Integer,
|
|
159
|
+
max_following: Integer,
|
|
160
|
+
max_statuses: Integer,
|
|
161
|
+
min_account_age_days: Integer,
|
|
162
|
+
min_followers: Integer,
|
|
163
|
+
min_following: Integer,
|
|
164
|
+
min_statuses: Integer,
|
|
165
|
+
username_contains: String,
|
|
166
|
+
verified_only: T::Boolean,
|
|
167
|
+
verified_type: String,
|
|
112
168
|
request_options: XTwitterScraper::RequestOptions::OrHash
|
|
113
169
|
).returns(XTwitterScraper::PaginatedUsers)
|
|
114
170
|
end
|
|
115
171
|
def retrieve_moderators(
|
|
116
172
|
# Community ID for moderator lookup
|
|
117
173
|
id,
|
|
174
|
+
# Match any comma-separated or line-separated bio term, ignoring case.
|
|
175
|
+
bio_contains: nil,
|
|
118
176
|
# Pagination cursor for community moderators
|
|
119
177
|
cursor: nil,
|
|
178
|
+
# Only return profiles with a location.
|
|
179
|
+
has_location: nil,
|
|
180
|
+
# Only return profiles with a website.
|
|
181
|
+
has_website: nil,
|
|
182
|
+
# Match a location substring, ignoring case.
|
|
183
|
+
location_contains: nil,
|
|
184
|
+
# Maximum follower count. Missing counts pass this maximum.
|
|
185
|
+
max_followers: nil,
|
|
186
|
+
# Maximum following count.
|
|
187
|
+
max_following: nil,
|
|
188
|
+
# Maximum post count. maxPosts is also accepted.
|
|
189
|
+
max_statuses: nil,
|
|
190
|
+
# Minimum account age in whole days.
|
|
191
|
+
min_account_age_days: nil,
|
|
192
|
+
# Minimum follower count. Filtering happens before billing.
|
|
193
|
+
min_followers: nil,
|
|
194
|
+
# Minimum following count.
|
|
195
|
+
min_following: nil,
|
|
196
|
+
# Minimum post count. minPosts is also accepted.
|
|
197
|
+
min_statuses: nil,
|
|
198
|
+
# Match a username substring, ignoring case.
|
|
199
|
+
username_contains: nil,
|
|
200
|
+
# Only return verified profiles.
|
|
201
|
+
verified_only: nil,
|
|
202
|
+
# Match the verification type exactly, ignoring case.
|
|
203
|
+
verified_type: nil,
|
|
120
204
|
request_options: {}
|
|
121
205
|
)
|
|
122
206
|
end
|
|
@@ -13,21 +13,62 @@ module XTwitterScraper
|
|
|
13
13
|
sig do
|
|
14
14
|
params(
|
|
15
15
|
id: String,
|
|
16
|
+
bio_contains: String,
|
|
16
17
|
cursor: String,
|
|
18
|
+
has_location: T::Boolean,
|
|
19
|
+
has_website: T::Boolean,
|
|
20
|
+
location_contains: String,
|
|
21
|
+
max_followers: Integer,
|
|
22
|
+
max_following: Integer,
|
|
23
|
+
max_statuses: Integer,
|
|
24
|
+
min_account_age_days: Integer,
|
|
25
|
+
min_followers: Integer,
|
|
26
|
+
min_following: Integer,
|
|
27
|
+
min_statuses: Integer,
|
|
17
28
|
page_size: Integer,
|
|
29
|
+
username_contains: String,
|
|
30
|
+
verified_only: T::Boolean,
|
|
31
|
+
verified_type: String,
|
|
18
32
|
request_options: XTwitterScraper::RequestOptions::OrHash
|
|
19
33
|
).returns(XTwitterScraper::PaginatedUsers)
|
|
20
34
|
end
|
|
21
35
|
def retrieve_followers(
|
|
22
36
|
# List ID
|
|
23
37
|
id,
|
|
38
|
+
# Match any comma-separated or line-separated bio term, ignoring case.
|
|
39
|
+
bio_contains: nil,
|
|
24
40
|
# Pagination cursor for list followers
|
|
25
41
|
cursor: nil,
|
|
26
|
-
#
|
|
27
|
-
|
|
28
|
-
#
|
|
29
|
-
|
|
42
|
+
# Only return profiles with a location.
|
|
43
|
+
has_location: nil,
|
|
44
|
+
# Only return profiles with a website.
|
|
45
|
+
has_website: nil,
|
|
46
|
+
# Match a location substring, ignoring case.
|
|
47
|
+
location_contains: nil,
|
|
48
|
+
# Maximum follower count. Missing counts pass this maximum.
|
|
49
|
+
max_followers: nil,
|
|
50
|
+
# Maximum following count.
|
|
51
|
+
max_following: nil,
|
|
52
|
+
# Maximum post count. maxPosts is also accepted.
|
|
53
|
+
max_statuses: nil,
|
|
54
|
+
# Minimum account age in whole days.
|
|
55
|
+
min_account_age_days: nil,
|
|
56
|
+
# Minimum follower count. Filtering happens before billing.
|
|
57
|
+
min_followers: nil,
|
|
58
|
+
# Minimum following count.
|
|
59
|
+
min_following: nil,
|
|
60
|
+
# Minimum post count. minPosts is also accepted.
|
|
61
|
+
min_statuses: nil,
|
|
62
|
+
# Maximum user profiles requested from this page (20-200, default 200). Source,
|
|
63
|
+
# filters, or credits can return fewer profiles. Keep requesting next_cursor while
|
|
64
|
+
# has_next_page is true. Deprecated aliases remain accepted.
|
|
30
65
|
page_size: nil,
|
|
66
|
+
# Match a username substring, ignoring case.
|
|
67
|
+
username_contains: nil,
|
|
68
|
+
# Only return verified profiles.
|
|
69
|
+
verified_only: nil,
|
|
70
|
+
# Match the verification type exactly, ignoring case.
|
|
71
|
+
verified_type: nil,
|
|
31
72
|
request_options: {}
|
|
32
73
|
)
|
|
33
74
|
end
|
|
@@ -36,18 +77,60 @@ module XTwitterScraper
|
|
|
36
77
|
sig do
|
|
37
78
|
params(
|
|
38
79
|
id: String,
|
|
80
|
+
bio_contains: String,
|
|
39
81
|
cursor: String,
|
|
82
|
+
has_location: T::Boolean,
|
|
83
|
+
has_website: T::Boolean,
|
|
84
|
+
location_contains: String,
|
|
85
|
+
max_followers: Integer,
|
|
86
|
+
max_following: Integer,
|
|
87
|
+
max_statuses: Integer,
|
|
88
|
+
min_account_age_days: Integer,
|
|
89
|
+
min_followers: Integer,
|
|
90
|
+
min_following: Integer,
|
|
91
|
+
min_statuses: Integer,
|
|
40
92
|
page_size: Integer,
|
|
93
|
+
username_contains: String,
|
|
94
|
+
verified_only: T::Boolean,
|
|
95
|
+
verified_type: String,
|
|
41
96
|
request_options: XTwitterScraper::RequestOptions::OrHash
|
|
42
97
|
).returns(XTwitterScraper::PaginatedUsers)
|
|
43
98
|
end
|
|
44
99
|
def retrieve_members(
|
|
45
100
|
# List ID for member lookup
|
|
46
101
|
id,
|
|
102
|
+
# Match any comma-separated or line-separated bio term, ignoring case.
|
|
103
|
+
bio_contains: nil,
|
|
47
104
|
# Pagination cursor for list members
|
|
48
105
|
cursor: nil,
|
|
106
|
+
# Only return profiles with a location.
|
|
107
|
+
has_location: nil,
|
|
108
|
+
# Only return profiles with a website.
|
|
109
|
+
has_website: nil,
|
|
110
|
+
# Match a location substring, ignoring case.
|
|
111
|
+
location_contains: nil,
|
|
112
|
+
# Maximum follower count. Missing counts pass this maximum.
|
|
113
|
+
max_followers: nil,
|
|
114
|
+
# Maximum following count.
|
|
115
|
+
max_following: nil,
|
|
116
|
+
# Maximum post count. maxPosts is also accepted.
|
|
117
|
+
max_statuses: nil,
|
|
118
|
+
# Minimum account age in whole days.
|
|
119
|
+
min_account_age_days: nil,
|
|
120
|
+
# Minimum follower count. Filtering happens before billing.
|
|
121
|
+
min_followers: nil,
|
|
122
|
+
# Minimum following count.
|
|
123
|
+
min_following: nil,
|
|
124
|
+
# Minimum post count. minPosts is also accepted.
|
|
125
|
+
min_statuses: nil,
|
|
49
126
|
# Members per page (20-200, default 20)
|
|
50
127
|
page_size: nil,
|
|
128
|
+
# Match a username substring, ignoring case.
|
|
129
|
+
username_contains: nil,
|
|
130
|
+
# Only return verified profiles.
|
|
131
|
+
verified_only: nil,
|
|
132
|
+
# Match the verification type exactly, ignoring case.
|
|
133
|
+
verified_type: nil,
|
|
51
134
|
request_options: {}
|
|
52
135
|
)
|
|
53
136
|
end
|