Class: XTwitterScraper::Resources::X::Users
- Inherits:
-
Object
- Object
- XTwitterScraper::Resources::X::Users
- Defined in:
- lib/x_twitter_scraper/resources/x/users.rb,
lib/x_twitter_scraper/resources/x/users/follow.rb,
sig/x_twitter_scraper/resources/x/users.rbs,
sig/x_twitter_scraper/resources/x/users/follow.rbs
Defined Under Namespace
Classes: Follow
Instance Attribute Summary collapse
-
#follow ⇒ XTwitterScraper::Resources::X::Users::Follow
readonly
X write actions (tweets, likes, follows, DMs).
Instance Method Summary collapse
-
#initialize(client:) ⇒ Users
constructor
private
A new instance of Users.
-
#remove_follower(id, account:, idempotency_key:, request_options: {}) ⇒ XTwitterScraper::Models::X::UserRemoveFollowerResponse
Some parameter documentations has been truncated, see Models::X::UserRemoveFollowerParams for more details.
-
#retrieve(id, request_options: {}) ⇒ XTwitterScraper::Models::UserProfile
Get user profile with follower counts & verification.
-
#retrieve_batch(ids:, request_options: {}) ⇒ XTwitterScraper::Models::X::UserRetrieveBatchResponse
Some parameter documentations has been truncated, see Models::X::UserRetrieveBatchParams for more details.
-
#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: {}) ⇒ XTwitterScraper::Models::PaginatedUsers, XTwitterScraper::Models::X::UserRetrieveFollowersResponse::UserListCoverageResponse
Some parameter documentations has been truncated, see Models::X::UserRetrieveFollowersParams for more details.
-
#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: {}) ⇒ XTwitterScraper::Models::PaginatedUsers
Some parameter documentations has been truncated, see Models::X::UserRetrieveFollowersYouKnowParams for more details.
-
#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: {}) ⇒ XTwitterScraper::Models::PaginatedUsers, XTwitterScraper::Models::X::UserRetrieveFollowingResponse::UserListCoverageResponse
Some parameter documentations has been truncated, see Models::X::UserRetrieveFollowingParams for more details.
-
#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: {}) ⇒ XTwitterScraper::Models::PaginatedTweets
Some parameter documentations has been truncated, see Models::X::UserRetrieveLikesParams for more details.
-
#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: {}) ⇒ XTwitterScraper::Models::PaginatedTweets
Some parameter documentations has been truncated, see Models::X::UserRetrieveMediaParams for more details.
-
#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: {}) ⇒ XTwitterScraper::Models::PaginatedTweets
Some parameter documentations has been truncated, see Models::X::UserRetrieveMentionsParams for more details.
-
#retrieve_replies(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_parent_tweet: 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: {}) ⇒ XTwitterScraper::Models::PaginatedTweets
Some parameter documentations has been truncated, see Models::X::UserRetrieveRepliesParams for more details.
-
#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: {}) ⇒ XTwitterScraper::Models::PaginatedUsers
Some parameter documentations has been truncated, see Models::X::UserRetrieveSearchParams for more details.
-
#retrieve_tweets(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_parent_tweet: 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, source: nil, to_user: nil, until_date: nil, url: nil, verified_only: nil, within: nil, within_time: nil, request_options: {}) ⇒ XTwitterScraper::Models::PaginatedTweets
Some parameter documentations has been truncated, see Models::X::UserRetrieveTweetsParams for more details.
-
#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: {}) ⇒ XTwitterScraper::Models::PaginatedUsers, XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse::UserListCoverageResponse
Some parameter documentations has been truncated, see Models::X::UserRetrieveVerifiedFollowersParams for more details.
Constructor Details
#initialize(client:) ⇒ Users
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Users.
1250 1251 1252 1253 |
# File 'lib/x_twitter_scraper/resources/x/users.rb', line 1250 def initialize(client:) @client = client @follow = XTwitterScraper::Resources::X::Users::Follow.new(client: client) end |
Instance Attribute Details
#follow ⇒ XTwitterScraper::Resources::X::Users::Follow (readonly)
X write actions (tweets, likes, follows, DMs)
13 14 15 |
# File 'lib/x_twitter_scraper/resources/x/users.rb', line 13 def follow @follow end |
Instance Method Details
#remove_follower(id, account:, idempotency_key:, request_options: {}) ⇒ XTwitterScraper::Models::X::UserRemoveFollowerResponse
Some parameter documentations has been truncated, see Models::X::UserRemoveFollowerParams for more details.
Remove follower
53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/x_twitter_scraper/resources/x/users.rb', line 53 def remove_follower(id, params) parsed, = XTwitterScraper::X::UserRemoveFollowerParams.dump_request(params) header_params = {idempotency_key: "idempotency-key"} @client.request( method: :post, path: ["x/users/%1$s/remove-follower", id], headers: parsed.slice(*header_params.keys).transform_keys(header_params), body: parsed.except(*header_params.keys), model: XTwitterScraper::Models::X::UserRemoveFollowerResponse, options: ) end |
#retrieve(id, request_options: {}) ⇒ XTwitterScraper::Models::UserProfile
Get user profile with follower counts & verification
26 27 28 29 30 31 32 33 |
# File 'lib/x_twitter_scraper/resources/x/users.rb', line 26 def retrieve(id, params = {}) @client.request( method: :get, path: ["x/users/%1$s", id], model: XTwitterScraper::UserProfile, options: params[:request_options] ) end |
#retrieve_batch(ids:, request_options: {}) ⇒ XTwitterScraper::Models::X::UserRetrieveBatchResponse
Some parameter documentations has been truncated, see Models::X::UserRetrieveBatchParams for more details.
Look up multiple users by IDs in one call
80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/x_twitter_scraper/resources/x/users.rb', line 80 def retrieve_batch(params) parsed, = XTwitterScraper::X::UserRetrieveBatchParams.dump_request(params) query = XTwitterScraper::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "x/users/batch", query: query, model: XTwitterScraper::Models::X::UserRetrieveBatchResponse, options: ) end |
#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: {}) ⇒ XTwitterScraper::Models::PaginatedUsers, XTwitterScraper::Models::X::UserRetrieveFollowersResponse::UserListCoverageResponse
Some parameter documentations has been truncated, see Models::X::UserRetrieveFollowersParams for more details.
List followers of a user
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/x_twitter_scraper/resources/x/users.rb', line 144 def retrieve_followers(id, params = {}) parsed, = XTwitterScraper::X::UserRetrieveFollowersParams.dump_request(params) query = XTwitterScraper::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["x/users/%1$s/followers", id], query: query.transform_keys( bio_contains: "bioContains", has_location: "hasLocation", has_website: "hasWebsite", location_contains: "locationContains", max_followers: "maxFollowers", max_following: "maxFollowing", max_statuses: "maxStatuses", min_account_age_days: "minAccountAgeDays", min_followers: "minFollowers", min_following: "minFollowing", min_statuses: "minStatuses", page_size: "pageSize", username_contains: "usernameContains", verified_only: "verifiedOnly", verified_type: "verifiedType" ), model: XTwitterScraper::Models::X::UserRetrieveFollowersResponse, options: ) end |
#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: {}) ⇒ XTwitterScraper::Models::PaginatedUsers
Some parameter documentations has been truncated, see Models::X::UserRetrieveFollowersYouKnowParams for more details.
List mutual followers between you and a user
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
# File 'lib/x_twitter_scraper/resources/x/users.rb', line 219 def retrieve_followers_you_know(id, params = {}) parsed, = XTwitterScraper::X::UserRetrieveFollowersYouKnowParams.dump_request(params) query = XTwitterScraper::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["x/users/%1$s/followers-you-know", id], query: query.transform_keys( bio_contains: "bioContains", has_location: "hasLocation", has_website: "hasWebsite", location_contains: "locationContains", max_followers: "maxFollowers", max_following: "maxFollowing", max_statuses: "maxStatuses", min_account_age_days: "minAccountAgeDays", min_followers: "minFollowers", min_following: "minFollowing", min_statuses: "minStatuses", page_size: "pageSize", username_contains: "usernameContains", verified_only: "verifiedOnly", verified_type: "verifiedType" ), model: XTwitterScraper::PaginatedUsers, options: ) end |
#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: {}) ⇒ XTwitterScraper::Models::PaginatedUsers, XTwitterScraper::Models::X::UserRetrieveFollowingResponse::UserListCoverageResponse
Some parameter documentations has been truncated, see Models::X::UserRetrieveFollowingParams for more details.
List accounts a user follows
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
# File 'lib/x_twitter_scraper/resources/x/users.rb', line 299 def retrieve_following(id, params = {}) parsed, = XTwitterScraper::X::UserRetrieveFollowingParams.dump_request(params) query = XTwitterScraper::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["x/users/%1$s/following", id], query: query.transform_keys( bio_contains: "bioContains", has_location: "hasLocation", has_website: "hasWebsite", location_contains: "locationContains", max_followers: "maxFollowers", max_following: "maxFollowing", max_statuses: "maxStatuses", min_account_age_days: "minAccountAgeDays", min_followers: "minFollowers", min_following: "minFollowing", min_statuses: "minStatuses", page_size: "pageSize", username_contains: "usernameContains", verified_only: "verifiedOnly", verified_type: "verifiedType" ), model: XTwitterScraper::Models::X::UserRetrieveFollowingResponse, options: ) end |
#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: {}) ⇒ XTwitterScraper::Models::PaginatedTweets
Some parameter documentations has been truncated, see Models::X::UserRetrieveLikesParams for more details.
List tweets liked by a user
433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 |
# File 'lib/x_twitter_scraper/resources/x/users.rb', line 433 def retrieve_likes(id, params = {}) parsed, = XTwitterScraper::X::UserRetrieveLikesParams.dump_request(params) query = XTwitterScraper::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["x/users/%1$s/likes", id], query: query.transform_keys( any_words: "anyWords", blue_verified_only: "blueVerifiedOnly", card_name: "cardName", conversation_id: "conversationId", exact_phrase: "exactPhrase", exclude_source: "excludeSource", exclude_words: "excludeWords", from_user: "fromUser", in_reply_to_tweet_id: "inReplyToTweetId", max_faves: "maxFaves", max_id: "maxId", max_quotes: "maxQuotes", max_replies: "maxReplies", max_retweets: "maxRetweets", media_type: "mediaType", min_bookmarks: "minBookmarks", min_faves: "minFaves", min_quotes: "minQuotes", min_replies: "minReplies", min_retweets: "minRetweets", min_views: "minViews", native_retweets: "nativeRetweets", page_size: "pageSize", quotes_of_tweet_id: "quotesOfTweetId", retweets_of_tweet_id: "retweetsOfTweetId", since_date: "sinceDate", since_id: "sinceId", to_user: "toUser", until_date: "untilDate", verified_only: "verifiedOnly", within_time: "withinTime" ), model: XTwitterScraper::PaginatedTweets, options: ) end |
#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: {}) ⇒ XTwitterScraper::Models::PaginatedTweets
Some parameter documentations has been truncated, see Models::X::UserRetrieveMediaParams for more details.
List media tweets posted by a user
583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 |
# File 'lib/x_twitter_scraper/resources/x/users.rb', line 583 def retrieve_media(id, params = {}) parsed, = XTwitterScraper::X::UserRetrieveMediaParams.dump_request(params) query = XTwitterScraper::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["x/users/%1$s/media", id], query: query.transform_keys( any_words: "anyWords", blue_verified_only: "blueVerifiedOnly", card_name: "cardName", conversation_id: "conversationId", exact_phrase: "exactPhrase", exclude_source: "excludeSource", exclude_words: "excludeWords", from_user: "fromUser", in_reply_to_tweet_id: "inReplyToTweetId", max_faves: "maxFaves", max_id: "maxId", max_quotes: "maxQuotes", max_replies: "maxReplies", max_retweets: "maxRetweets", media_type: "mediaType", min_bookmarks: "minBookmarks", min_faves: "minFaves", min_quotes: "minQuotes", min_replies: "minReplies", min_retweets: "minRetweets", min_views: "minViews", native_retweets: "nativeRetweets", page_size: "pageSize", quotes_of_tweet_id: "quotesOfTweetId", retweets_of_tweet_id: "retweetsOfTweetId", since_date: "sinceDate", since_id: "sinceId", to_user: "toUser", until_date: "untilDate", verified_only: "verifiedOnly", within_time: "withinTime" ), model: XTwitterScraper::PaginatedTweets, options: ) end |
#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: {}) ⇒ XTwitterScraper::Models::PaginatedTweets
Some parameter documentations has been truncated, see Models::X::UserRetrieveMentionsParams for more details.
List tweets mentioning a user
737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 |
# File 'lib/x_twitter_scraper/resources/x/users.rb', line 737 def retrieve_mentions(id, params = {}) parsed, = XTwitterScraper::X::UserRetrieveMentionsParams.dump_request(params) query = XTwitterScraper::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["x/users/%1$s/mentions", id], query: query.transform_keys( any_words: "anyWords", blue_verified_only: "blueVerifiedOnly", card_name: "cardName", conversation_id: "conversationId", exact_phrase: "exactPhrase", exclude_source: "excludeSource", exclude_words: "excludeWords", from_user: "fromUser", in_reply_to_tweet_id: "inReplyToTweetId", max_faves: "maxFaves", max_id: "maxId", max_quotes: "maxQuotes", max_replies: "maxReplies", max_retweets: "maxRetweets", media_type: "mediaType", min_bookmarks: "minBookmarks", min_faves: "minFaves", min_quotes: "minQuotes", min_replies: "minReplies", min_retweets: "minRetweets", min_views: "minViews", native_retweets: "nativeRetweets", page_size: "pageSize", quotes_of_tweet_id: "quotesOfTweetId", retweets_of_tweet_id: "retweetsOfTweetId", since_date: "sinceDate", since_id: "sinceId", since_time: "sinceTime", to_user: "toUser", until_date: "untilDate", until_time: "untilTime", verified_only: "verifiedOnly", within_time: "withinTime" ), model: XTwitterScraper::PaginatedTweets, options: ) end |
#retrieve_replies(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_parent_tweet: 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: {}) ⇒ XTwitterScraper::Models::PaginatedTweets
Some parameter documentations has been truncated, see Models::X::UserRetrieveRepliesParams for more details.
Returns target-authored posts and replies. Omit mode for automatic maximum coverage. Pass next_cursor unchanged. Unprefixed cursors stay legacy. Excludes other-author context.
893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 |
# File 'lib/x_twitter_scraper/resources/x/users.rb', line 893 def retrieve_replies(id, params = {}) parsed, = XTwitterScraper::X::UserRetrieveRepliesParams.dump_request(params) query = XTwitterScraper::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["x/users/%1$s/replies", id], query: query.transform_keys( any_words: "anyWords", blue_verified_only: "blueVerifiedOnly", card_name: "cardName", conversation_id: "conversationId", exact_phrase: "exactPhrase", exclude_source: "excludeSource", exclude_words: "excludeWords", from_user: "fromUser", include_parent_tweet: "includeParentTweet", in_reply_to_tweet_id: "inReplyToTweetId", max_faves: "maxFaves", max_id: "maxId", max_quotes: "maxQuotes", max_replies: "maxReplies", max_retweets: "maxRetweets", media_type: "mediaType", min_bookmarks: "minBookmarks", min_faves: "minFaves", min_quotes: "minQuotes", min_replies: "minReplies", min_retweets: "minRetweets", min_views: "minViews", native_retweets: "nativeRetweets", page_size: "pageSize", quotes_of_tweet_id: "quotesOfTweetId", retweets_of_tweet_id: "retweetsOfTweetId", since_date: "sinceDate", since_id: "sinceId", to_user: "toUser", until_date: "untilDate", verified_only: "verifiedOnly", within_time: "withinTime" ), model: XTwitterScraper::PaginatedTweets, options: ) end |
#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: {}) ⇒ XTwitterScraper::Models::PaginatedUsers
Some parameter documentations has been truncated, see Models::X::UserRetrieveSearchParams for more details.
Search users by name or username
982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 |
# File 'lib/x_twitter_scraper/resources/x/users.rb', line 982 def retrieve_search(params) parsed, = XTwitterScraper::X::UserRetrieveSearchParams.dump_request(params) query = XTwitterScraper::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "x/users/search", query: query.transform_keys( bio_contains: "bioContains", has_location: "hasLocation", has_website: "hasWebsite", location_contains: "locationContains", max_followers: "maxFollowers", max_following: "maxFollowing", max_statuses: "maxStatuses", min_account_age_days: "minAccountAgeDays", min_followers: "minFollowers", min_following: "minFollowing", min_statuses: "minStatuses", username_contains: "usernameContains", verified_only: "verifiedOnly", verified_type: "verifiedType" ), model: XTwitterScraper::PaginatedUsers, options: ) end |
#retrieve_tweets(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_parent_tweet: 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, source: nil, to_user: nil, until_date: nil, url: nil, verified_only: nil, within: nil, within_time: nil, request_options: {}) ⇒ XTwitterScraper::Models::PaginatedTweets
Some parameter documentations has been truncated, see Models::X::UserRetrieveTweetsParams for more details.
Omit mode for automatic maximum coverage. Pass next_cursor unchanged. Unprefixed cursors use legacy pagination. Shape and billing stay the same.
1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 |
# File 'lib/x_twitter_scraper/resources/x/users.rb', line 1120 def retrieve_tweets(id, params = {}) parsed, = XTwitterScraper::X::UserRetrieveTweetsParams.dump_request(params) query = XTwitterScraper::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["x/users/%1$s/tweets", id], query: query.transform_keys( any_words: "anyWords", blue_verified_only: "blueVerifiedOnly", card_name: "cardName", conversation_id: "conversationId", exact_phrase: "exactPhrase", exclude_source: "excludeSource", exclude_words: "excludeWords", from_user: "fromUser", include_parent_tweet: "includeParentTweet", include_replies: "includeReplies", in_reply_to_tweet_id: "inReplyToTweetId", max_faves: "maxFaves", max_id: "maxId", max_quotes: "maxQuotes", max_replies: "maxReplies", max_retweets: "maxRetweets", media_type: "mediaType", min_bookmarks: "minBookmarks", min_faves: "minFaves", min_quotes: "minQuotes", min_replies: "minReplies", min_retweets: "minRetweets", min_views: "minViews", native_retweets: "nativeRetweets", page_size: "pageSize", quotes_of_tweet_id: "quotesOfTweetId", retweets_of_tweet_id: "retweetsOfTweetId", since_date: "sinceDate", since_id: "sinceId", to_user: "toUser", until_date: "untilDate", verified_only: "verifiedOnly", within_time: "withinTime" ), model: XTwitterScraper::PaginatedTweets, options: ) end |
#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: {}) ⇒ XTwitterScraper::Models::PaginatedUsers, XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse::UserListCoverageResponse
Some parameter documentations has been truncated, see Models::X::UserRetrieveVerifiedFollowersParams for more details.
List verified followers of a user
1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 |
# File 'lib/x_twitter_scraper/resources/x/users.rb', line 1219 def retrieve_verified_followers(id, params = {}) parsed, = XTwitterScraper::X::UserRetrieveVerifiedFollowersParams.dump_request(params) query = XTwitterScraper::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["x/users/%1$s/verified-followers", id], query: query.transform_keys( bio_contains: "bioContains", has_location: "hasLocation", has_website: "hasWebsite", location_contains: "locationContains", max_followers: "maxFollowers", max_following: "maxFollowing", max_statuses: "maxStatuses", min_account_age_days: "minAccountAgeDays", min_followers: "minFollowers", min_following: "minFollowing", min_statuses: "minStatuses", page_size: "pageSize", username_contains: "usernameContains", verified_only: "verifiedOnly", verified_type: "verifiedType" ), model: XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse, options: ) end |