x-twitter-scraper 0.5.5 → 0.7.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 +34 -0
- data/README.md +1 -1
- data/lib/x_twitter_scraper/internal/type/union.rb +25 -9
- data/lib/x_twitter_scraper/models/compose_create_response.rb +62 -1
- data/lib/x_twitter_scraper/models/content_disclosure.rb +1 -9
- data/lib/x_twitter_scraper/models/embedded_tweet.rb +389 -1
- data/lib/x_twitter_scraper/models/paginated_tweets.rb +4 -5
- data/lib/x_twitter_scraper/models/radar_item.rb +144 -7
- data/lib/x_twitter_scraper/models/search_tweet.rb +371 -1
- data/lib/x_twitter_scraper/models/support/ticket_list_response.rb +30 -17
- data/lib/x_twitter_scraper/models/support/ticket_retrieve_response.rb +49 -24
- data/lib/x_twitter_scraper/models/support/ticket_update_response.rb +18 -6
- data/lib/x_twitter_scraper/models/trend_list_response.rb +28 -1
- data/lib/x_twitter_scraper/models/tweet_media.rb +213 -1
- data/lib/x_twitter_scraper/models/user_profile.rb +211 -21
- data/lib/x_twitter_scraper/models/x/account_connection_attempt_retrieve_params.rb +22 -0
- data/lib/x_twitter_scraper/models/x/account_connection_attempt_retrieve_response.rb +224 -0
- data/lib/x_twitter_scraper/models/x/account_connection_challenge_submit_response.rb +4 -4
- data/lib/x_twitter_scraper/models/x/account_create_params.rb +9 -9
- data/lib/x_twitter_scraper/models/x/account_create_response.rb +146 -54
- data/lib/x_twitter_scraper/models/x/account_reauth_params.rb +2 -2
- data/lib/x_twitter_scraper/models/x/account_reauth_response.rb +4 -4
- data/lib/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/communities/tweet_list_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/community_retrieve_info_response.rb +1 -17
- data/lib/x_twitter_scraper/models/x/community_retrieve_search_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/list_retrieve_tweets_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/tweet_author.rb +14 -1
- data/lib/x_twitter_scraper/models/x/tweet_detail.rb +373 -1
- data/lib/x_twitter_scraper/models/x/tweet_get_quotes_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/tweet_get_replies_params.rb +34 -6
- data/lib/x_twitter_scraper/models/x/tweet_get_replies_response.rb +345 -0
- data/lib/x_twitter_scraper/models/x/tweet_get_thread_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/user_retrieve_likes_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/user_retrieve_media_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/user_retrieve_mentions_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/user_retrieve_replies_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/user_retrieve_tweets_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/x_account.rb +9 -9
- data/lib/x_twitter_scraper/models/x_get_article_response.rb +1 -7
- data/lib/x_twitter_scraper/models/x_get_trends_response.rb +28 -1
- data/lib/x_twitter_scraper/resources/compose.rb +4 -4
- data/lib/x_twitter_scraper/resources/x/account_connection_attempts.rb +37 -0
- data/lib/x_twitter_scraper/resources/x/accounts.rb +5 -5
- data/lib/x_twitter_scraper/resources/x/communities/tweets.rb +2 -2
- data/lib/x_twitter_scraper/resources/x/communities.rb +1 -1
- data/lib/x_twitter_scraper/resources/x/lists.rb +1 -1
- data/lib/x_twitter_scraper/resources/x/tweets.rb +14 -11
- data/lib/x_twitter_scraper/resources/x/users.rb +5 -5
- data/lib/x_twitter_scraper/resources/x.rb +6 -0
- data/lib/x_twitter_scraper/version.rb +1 -1
- data/lib/x_twitter_scraper.rb +5 -1
- data/rbi/x_twitter_scraper/models/compose_create_response.rbi +142 -0
- data/rbi/x_twitter_scraper/models/content_disclosure.rbi +1 -15
- data/rbi/x_twitter_scraper/models/embedded_tweet.rbi +708 -3
- data/rbi/x_twitter_scraper/models/paginated_tweets.rbi +4 -5
- data/rbi/x_twitter_scraper/models/radar_item.rbi +245 -8
- data/rbi/x_twitter_scraper/models/search_tweet.rbi +674 -3
- data/rbi/x_twitter_scraper/models/support/ticket_list_response.rbi +75 -55
- data/rbi/x_twitter_scraper/models/support/ticket_retrieve_response.rbi +129 -87
- data/rbi/x_twitter_scraper/models/support/ticket_update_response.rbi +62 -13
- data/rbi/x_twitter_scraper/models/trend_list_response.rbi +40 -3
- data/rbi/x_twitter_scraper/models/tweet_media.rbi +313 -3
- data/rbi/x_twitter_scraper/models/user_profile.rbi +340 -29
- data/rbi/x_twitter_scraper/models/x/account_connection_attempt_retrieve_params.rbi +40 -0
- data/rbi/x_twitter_scraper/models/x/account_connection_attempt_retrieve_response.rbi +295 -0
- data/rbi/x_twitter_scraper/models/x/account_connection_challenge_submit_response.rbi +6 -6
- data/rbi/x_twitter_scraper/models/x/account_create_params.rbi +8 -11
- data/rbi/x_twitter_scraper/models/x/account_create_response.rbi +232 -91
- data/rbi/x_twitter_scraper/models/x/account_reauth_params.rbi +2 -2
- data/rbi/x_twitter_scraper/models/x/account_reauth_response.rbi +6 -6
- data/rbi/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/communities/tweet_list_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/community_retrieve_info_response.rbi +0 -22
- data/rbi/x_twitter_scraper/models/x/community_retrieve_search_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/list_retrieve_tweets_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/tweet_author.rbi +13 -3
- data/rbi/x_twitter_scraper/models/x/tweet_detail.rbi +690 -3
- data/rbi/x_twitter_scraper/models/x/tweet_get_quotes_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/tweet_get_replies_params.rbi +68 -8
- data/rbi/x_twitter_scraper/models/x/tweet_get_replies_response.rbi +527 -0
- data/rbi/x_twitter_scraper/models/x/tweet_get_thread_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/user_retrieve_likes_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/user_retrieve_media_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/user_retrieve_mentions_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/user_retrieve_replies_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/x_account.rbi +12 -12
- data/rbi/x_twitter_scraper/models/x_get_article_response.rbi +0 -9
- data/rbi/x_twitter_scraper/models/x_get_trends_response.rbi +40 -3
- data/rbi/x_twitter_scraper/resources/compose.rbi +4 -4
- data/rbi/x_twitter_scraper/resources/x/account_connection_attempts.rbi +33 -0
- data/rbi/x_twitter_scraper/resources/x/accounts.rbi +5 -5
- data/rbi/x_twitter_scraper/resources/x/communities/tweets.rbi +4 -8
- data/rbi/x_twitter_scraper/resources/x/communities.rbi +2 -4
- data/rbi/x_twitter_scraper/resources/x/lists.rbi +2 -4
- data/rbi/x_twitter_scraper/resources/x/tweets.rbi +20 -18
- data/rbi/x_twitter_scraper/resources/x/users.rbi +10 -20
- data/rbi/x_twitter_scraper/resources/x.rbi +4 -0
- data/sig/x_twitter_scraper/models/compose_create_response.rbs +60 -0
- data/sig/x_twitter_scraper/models/content_disclosure.rbs +1 -11
- data/sig/x_twitter_scraper/models/embedded_tweet.rbs +343 -62
- data/sig/x_twitter_scraper/models/radar_item.rbs +100 -4
- data/sig/x_twitter_scraper/models/search_tweet.rbs +333 -70
- data/sig/x_twitter_scraper/models/support/ticket_list_response.rbs +29 -32
- data/sig/x_twitter_scraper/models/support/ticket_retrieve_response.rbs +49 -48
- data/sig/x_twitter_scraper/models/support/ticket_update_response.rbs +25 -7
- data/sig/x_twitter_scraper/models/trend_list_response.rbs +16 -20
- data/sig/x_twitter_scraper/models/tweet_media.rbs +146 -15
- data/sig/x_twitter_scraper/models/user_profile.rbs +164 -86
- data/sig/x_twitter_scraper/models/x/account_connection_attempt_retrieve_params.rbs +25 -0
- data/sig/x_twitter_scraper/models/x/account_connection_attempt_retrieve_response.rbs +199 -0
- data/sig/x_twitter_scraper/models/x/account_connection_challenge_submit_response.rbs +5 -5
- data/sig/x_twitter_scraper/models/x/account_create_params.rbs +6 -8
- data/sig/x_twitter_scraper/models/x/account_create_response.rbs +144 -59
- data/sig/x_twitter_scraper/models/x/account_reauth_response.rbs +5 -5
- data/sig/x_twitter_scraper/models/x/community_retrieve_info_response.rbs +0 -14
- data/sig/x_twitter_scraper/models/x/tweet_author.rbs +11 -3
- data/sig/x_twitter_scraper/models/x/tweet_detail.rbs +333 -70
- data/sig/x_twitter_scraper/models/x/tweet_get_replies_params.rbs +26 -0
- data/sig/x_twitter_scraper/models/x/tweet_get_replies_response.rbs +274 -0
- data/sig/x_twitter_scraper/models/x_get_article_response.rbs +0 -7
- data/sig/x_twitter_scraper/models/x_get_trends_response.rbs +25 -3
- data/sig/x_twitter_scraper/resources/x/account_connection_attempts.rbs +14 -0
- data/sig/x_twitter_scraper/resources/x/accounts.rbs +2 -2
- data/sig/x_twitter_scraper/resources/x/tweets.rbs +3 -1
- data/sig/x_twitter_scraper/resources/x.rbs +2 -0
- metadata +14 -2
|
@@ -11,19 +11,19 @@ module XTwitterScraper
|
|
|
11
11
|
class Accounts
|
|
12
12
|
# Connect X account
|
|
13
13
|
#
|
|
14
|
-
# @overload create(email:, password:, username:,
|
|
14
|
+
# @overload create(email:, password:, totp_secret:, username:, request_options: {})
|
|
15
15
|
#
|
|
16
16
|
# @param email [String] Account email
|
|
17
17
|
#
|
|
18
18
|
# @param password [String] Account password
|
|
19
19
|
#
|
|
20
|
-
# @param
|
|
20
|
+
# @param totp_secret [String] Authenticator App TOTP secret required for durable login
|
|
21
21
|
#
|
|
22
|
-
# @param
|
|
22
|
+
# @param username [String] X username
|
|
23
23
|
#
|
|
24
24
|
# @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
25
25
|
#
|
|
26
|
-
# @return [XTwitterScraper::Models::X::AccountCreateResponse]
|
|
26
|
+
# @return [XTwitterScraper::Models::X::AccountCreateResponse::SanitizedXAccount, XTwitterScraper::Models::X::AccountCreateResponse::XAccountConnectionAttemptPending, XTwitterScraper::Models::X::AccountCreateResponse::XAccountConnectionChallenge]
|
|
27
27
|
#
|
|
28
28
|
# @see XTwitterScraper::Models::X::AccountCreateParams
|
|
29
29
|
def create(params)
|
|
@@ -124,7 +124,7 @@ module XTwitterScraper
|
|
|
124
124
|
#
|
|
125
125
|
# @param email [String] Email for the X account (updates stored email)
|
|
126
126
|
#
|
|
127
|
-
# @param totp_secret [String] TOTP secret
|
|
127
|
+
# @param totp_secret [String] Replacement Authenticator App TOTP secret. Omit it to reuse the saved secret.
|
|
128
128
|
#
|
|
129
129
|
# @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
130
130
|
#
|
|
@@ -23,7 +23,7 @@ module XTwitterScraper
|
|
|
23
23
|
#
|
|
24
24
|
# @param cursor [String] Pagination cursor for community results
|
|
25
25
|
#
|
|
26
|
-
# @param page_size [Integer] Maximum items
|
|
26
|
+
# @param page_size [Integer] Maximum page items (1-100, default 20). Source, filters, or credits can reduce r
|
|
27
27
|
#
|
|
28
28
|
# @param query_type [Symbol, XTwitterScraper::Models::X::Communities::TweetListParams::QueryType] Sort order for community results (Latest or Top)
|
|
29
29
|
#
|
|
@@ -60,7 +60,7 @@ module XTwitterScraper
|
|
|
60
60
|
#
|
|
61
61
|
# @param cursor [String] Pagination cursor for community tweets
|
|
62
62
|
#
|
|
63
|
-
# @param page_size [Integer] Maximum items
|
|
63
|
+
# @param page_size [Integer] Maximum page items (1-100, default 20). Source, filters, or credits can reduce r
|
|
64
64
|
#
|
|
65
65
|
# @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
66
66
|
#
|
|
@@ -170,7 +170,7 @@ module XTwitterScraper
|
|
|
170
170
|
#
|
|
171
171
|
# @param cursor [String] Pagination cursor for community search
|
|
172
172
|
#
|
|
173
|
-
# @param page_size [Integer] Maximum items
|
|
173
|
+
# @param page_size [Integer] Maximum page items (1-100, default 20). The source, filters, or credits can reduce results.
|
|
174
174
|
#
|
|
175
175
|
# @param query_type [Symbol, XTwitterScraper::Models::X::CommunityRetrieveSearchParams::QueryType] Sort order (Latest or Top)
|
|
176
176
|
#
|
|
@@ -79,7 +79,7 @@ module XTwitterScraper
|
|
|
79
79
|
#
|
|
80
80
|
# @param include_replies [Boolean] Include replies (default false)
|
|
81
81
|
#
|
|
82
|
-
# @param page_size [Integer] Maximum items
|
|
82
|
+
# @param page_size [Integer] Maximum page items (1-100, default 20). Source, filters, or credits can reduce r
|
|
83
83
|
#
|
|
84
84
|
# @param since_time [String] Unix timestamp - filter after
|
|
85
85
|
#
|
|
@@ -204,7 +204,7 @@ module XTwitterScraper
|
|
|
204
204
|
#
|
|
205
205
|
# @param min_retweets [Integer] Minimum retweets threshold.
|
|
206
206
|
#
|
|
207
|
-
# @param page_size [Integer] Maximum items
|
|
207
|
+
# @param page_size [Integer] Maximum page items (1-100, default 20). Source, filters, or credits can reduce r
|
|
208
208
|
#
|
|
209
209
|
# @param quotes [Symbol, XTwitterScraper::Models::X::TweetGetQuotesParams::Quotes] Quote mode.
|
|
210
210
|
#
|
|
@@ -272,13 +272,12 @@ module XTwitterScraper
|
|
|
272
272
|
# Some parameter documentations has been truncated, see
|
|
273
273
|
# {XTwitterScraper::Models::X::TweetGetRepliesParams} for more details.
|
|
274
274
|
#
|
|
275
|
-
# Returns
|
|
276
|
-
#
|
|
277
|
-
#
|
|
278
|
-
#
|
|
279
|
-
# the broader fallback.
|
|
275
|
+
# Returns direct replies. Complete mode merges available timeline views, supported
|
|
276
|
+
# rankings, every forward cursor module, labeled hidden-content branches,
|
|
277
|
+
# exact-parent time partitions scaled to the reported reply count, and search. It
|
|
278
|
+
# separates nested replies and returns 424 below 80% coverage.
|
|
280
279
|
#
|
|
281
|
-
# @overload get_replies(id, any_words: nil, cashtags: nil, conversation_id: nil, cursor: nil, exact_phrase: nil, exclude_words: nil, from_user: nil, hashtags: nil, in_reply_to_tweet_id: nil, language: nil, media_type: nil, mentioning: nil, min_faves: nil, min_quotes: nil, min_replies: nil, min_retweets: nil, page_size: nil, quotes: nil, quotes_of_tweet_id: nil, replies: nil, retweets: nil, retweets_of_tweet_id: nil, since_date: nil, since_time: nil, to_user: nil, until_date: nil, until_time: nil, url: nil, verified_only: nil, request_options: {})
|
|
280
|
+
# @overload get_replies(id, any_words: nil, cashtags: nil, conversation_id: nil, cursor: nil, exact_phrase: nil, exclude_words: nil, from_user: nil, hashtags: nil, in_reply_to_tweet_id: nil, language: nil, limit: nil, media_type: nil, mentioning: nil, min_faves: nil, min_quotes: nil, min_replies: nil, min_retweets: nil, mode: nil, page_size: nil, quotes: nil, quotes_of_tweet_id: nil, replies: nil, retweets: nil, retweets_of_tweet_id: nil, since_date: nil, since_time: nil, to_user: nil, until_date: nil, until_time: nil, url: nil, verified_only: nil, request_options: {})
|
|
282
281
|
#
|
|
283
282
|
# @param id [String] Tweet ID to get replies
|
|
284
283
|
#
|
|
@@ -302,6 +301,8 @@ module XTwitterScraper
|
|
|
302
301
|
#
|
|
303
302
|
# @param language [String] Language code filter, e.g. en or tr.
|
|
304
303
|
#
|
|
304
|
+
# @param limit [Integer] With mode=complete, maximum combined direct and nested reply rows (1-25000). Wit
|
|
305
|
+
#
|
|
305
306
|
# @param media_type [Symbol, XTwitterScraper::Models::X::TweetGetRepliesParams::MediaType] Filter by media type.
|
|
306
307
|
#
|
|
307
308
|
# @param mentioning [String] Filter tweets mentioning a username.
|
|
@@ -314,7 +315,9 @@ module XTwitterScraper
|
|
|
314
315
|
#
|
|
315
316
|
# @param min_retweets [Integer] Minimum retweets threshold.
|
|
316
317
|
#
|
|
317
|
-
# @param
|
|
318
|
+
# @param mode [Symbol, XTwitterScraper::Models::X::TweetGetRepliesParams::Mode] Set complete for maximum-coverage collection. Complete mode accepts only limit.
|
|
319
|
+
#
|
|
320
|
+
# @param page_size [Integer] Maximum page items (1-100, default 20). Source, filters, or credits can reduce r
|
|
318
321
|
#
|
|
319
322
|
# @param quotes [Symbol, XTwitterScraper::Models::X::TweetGetRepliesParams::Quotes] Quote mode.
|
|
320
323
|
#
|
|
@@ -342,7 +345,7 @@ module XTwitterScraper
|
|
|
342
345
|
#
|
|
343
346
|
# @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
344
347
|
#
|
|
345
|
-
# @return [XTwitterScraper::Models::
|
|
348
|
+
# @return [XTwitterScraper::Models::X::TweetGetRepliesResponse]
|
|
346
349
|
#
|
|
347
350
|
# @see XTwitterScraper::Models::X::TweetGetRepliesParams
|
|
348
351
|
def get_replies(id, params = {})
|
|
@@ -373,7 +376,7 @@ module XTwitterScraper
|
|
|
373
376
|
until_time: "untilTime",
|
|
374
377
|
verified_only: "verifiedOnly"
|
|
375
378
|
),
|
|
376
|
-
model: XTwitterScraper::
|
|
379
|
+
model: XTwitterScraper::Models::X::TweetGetRepliesResponse,
|
|
377
380
|
options: options
|
|
378
381
|
)
|
|
379
382
|
end
|
|
@@ -419,7 +422,7 @@ module XTwitterScraper
|
|
|
419
422
|
#
|
|
420
423
|
# @param cursor [String] Pagination cursor for thread tweets
|
|
421
424
|
#
|
|
422
|
-
# @param page_size [Integer] Maximum items
|
|
425
|
+
# @param page_size [Integer] Maximum page items (1-100, default 20). Source, filters, or credits can reduce r
|
|
423
426
|
#
|
|
424
427
|
# @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
425
428
|
#
|
|
@@ -229,7 +229,7 @@ module XTwitterScraper
|
|
|
229
229
|
#
|
|
230
230
|
# @param min_retweets [Integer] Minimum retweets threshold.
|
|
231
231
|
#
|
|
232
|
-
# @param page_size [Integer] Maximum items
|
|
232
|
+
# @param page_size [Integer] Maximum page items (1-100, default 20). Source, filters, or credits can reduce r
|
|
233
233
|
#
|
|
234
234
|
# @param quotes [Symbol, XTwitterScraper::Models::X::UserRetrieveLikesParams::Quotes] Quote mode.
|
|
235
235
|
#
|
|
@@ -328,7 +328,7 @@ module XTwitterScraper
|
|
|
328
328
|
#
|
|
329
329
|
# @param min_retweets [Integer] Minimum retweets threshold.
|
|
330
330
|
#
|
|
331
|
-
# @param page_size [Integer] Maximum items
|
|
331
|
+
# @param page_size [Integer] Maximum page items (1-100, default 20). Source, filters, or credits can reduce r
|
|
332
332
|
#
|
|
333
333
|
# @param quotes [Symbol, XTwitterScraper::Models::X::UserRetrieveMediaParams::Quotes] Quote mode.
|
|
334
334
|
#
|
|
@@ -427,7 +427,7 @@ module XTwitterScraper
|
|
|
427
427
|
#
|
|
428
428
|
# @param min_retweets [Integer] Minimum retweets threshold.
|
|
429
429
|
#
|
|
430
|
-
# @param page_size [Integer] Maximum items
|
|
430
|
+
# @param page_size [Integer] Maximum page items (1-100, default 20). Source, filters, or credits can reduce r
|
|
431
431
|
#
|
|
432
432
|
# @param quotes [Symbol, XTwitterScraper::Models::X::UserRetrieveMentionsParams::Quotes] Quote mode.
|
|
433
433
|
#
|
|
@@ -534,7 +534,7 @@ module XTwitterScraper
|
|
|
534
534
|
#
|
|
535
535
|
# @param min_retweets [Integer] Minimum retweets threshold.
|
|
536
536
|
#
|
|
537
|
-
# @param page_size [Integer] Maximum items
|
|
537
|
+
# @param page_size [Integer] Maximum page items (1-100, default 20). Source, filters, or credits can reduce r
|
|
538
538
|
#
|
|
539
539
|
# @param quotes [Symbol, XTwitterScraper::Models::X::UserRetrieveRepliesParams::Quotes] Quote mode.
|
|
540
540
|
#
|
|
@@ -663,7 +663,7 @@ module XTwitterScraper
|
|
|
663
663
|
#
|
|
664
664
|
# @param min_retweets [Integer] Minimum retweets threshold.
|
|
665
665
|
#
|
|
666
|
-
# @param page_size [Integer] Maximum items
|
|
666
|
+
# @param page_size [Integer] Maximum page items (1-100, default 20). Source, filters, or credits can reduce r
|
|
667
667
|
#
|
|
668
668
|
# @param quotes [Symbol, XTwitterScraper::Models::X::UserRetrieveTweetsParams::Quotes] Quote mode.
|
|
669
669
|
#
|
|
@@ -42,6 +42,10 @@ module XTwitterScraper
|
|
|
42
42
|
# @return [XTwitterScraper::Resources::X::AccountConnectionChallenges]
|
|
43
43
|
attr_reader :account_connection_challenges
|
|
44
44
|
|
|
45
|
+
# Connected X account management
|
|
46
|
+
# @return [XTwitterScraper::Resources::X::AccountConnectionAttempts]
|
|
47
|
+
attr_reader :account_connection_attempts
|
|
48
|
+
|
|
45
49
|
# Look up, search, and analyze individual tweets
|
|
46
50
|
# @return [XTwitterScraper::Resources::X::Bookmarks]
|
|
47
51
|
attr_reader :bookmarks
|
|
@@ -165,6 +169,8 @@ module XTwitterScraper
|
|
|
165
169
|
@accounts = XTwitterScraper::Resources::X::Accounts.new(client: client)
|
|
166
170
|
@account_connection_challenges =
|
|
167
171
|
XTwitterScraper::Resources::X::AccountConnectionChallenges.new(client: client)
|
|
172
|
+
@account_connection_attempts =
|
|
173
|
+
XTwitterScraper::Resources::X::AccountConnectionAttempts.new(client: client)
|
|
168
174
|
@bookmarks = XTwitterScraper::Resources::X::Bookmarks.new(client: client)
|
|
169
175
|
@lists = XTwitterScraper::Resources::X::Lists.new(client: client)
|
|
170
176
|
end
|
data/lib/x_twitter_scraper.rb
CHANGED
|
@@ -57,6 +57,7 @@ require_relative "x_twitter_scraper/internal/transport/base_client"
|
|
|
57
57
|
require_relative "x_twitter_scraper/internal/transport/pooled_net_requester"
|
|
58
58
|
require_relative "x_twitter_scraper/client"
|
|
59
59
|
require_relative "x_twitter_scraper/models/user_profile"
|
|
60
|
+
require_relative "x_twitter_scraper/models/paginated_tweets"
|
|
60
61
|
require_relative "x_twitter_scraper/models/account_retrieve_params"
|
|
61
62
|
require_relative "x_twitter_scraper/models/account_retrieve_response"
|
|
62
63
|
require_relative "x_twitter_scraper/models/account_set_x_username_params"
|
|
@@ -134,7 +135,6 @@ require_relative "x_twitter_scraper/models/monitors/keyword_retrieve_response"
|
|
|
134
135
|
require_relative "x_twitter_scraper/models/monitors/keyword_update_params"
|
|
135
136
|
require_relative "x_twitter_scraper/models/monitors/keyword_update_response"
|
|
136
137
|
require_relative "x_twitter_scraper/models/monitor_update_params"
|
|
137
|
-
require_relative "x_twitter_scraper/models/paginated_tweets"
|
|
138
138
|
require_relative "x_twitter_scraper/models/paginated_users"
|
|
139
139
|
require_relative "x_twitter_scraper/models/radar_item"
|
|
140
140
|
require_relative "x_twitter_scraper/models/radar_retrieve_trending_topics_params"
|
|
@@ -184,6 +184,8 @@ require_relative "x_twitter_scraper/models/webhook_update_params"
|
|
|
184
184
|
require_relative "x_twitter_scraper/models/winner"
|
|
185
185
|
require_relative "x_twitter_scraper/models/x/account_bulk_retry_params"
|
|
186
186
|
require_relative "x_twitter_scraper/models/x/account_bulk_retry_response"
|
|
187
|
+
require_relative "x_twitter_scraper/models/x/account_connection_attempt_retrieve_params"
|
|
188
|
+
require_relative "x_twitter_scraper/models/x/account_connection_attempt_retrieve_response"
|
|
187
189
|
require_relative "x_twitter_scraper/models/x/account_connection_challenge_submit_params"
|
|
188
190
|
require_relative "x_twitter_scraper/models/x/account_connection_challenge_submit_response"
|
|
189
191
|
require_relative "x_twitter_scraper/models/x/account_create_params"
|
|
@@ -241,6 +243,7 @@ require_relative "x_twitter_scraper/models/x/tweet_detail"
|
|
|
241
243
|
require_relative "x_twitter_scraper/models/x/tweet_get_favoriters_params"
|
|
242
244
|
require_relative "x_twitter_scraper/models/x/tweet_get_quotes_params"
|
|
243
245
|
require_relative "x_twitter_scraper/models/x/tweet_get_replies_params"
|
|
246
|
+
require_relative "x_twitter_scraper/models/x/tweet_get_replies_response"
|
|
244
247
|
require_relative "x_twitter_scraper/models/x/tweet_get_retweeters_params"
|
|
245
248
|
require_relative "x_twitter_scraper/models/x/tweet_get_thread_params"
|
|
246
249
|
require_relative "x_twitter_scraper/models/x/tweet_list_params"
|
|
@@ -304,6 +307,7 @@ require_relative "x_twitter_scraper/resources/support/tickets"
|
|
|
304
307
|
require_relative "x_twitter_scraper/resources/trends"
|
|
305
308
|
require_relative "x_twitter_scraper/resources/webhooks"
|
|
306
309
|
require_relative "x_twitter_scraper/resources/x"
|
|
310
|
+
require_relative "x_twitter_scraper/resources/x/account_connection_attempts"
|
|
307
311
|
require_relative "x_twitter_scraper/resources/x/account_connection_challenges"
|
|
308
312
|
require_relative "x_twitter_scraper/resources/x/accounts"
|
|
309
313
|
require_relative "x_twitter_scraper/resources/x/bookmarks"
|
|
@@ -61,6 +61,16 @@ module XTwitterScraper
|
|
|
61
61
|
sig { returns(String) }
|
|
62
62
|
attr_accessor :next_step
|
|
63
63
|
|
|
64
|
+
# Sources and guidance for researching a fresh post angle.
|
|
65
|
+
sig do
|
|
66
|
+
returns(
|
|
67
|
+
T::Array[
|
|
68
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation
|
|
69
|
+
]
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
attr_accessor :radar_recommendations
|
|
73
|
+
|
|
64
74
|
# Published signal names with unpublished weights as null.
|
|
65
75
|
sig do
|
|
66
76
|
returns(
|
|
@@ -129,6 +139,10 @@ module XTwitterScraper
|
|
|
129
139
|
follow_up_questions: T::Array[String],
|
|
130
140
|
intent_url: String,
|
|
131
141
|
next_step: String,
|
|
142
|
+
radar_recommendations:
|
|
143
|
+
T::Array[
|
|
144
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation::OrHash
|
|
145
|
+
],
|
|
132
146
|
scorer_weights:
|
|
133
147
|
T::Array[
|
|
134
148
|
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::ScorerWeight::OrHash
|
|
@@ -154,6 +168,8 @@ module XTwitterScraper
|
|
|
154
168
|
# X post intent seeded with the topic.
|
|
155
169
|
intent_url:,
|
|
156
170
|
next_step:,
|
|
171
|
+
# Sources and guidance for researching a fresh post angle.
|
|
172
|
+
radar_recommendations:,
|
|
157
173
|
# Published signal names with unpublished weights as null.
|
|
158
174
|
scorer_weights:,
|
|
159
175
|
# Signal source and evidence limits.
|
|
@@ -184,6 +200,10 @@ module XTwitterScraper
|
|
|
184
200
|
follow_up_questions: T::Array[String],
|
|
185
201
|
intent_url: String,
|
|
186
202
|
next_step: String,
|
|
203
|
+
radar_recommendations:
|
|
204
|
+
T::Array[
|
|
205
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation
|
|
206
|
+
],
|
|
187
207
|
scorer_weights:
|
|
188
208
|
T::Array[
|
|
189
209
|
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::ScorerWeight
|
|
@@ -254,6 +274,128 @@ module XTwitterScraper
|
|
|
254
274
|
end
|
|
255
275
|
end
|
|
256
276
|
|
|
277
|
+
class RadarRecommendation < XTwitterScraper::Internal::Type::BaseModel
|
|
278
|
+
OrHash =
|
|
279
|
+
T.type_alias do
|
|
280
|
+
T.any(
|
|
281
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation,
|
|
282
|
+
XTwitterScraper::Internal::AnyHash
|
|
283
|
+
)
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# Radar endpoint for this source.
|
|
287
|
+
sig { returns(String) }
|
|
288
|
+
attr_accessor :endpoint
|
|
289
|
+
|
|
290
|
+
# Source-specific drafting guidance.
|
|
291
|
+
sig { returns(String) }
|
|
292
|
+
attr_accessor :guidance
|
|
293
|
+
|
|
294
|
+
sig do
|
|
295
|
+
returns(
|
|
296
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation::Source::TaggedSymbol
|
|
297
|
+
)
|
|
298
|
+
end
|
|
299
|
+
attr_accessor :source
|
|
300
|
+
|
|
301
|
+
# Current-topic research this source supports.
|
|
302
|
+
sig { returns(String) }
|
|
303
|
+
attr_accessor :use_for
|
|
304
|
+
|
|
305
|
+
sig do
|
|
306
|
+
params(
|
|
307
|
+
endpoint: String,
|
|
308
|
+
guidance: String,
|
|
309
|
+
source:
|
|
310
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation::Source::OrSymbol,
|
|
311
|
+
use_for: String
|
|
312
|
+
).returns(T.attached_class)
|
|
313
|
+
end
|
|
314
|
+
def self.new(
|
|
315
|
+
# Radar endpoint for this source.
|
|
316
|
+
endpoint:,
|
|
317
|
+
# Source-specific drafting guidance.
|
|
318
|
+
guidance:,
|
|
319
|
+
source:,
|
|
320
|
+
# Current-topic research this source supports.
|
|
321
|
+
use_for:
|
|
322
|
+
)
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
sig do
|
|
326
|
+
override.returns(
|
|
327
|
+
{
|
|
328
|
+
endpoint: String,
|
|
329
|
+
guidance: String,
|
|
330
|
+
source:
|
|
331
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation::Source::TaggedSymbol,
|
|
332
|
+
use_for: String
|
|
333
|
+
}
|
|
334
|
+
)
|
|
335
|
+
end
|
|
336
|
+
def to_hash
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
module Source
|
|
340
|
+
extend XTwitterScraper::Internal::Type::Enum
|
|
341
|
+
|
|
342
|
+
TaggedSymbol =
|
|
343
|
+
T.type_alias do
|
|
344
|
+
T.all(
|
|
345
|
+
Symbol,
|
|
346
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation::Source
|
|
347
|
+
)
|
|
348
|
+
end
|
|
349
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
350
|
+
|
|
351
|
+
REDDIT =
|
|
352
|
+
T.let(
|
|
353
|
+
:reddit,
|
|
354
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation::Source::TaggedSymbol
|
|
355
|
+
)
|
|
356
|
+
GITHUB =
|
|
357
|
+
T.let(
|
|
358
|
+
:github,
|
|
359
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation::Source::TaggedSymbol
|
|
360
|
+
)
|
|
361
|
+
TRUSTMRR =
|
|
362
|
+
T.let(
|
|
363
|
+
:trustmrr,
|
|
364
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation::Source::TaggedSymbol
|
|
365
|
+
)
|
|
366
|
+
HACKER_NEWS =
|
|
367
|
+
T.let(
|
|
368
|
+
:hacker_news,
|
|
369
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation::Source::TaggedSymbol
|
|
370
|
+
)
|
|
371
|
+
GOOGLE_TRENDS =
|
|
372
|
+
T.let(
|
|
373
|
+
:google_trends,
|
|
374
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation::Source::TaggedSymbol
|
|
375
|
+
)
|
|
376
|
+
WIKIPEDIA =
|
|
377
|
+
T.let(
|
|
378
|
+
:wikipedia,
|
|
379
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation::Source::TaggedSymbol
|
|
380
|
+
)
|
|
381
|
+
POLYMARKET =
|
|
382
|
+
T.let(
|
|
383
|
+
:polymarket,
|
|
384
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation::Source::TaggedSymbol
|
|
385
|
+
)
|
|
386
|
+
|
|
387
|
+
sig do
|
|
388
|
+
override.returns(
|
|
389
|
+
T::Array[
|
|
390
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation::Source::TaggedSymbol
|
|
391
|
+
]
|
|
392
|
+
)
|
|
393
|
+
end
|
|
394
|
+
def self.values
|
|
395
|
+
end
|
|
396
|
+
end
|
|
397
|
+
end
|
|
398
|
+
|
|
257
399
|
class ScorerWeight < XTwitterScraper::Internal::Type::BaseModel
|
|
258
400
|
OrHash =
|
|
259
401
|
T.type_alias do
|
|
@@ -98,13 +98,6 @@ module XTwitterScraper
|
|
|
98
98
|
)
|
|
99
99
|
end
|
|
100
100
|
|
|
101
|
-
# Whether the disclosure can be edited on X.
|
|
102
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
103
|
-
attr_reader :can_edit
|
|
104
|
-
|
|
105
|
-
sig { params(can_edit: T::Boolean).void }
|
|
106
|
-
attr_writer :can_edit
|
|
107
|
-
|
|
108
101
|
# Source of the AI-generated media disclosure.
|
|
109
102
|
sig { returns(T.nilable(String)) }
|
|
110
103
|
attr_reader :detection_source
|
|
@@ -121,14 +114,11 @@ module XTwitterScraper
|
|
|
121
114
|
|
|
122
115
|
sig do
|
|
123
116
|
params(
|
|
124
|
-
can_edit: T::Boolean,
|
|
125
117
|
detection_source: String,
|
|
126
118
|
has_ai_generated_media: T::Boolean
|
|
127
119
|
).returns(T.attached_class)
|
|
128
120
|
end
|
|
129
121
|
def self.new(
|
|
130
|
-
# Whether the disclosure can be edited on X.
|
|
131
|
-
can_edit: nil,
|
|
132
122
|
# Source of the AI-generated media disclosure.
|
|
133
123
|
detection_source: nil,
|
|
134
124
|
# True when X labels the tweet as containing AI-generated media.
|
|
@@ -138,11 +128,7 @@ module XTwitterScraper
|
|
|
138
128
|
|
|
139
129
|
sig do
|
|
140
130
|
override.returns(
|
|
141
|
-
{
|
|
142
|
-
can_edit: T::Boolean,
|
|
143
|
-
detection_source: String,
|
|
144
|
-
has_ai_generated_media: T::Boolean
|
|
145
|
-
}
|
|
131
|
+
{ detection_source: String, has_ai_generated_media: T::Boolean }
|
|
146
132
|
)
|
|
147
133
|
end
|
|
148
134
|
def to_hash
|