x-twitter-scraper 0.10.5 → 0.10.6
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 +14 -0
- data/README.md +49 -17
- data/lib/x_twitter_scraper/client.rb +0 -13
- data/lib/x_twitter_scraper/file_part.rb +0 -3
- data/lib/x_twitter_scraper/internal/transport/base_client.rb +3 -211
- data/lib/x_twitter_scraper/internal/transport/pooled_net_requester.rb +2 -56
- data/lib/x_twitter_scraper/internal/type/array_of.rb +1 -77
- data/lib/x_twitter_scraper/internal/type/base_model.rb +3 -133
- data/lib/x_twitter_scraper/internal/type/base_page.rb +0 -13
- data/lib/x_twitter_scraper/internal/type/boolean.rb +0 -38
- data/lib/x_twitter_scraper/internal/type/converter.rb +0 -136
- data/lib/x_twitter_scraper/internal/type/enum.rb +1 -80
- data/lib/x_twitter_scraper/internal/type/file_input.rb +0 -39
- data/lib/x_twitter_scraper/internal/type/hash_of.rb +1 -77
- data/lib/x_twitter_scraper/internal/type/request_parameters.rb +0 -13
- data/lib/x_twitter_scraper/internal/type/union.rb +0 -101
- data/lib/x_twitter_scraper/internal/type/unknown.rb +0 -40
- data/lib/x_twitter_scraper/internal/util.rb +2 -307
- data/lib/x_twitter_scraper/models/account_retrieve_response.rb +0 -3
- data/lib/x_twitter_scraper/models/compose_create_params.rb +0 -4
- data/lib/x_twitter_scraper/models/compose_create_response.rb +0 -4
- data/lib/x_twitter_scraper/models/credit_retrieve_balance_response.rb +0 -3
- data/lib/x_twitter_scraper/models/credit_topup_balance_response.rb +0 -3
- data/lib/x_twitter_scraper/models/draft_list_params.rb +0 -3
- data/lib/x_twitter_scraper/models/draw_export_params.rb +0 -3
- data/lib/x_twitter_scraper/models/draw_list_params.rb +0 -3
- data/lib/x_twitter_scraper/models/draw_run_response.rb +0 -3
- data/lib/x_twitter_scraper/models/embedded_tweet.rb +0 -3
- data/lib/x_twitter_scraper/models/event.rb +0 -3
- data/lib/x_twitter_scraper/models/event_list_params.rb +0 -3
- data/lib/x_twitter_scraper/models/extraction_estimate_cost_params.rb +0 -3
- data/lib/x_twitter_scraper/models/extraction_list_params.rb +0 -3
- data/lib/x_twitter_scraper/models/extraction_run_params.rb +0 -3
- data/lib/x_twitter_scraper/models/guest_wallet_create_response.rb +0 -3
- data/lib/x_twitter_scraper/models/guest_wallet_retrieve_status_response.rb +0 -3
- data/lib/x_twitter_scraper/models/guest_wallet_topup_response.rb +0 -3
- data/lib/x_twitter_scraper/models/radar_item.rb +0 -3
- data/lib/x_twitter_scraper/models/radar_retrieve_trending_topics_params.rb +0 -3
- data/lib/x_twitter_scraper/models/search_tweet.rb +0 -3
- data/lib/x_twitter_scraper/models/trend_list_params.rb +0 -3
- data/lib/x_twitter_scraper/models/webhook.rb +0 -3
- data/lib/x_twitter_scraper/models/x/communities/join_create_response.rb +0 -3
- data/lib/x_twitter_scraper/models/x/communities/join_delete_all_response.rb +0 -4
- data/lib/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rb +0 -4
- data/lib/x_twitter_scraper/models/x/communities/tweet_list_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/community_create_response.rb +0 -3
- data/lib/x_twitter_scraper/models/x/community_delete_response.rb +0 -3
- data/lib/x_twitter_scraper/models/x/community_retrieve_members_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/community_retrieve_moderators_params.rb +0 -4
- data/lib/x_twitter_scraper/models/x/community_retrieve_search_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/dm_retrieve_history_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/dm_retrieve_history_response.rb +0 -4
- data/lib/x_twitter_scraper/models/x/dm_send_response.rb +0 -3
- data/lib/x_twitter_scraper/models/x/list_retrieve_followers_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/list_retrieve_members_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/list_retrieve_tweets_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/media_upload_response.rb +0 -3
- data/lib/x_twitter_scraper/models/x/profile_update_avatar_response.rb +0 -3
- data/lib/x_twitter_scraper/models/x/profile_update_banner_response.rb +0 -3
- data/lib/x_twitter_scraper/models/x/profile_update_response.rb +0 -3
- data/lib/x_twitter_scraper/models/x/tweet_create_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/tweet_create_response.rb +0 -3
- data/lib/x_twitter_scraper/models/x/tweet_delete_response.rb +0 -3
- data/lib/x_twitter_scraper/models/x/tweet_detail.rb +0 -3
- data/lib/x_twitter_scraper/models/x/tweet_get_favoriters_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/tweet_get_quotes_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/tweet_get_replies_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/tweet_get_retweeters_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/tweet_get_thread_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/tweet_retrieve_response.rb +0 -3
- data/lib/x_twitter_scraper/models/x/tweet_search_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/tweets/like_create_response.rb +0 -3
- data/lib/x_twitter_scraper/models/x/tweets/like_delete_response.rb +0 -3
- data/lib/x_twitter_scraper/models/x/tweets/retweet_create_response.rb +0 -3
- data/lib/x_twitter_scraper/models/x/tweets/retweet_delete_response.rb +0 -3
- data/lib/x_twitter_scraper/models/x/user_remove_follower_response.rb +0 -3
- data/lib/x_twitter_scraper/models/x/user_retrieve_batch_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/user_retrieve_batch_response.rb +0 -3
- data/lib/x_twitter_scraper/models/x/user_retrieve_followers_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/user_retrieve_followers_you_know_params.rb +0 -4
- data/lib/x_twitter_scraper/models/x/user_retrieve_following_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/user_retrieve_likes_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/user_retrieve_media_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/user_retrieve_mentions_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/user_retrieve_replies_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/user_retrieve_search_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/user_retrieve_tweets_params.rb +0 -3
- data/lib/x_twitter_scraper/models/x/user_retrieve_verified_followers_params.rb +0 -4
- data/lib/x_twitter_scraper/models/x/users/follow_create_response.rb +0 -3
- data/lib/x_twitter_scraper/models/x/users/follow_delete_all_response.rb +0 -3
- data/lib/x_twitter_scraper/models/x/write_action_retrieve_response.rb +0 -3
- data/lib/x_twitter_scraper/models/x/x_account.rb +0 -3
- data/lib/x_twitter_scraper/models/x_get_article_response.rb +0 -4
- data/lib/x_twitter_scraper/request_options.rb +0 -2
- data/lib/x_twitter_scraper/resources/drafts.rb +0 -3
- data/lib/x_twitter_scraper/resources/draws.rb +0 -6
- data/lib/x_twitter_scraper/resources/events.rb +0 -3
- data/lib/x_twitter_scraper/resources/extractions.rb +0 -9
- data/lib/x_twitter_scraper/resources/guest_wallets.rb +0 -6
- data/lib/x_twitter_scraper/resources/radar.rb +0 -3
- data/lib/x_twitter_scraper/resources/support/tickets.rb +0 -6
- data/lib/x_twitter_scraper/resources/trends.rb +0 -3
- data/lib/x_twitter_scraper/resources/x/communities/join.rb +0 -6
- data/lib/x_twitter_scraper/resources/x/communities/tweets.rb +0 -7
- data/lib/x_twitter_scraper/resources/x/communities.rb +0 -16
- data/lib/x_twitter_scraper/resources/x/dm.rb +0 -6
- data/lib/x_twitter_scraper/resources/x/lists.rb +0 -9
- data/lib/x_twitter_scraper/resources/x/media.rb +0 -3
- data/lib/x_twitter_scraper/resources/x/profile.rb +0 -9
- data/lib/x_twitter_scraper/resources/x/tweets/like.rb +0 -6
- data/lib/x_twitter_scraper/resources/x/tweets/retweet.rb +0 -6
- data/lib/x_twitter_scraper/resources/x/tweets.rb +0 -24
- data/lib/x_twitter_scraper/resources/x/users/follow.rb +0 -6
- data/lib/x_twitter_scraper/resources/x/users.rb +0 -38
- data/lib/x_twitter_scraper/resources/x.rb +0 -3
- data/lib/x_twitter_scraper/version.rb +1 -1
- data/lib/x_twitter_scraper.rb +0 -5
- data/rbi/x_twitter_scraper/client.rbi +0 -4
- data/rbi/x_twitter_scraper/file_part.rbi +0 -1
- data/rbi/x_twitter_scraper/internal/transport/base_client.rbi +0 -19
- data/rbi/x_twitter_scraper/internal/transport/pooled_net_requester.rbi +0 -9
- data/rbi/x_twitter_scraper/internal/type/array_of.rbi +0 -10
- data/rbi/x_twitter_scraper/internal/type/base_model.rbi +0 -47
- data/rbi/x_twitter_scraper/internal/type/base_page.rbi +0 -4
- data/rbi/x_twitter_scraper/internal/type/boolean.rbi +0 -8
- data/rbi/x_twitter_scraper/internal/type/converter.rbi +0 -36
- data/rbi/x_twitter_scraper/internal/type/enum.rbi +0 -20
- data/rbi/x_twitter_scraper/internal/type/file_input.rbi +0 -10
- data/rbi/x_twitter_scraper/internal/type/hash_of.rbi +0 -10
- data/rbi/x_twitter_scraper/internal/type/request_parameters.rbi +0 -4
- data/rbi/x_twitter_scraper/internal/type/union.rbi +0 -18
- data/rbi/x_twitter_scraper/internal/type/unknown.rbi +0 -8
- data/rbi/x_twitter_scraper/internal/util.rbi +0 -75
- data/rbi/x_twitter_scraper/internal.rbi +0 -2
- data/rbi/x_twitter_scraper/request_options.rbi +0 -1
- data/sig/x_twitter_scraper/internal/transport/base_client.rbs +0 -1
- metadata +2 -2
|
@@ -16,9 +16,6 @@ module XTwitterScraper
|
|
|
16
16
|
# @return [XTwitterScraper::Resources::X::Tweets::Retweet]
|
|
17
17
|
attr_reader :retweet
|
|
18
18
|
|
|
19
|
-
# Some parameter documentations has been truncated, see
|
|
20
|
-
# {XTwitterScraper::Models::X::TweetCreateParams} for more details.
|
|
21
|
-
#
|
|
22
19
|
# Create tweet
|
|
23
20
|
#
|
|
24
21
|
# @overload create(account:, idempotency_key:, community_id: nil, is_note_tweet: nil, media: nil, reply_to_tweet_id: nil, text: nil, request_options: {})
|
|
@@ -98,9 +95,6 @@ module XTwitterScraper
|
|
|
98
95
|
)
|
|
99
96
|
end
|
|
100
97
|
|
|
101
|
-
# Some parameter documentations has been truncated, see
|
|
102
|
-
# {XTwitterScraper::Models::X::TweetDeleteParams} for more details.
|
|
103
|
-
#
|
|
104
98
|
# Delete tweet
|
|
105
99
|
#
|
|
106
100
|
# @overload delete(id, account:, idempotency_key:, request_options: {})
|
|
@@ -129,9 +123,6 @@ module XTwitterScraper
|
|
|
129
123
|
)
|
|
130
124
|
end
|
|
131
125
|
|
|
132
|
-
# Some parameter documentations has been truncated, see
|
|
133
|
-
# {XTwitterScraper::Models::X::TweetGetFavoritersParams} for more details.
|
|
134
|
-
#
|
|
135
126
|
# Returns liker profiles that X makes visible for the post. X can withhold liker
|
|
136
127
|
# identities even when the post reports likes. In that case this endpoint returns
|
|
137
128
|
# 424 `favoriters_unavailable` instead of a misleading empty success.
|
|
@@ -205,9 +196,6 @@ module XTwitterScraper
|
|
|
205
196
|
)
|
|
206
197
|
end
|
|
207
198
|
|
|
208
|
-
# Some parameter documentations has been truncated, see
|
|
209
|
-
# {XTwitterScraper::Models::X::TweetGetQuotesParams} for more details.
|
|
210
|
-
#
|
|
211
199
|
# List quote tweets of a tweet
|
|
212
200
|
#
|
|
213
201
|
# @overload get_quotes(id, any_words: nil, blue_verified_only: nil, card_name: nil, cashtags: nil, conversation_id: nil, cursor: nil, exact_phrase: nil, exclude_source: nil, exclude_words: nil, from_user: nil, geocode: nil, hashtags: nil, include_replies: nil, in_reply_to_tweet_id: nil, language: nil, max_faves: nil, max_id: nil, max_quotes: nil, max_replies: nil, max_retweets: nil, media_type: nil, mentioning: nil, min_bookmarks: nil, min_faves: nil, min_quotes: nil, min_replies: nil, min_retweets: nil, min_views: nil, native_retweets: nil, near: nil, news: nil, page_size: nil, quotes: nil, quotes_of_tweet_id: nil, replies: nil, retweets: nil, retweets_of_tweet_id: nil, safe: nil, since_date: nil, since_id: nil, since_time: nil, source: nil, to_user: nil, until_date: nil, until_time: nil, url: nil, verified_only: nil, within: nil, within_time: nil, request_options: {})
|
|
@@ -364,9 +352,6 @@ module XTwitterScraper
|
|
|
364
352
|
)
|
|
365
353
|
end
|
|
366
354
|
|
|
367
|
-
# Some parameter documentations has been truncated, see
|
|
368
|
-
# {XTwitterScraper::Models::X::TweetGetRepliesParams} for more details.
|
|
369
|
-
#
|
|
370
355
|
# Returns direct replies. Omit mode for automatic maximum coverage with resumable
|
|
371
356
|
# pagination. Complete mode returns nested replies, diagnostics, and 424 when
|
|
372
357
|
# direct coverage stays below 80%.
|
|
@@ -542,9 +527,6 @@ module XTwitterScraper
|
|
|
542
527
|
)
|
|
543
528
|
end
|
|
544
529
|
|
|
545
|
-
# Some parameter documentations has been truncated, see
|
|
546
|
-
# {XTwitterScraper::Models::X::TweetGetRetweetersParams} for more details.
|
|
547
|
-
#
|
|
548
530
|
# List users who retweeted a tweet
|
|
549
531
|
#
|
|
550
532
|
# @overload get_retweeters(id, bio_contains: nil, cursor: nil, has_location: nil, has_website: nil, location_contains: nil, max_followers: nil, max_following: nil, max_statuses: nil, min_account_age_days: nil, min_followers: nil, min_following: nil, min_statuses: nil, page_size: nil, username_contains: nil, verified_only: nil, verified_type: nil, request_options: {})
|
|
@@ -616,9 +598,6 @@ module XTwitterScraper
|
|
|
616
598
|
)
|
|
617
599
|
end
|
|
618
600
|
|
|
619
|
-
# Some parameter documentations has been truncated, see
|
|
620
|
-
# {XTwitterScraper::Models::X::TweetGetThreadParams} for more details.
|
|
621
|
-
#
|
|
622
601
|
# Get full conversation thread for a tweet
|
|
623
602
|
#
|
|
624
603
|
# @overload get_thread(id, any_words: nil, blue_verified_only: 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, max_faves: nil, max_quotes: nil, max_replies: nil, max_retweets: nil, media_type: nil, mentioning: nil, min_bookmarks: nil, min_faves: nil, min_quotes: nil, min_replies: nil, min_retweets: nil, min_views: nil, page_size: nil, quotes: nil, quotes_of_tweet_id: nil, replies: nil, retweets: nil, retweets_of_tweet_id: nil, since_date: nil, to_user: nil, until_date: nil, url: nil, verified_only: nil, request_options: {})
|
|
@@ -736,9 +715,6 @@ module XTwitterScraper
|
|
|
736
715
|
)
|
|
737
716
|
end
|
|
738
717
|
|
|
739
|
-
# Some parameter documentations has been truncated, see
|
|
740
|
-
# {XTwitterScraper::Models::X::TweetSearchParams} for more details.
|
|
741
|
-
#
|
|
742
718
|
# No-mode search maximizes coverage. New cursorless `Latest` sessions return rows
|
|
743
719
|
# newest-first across cursor pages. Existing cursors preserve their established
|
|
744
720
|
# ordering.
|
|
@@ -10,9 +10,6 @@ module XTwitterScraper
|
|
|
10
10
|
class Users
|
|
11
11
|
# X write actions (tweets, likes, follows, DMs)
|
|
12
12
|
class Follow
|
|
13
|
-
# Some parameter documentations has been truncated, see
|
|
14
|
-
# {XTwitterScraper::Models::X::Users::FollowCreateParams} for more details.
|
|
15
|
-
#
|
|
16
13
|
# Follow user
|
|
17
14
|
#
|
|
18
15
|
# @overload create(id, account:, idempotency_key:, request_options: {})
|
|
@@ -41,9 +38,6 @@ module XTwitterScraper
|
|
|
41
38
|
)
|
|
42
39
|
end
|
|
43
40
|
|
|
44
|
-
# Some parameter documentations has been truncated, see
|
|
45
|
-
# {XTwitterScraper::Models::X::Users::FollowDeleteAllParams} for more details.
|
|
46
|
-
#
|
|
47
41
|
# Unfollow user
|
|
48
42
|
#
|
|
49
43
|
# @overload delete_all(id, account:, idempotency_key:, request_options: {})
|
|
@@ -32,9 +32,6 @@ module XTwitterScraper
|
|
|
32
32
|
)
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
# Some parameter documentations has been truncated, see
|
|
36
|
-
# {XTwitterScraper::Models::X::UserRemoveFollowerParams} for more details.
|
|
37
|
-
#
|
|
38
35
|
# Remove follower
|
|
39
36
|
#
|
|
40
37
|
# @overload remove_follower(id, account:, idempotency_key:, request_options: {})
|
|
@@ -63,9 +60,6 @@ module XTwitterScraper
|
|
|
63
60
|
)
|
|
64
61
|
end
|
|
65
62
|
|
|
66
|
-
# Some parameter documentations has been truncated, see
|
|
67
|
-
# {XTwitterScraper::Models::X::UserRetrieveBatchParams} for more details.
|
|
68
|
-
#
|
|
69
63
|
# Look up multiple users by IDs in one call
|
|
70
64
|
#
|
|
71
65
|
# @overload retrieve_batch(ids:, request_options: {})
|
|
@@ -89,9 +83,6 @@ module XTwitterScraper
|
|
|
89
83
|
)
|
|
90
84
|
end
|
|
91
85
|
|
|
92
|
-
# Some parameter documentations has been truncated, see
|
|
93
|
-
# {XTwitterScraper::Models::X::UserRetrieveFollowersParams} for more details.
|
|
94
|
-
#
|
|
95
86
|
# List followers of a user
|
|
96
87
|
#
|
|
97
88
|
# @overload retrieve_followers(id, after: nil, bio_contains: nil, cursor: nil, has_location: nil, has_website: nil, limit: nil, location_contains: nil, max_followers: nil, max_following: nil, max_statuses: nil, min_account_age_days: nil, min_followers: nil, min_following: nil, min_statuses: nil, mode: nil, page_size: nil, username_contains: nil, verified_only: nil, verified_type: nil, request_options: {})
|
|
@@ -169,10 +160,6 @@ module XTwitterScraper
|
|
|
169
160
|
)
|
|
170
161
|
end
|
|
171
162
|
|
|
172
|
-
# Some parameter documentations has been truncated, see
|
|
173
|
-
# {XTwitterScraper::Models::X::UserRetrieveFollowersYouKnowParams} for more
|
|
174
|
-
# details.
|
|
175
|
-
#
|
|
176
163
|
# List mutual followers between you and a user
|
|
177
164
|
#
|
|
178
165
|
# @overload retrieve_followers_you_know(id, bio_contains: nil, cursor: nil, has_location: nil, has_website: nil, location_contains: nil, max_followers: nil, max_following: nil, max_statuses: nil, min_account_age_days: nil, min_followers: nil, min_following: nil, min_statuses: nil, page_size: nil, username_contains: nil, verified_only: nil, verified_type: nil, request_options: {})
|
|
@@ -244,9 +231,6 @@ module XTwitterScraper
|
|
|
244
231
|
)
|
|
245
232
|
end
|
|
246
233
|
|
|
247
|
-
# Some parameter documentations has been truncated, see
|
|
248
|
-
# {XTwitterScraper::Models::X::UserRetrieveFollowingParams} for more details.
|
|
249
|
-
#
|
|
250
234
|
# List accounts a user follows
|
|
251
235
|
#
|
|
252
236
|
# @overload retrieve_following(id, after: nil, bio_contains: nil, cursor: nil, has_location: nil, has_website: nil, limit: nil, location_contains: nil, max_followers: nil, max_following: nil, max_statuses: nil, min_account_age_days: nil, min_followers: nil, min_following: nil, min_statuses: nil, mode: nil, page_size: nil, username_contains: nil, verified_only: nil, verified_type: nil, request_options: {})
|
|
@@ -324,9 +308,6 @@ module XTwitterScraper
|
|
|
324
308
|
)
|
|
325
309
|
end
|
|
326
310
|
|
|
327
|
-
# Some parameter documentations has been truncated, see
|
|
328
|
-
# {XTwitterScraper::Models::X::UserRetrieveLikesParams} for more details.
|
|
329
|
-
#
|
|
330
311
|
# List tweets liked by a user
|
|
331
312
|
#
|
|
332
313
|
# @overload retrieve_likes(id, any_words: nil, blue_verified_only: nil, card_name: nil, cashtags: nil, conversation_id: nil, cursor: nil, exact_phrase: nil, exclude_source: nil, exclude_words: nil, from_user: nil, geocode: nil, hashtags: nil, in_reply_to_tweet_id: nil, language: nil, max_faves: nil, max_id: nil, max_quotes: nil, max_replies: nil, max_retweets: nil, media_type: nil, mentioning: nil, min_bookmarks: nil, min_faves: nil, min_quotes: nil, min_replies: nil, min_retweets: nil, min_views: nil, native_retweets: nil, near: nil, news: nil, page_size: nil, quotes: nil, quotes_of_tweet_id: nil, replies: nil, retweets: nil, retweets_of_tweet_id: nil, safe: nil, since_date: nil, since_id: nil, source: nil, to_user: nil, until_date: nil, url: nil, verified_only: nil, within: nil, within_time: nil, request_options: {})
|
|
@@ -474,9 +455,6 @@ module XTwitterScraper
|
|
|
474
455
|
)
|
|
475
456
|
end
|
|
476
457
|
|
|
477
|
-
# Some parameter documentations has been truncated, see
|
|
478
|
-
# {XTwitterScraper::Models::X::UserRetrieveMediaParams} for more details.
|
|
479
|
-
#
|
|
480
458
|
# List media tweets posted by a user
|
|
481
459
|
#
|
|
482
460
|
# @overload retrieve_media(id, any_words: nil, blue_verified_only: nil, card_name: nil, cashtags: nil, conversation_id: nil, cursor: nil, exact_phrase: nil, exclude_source: nil, exclude_words: nil, from_user: nil, geocode: nil, hashtags: nil, in_reply_to_tweet_id: nil, language: nil, max_faves: nil, max_id: nil, max_quotes: nil, max_replies: nil, max_retweets: nil, media_type: nil, mentioning: nil, min_bookmarks: nil, min_faves: nil, min_quotes: nil, min_replies: nil, min_retweets: nil, min_views: nil, native_retweets: nil, near: nil, news: nil, page_size: nil, quotes: nil, quotes_of_tweet_id: nil, replies: nil, retweets: nil, retweets_of_tweet_id: nil, safe: nil, since_date: nil, since_id: nil, source: nil, to_user: nil, until_date: nil, url: nil, verified_only: nil, within: nil, within_time: nil, request_options: {})
|
|
@@ -624,9 +602,6 @@ module XTwitterScraper
|
|
|
624
602
|
)
|
|
625
603
|
end
|
|
626
604
|
|
|
627
|
-
# Some parameter documentations has been truncated, see
|
|
628
|
-
# {XTwitterScraper::Models::X::UserRetrieveMentionsParams} for more details.
|
|
629
|
-
#
|
|
630
605
|
# List tweets mentioning a user
|
|
631
606
|
#
|
|
632
607
|
# @overload retrieve_mentions(id, any_words: nil, blue_verified_only: nil, card_name: nil, cashtags: nil, conversation_id: nil, cursor: nil, exact_phrase: nil, exclude_source: nil, exclude_words: nil, from_user: nil, geocode: nil, hashtags: nil, in_reply_to_tweet_id: nil, language: nil, max_faves: nil, max_id: nil, max_quotes: nil, max_replies: nil, max_retweets: nil, media_type: nil, mentioning: nil, min_bookmarks: nil, min_faves: nil, min_quotes: nil, min_replies: nil, min_retweets: nil, min_views: nil, native_retweets: nil, near: nil, news: nil, page_size: nil, quotes: nil, quotes_of_tweet_id: nil, replies: nil, retweets: nil, retweets_of_tweet_id: nil, safe: nil, since_date: nil, since_id: nil, since_time: nil, source: nil, to_user: nil, until_date: nil, until_time: nil, url: nil, verified_only: nil, within: nil, within_time: nil, request_options: {})
|
|
@@ -780,9 +755,6 @@ module XTwitterScraper
|
|
|
780
755
|
)
|
|
781
756
|
end
|
|
782
757
|
|
|
783
|
-
# Some parameter documentations has been truncated, see
|
|
784
|
-
# {XTwitterScraper::Models::X::UserRetrieveRepliesParams} for more details.
|
|
785
|
-
#
|
|
786
758
|
# Returns target-authored posts and replies. Omit mode for automatic maximum
|
|
787
759
|
# coverage. Pass next_cursor unchanged. Unprefixed cursors stay legacy. Excludes
|
|
788
760
|
# other-author context.
|
|
@@ -935,9 +907,6 @@ module XTwitterScraper
|
|
|
935
907
|
)
|
|
936
908
|
end
|
|
937
909
|
|
|
938
|
-
# Some parameter documentations has been truncated, see
|
|
939
|
-
# {XTwitterScraper::Models::X::UserRetrieveSearchParams} for more details.
|
|
940
|
-
#
|
|
941
910
|
# Search users by name or username
|
|
942
911
|
#
|
|
943
912
|
# @overload retrieve_search(q:, bio_contains: nil, cursor: nil, has_location: nil, has_website: nil, location_contains: nil, max_followers: nil, max_following: nil, max_statuses: nil, min_account_age_days: nil, min_followers: nil, min_following: nil, min_statuses: nil, username_contains: nil, verified_only: nil, verified_type: nil, request_options: {})
|
|
@@ -1006,9 +975,6 @@ module XTwitterScraper
|
|
|
1006
975
|
)
|
|
1007
976
|
end
|
|
1008
977
|
|
|
1009
|
-
# Some parameter documentations has been truncated, see
|
|
1010
|
-
# {XTwitterScraper::Models::X::UserRetrieveTweetsParams} for more details.
|
|
1011
|
-
#
|
|
1012
978
|
# Omit mode for automatic maximum coverage. Pass next_cursor unchanged. Unprefixed
|
|
1013
979
|
# cursors use legacy pagination. Shape and billing stay the same.
|
|
1014
980
|
#
|
|
@@ -1163,10 +1129,6 @@ module XTwitterScraper
|
|
|
1163
1129
|
)
|
|
1164
1130
|
end
|
|
1165
1131
|
|
|
1166
|
-
# Some parameter documentations has been truncated, see
|
|
1167
|
-
# {XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersParams} for more
|
|
1168
|
-
# details.
|
|
1169
|
-
#
|
|
1170
1132
|
# List verified followers of a user
|
|
1171
1133
|
#
|
|
1172
1134
|
# @overload retrieve_verified_followers(id, after: nil, bio_contains: nil, cursor: nil, has_location: nil, has_website: nil, limit: nil, location_contains: nil, max_followers: nil, max_following: nil, max_statuses: nil, min_account_age_days: nil, min_followers: nil, min_following: nil, min_statuses: nil, mode: nil, page_size: nil, username_contains: nil, verified_only: nil, verified_type: nil, request_options: {})
|
|
@@ -54,9 +54,6 @@ module XTwitterScraper
|
|
|
54
54
|
# @return [XTwitterScraper::Resources::X::Lists]
|
|
55
55
|
attr_reader :lists
|
|
56
56
|
|
|
57
|
-
# Some parameter documentations has been truncated, see
|
|
58
|
-
# {XTwitterScraper::Models::XGetArticleParams} for more details.
|
|
59
|
-
#
|
|
60
57
|
# Retrieve the full content of an X Article (long-form post) by numeric tweet ID.
|
|
61
58
|
# Returns article_not_found when the tweet is valid but is not an X Article.
|
|
62
59
|
#
|
data/lib/x_twitter_scraper.rb
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
# frozen_string_literal: true
|
|
6
6
|
|
|
7
|
-
# Standard libraries.
|
|
8
7
|
# rubocop:disable Lint/RedundantRequireStatement
|
|
9
8
|
require "English"
|
|
10
9
|
require "base64"
|
|
@@ -24,18 +23,14 @@ require "time"
|
|
|
24
23
|
require "uri"
|
|
25
24
|
# rubocop:enable Lint/RedundantRequireStatement
|
|
26
25
|
|
|
27
|
-
# We already ship the preferred sorbet manifests in the package itself.
|
|
28
|
-
# `tapioca` currently does not offer us a way to opt out of unnecessary compilation.
|
|
29
26
|
if Object.const_defined?(:Tapioca) &&
|
|
30
27
|
caller.chain([$PROGRAM_NAME]).chain(ARGV).any?(/tapioca/) &&
|
|
31
28
|
ARGV.none?(/dsl/)
|
|
32
29
|
return
|
|
33
30
|
end
|
|
34
31
|
|
|
35
|
-
# Gems.
|
|
36
32
|
require "connection_pool"
|
|
37
33
|
|
|
38
|
-
# Package files.
|
|
39
34
|
require_relative "x_twitter_scraper/version"
|
|
40
35
|
require_relative "x_twitter_scraper/internal/util"
|
|
41
36
|
require_relative "x_twitter_scraper/internal/type/converter"
|
|
@@ -83,7 +83,6 @@ module XTwitterScraper
|
|
|
83
83
|
sig { returns(XTwitterScraper::Resources::GuestWallets) }
|
|
84
84
|
attr_reader :guest_wallets
|
|
85
85
|
|
|
86
|
-
# @api private
|
|
87
86
|
sig do
|
|
88
87
|
override
|
|
89
88
|
.params(
|
|
@@ -97,17 +96,14 @@ module XTwitterScraper
|
|
|
97
96
|
private def auth_headers(security:)
|
|
98
97
|
end
|
|
99
98
|
|
|
100
|
-
# @api private
|
|
101
99
|
sig { returns(T::Hash[String, String]) }
|
|
102
100
|
private def auth_api_key
|
|
103
101
|
end
|
|
104
102
|
|
|
105
|
-
# @api private
|
|
106
103
|
sig { returns(T::Hash[String, String]) }
|
|
107
104
|
private def oauth_bearer
|
|
108
105
|
end
|
|
109
106
|
|
|
110
|
-
# Creates and returns a new client for interacting with the API.
|
|
111
107
|
sig do
|
|
112
108
|
params(
|
|
113
109
|
api_key: T.nilable(String),
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
module XTwitterScraper
|
|
8
8
|
module Internal
|
|
9
9
|
module Transport
|
|
10
|
-
# @api private
|
|
11
10
|
class BaseClient
|
|
12
11
|
extend XTwitterScraper::Internal::Util::SorbetRuntimeSupport
|
|
13
12
|
|
|
@@ -76,13 +75,11 @@ module XTwitterScraper
|
|
|
76
75
|
}
|
|
77
76
|
end
|
|
78
77
|
|
|
79
|
-
# from whatwg fetch spec
|
|
80
78
|
MAX_REDIRECTS = 20
|
|
81
79
|
|
|
82
80
|
PLATFORM_HEADERS = T::Hash[String, String]
|
|
83
81
|
|
|
84
82
|
class << self
|
|
85
|
-
# @api private
|
|
86
83
|
sig do
|
|
87
84
|
params(
|
|
88
85
|
req:
|
|
@@ -92,7 +89,6 @@ module XTwitterScraper
|
|
|
92
89
|
def validate!(req)
|
|
93
90
|
end
|
|
94
91
|
|
|
95
|
-
# @api private
|
|
96
92
|
sig do
|
|
97
93
|
params(status: Integer, headers: T::Hash[String, String]).returns(
|
|
98
94
|
T::Boolean
|
|
@@ -101,7 +97,6 @@ module XTwitterScraper
|
|
|
101
97
|
def should_retry?(status, headers:)
|
|
102
98
|
end
|
|
103
99
|
|
|
104
|
-
# @api private
|
|
105
100
|
sig do
|
|
106
101
|
params(
|
|
107
102
|
request:
|
|
@@ -115,7 +110,6 @@ module XTwitterScraper
|
|
|
115
110
|
def follow_redirect(request, status:, response_headers:)
|
|
116
111
|
end
|
|
117
112
|
|
|
118
|
-
# @api private
|
|
119
113
|
sig do
|
|
120
114
|
params(
|
|
121
115
|
status:
|
|
@@ -148,13 +142,11 @@ module XTwitterScraper
|
|
|
148
142
|
sig { returns(T.nilable(String)) }
|
|
149
143
|
attr_reader :idempotency_header
|
|
150
144
|
|
|
151
|
-
# @api private
|
|
152
145
|
sig do
|
|
153
146
|
returns(XTwitterScraper::Internal::Transport::PooledNetRequester)
|
|
154
147
|
end
|
|
155
148
|
attr_reader :requester
|
|
156
149
|
|
|
157
|
-
# @api private
|
|
158
150
|
sig do
|
|
159
151
|
params(
|
|
160
152
|
base_url: String,
|
|
@@ -187,22 +179,18 @@ module XTwitterScraper
|
|
|
187
179
|
)
|
|
188
180
|
end
|
|
189
181
|
|
|
190
|
-
# @api private
|
|
191
182
|
sig { overridable.returns(T::Hash[String, String]) }
|
|
192
183
|
private def auth_headers
|
|
193
184
|
end
|
|
194
185
|
|
|
195
|
-
# @api private
|
|
196
186
|
sig { returns(String) }
|
|
197
187
|
private def user_agent
|
|
198
188
|
end
|
|
199
189
|
|
|
200
|
-
# @api private
|
|
201
190
|
sig { returns(String) }
|
|
202
191
|
private def generate_idempotency_key
|
|
203
192
|
end
|
|
204
193
|
|
|
205
|
-
# @api private
|
|
206
194
|
sig do
|
|
207
195
|
overridable
|
|
208
196
|
.params(
|
|
@@ -217,7 +205,6 @@ module XTwitterScraper
|
|
|
217
205
|
private def build_request(req, opts)
|
|
218
206
|
end
|
|
219
207
|
|
|
220
|
-
# @api private
|
|
221
208
|
sig do
|
|
222
209
|
params(
|
|
223
210
|
headers: T::Hash[String, String],
|
|
@@ -227,7 +214,6 @@ module XTwitterScraper
|
|
|
227
214
|
private def retry_delay(headers, retry_count:)
|
|
228
215
|
end
|
|
229
216
|
|
|
230
|
-
# @api private
|
|
231
217
|
sig do
|
|
232
218
|
params(
|
|
233
219
|
request:
|
|
@@ -245,10 +231,6 @@ module XTwitterScraper
|
|
|
245
231
|
)
|
|
246
232
|
end
|
|
247
233
|
|
|
248
|
-
# Execute the request specified by `req`. This is the method that all resource
|
|
249
|
-
# methods call into.
|
|
250
|
-
#
|
|
251
|
-
# @overload request(method, path, query: {}, headers: {}, body: nil, unwrap: nil, page: nil, stream: nil, model: XTwitterScraper::Internal::Type::Unknown, security: {auth_api_key: true, oauth_bearer: true}, options: {})
|
|
252
234
|
sig do
|
|
253
235
|
params(
|
|
254
236
|
method: Symbol,
|
|
@@ -310,7 +292,6 @@ module XTwitterScraper
|
|
|
310
292
|
)
|
|
311
293
|
end
|
|
312
294
|
|
|
313
|
-
# @api private
|
|
314
295
|
sig { returns(String) }
|
|
315
296
|
def inspect
|
|
316
297
|
end
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
module XTwitterScraper
|
|
8
8
|
module Internal
|
|
9
9
|
module Transport
|
|
10
|
-
# @api private
|
|
11
10
|
class PooledNetRequester
|
|
12
11
|
extend XTwitterScraper::Internal::Util::SorbetRuntimeSupport
|
|
13
12
|
|
|
@@ -22,14 +21,11 @@ module XTwitterScraper
|
|
|
22
21
|
}
|
|
23
22
|
end
|
|
24
23
|
|
|
25
|
-
# from the golang stdlib
|
|
26
|
-
# https://github.com/golang/go/blob/c8eced8580028328fde7c03cbfcb720ce15b2358/src/net/http/transport.go#L49
|
|
27
24
|
KEEP_ALIVE_TIMEOUT = 30
|
|
28
25
|
|
|
29
26
|
DEFAULT_MAX_CONNECTIONS = T.let(T.unsafe(nil), Integer)
|
|
30
27
|
|
|
31
28
|
class << self
|
|
32
|
-
# @api private
|
|
33
29
|
sig do
|
|
34
30
|
params(cert_store: OpenSSL::X509::Store, url: URI::Generic).returns(
|
|
35
31
|
Net::HTTP
|
|
@@ -38,12 +34,10 @@ module XTwitterScraper
|
|
|
38
34
|
def connect(cert_store:, url:)
|
|
39
35
|
end
|
|
40
36
|
|
|
41
|
-
# @api private
|
|
42
37
|
sig { params(conn: Net::HTTP, deadline: Float).void }
|
|
43
38
|
def calibrate_socket_timeout(conn, deadline)
|
|
44
39
|
end
|
|
45
40
|
|
|
46
|
-
# @api private
|
|
47
41
|
sig do
|
|
48
42
|
params(
|
|
49
43
|
request:
|
|
@@ -55,7 +49,6 @@ module XTwitterScraper
|
|
|
55
49
|
end
|
|
56
50
|
end
|
|
57
51
|
|
|
58
|
-
# @api private
|
|
59
52
|
sig do
|
|
60
53
|
params(
|
|
61
54
|
url: URI::Generic,
|
|
@@ -66,7 +59,6 @@ module XTwitterScraper
|
|
|
66
59
|
private def with_pool(url, deadline:, &blk)
|
|
67
60
|
end
|
|
68
61
|
|
|
69
|
-
# @api private
|
|
70
62
|
sig do
|
|
71
63
|
params(
|
|
72
64
|
request:
|
|
@@ -76,7 +68,6 @@ module XTwitterScraper
|
|
|
76
68
|
def execute(request)
|
|
77
69
|
end
|
|
78
70
|
|
|
79
|
-
# @api private
|
|
80
71
|
sig { params(size: Integer).returns(T.attached_class) }
|
|
81
72
|
def self.new(
|
|
82
73
|
size: XTwitterScraper::Internal::Transport::PooledNetRequester::DEFAULT_MAX_CONNECTIONS
|
|
@@ -7,9 +7,6 @@
|
|
|
7
7
|
module XTwitterScraper
|
|
8
8
|
module Internal
|
|
9
9
|
module Type
|
|
10
|
-
# @api private
|
|
11
|
-
#
|
|
12
|
-
# Array of items of a given type.
|
|
13
10
|
class ArrayOf
|
|
14
11
|
include XTwitterScraper::Internal::Type::Converter
|
|
15
12
|
include XTwitterScraper::Internal::Util::SorbetRuntimeSupport
|
|
@@ -46,7 +43,6 @@ module XTwitterScraper
|
|
|
46
43
|
def hash
|
|
47
44
|
end
|
|
48
45
|
|
|
49
|
-
# @api private
|
|
50
46
|
sig do
|
|
51
47
|
override
|
|
52
48
|
.params(
|
|
@@ -58,7 +54,6 @@ module XTwitterScraper
|
|
|
58
54
|
def coerce(value, state:)
|
|
59
55
|
end
|
|
60
56
|
|
|
61
|
-
# @api private
|
|
62
57
|
sig do
|
|
63
58
|
override
|
|
64
59
|
.params(
|
|
@@ -70,22 +65,18 @@ module XTwitterScraper
|
|
|
70
65
|
def dump(value, state:)
|
|
71
66
|
end
|
|
72
67
|
|
|
73
|
-
# @api private
|
|
74
68
|
sig { returns(T.anything) }
|
|
75
69
|
def to_sorbet_type
|
|
76
70
|
end
|
|
77
71
|
|
|
78
|
-
# @api private
|
|
79
72
|
sig { returns(Elem) }
|
|
80
73
|
protected def item_type
|
|
81
74
|
end
|
|
82
75
|
|
|
83
|
-
# @api private
|
|
84
76
|
sig { returns(T::Boolean) }
|
|
85
77
|
protected def nilable?
|
|
86
78
|
end
|
|
87
79
|
|
|
88
|
-
# @api private
|
|
89
80
|
sig do
|
|
90
81
|
params(
|
|
91
82
|
type_info:
|
|
@@ -102,7 +93,6 @@ module XTwitterScraper
|
|
|
102
93
|
def initialize(type_info, spec = {})
|
|
103
94
|
end
|
|
104
95
|
|
|
105
|
-
# @api private
|
|
106
96
|
sig { params(depth: Integer).returns(String) }
|
|
107
97
|
def inspect(depth: 0)
|
|
108
98
|
end
|
|
@@ -31,15 +31,10 @@ module XTwitterScraper
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
class << self
|
|
34
|
-
# @api private
|
|
35
|
-
#
|
|
36
|
-
# Assumes superclass fields are totally defined before fields are accessed /
|
|
37
|
-
# defined on subclasses.
|
|
38
34
|
sig { params(child: XTwitterScraper::Internal::Type::BaseModel).void }
|
|
39
35
|
def inherited(child)
|
|
40
36
|
end
|
|
41
37
|
|
|
42
|
-
# @api private
|
|
43
38
|
sig do
|
|
44
39
|
returns(
|
|
45
40
|
T::Hash[
|
|
@@ -59,7 +54,6 @@ module XTwitterScraper
|
|
|
59
54
|
def known_fields
|
|
60
55
|
end
|
|
61
56
|
|
|
62
|
-
# @api private
|
|
63
57
|
sig do
|
|
64
58
|
returns(
|
|
65
59
|
T::Hash[
|
|
@@ -74,7 +68,6 @@ module XTwitterScraper
|
|
|
74
68
|
def fields
|
|
75
69
|
end
|
|
76
70
|
|
|
77
|
-
# @api private
|
|
78
71
|
sig do
|
|
79
72
|
params(
|
|
80
73
|
name_sym: Symbol,
|
|
@@ -112,7 +105,6 @@ module XTwitterScraper
|
|
|
112
105
|
private def add_field(name_sym, required:, type_info:, spec:)
|
|
113
106
|
end
|
|
114
107
|
|
|
115
|
-
# @api private
|
|
116
108
|
sig do
|
|
117
109
|
params(
|
|
118
110
|
name_sym: Symbol,
|
|
@@ -130,7 +122,6 @@ module XTwitterScraper
|
|
|
130
122
|
def required(name_sym, type_info, spec = {})
|
|
131
123
|
end
|
|
132
124
|
|
|
133
|
-
# @api private
|
|
134
125
|
sig do
|
|
135
126
|
params(
|
|
136
127
|
name_sym: Symbol,
|
|
@@ -148,17 +139,10 @@ module XTwitterScraper
|
|
|
148
139
|
def optional(name_sym, type_info, spec = {})
|
|
149
140
|
end
|
|
150
141
|
|
|
151
|
-
# @api private
|
|
152
|
-
#
|
|
153
|
-
# `request_only` attributes not excluded from `.#coerce` when receiving responses
|
|
154
|
-
# even if well behaved servers should not send them
|
|
155
142
|
sig { params(blk: T.proc.void).void }
|
|
156
143
|
private def request_only(&blk)
|
|
157
144
|
end
|
|
158
145
|
|
|
159
|
-
# @api private
|
|
160
|
-
#
|
|
161
|
-
# `response_only` attributes are omitted from `.#dump` when making requests
|
|
162
146
|
sig { params(blk: T.proc.void).void }
|
|
163
147
|
private def response_only(&blk)
|
|
164
148
|
end
|
|
@@ -181,7 +165,6 @@ module XTwitterScraper
|
|
|
181
165
|
end
|
|
182
166
|
|
|
183
167
|
class << self
|
|
184
|
-
# @api private
|
|
185
168
|
sig do
|
|
186
169
|
override
|
|
187
170
|
.params(
|
|
@@ -198,7 +181,6 @@ module XTwitterScraper
|
|
|
198
181
|
def coerce(value, state:)
|
|
199
182
|
end
|
|
200
183
|
|
|
201
|
-
# @api private
|
|
202
184
|
sig do
|
|
203
185
|
override
|
|
204
186
|
.params(
|
|
@@ -210,14 +192,12 @@ module XTwitterScraper
|
|
|
210
192
|
def dump(value, state:)
|
|
211
193
|
end
|
|
212
194
|
|
|
213
|
-
# @api private
|
|
214
195
|
sig { returns(T.anything) }
|
|
215
196
|
def to_sorbet_type
|
|
216
197
|
end
|
|
217
198
|
end
|
|
218
199
|
|
|
219
200
|
class << self
|
|
220
|
-
# @api private
|
|
221
201
|
sig do
|
|
222
202
|
params(
|
|
223
203
|
model: XTwitterScraper::Internal::Type::BaseModel,
|
|
@@ -228,42 +208,18 @@ module XTwitterScraper
|
|
|
228
208
|
end
|
|
229
209
|
end
|
|
230
210
|
|
|
231
|
-
# Returns the raw value associated with the given key, if found. Otherwise, nil is
|
|
232
|
-
# returned.
|
|
233
|
-
#
|
|
234
|
-
# It is valid to lookup keys that are not in the API spec, for example to access
|
|
235
|
-
# undocumented features. This method does not parse response data into
|
|
236
|
-
# higher-level types. Lookup by anything other than a Symbol is an ArgumentError.
|
|
237
211
|
sig { params(key: Symbol).returns(T.nilable(T.anything)) }
|
|
238
212
|
def [](key)
|
|
239
213
|
end
|
|
240
214
|
|
|
241
|
-
# Returns a Hash of the data underlying this object. O(1)
|
|
242
|
-
#
|
|
243
|
-
# Keys are Symbols and values are the raw values from the response. The return
|
|
244
|
-
# value indicates which values were ever set on the object. i.e. there will be a
|
|
245
|
-
# key in this hash if they ever were, even if the set value was nil.
|
|
246
|
-
#
|
|
247
|
-
# This method is not recursive. The returned value is shared by the object, so it
|
|
248
|
-
# should not be mutated.
|
|
249
215
|
sig { overridable.returns(XTwitterScraper::Internal::AnyHash) }
|
|
250
216
|
def to_h
|
|
251
217
|
end
|
|
252
218
|
|
|
253
|
-
# Returns a Hash of the data underlying this object. O(1)
|
|
254
|
-
#
|
|
255
|
-
# Keys are Symbols and values are the raw values from the response. The return
|
|
256
|
-
# value indicates which values were ever set on the object. i.e. there will be a
|
|
257
|
-
# key in this hash if they ever were, even if the set value was nil.
|
|
258
|
-
#
|
|
259
|
-
# This method is not recursive. The returned value is shared by the object, so it
|
|
260
|
-
# should not be mutated.
|
|
261
219
|
sig { overridable.returns(XTwitterScraper::Internal::AnyHash) }
|
|
262
220
|
def to_hash
|
|
263
221
|
end
|
|
264
222
|
|
|
265
|
-
# In addition to the behaviour of `#to_h`, this method will recursively call
|
|
266
|
-
# `#to_h` on nested models.
|
|
267
223
|
sig { overridable.returns(XTwitterScraper::Internal::AnyHash) }
|
|
268
224
|
def deep_to_h
|
|
269
225
|
end
|
|
@@ -284,7 +240,6 @@ module XTwitterScraper
|
|
|
284
240
|
def to_yaml(*a)
|
|
285
241
|
end
|
|
286
242
|
|
|
287
|
-
# Create a new instance of a model.
|
|
288
243
|
sig do
|
|
289
244
|
params(
|
|
290
245
|
data:
|
|
@@ -298,7 +253,6 @@ module XTwitterScraper
|
|
|
298
253
|
end
|
|
299
254
|
|
|
300
255
|
class << self
|
|
301
|
-
# @api private
|
|
302
256
|
sig { params(depth: Integer).returns(String) }
|
|
303
257
|
def inspect(depth: 0)
|
|
304
258
|
end
|
|
@@ -308,7 +262,6 @@ module XTwitterScraper
|
|
|
308
262
|
def to_s
|
|
309
263
|
end
|
|
310
264
|
|
|
311
|
-
# @api private
|
|
312
265
|
sig { returns(String) }
|
|
313
266
|
def inspect
|
|
314
267
|
end
|