From 279a416215ad266661cac5edd02e821e2f701d60 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 16:15:41 +0000 Subject: [PATCH 01/27] feat(api): api update --- .stats.yml | 6 +- lib/x_twitter_scraper.rb | 25 --- lib/x_twitter_scraper/models.rb | 8 - .../radar_retrieve_trending_topics_params.rb | 23 +- .../models/style_delete_params.rb | 20 -- .../models/style_get_performance_params.rb | 20 -- .../models/style_get_performance_response.rb | 75 ------- .../models/style_retrieve_params.rb | 20 -- .../models/style_retrieve_response.rb | 69 ------ .../models/style_update_params.rb | 48 ---- .../models/style_update_response.rb | 69 ------ .../models/x/tweet_delete_params.rb | 31 --- .../models/x/tweet_delete_response.rb | 18 -- .../models/x/tweet_retrieve_params.rb | 22 -- .../models/x/tweet_retrieve_response.rb | 118 ---------- .../models/x/tweets/like_create_params.rb | 33 --- .../models/x/tweets/like_create_response.rb | 20 -- .../models/x/tweets/like_delete_params.rb | 33 --- .../models/x/tweets/like_delete_response.rb | 20 -- .../models/x/tweets/retweet_create_params.rb | 33 --- .../x/tweets/retweet_create_response.rb | 20 -- .../models/x/tweets/retweet_delete_params.rb | 33 --- .../x/tweets/retweet_delete_response.rb | 20 -- .../models/x/user_retrieve_params.rb | 22 -- .../models/x/user_retrieve_response.rb | 78 ------- .../models/x/users/follow_create_params.rb | 33 --- .../models/x/users/follow_create_response.rb | 20 -- .../x/users/follow_delete_all_params.rb | 33 --- .../x/users/follow_delete_all_response.rb | 20 -- lib/x_twitter_scraper/resources/radar.rb | 2 +- lib/x_twitter_scraper/resources/styles.rb | 86 ------- lib/x_twitter_scraper/resources/x/tweets.rb | 45 ---- .../resources/x/tweets/like.rb | 49 ---- .../resources/x/tweets/retweet.rb | 49 ---- lib/x_twitter_scraper/resources/x/users.rb | 21 -- .../resources/x/users/follow.rb | 49 ---- rbi/x_twitter_scraper/models.rbi | 8 - .../radar_retrieve_trending_topics_params.rbi | 82 ++++++- .../models/style_delete_params.rbi | 38 ---- .../models/style_get_performance_params.rbi | 38 ---- .../models/style_get_performance_response.rbi | 140 ------------ .../models/style_retrieve_params.rbi | 38 ---- .../models/style_retrieve_response.rbi | 120 ---------- .../models/style_update_params.rbi | 81 ------- .../models/style_update_response.rbi | 120 ---------- .../models/x/tweet_delete_params.rbi | 54 ----- .../models/x/tweet_delete_response.rbi | 28 --- .../models/x/tweet_retrieve_params.rbi | 43 ---- .../models/x/tweet_retrieve_response.rbi | 211 ------------------ .../models/x/tweets/like_create_params.rbi | 56 ----- .../models/x/tweets/like_create_response.rbi | 30 --- .../models/x/tweets/like_delete_params.rbi | 56 ----- .../models/x/tweets/like_delete_response.rbi | 30 --- .../models/x/tweets/retweet_create_params.rbi | 56 ----- .../x/tweets/retweet_create_response.rbi | 30 --- .../models/x/tweets/retweet_delete_params.rbi | 56 ----- .../x/tweets/retweet_delete_response.rbi | 30 --- .../models/x/user_retrieve_params.rbi | 43 ---- .../models/x/user_retrieve_response.rbi | 124 ---------- .../models/x/users/follow_create_params.rbi | 56 ----- .../models/x/users/follow_create_response.rbi | 30 --- .../x/users/follow_delete_all_params.rbi | 56 ----- .../x/users/follow_delete_all_response.rbi | 30 --- rbi/x_twitter_scraper/resources/radar.rbi | 3 +- rbi/x_twitter_scraper/resources/styles.rbi | 62 ----- rbi/x_twitter_scraper/resources/x/tweets.rbi | 28 --- .../resources/x/tweets/like.rbi | 33 --- .../resources/x/tweets/retweet.rbi | 33 --- rbi/x_twitter_scraper/resources/x/users.rbi | 15 -- .../resources/x/users/follow.rbi | 37 --- sig/x_twitter_scraper/models.rbs | 8 - .../radar_retrieve_trending_topics_params.rbs | 35 ++- .../models/style_delete_params.rbs | 23 -- .../models/style_get_performance_params.rbs | 23 -- .../models/style_get_performance_response.rbs | 87 -------- .../models/style_retrieve_params.rbs | 23 -- .../models/style_retrieve_response.rbs | 76 ------- .../models/style_update_params.rbs | 46 ---- .../models/style_update_response.rbs | 76 ------- .../models/x/tweet_delete_params.rbs | 30 --- .../models/x/tweet_delete_response.rbs | 15 -- .../models/x/tweet_retrieve_params.rbs | 26 --- .../models/x/tweet_retrieve_response.rbs | 129 ----------- .../models/x/tweets/like_create_params.rbs | 32 --- .../models/x/tweets/like_create_response.rbs | 17 -- .../models/x/tweets/like_delete_params.rbs | 32 --- .../models/x/tweets/like_delete_response.rbs | 17 -- .../models/x/tweets/retweet_create_params.rbs | 32 --- .../x/tweets/retweet_create_response.rbs | 17 -- .../models/x/tweets/retweet_delete_params.rbs | 32 --- .../x/tweets/retweet_delete_response.rbs | 17 -- .../models/x/user_retrieve_params.rbs | 26 --- .../models/x/user_retrieve_response.rbs | 88 -------- .../models/x/users/follow_create_params.rbs | 32 --- .../models/x/users/follow_create_response.rbs | 17 -- .../x/users/follow_delete_all_params.rbs | 32 --- .../x/users/follow_delete_all_response.rbs | 17 -- sig/x_twitter_scraper/resources/radar.rbs | 2 +- sig/x_twitter_scraper/resources/styles.rbs | 22 -- sig/x_twitter_scraper/resources/x/tweets.rbs | 11 - .../resources/x/tweets/like.rbs | 12 - .../resources/x/tweets/retweet.rbs | 12 - sig/x_twitter_scraper/resources/x/users.rbs | 5 - .../resources/x/users/follow.rbs | 12 - .../resources/styles_test.rb | 68 ------ .../resources/x/tweets/like_test.rb | 31 --- .../resources/x/tweets/retweet_test.rb | 31 --- .../resources/x/tweets_test.rb | 33 --- .../resources/x/users/follow_test.rb | 31 --- .../resources/x/users_test.rb | 26 --- 110 files changed, 135 insertions(+), 4352 deletions(-) delete mode 100644 lib/x_twitter_scraper/models/style_delete_params.rb delete mode 100644 lib/x_twitter_scraper/models/style_get_performance_params.rb delete mode 100644 lib/x_twitter_scraper/models/style_get_performance_response.rb delete mode 100644 lib/x_twitter_scraper/models/style_retrieve_params.rb delete mode 100644 lib/x_twitter_scraper/models/style_retrieve_response.rb delete mode 100644 lib/x_twitter_scraper/models/style_update_params.rb delete mode 100644 lib/x_twitter_scraper/models/style_update_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/tweet_delete_params.rb delete mode 100644 lib/x_twitter_scraper/models/x/tweet_delete_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/tweet_retrieve_params.rb delete mode 100644 lib/x_twitter_scraper/models/x/tweet_retrieve_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/tweets/like_create_params.rb delete mode 100644 lib/x_twitter_scraper/models/x/tweets/like_create_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/tweets/like_delete_params.rb delete mode 100644 lib/x_twitter_scraper/models/x/tweets/like_delete_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/tweets/retweet_create_params.rb delete mode 100644 lib/x_twitter_scraper/models/x/tweets/retweet_create_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/tweets/retweet_delete_params.rb delete mode 100644 lib/x_twitter_scraper/models/x/tweets/retweet_delete_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/user_retrieve_params.rb delete mode 100644 lib/x_twitter_scraper/models/x/user_retrieve_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/users/follow_create_params.rb delete mode 100644 lib/x_twitter_scraper/models/x/users/follow_create_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/users/follow_delete_all_params.rb delete mode 100644 lib/x_twitter_scraper/models/x/users/follow_delete_all_response.rb delete mode 100644 rbi/x_twitter_scraper/models/style_delete_params.rbi delete mode 100644 rbi/x_twitter_scraper/models/style_get_performance_params.rbi delete mode 100644 rbi/x_twitter_scraper/models/style_get_performance_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/style_retrieve_params.rbi delete mode 100644 rbi/x_twitter_scraper/models/style_retrieve_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/style_update_params.rbi delete mode 100644 rbi/x_twitter_scraper/models/style_update_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/tweet_delete_params.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/tweet_delete_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/tweet_retrieve_params.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/tweet_retrieve_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/tweets/like_create_params.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/tweets/like_create_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/tweets/like_delete_params.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/tweets/like_delete_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/tweets/retweet_create_params.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/tweets/retweet_create_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/user_retrieve_params.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/user_retrieve_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/users/follow_create_params.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/users/follow_create_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/users/follow_delete_all_params.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/users/follow_delete_all_response.rbi delete mode 100644 sig/x_twitter_scraper/models/style_delete_params.rbs delete mode 100644 sig/x_twitter_scraper/models/style_get_performance_params.rbs delete mode 100644 sig/x_twitter_scraper/models/style_get_performance_response.rbs delete mode 100644 sig/x_twitter_scraper/models/style_retrieve_params.rbs delete mode 100644 sig/x_twitter_scraper/models/style_retrieve_response.rbs delete mode 100644 sig/x_twitter_scraper/models/style_update_params.rbs delete mode 100644 sig/x_twitter_scraper/models/style_update_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/tweet_delete_params.rbs delete mode 100644 sig/x_twitter_scraper/models/x/tweet_delete_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/tweet_retrieve_params.rbs delete mode 100644 sig/x_twitter_scraper/models/x/tweet_retrieve_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/tweets/like_create_params.rbs delete mode 100644 sig/x_twitter_scraper/models/x/tweets/like_create_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/tweets/like_delete_params.rbs delete mode 100644 sig/x_twitter_scraper/models/x/tweets/like_delete_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/tweets/retweet_create_params.rbs delete mode 100644 sig/x_twitter_scraper/models/x/tweets/retweet_create_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbs delete mode 100644 sig/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/user_retrieve_params.rbs delete mode 100644 sig/x_twitter_scraper/models/x/user_retrieve_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/users/follow_create_params.rbs delete mode 100644 sig/x_twitter_scraper/models/x/users/follow_create_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/users/follow_delete_all_params.rbs delete mode 100644 sig/x_twitter_scraper/models/x/users/follow_delete_all_response.rbs diff --git a/.stats.yml b/.stats.yml index 68ba24f..5fb34d8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 115 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-93bb7d4f1475c8043af464ec88244a034456c549136c8477f284f0a33192e1c9.yml -openapi_spec_hash: 74dca63c872249274ad99b111dea0833 +configured_endpoints: 102 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-f4a2baf44e99ee3fa87e08d50099bc70680c9ef2e612290ab1f749396266455d.yml +openapi_spec_hash: 1b7655f5b5cc5ffb69e41461cd4d9158 config_hash: 8894c96caeb6df84c9394518810221bd diff --git a/lib/x_twitter_scraper.rb b/lib/x_twitter_scraper.rb index 93f077c..882c6db 100644 --- a/lib/x_twitter_scraper.rb +++ b/lib/x_twitter_scraper.rb @@ -144,17 +144,10 @@ require_relative "x_twitter_scraper/models/style_analyze_response" require_relative "x_twitter_scraper/models/style_compare_params" require_relative "x_twitter_scraper/models/style_compare_response" -require_relative "x_twitter_scraper/models/style_delete_params" -require_relative "x_twitter_scraper/models/style_get_performance_params" -require_relative "x_twitter_scraper/models/style_get_performance_response" require_relative "x_twitter_scraper/models/style_list_params" require_relative "x_twitter_scraper/models/style_list_response" require_relative "x_twitter_scraper/models/style_profile" require_relative "x_twitter_scraper/models/style_profile_summary" -require_relative "x_twitter_scraper/models/style_retrieve_params" -require_relative "x_twitter_scraper/models/style_retrieve_response" -require_relative "x_twitter_scraper/models/style_update_params" -require_relative "x_twitter_scraper/models/style_update_response" require_relative "x_twitter_scraper/models/subscribe_create_params" require_relative "x_twitter_scraper/models/subscribe_create_response" require_relative "x_twitter_scraper/models/support/ticket_create_params" @@ -235,8 +228,6 @@ require_relative "x_twitter_scraper/models/x/tweet_author" require_relative "x_twitter_scraper/models/x/tweet_create_params" require_relative "x_twitter_scraper/models/x/tweet_create_response" -require_relative "x_twitter_scraper/models/x/tweet_delete_params" -require_relative "x_twitter_scraper/models/x/tweet_delete_response" require_relative "x_twitter_scraper/models/x/tweet_detail" require_relative "x_twitter_scraper/models/x/tweet_get_favoriters_params" require_relative "x_twitter_scraper/models/x/tweet_get_favoriters_response" @@ -249,16 +240,6 @@ require_relative "x_twitter_scraper/models/x/tweet_get_thread_params" require_relative "x_twitter_scraper/models/x/tweet_get_thread_response" require_relative "x_twitter_scraper/models/x/tweet_list_params" -require_relative "x_twitter_scraper/models/x/tweet_retrieve_params" -require_relative "x_twitter_scraper/models/x/tweet_retrieve_response" -require_relative "x_twitter_scraper/models/x/tweets/like_create_params" -require_relative "x_twitter_scraper/models/x/tweets/like_create_response" -require_relative "x_twitter_scraper/models/x/tweets/like_delete_params" -require_relative "x_twitter_scraper/models/x/tweets/like_delete_response" -require_relative "x_twitter_scraper/models/x/tweets/retweet_create_params" -require_relative "x_twitter_scraper/models/x/tweets/retweet_create_response" -require_relative "x_twitter_scraper/models/x/tweets/retweet_delete_params" -require_relative "x_twitter_scraper/models/x/tweets/retweet_delete_response" require_relative "x_twitter_scraper/models/x/tweet_search_params" require_relative "x_twitter_scraper/models/x/tweet_search_response" require_relative "x_twitter_scraper/models/x/user_profile" @@ -272,16 +253,10 @@ require_relative "x_twitter_scraper/models/x/user_retrieve_media_params" require_relative "x_twitter_scraper/models/x/user_retrieve_media_response" require_relative "x_twitter_scraper/models/x/user_retrieve_mentions_params" -require_relative "x_twitter_scraper/models/x/user_retrieve_params" -require_relative "x_twitter_scraper/models/x/user_retrieve_response" require_relative "x_twitter_scraper/models/x/user_retrieve_search_params" require_relative "x_twitter_scraper/models/x/user_retrieve_tweets_params" require_relative "x_twitter_scraper/models/x/user_retrieve_tweets_response" require_relative "x_twitter_scraper/models/x/user_retrieve_verified_followers_params" -require_relative "x_twitter_scraper/models/x/users/follow_create_params" -require_relative "x_twitter_scraper/models/x/users/follow_create_response" -require_relative "x_twitter_scraper/models/x/users/follow_delete_all_params" -require_relative "x_twitter_scraper/models/x/users/follow_delete_all_response" require_relative "x_twitter_scraper/models/x/x_account" require_relative "x_twitter_scraper/models/x/x_account_detail" require_relative "x_twitter_scraper/models/x_get_article_params" diff --git a/lib/x_twitter_scraper/models.rb b/lib/x_twitter_scraper/models.rb index 41b8099..e6c6008 100644 --- a/lib/x_twitter_scraper/models.rb +++ b/lib/x_twitter_scraper/models.rb @@ -154,20 +154,12 @@ module XTwitterScraper StyleCompareParams = XTwitterScraper::Models::StyleCompareParams - StyleDeleteParams = XTwitterScraper::Models::StyleDeleteParams - - StyleGetPerformanceParams = XTwitterScraper::Models::StyleGetPerformanceParams - StyleListParams = XTwitterScraper::Models::StyleListParams StyleProfile = XTwitterScraper::Models::StyleProfile StyleProfileSummary = XTwitterScraper::Models::StyleProfileSummary - StyleRetrieveParams = XTwitterScraper::Models::StyleRetrieveParams - - StyleUpdateParams = XTwitterScraper::Models::StyleUpdateParams - SubscribeCreateParams = XTwitterScraper::Models::SubscribeCreateParams Support = XTwitterScraper::Models::Support diff --git a/lib/x_twitter_scraper/models/radar_retrieve_trending_topics_params.rb b/lib/x_twitter_scraper/models/radar_retrieve_trending_topics_params.rb index 001b544..8f22c9c 100644 --- a/lib/x_twitter_scraper/models/radar_retrieve_trending_topics_params.rb +++ b/lib/x_twitter_scraper/models/radar_retrieve_trending_topics_params.rb @@ -35,8 +35,8 @@ class RadarRetrieveTrendingTopicsParams < XTwitterScraper::Internal::Type::BaseM # Source filter. One of: github, google_trends, hacker_news, polymarket, reddit, # trustmrr, wikipedia # - # @return [String, nil] - optional :source, String + # @return [Symbol, XTwitterScraper::Models::RadarRetrieveTrendingTopicsParams::Source, nil] + optional :source, enum: -> { XTwitterScraper::RadarRetrieveTrendingTopicsParams::Source } # @!method initialize(category: nil, count: nil, hours: nil, region: nil, source: nil, request_options: {}) # Some parameter documentations has been truncated, see @@ -50,9 +50,26 @@ class RadarRetrieveTrendingTopicsParams < XTwitterScraper::Internal::Type::BaseM # # @param region [String] Region filter (us, global, etc.) # - # @param source [String] Source filter. One of: github, google_trends, hacker_news, polymarket, reddit, t + # @param source [Symbol, XTwitterScraper::Models::RadarRetrieveTrendingTopicsParams::Source] Source filter. One of: github, google_trends, hacker_news, polymarket, reddit, t # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + + # Source filter. One of: github, google_trends, hacker_news, polymarket, reddit, + # trustmrr, wikipedia + module Source + extend XTwitterScraper::Internal::Type::Enum + + GITHUB = :github + GOOGLE_TRENDS = :google_trends + HACKER_NEWS = :hacker_news + POLYMARKET = :polymarket + REDDIT = :reddit + TRUSTMRR = :trustmrr + WIKIPEDIA = :wikipedia + + # @!method self.values + # @return [Array] + end end end end diff --git a/lib/x_twitter_scraper/models/style_delete_params.rb b/lib/x_twitter_scraper/models/style_delete_params.rb deleted file mode 100644 index 1c7df5e..0000000 --- a/lib/x_twitter_scraper/models/style_delete_params.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - # @see XTwitterScraper::Resources::Styles#delete - class StyleDeleteParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - # @!attribute username - # - # @return [String] - required :username, String - - # @!method initialize(username:, request_options: {}) - # @param username [String] - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] - end - end -end diff --git a/lib/x_twitter_scraper/models/style_get_performance_params.rb b/lib/x_twitter_scraper/models/style_get_performance_params.rb deleted file mode 100644 index 4a6a9f0..0000000 --- a/lib/x_twitter_scraper/models/style_get_performance_params.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - # @see XTwitterScraper::Resources::Styles#get_performance - class StyleGetPerformanceParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - # @!attribute username - # - # @return [String] - required :username, String - - # @!method initialize(username:, request_options: {}) - # @param username [String] - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] - end - end -end diff --git a/lib/x_twitter_scraper/models/style_get_performance_response.rb b/lib/x_twitter_scraper/models/style_get_performance_response.rb deleted file mode 100644 index 847850b..0000000 --- a/lib/x_twitter_scraper/models/style_get_performance_response.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - # @see XTwitterScraper::Resources::Styles#get_performance - class StyleGetPerformanceResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute tweet_count - # - # @return [Integer] - required :tweet_count, Integer, api_name: :tweetCount - - # @!attribute tweets - # - # @return [Array] - required :tweets, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::StyleGetPerformanceResponse::Tweet] } - - # @!attribute x_username - # - # @return [String] - required :x_username, String, api_name: :xUsername - - # @!method initialize(tweet_count:, tweets:, x_username:) - # @param tweet_count [Integer] - # @param tweets [Array] - # @param x_username [String] - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute like_count - # - # @return [Integer, nil] - optional :like_count, Integer, api_name: :likeCount - - # @!attribute reply_count - # - # @return [Integer, nil] - optional :reply_count, Integer, api_name: :replyCount - - # @!attribute retweet_count - # - # @return [Integer, nil] - optional :retweet_count, Integer, api_name: :retweetCount - - # @!attribute view_count - # - # @return [Integer, nil] - optional :view_count, Integer, api_name: :viewCount - - # @!method initialize(id:, text:, created_at: nil, like_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) - # @param id [String] - # @param text [String] - # @param created_at [String] - # @param like_count [Integer] - # @param reply_count [Integer] - # @param retweet_count [Integer] - # @param view_count [Integer] - end - end - end -end diff --git a/lib/x_twitter_scraper/models/style_retrieve_params.rb b/lib/x_twitter_scraper/models/style_retrieve_params.rb deleted file mode 100644 index 0f95c6d..0000000 --- a/lib/x_twitter_scraper/models/style_retrieve_params.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - # @see XTwitterScraper::Resources::Styles#retrieve - class StyleRetrieveParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - # @!attribute username - # - # @return [String] - required :username, String - - # @!method initialize(username:, request_options: {}) - # @param username [String] - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] - end - end -end diff --git a/lib/x_twitter_scraper/models/style_retrieve_response.rb b/lib/x_twitter_scraper/models/style_retrieve_response.rb deleted file mode 100644 index 148a361..0000000 --- a/lib/x_twitter_scraper/models/style_retrieve_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - # @see XTwitterScraper::Resources::Styles#retrieve - class StyleRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute fetched_at - # - # @return [Time] - required :fetched_at, Time, api_name: :fetchedAt - - # @!attribute is_own_account - # - # @return [Boolean] - required :is_own_account, XTwitterScraper::Internal::Type::Boolean, api_name: :isOwnAccount - - # @!attribute tweet_count - # - # @return [Integer] - required :tweet_count, Integer, api_name: :tweetCount - - # @!attribute tweets - # - # @return [Array] - required :tweets, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::StyleRetrieveResponse::Tweet] } - - # @!attribute x_username - # - # @return [String] - required :x_username, String, api_name: :xUsername - - # @!method initialize(fetched_at:, is_own_account:, tweet_count:, tweets:, x_username:) - # @param fetched_at [Time] - # @param is_own_account [Boolean] - # @param tweet_count [Integer] - # @param tweets [Array] - # @param x_username [String] - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute author_username - # - # @return [String, nil] - optional :author_username, String, api_name: :authorUsername - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!method initialize(id:, text:, author_username: nil, created_at: nil) - # @param id [String] - # @param text [String] - # @param author_username [String] - # @param created_at [String] - end - end - end -end diff --git a/lib/x_twitter_scraper/models/style_update_params.rb b/lib/x_twitter_scraper/models/style_update_params.rb deleted file mode 100644 index 6e92262..0000000 --- a/lib/x_twitter_scraper/models/style_update_params.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - # @see XTwitterScraper::Resources::Styles#update - class StyleUpdateParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute label - # Display label for the style - # - # @return [String] - required :label, String - - # @!attribute tweets - # Array of tweet objects - # - # @return [Array] - required :tweets, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::StyleUpdateParams::Tweet] } - - # @!method initialize(username:, label:, tweets:, request_options: {}) - # @param username [String] - # - # @param label [String] Display label for the style - # - # @param tweets [Array] Array of tweet objects - # - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute text - # - # @return [String] - required :text, String - - # @!method initialize(text:) - # @param text [String] - end - end - end -end diff --git a/lib/x_twitter_scraper/models/style_update_response.rb b/lib/x_twitter_scraper/models/style_update_response.rb deleted file mode 100644 index ddec7fa..0000000 --- a/lib/x_twitter_scraper/models/style_update_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - # @see XTwitterScraper::Resources::Styles#update - class StyleUpdateResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute fetched_at - # - # @return [Time] - required :fetched_at, Time, api_name: :fetchedAt - - # @!attribute is_own_account - # - # @return [Boolean] - required :is_own_account, XTwitterScraper::Internal::Type::Boolean, api_name: :isOwnAccount - - # @!attribute tweet_count - # - # @return [Integer] - required :tweet_count, Integer, api_name: :tweetCount - - # @!attribute tweets - # - # @return [Array] - required :tweets, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::StyleUpdateResponse::Tweet] } - - # @!attribute x_username - # - # @return [String] - required :x_username, String, api_name: :xUsername - - # @!method initialize(fetched_at:, is_own_account:, tweet_count:, tweets:, x_username:) - # @param fetched_at [Time] - # @param is_own_account [Boolean] - # @param tweet_count [Integer] - # @param tweets [Array] - # @param x_username [String] - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute author_username - # - # @return [String, nil] - optional :author_username, String, api_name: :authorUsername - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!method initialize(id:, text:, author_username: nil, created_at: nil) - # @param id [String] - # @param text [String] - # @param author_username [String] - # @param created_at [String] - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/tweet_delete_params.rb b/lib/x_twitter_scraper/models/x/tweet_delete_params.rb deleted file mode 100644 index 55b1044..0000000 --- a/lib/x_twitter_scraper/models/x/tweet_delete_params.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Tweets#delete - class TweetDeleteParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - # @!attribute tweet_id - # - # @return [String] - required :tweet_id, String - - # @!attribute account - # X account (@username or account ID) - # - # @return [String] - required :account, String - - # @!method initialize(tweet_id:, account:, request_options: {}) - # @param tweet_id [String] - # - # @param account [String] X account (@username or account ID) - # - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/tweet_delete_response.rb b/lib/x_twitter_scraper/models/x/tweet_delete_response.rb deleted file mode 100644 index 8316b1c..0000000 --- a/lib/x_twitter_scraper/models/x/tweet_delete_response.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Tweets#delete - class TweetDeleteResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute success - # - # @return [Boolean, true] - required :success, const: true - - # @!method initialize(success: true) - # @param success [Boolean, true] - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/tweet_retrieve_params.rb b/lib/x_twitter_scraper/models/x/tweet_retrieve_params.rb deleted file mode 100644 index 0fc92d3..0000000 --- a/lib/x_twitter_scraper/models/x/tweet_retrieve_params.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Tweets#retrieve - class TweetRetrieveParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - # @!attribute tweet_id - # - # @return [String] - required :tweet_id, String - - # @!method initialize(tweet_id:, request_options: {}) - # @param tweet_id [String] - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/tweet_retrieve_response.rb b/lib/x_twitter_scraper/models/x/tweet_retrieve_response.rb deleted file mode 100644 index 50387f8..0000000 --- a/lib/x_twitter_scraper/models/x/tweet_retrieve_response.rb +++ /dev/null @@ -1,118 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Tweets#retrieve - class TweetRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute tweet - # - # @return [XTwitterScraper::Models::X::TweetRetrieveResponse::Tweet] - required :tweet, -> { XTwitterScraper::Models::X::TweetRetrieveResponse::Tweet } - - # @!attribute author - # - # @return [XTwitterScraper::Models::X::TweetRetrieveResponse::Author, nil] - optional :author, -> { XTwitterScraper::Models::X::TweetRetrieveResponse::Author } - - # @!method initialize(tweet:, author: nil) - # @param tweet [XTwitterScraper::Models::X::TweetRetrieveResponse::Tweet] - # @param author [XTwitterScraper::Models::X::TweetRetrieveResponse::Author] - - # @see XTwitterScraper::Models::X::TweetRetrieveResponse#tweet - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute bookmark_count - # - # @return [Integer] - required :bookmark_count, Integer, api_name: :bookmarkCount - - # @!attribute like_count - # - # @return [Integer] - required :like_count, Integer, api_name: :likeCount - - # @!attribute quote_count - # - # @return [Integer] - required :quote_count, Integer, api_name: :quoteCount - - # @!attribute reply_count - # - # @return [Integer] - required :reply_count, Integer, api_name: :replyCount - - # @!attribute retweet_count - # - # @return [Integer] - required :retweet_count, Integer, api_name: :retweetCount - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute view_count - # - # @return [Integer] - required :view_count, Integer, api_name: :viewCount - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!method initialize(id:, bookmark_count:, like_count:, quote_count:, reply_count:, retweet_count:, text:, view_count:, created_at: nil) - # @param id [String] - # @param bookmark_count [Integer] - # @param like_count [Integer] - # @param quote_count [Integer] - # @param reply_count [Integer] - # @param retweet_count [Integer] - # @param text [String] - # @param view_count [Integer] - # @param created_at [String] - end - - # @see XTwitterScraper::Models::X::TweetRetrieveResponse#author - class Author < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute followers - # - # @return [Integer] - required :followers, Integer - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute verified - # - # @return [Boolean] - required :verified, XTwitterScraper::Internal::Type::Boolean - - # @!attribute profile_picture - # - # @return [String, nil] - optional :profile_picture, String, api_name: :profilePicture - - # @!method initialize(id:, followers:, username:, verified:, profile_picture: nil) - # @param id [String] - # @param followers [Integer] - # @param username [String] - # @param verified [Boolean] - # @param profile_picture [String] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/tweets/like_create_params.rb b/lib/x_twitter_scraper/models/x/tweets/like_create_params.rb deleted file mode 100644 index be50f8e..0000000 --- a/lib/x_twitter_scraper/models/x/tweets/like_create_params.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - module Tweets - # @see XTwitterScraper::Resources::X::Tweets::Like#create - class LikeCreateParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - # @!attribute tweet_id - # - # @return [String] - required :tweet_id, String - - # @!attribute account - # X account (@username or account ID) - # - # @return [String] - required :account, String - - # @!method initialize(tweet_id:, account:, request_options: {}) - # @param tweet_id [String] - # - # @param account [String] X account (@username or account ID) - # - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/tweets/like_create_response.rb b/lib/x_twitter_scraper/models/x/tweets/like_create_response.rb deleted file mode 100644 index 57247ba..0000000 --- a/lib/x_twitter_scraper/models/x/tweets/like_create_response.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - module Tweets - # @see XTwitterScraper::Resources::X::Tweets::Like#create - class LikeCreateResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute success - # - # @return [Boolean, true] - required :success, const: true - - # @!method initialize(success: true) - # @param success [Boolean, true] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/tweets/like_delete_params.rb b/lib/x_twitter_scraper/models/x/tweets/like_delete_params.rb deleted file mode 100644 index 71f075d..0000000 --- a/lib/x_twitter_scraper/models/x/tweets/like_delete_params.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - module Tweets - # @see XTwitterScraper::Resources::X::Tweets::Like#delete - class LikeDeleteParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - # @!attribute tweet_id - # - # @return [String] - required :tweet_id, String - - # @!attribute account - # X account (@username or account ID) - # - # @return [String] - required :account, String - - # @!method initialize(tweet_id:, account:, request_options: {}) - # @param tweet_id [String] - # - # @param account [String] X account (@username or account ID) - # - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/tweets/like_delete_response.rb b/lib/x_twitter_scraper/models/x/tweets/like_delete_response.rb deleted file mode 100644 index c65f121..0000000 --- a/lib/x_twitter_scraper/models/x/tweets/like_delete_response.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - module Tweets - # @see XTwitterScraper::Resources::X::Tweets::Like#delete - class LikeDeleteResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute success - # - # @return [Boolean, true] - required :success, const: true - - # @!method initialize(success: true) - # @param success [Boolean, true] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/tweets/retweet_create_params.rb b/lib/x_twitter_scraper/models/x/tweets/retweet_create_params.rb deleted file mode 100644 index aa4d24c..0000000 --- a/lib/x_twitter_scraper/models/x/tweets/retweet_create_params.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - module Tweets - # @see XTwitterScraper::Resources::X::Tweets::Retweet#create - class RetweetCreateParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - # @!attribute tweet_id - # - # @return [String] - required :tweet_id, String - - # @!attribute account - # X account (@username or account ID) - # - # @return [String] - required :account, String - - # @!method initialize(tweet_id:, account:, request_options: {}) - # @param tweet_id [String] - # - # @param account [String] X account (@username or account ID) - # - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/tweets/retweet_create_response.rb b/lib/x_twitter_scraper/models/x/tweets/retweet_create_response.rb deleted file mode 100644 index 0c1b16d..0000000 --- a/lib/x_twitter_scraper/models/x/tweets/retweet_create_response.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - module Tweets - # @see XTwitterScraper::Resources::X::Tweets::Retweet#create - class RetweetCreateResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute success - # - # @return [Boolean, true] - required :success, const: true - - # @!method initialize(success: true) - # @param success [Boolean, true] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/tweets/retweet_delete_params.rb b/lib/x_twitter_scraper/models/x/tweets/retweet_delete_params.rb deleted file mode 100644 index 88d35b4..0000000 --- a/lib/x_twitter_scraper/models/x/tweets/retweet_delete_params.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - module Tweets - # @see XTwitterScraper::Resources::X::Tweets::Retweet#delete - class RetweetDeleteParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - # @!attribute tweet_id - # - # @return [String] - required :tweet_id, String - - # @!attribute account - # X account (@username or account ID) - # - # @return [String] - required :account, String - - # @!method initialize(tweet_id:, account:, request_options: {}) - # @param tweet_id [String] - # - # @param account [String] X account (@username or account ID) - # - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/tweets/retweet_delete_response.rb b/lib/x_twitter_scraper/models/x/tweets/retweet_delete_response.rb deleted file mode 100644 index 581ce97..0000000 --- a/lib/x_twitter_scraper/models/x/tweets/retweet_delete_response.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - module Tweets - # @see XTwitterScraper::Resources::X::Tweets::Retweet#delete - class RetweetDeleteResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute success - # - # @return [Boolean, true] - required :success, const: true - - # @!method initialize(success: true) - # @param success [Boolean, true] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_params.rb b/lib/x_twitter_scraper/models/x/user_retrieve_params.rb deleted file mode 100644 index 3c60560..0000000 --- a/lib/x_twitter_scraper/models/x/user_retrieve_params.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Users#retrieve - class UserRetrieveParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - # @!attribute username - # - # @return [String] - required :username, String - - # @!method initialize(username:, request_options: {}) - # @param username [String] - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_response.rb deleted file mode 100644 index b988dc9..0000000 --- a/lib/x_twitter_scraper/models/x/user_retrieve_response.rb +++ /dev/null @@ -1,78 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Users#retrieve - class UserRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute description - # - # @return [String, nil] - optional :description, String - - # @!attribute followers - # - # @return [Integer, nil] - optional :followers, Integer - - # @!attribute following - # - # @return [Integer, nil] - optional :following, Integer - - # @!attribute location - # - # @return [String, nil] - optional :location, String - - # @!attribute profile_picture - # - # @return [String, nil] - optional :profile_picture, String, api_name: :profilePicture - - # @!attribute statuses_count - # - # @return [Integer, nil] - optional :statuses_count, Integer, api_name: :statusesCount - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) - # @param id [String] - # @param name [String] - # @param username [String] - # @param created_at [String] - # @param description [String] - # @param followers [Integer] - # @param following [Integer] - # @param location [String] - # @param profile_picture [String] - # @param statuses_count [Integer] - # @param verified [Boolean] - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/users/follow_create_params.rb b/lib/x_twitter_scraper/models/x/users/follow_create_params.rb deleted file mode 100644 index 210da20..0000000 --- a/lib/x_twitter_scraper/models/x/users/follow_create_params.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - module Users - # @see XTwitterScraper::Resources::X::Users::Follow#create - class FollowCreateParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - # @!attribute user_id - # - # @return [String] - required :user_id, String - - # @!attribute account - # X account (@username or account ID) - # - # @return [String] - required :account, String - - # @!method initialize(user_id:, account:, request_options: {}) - # @param user_id [String] - # - # @param account [String] X account (@username or account ID) - # - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/users/follow_create_response.rb b/lib/x_twitter_scraper/models/x/users/follow_create_response.rb deleted file mode 100644 index d59b4eb..0000000 --- a/lib/x_twitter_scraper/models/x/users/follow_create_response.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - module Users - # @see XTwitterScraper::Resources::X::Users::Follow#create - class FollowCreateResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute success - # - # @return [Boolean, true] - required :success, const: true - - # @!method initialize(success: true) - # @param success [Boolean, true] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/users/follow_delete_all_params.rb b/lib/x_twitter_scraper/models/x/users/follow_delete_all_params.rb deleted file mode 100644 index e6a9637..0000000 --- a/lib/x_twitter_scraper/models/x/users/follow_delete_all_params.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - module Users - # @see XTwitterScraper::Resources::X::Users::Follow#delete_all - class FollowDeleteAllParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - # @!attribute user_id - # - # @return [String] - required :user_id, String - - # @!attribute account - # X account (@username or account ID) - # - # @return [String] - required :account, String - - # @!method initialize(user_id:, account:, request_options: {}) - # @param user_id [String] - # - # @param account [String] X account (@username or account ID) - # - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/users/follow_delete_all_response.rb b/lib/x_twitter_scraper/models/x/users/follow_delete_all_response.rb deleted file mode 100644 index a8afee1..0000000 --- a/lib/x_twitter_scraper/models/x/users/follow_delete_all_response.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - module Users - # @see XTwitterScraper::Resources::X::Users::Follow#delete_all - class FollowDeleteAllResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute success - # - # @return [Boolean, true] - required :success, const: true - - # @!method initialize(success: true) - # @param success [Boolean, true] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/resources/radar.rb b/lib/x_twitter_scraper/resources/radar.rb index 10967e3..88632a5 100644 --- a/lib/x_twitter_scraper/resources/radar.rb +++ b/lib/x_twitter_scraper/resources/radar.rb @@ -19,7 +19,7 @@ class Radar # # @param region [String] Region filter (us, global, etc.) # - # @param source [String] Source filter. One of: github, google_trends, hacker_news, polymarket, reddit, t + # @param source [Symbol, XTwitterScraper::Models::RadarRetrieveTrendingTopicsParams::Source] Source filter. One of: github, google_trends, hacker_news, polymarket, reddit, t # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/x_twitter_scraper/resources/styles.rb b/lib/x_twitter_scraper/resources/styles.rb index f9d3b5f..a56ccbb 100644 --- a/lib/x_twitter_scraper/resources/styles.rb +++ b/lib/x_twitter_scraper/resources/styles.rb @@ -4,52 +4,6 @@ module XTwitterScraper module Resources # Tweet composition, drafts, writing styles & radar class Styles - # Get cached style profile - # - # @overload retrieve(username, request_options: {}) - # - # @param username [String] X username of cached style - # - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [XTwitterScraper::Models::StyleRetrieveResponse] - # - # @see XTwitterScraper::Models::StyleRetrieveParams - def retrieve(username, params = {}) - @client.request( - method: :get, - path: ["styles/%1$s", username], - model: XTwitterScraper::Models::StyleRetrieveResponse, - options: params[:request_options] - ) - end - - # Save style profile with custom tweets - # - # @overload update(username, label:, tweets:, request_options: {}) - # - # @param username [String] X username of cached style - # - # @param label [String] Display label for the style - # - # @param tweets [Array] Array of tweet objects - # - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [XTwitterScraper::Models::StyleUpdateResponse] - # - # @see XTwitterScraper::Models::StyleUpdateParams - def update(username, params) - parsed, options = XTwitterScraper::StyleUpdateParams.dump_request(params) - @client.request( - method: :put, - path: ["styles/%1$s", username], - body: parsed, - model: XTwitterScraper::Models::StyleUpdateResponse, - options: options - ) - end - # List cached style profiles # # @overload list(request_options: {}) @@ -68,26 +22,6 @@ def list(params = {}) ) end - # Delete a style profile - # - # @overload delete(username, request_options: {}) - # - # @param username [String] X username of cached style - # - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [nil] - # - # @see XTwitterScraper::Models::StyleDeleteParams - def delete(username, params = {}) - @client.request( - method: :delete, - path: ["styles/%1$s", username], - model: NilClass, - options: params[:request_options] - ) - end - # Analyze writing style from recent tweets # # @overload analyze(username:, request_options: {}) @@ -135,26 +69,6 @@ def compare(params) ) end - # Get engagement metrics for style tweets - # - # @overload get_performance(username, request_options: {}) - # - # @param username [String] X username of cached style - # - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [XTwitterScraper::Models::StyleGetPerformanceResponse] - # - # @see XTwitterScraper::Models::StyleGetPerformanceParams - def get_performance(username, params = {}) - @client.request( - method: :get, - path: ["styles/%1$s/performance", username], - model: XTwitterScraper::Models::StyleGetPerformanceResponse, - options: params[:request_options] - ) - end - # @api private # # @param client [XTwitterScraper::Client] diff --git a/lib/x_twitter_scraper/resources/x/tweets.rb b/lib/x_twitter_scraper/resources/x/tweets.rb index 93714af..1554d1a 100644 --- a/lib/x_twitter_scraper/resources/x/tweets.rb +++ b/lib/x_twitter_scraper/resources/x/tweets.rb @@ -4,11 +4,9 @@ module XTwitterScraper module Resources class X class Tweets - # X write actions (tweets, likes, follows, DMs) # @return [XTwitterScraper::Resources::X::Tweets::Like] attr_reader :like - # X write actions (tweets, likes, follows, DMs) # @return [XTwitterScraper::Resources::X::Tweets::Retweet] attr_reader :retweet @@ -46,25 +44,6 @@ def create(params) ) end - # Look up tweet - # - # @overload retrieve(tweet_id, request_options: {}) - # - # @param tweet_id [String] - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [XTwitterScraper::Models::X::TweetRetrieveResponse] - # - # @see XTwitterScraper::Models::X::TweetRetrieveParams - def retrieve(tweet_id, params = {}) - @client.request( - method: :get, - path: ["x/tweets/%1$s", tweet_id], - model: XTwitterScraper::Models::X::TweetRetrieveResponse, - options: params[:request_options] - ) - end - # Get multiple tweets by IDs # # @overload list(ids:, request_options: {}) @@ -82,30 +61,6 @@ def list(params) @client.request(method: :get, path: "x/tweets", query: query, model: NilClass, options: options) end - # Delete tweet - # - # @overload delete(tweet_id, account:, request_options: {}) - # - # @param tweet_id [String] - # - # @param account [String] X account (@username or account ID) - # - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [XTwitterScraper::Models::X::TweetDeleteResponse] - # - # @see XTwitterScraper::Models::X::TweetDeleteParams - def delete(tweet_id, params) - parsed, options = XTwitterScraper::X::TweetDeleteParams.dump_request(params) - @client.request( - method: :delete, - path: ["x/tweets/%1$s", tweet_id], - body: parsed, - model: XTwitterScraper::Models::X::TweetDeleteResponse, - options: options - ) - end - # Get users who liked a tweet # # @overload get_favoriters(id, cursor: nil, request_options: {}) diff --git a/lib/x_twitter_scraper/resources/x/tweets/like.rb b/lib/x_twitter_scraper/resources/x/tweets/like.rb index a45f934..fa73fd8 100644 --- a/lib/x_twitter_scraper/resources/x/tweets/like.rb +++ b/lib/x_twitter_scraper/resources/x/tweets/like.rb @@ -4,56 +4,7 @@ module XTwitterScraper module Resources class X class Tweets - # X write actions (tweets, likes, follows, DMs) class Like - # Like tweet - # - # @overload create(tweet_id, account:, request_options: {}) - # - # @param tweet_id [String] - # - # @param account [String] X account (@username or account ID) - # - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [XTwitterScraper::Models::X::Tweets::LikeCreateResponse] - # - # @see XTwitterScraper::Models::X::Tweets::LikeCreateParams - def create(tweet_id, params) - parsed, options = XTwitterScraper::X::Tweets::LikeCreateParams.dump_request(params) - @client.request( - method: :post, - path: ["x/tweets/%1$s/like", tweet_id], - body: parsed, - model: XTwitterScraper::Models::X::Tweets::LikeCreateResponse, - options: options - ) - end - - # Unlike tweet - # - # @overload delete(tweet_id, account:, request_options: {}) - # - # @param tweet_id [String] - # - # @param account [String] X account (@username or account ID) - # - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [XTwitterScraper::Models::X::Tweets::LikeDeleteResponse] - # - # @see XTwitterScraper::Models::X::Tweets::LikeDeleteParams - def delete(tweet_id, params) - parsed, options = XTwitterScraper::X::Tweets::LikeDeleteParams.dump_request(params) - @client.request( - method: :delete, - path: ["x/tweets/%1$s/like", tweet_id], - body: parsed, - model: XTwitterScraper::Models::X::Tweets::LikeDeleteResponse, - options: options - ) - end - # @api private # # @param client [XTwitterScraper::Client] diff --git a/lib/x_twitter_scraper/resources/x/tweets/retweet.rb b/lib/x_twitter_scraper/resources/x/tweets/retweet.rb index 518b740..8c422d3 100644 --- a/lib/x_twitter_scraper/resources/x/tweets/retweet.rb +++ b/lib/x_twitter_scraper/resources/x/tweets/retweet.rb @@ -4,56 +4,7 @@ module XTwitterScraper module Resources class X class Tweets - # X write actions (tweets, likes, follows, DMs) class Retweet - # Retweet - # - # @overload create(tweet_id, account:, request_options: {}) - # - # @param tweet_id [String] - # - # @param account [String] X account (@username or account ID) - # - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [XTwitterScraper::Models::X::Tweets::RetweetCreateResponse] - # - # @see XTwitterScraper::Models::X::Tweets::RetweetCreateParams - def create(tweet_id, params) - parsed, options = XTwitterScraper::X::Tweets::RetweetCreateParams.dump_request(params) - @client.request( - method: :post, - path: ["x/tweets/%1$s/retweet", tweet_id], - body: parsed, - model: XTwitterScraper::Models::X::Tweets::RetweetCreateResponse, - options: options - ) - end - - # Unretweet - # - # @overload delete(tweet_id, account:, request_options: {}) - # - # @param tweet_id [String] - # - # @param account [String] X account (@username or account ID) - # - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [XTwitterScraper::Models::X::Tweets::RetweetDeleteResponse] - # - # @see XTwitterScraper::Models::X::Tweets::RetweetDeleteParams - def delete(tweet_id, params) - parsed, options = XTwitterScraper::X::Tweets::RetweetDeleteParams.dump_request(params) - @client.request( - method: :delete, - path: ["x/tweets/%1$s/retweet", tweet_id], - body: parsed, - model: XTwitterScraper::Models::X::Tweets::RetweetDeleteResponse, - options: options - ) - end - # @api private # # @param client [XTwitterScraper::Client] diff --git a/lib/x_twitter_scraper/resources/x/users.rb b/lib/x_twitter_scraper/resources/x/users.rb index cafe029..db49695 100644 --- a/lib/x_twitter_scraper/resources/x/users.rb +++ b/lib/x_twitter_scraper/resources/x/users.rb @@ -5,30 +5,9 @@ module Resources class X # X data lookups (subscription required) class Users - # X write actions (tweets, likes, follows, DMs) # @return [XTwitterScraper::Resources::X::Users::Follow] attr_reader :follow - # Look up X user - # - # @overload retrieve(username, request_options: {}) - # - # @param username [String] X username (without @) - # - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [XTwitterScraper::Models::X::UserRetrieveResponse] - # - # @see XTwitterScraper::Models::X::UserRetrieveParams - def retrieve(username, params = {}) - @client.request( - method: :get, - path: ["x/users/%1$s", username], - model: XTwitterScraper::Models::X::UserRetrieveResponse, - options: params[:request_options] - ) - end - # Get multiple users by IDs # # @overload retrieve_batch(ids:, request_options: {}) diff --git a/lib/x_twitter_scraper/resources/x/users/follow.rb b/lib/x_twitter_scraper/resources/x/users/follow.rb index edeea72..8315aee 100644 --- a/lib/x_twitter_scraper/resources/x/users/follow.rb +++ b/lib/x_twitter_scraper/resources/x/users/follow.rb @@ -4,56 +4,7 @@ module XTwitterScraper module Resources class X class Users - # X write actions (tweets, likes, follows, DMs) class Follow - # Follow user - # - # @overload create(user_id, account:, request_options: {}) - # - # @param user_id [String] User ID to follow - # - # @param account [String] X account (@username or account ID) - # - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [XTwitterScraper::Models::X::Users::FollowCreateResponse] - # - # @see XTwitterScraper::Models::X::Users::FollowCreateParams - def create(user_id, params) - parsed, options = XTwitterScraper::X::Users::FollowCreateParams.dump_request(params) - @client.request( - method: :post, - path: ["x/users/%1$s/follow", user_id], - body: parsed, - model: XTwitterScraper::Models::X::Users::FollowCreateResponse, - options: options - ) - end - - # Unfollow user - # - # @overload delete_all(user_id, account:, request_options: {}) - # - # @param user_id [String] User ID to unfollow - # - # @param account [String] X account (@username or account ID) - # - # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [XTwitterScraper::Models::X::Users::FollowDeleteAllResponse] - # - # @see XTwitterScraper::Models::X::Users::FollowDeleteAllParams - def delete_all(user_id, params) - parsed, options = XTwitterScraper::X::Users::FollowDeleteAllParams.dump_request(params) - @client.request( - method: :delete, - path: ["x/users/%1$s/follow", user_id], - body: parsed, - model: XTwitterScraper::Models::X::Users::FollowDeleteAllResponse, - options: options - ) - end - # @api private # # @param client [XTwitterScraper::Client] diff --git a/rbi/x_twitter_scraper/models.rbi b/rbi/x_twitter_scraper/models.rbi index 99499ab..178ee17 100644 --- a/rbi/x_twitter_scraper/models.rbi +++ b/rbi/x_twitter_scraper/models.rbi @@ -118,20 +118,12 @@ module XTwitterScraper StyleCompareParams = XTwitterScraper::Models::StyleCompareParams - StyleDeleteParams = XTwitterScraper::Models::StyleDeleteParams - - StyleGetPerformanceParams = XTwitterScraper::Models::StyleGetPerformanceParams - StyleListParams = XTwitterScraper::Models::StyleListParams StyleProfile = XTwitterScraper::Models::StyleProfile StyleProfileSummary = XTwitterScraper::Models::StyleProfileSummary - StyleRetrieveParams = XTwitterScraper::Models::StyleRetrieveParams - - StyleUpdateParams = XTwitterScraper::Models::StyleUpdateParams - SubscribeCreateParams = XTwitterScraper::Models::SubscribeCreateParams Support = XTwitterScraper::Models::Support diff --git a/rbi/x_twitter_scraper/models/radar_retrieve_trending_topics_params.rbi b/rbi/x_twitter_scraper/models/radar_retrieve_trending_topics_params.rbi index eb966fc..0a95692 100644 --- a/rbi/x_twitter_scraper/models/radar_retrieve_trending_topics_params.rbi +++ b/rbi/x_twitter_scraper/models/radar_retrieve_trending_topics_params.rbi @@ -44,10 +44,21 @@ module XTwitterScraper # Source filter. One of: github, google_trends, hacker_news, polymarket, reddit, # trustmrr, wikipedia - sig { returns(T.nilable(String)) } + sig do + returns( + T.nilable( + XTwitterScraper::RadarRetrieveTrendingTopicsParams::Source::OrSymbol + ) + ) + end attr_reader :source - sig { params(source: String).void } + sig do + params( + source: + XTwitterScraper::RadarRetrieveTrendingTopicsParams::Source::OrSymbol + ).void + end attr_writer :source sig do @@ -56,7 +67,8 @@ module XTwitterScraper count: Integer, hours: Integer, region: String, - source: String, + source: + XTwitterScraper::RadarRetrieveTrendingTopicsParams::Source::OrSymbol, request_options: XTwitterScraper::RequestOptions::OrHash ).returns(T.attached_class) end @@ -83,13 +95,75 @@ module XTwitterScraper count: Integer, hours: Integer, region: String, - source: String, + source: + XTwitterScraper::RadarRetrieveTrendingTopicsParams::Source::OrSymbol, request_options: XTwitterScraper::RequestOptions } ) end def to_hash end + + # Source filter. One of: github, google_trends, hacker_news, polymarket, reddit, + # trustmrr, wikipedia + module Source + extend XTwitterScraper::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + XTwitterScraper::RadarRetrieveTrendingTopicsParams::Source + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + GITHUB = + T.let( + :github, + XTwitterScraper::RadarRetrieveTrendingTopicsParams::Source::TaggedSymbol + ) + GOOGLE_TRENDS = + T.let( + :google_trends, + XTwitterScraper::RadarRetrieveTrendingTopicsParams::Source::TaggedSymbol + ) + HACKER_NEWS = + T.let( + :hacker_news, + XTwitterScraper::RadarRetrieveTrendingTopicsParams::Source::TaggedSymbol + ) + POLYMARKET = + T.let( + :polymarket, + XTwitterScraper::RadarRetrieveTrendingTopicsParams::Source::TaggedSymbol + ) + REDDIT = + T.let( + :reddit, + XTwitterScraper::RadarRetrieveTrendingTopicsParams::Source::TaggedSymbol + ) + TRUSTMRR = + T.let( + :trustmrr, + XTwitterScraper::RadarRetrieveTrendingTopicsParams::Source::TaggedSymbol + ) + WIKIPEDIA = + T.let( + :wikipedia, + XTwitterScraper::RadarRetrieveTrendingTopicsParams::Source::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + XTwitterScraper::RadarRetrieveTrendingTopicsParams::Source::TaggedSymbol + ] + ) + end + def self.values + end + end end end end diff --git a/rbi/x_twitter_scraper/models/style_delete_params.rbi b/rbi/x_twitter_scraper/models/style_delete_params.rbi deleted file mode 100644 index f7255d8..0000000 --- a/rbi/x_twitter_scraper/models/style_delete_params.rbi +++ /dev/null @@ -1,38 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - class StyleDeleteParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any( - XTwitterScraper::StyleDeleteParams, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :username - - sig do - params( - username: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(T.attached_class) - end - def self.new(username:, request_options: {}) - end - - sig do - override.returns( - { username: String, request_options: XTwitterScraper::RequestOptions } - ) - end - def to_hash - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/style_get_performance_params.rbi b/rbi/x_twitter_scraper/models/style_get_performance_params.rbi deleted file mode 100644 index 1c05692..0000000 --- a/rbi/x_twitter_scraper/models/style_get_performance_params.rbi +++ /dev/null @@ -1,38 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - class StyleGetPerformanceParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any( - XTwitterScraper::StyleGetPerformanceParams, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :username - - sig do - params( - username: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(T.attached_class) - end - def self.new(username:, request_options: {}) - end - - sig do - override.returns( - { username: String, request_options: XTwitterScraper::RequestOptions } - ) - end - def to_hash - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/style_get_performance_response.rbi b/rbi/x_twitter_scraper/models/style_get_performance_response.rbi deleted file mode 100644 index 2fb7605..0000000 --- a/rbi/x_twitter_scraper/models/style_get_performance_response.rbi +++ /dev/null @@ -1,140 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - class StyleGetPerformanceResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::StyleGetPerformanceResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(Integer) } - attr_accessor :tweet_count - - sig do - returns( - T::Array[XTwitterScraper::Models::StyleGetPerformanceResponse::Tweet] - ) - end - attr_accessor :tweets - - sig { returns(String) } - attr_accessor :x_username - - sig do - params( - tweet_count: Integer, - tweets: - T::Array[ - XTwitterScraper::Models::StyleGetPerformanceResponse::Tweet::OrHash - ], - x_username: String - ).returns(T.attached_class) - end - def self.new(tweet_count:, tweets:, x_username:) - end - - sig do - override.returns( - { - tweet_count: Integer, - tweets: - T::Array[ - XTwitterScraper::Models::StyleGetPerformanceResponse::Tweet - ], - x_username: String - } - ) - end - def to_hash - end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::StyleGetPerformanceResponse::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :text - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - sig { returns(T.nilable(Integer)) } - attr_reader :like_count - - sig { params(like_count: Integer).void } - attr_writer :like_count - - sig { returns(T.nilable(Integer)) } - attr_reader :reply_count - - sig { params(reply_count: Integer).void } - attr_writer :reply_count - - sig { returns(T.nilable(Integer)) } - attr_reader :retweet_count - - sig { params(retweet_count: Integer).void } - attr_writer :retweet_count - - sig { returns(T.nilable(Integer)) } - attr_reader :view_count - - sig { params(view_count: Integer).void } - attr_writer :view_count - - sig do - params( - id: String, - text: String, - created_at: String, - like_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - ).returns(T.attached_class) - end - def self.new( - id:, - text:, - created_at: nil, - like_count: nil, - reply_count: nil, - retweet_count: nil, - view_count: nil - ) - end - - sig do - override.returns( - { - id: String, - text: String, - created_at: String, - like_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - ) - end - def to_hash - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/style_retrieve_params.rbi b/rbi/x_twitter_scraper/models/style_retrieve_params.rbi deleted file mode 100644 index a3eab0a..0000000 --- a/rbi/x_twitter_scraper/models/style_retrieve_params.rbi +++ /dev/null @@ -1,38 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - class StyleRetrieveParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any( - XTwitterScraper::StyleRetrieveParams, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :username - - sig do - params( - username: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(T.attached_class) - end - def self.new(username:, request_options: {}) - end - - sig do - override.returns( - { username: String, request_options: XTwitterScraper::RequestOptions } - ) - end - def to_hash - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/style_retrieve_response.rbi b/rbi/x_twitter_scraper/models/style_retrieve_response.rbi deleted file mode 100644 index ffc566f..0000000 --- a/rbi/x_twitter_scraper/models/style_retrieve_response.rbi +++ /dev/null @@ -1,120 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - class StyleRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::StyleRetrieveResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(Time) } - attr_accessor :fetched_at - - sig { returns(T::Boolean) } - attr_accessor :is_own_account - - sig { returns(Integer) } - attr_accessor :tweet_count - - sig do - returns(T::Array[XTwitterScraper::Models::StyleRetrieveResponse::Tweet]) - end - attr_accessor :tweets - - sig { returns(String) } - attr_accessor :x_username - - sig do - params( - fetched_at: Time, - is_own_account: T::Boolean, - tweet_count: Integer, - tweets: - T::Array[ - XTwitterScraper::Models::StyleRetrieveResponse::Tweet::OrHash - ], - x_username: String - ).returns(T.attached_class) - end - def self.new( - fetched_at:, - is_own_account:, - tweet_count:, - tweets:, - x_username: - ) - end - - sig do - override.returns( - { - fetched_at: Time, - is_own_account: T::Boolean, - tweet_count: Integer, - tweets: - T::Array[XTwitterScraper::Models::StyleRetrieveResponse::Tweet], - x_username: String - } - ) - end - def to_hash - end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::StyleRetrieveResponse::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :text - - sig { returns(T.nilable(String)) } - attr_reader :author_username - - sig { params(author_username: String).void } - attr_writer :author_username - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - sig do - params( - id: String, - text: String, - author_username: String, - created_at: String - ).returns(T.attached_class) - end - def self.new(id:, text:, author_username: nil, created_at: nil) - end - - sig do - override.returns( - { - id: String, - text: String, - author_username: String, - created_at: String - } - ) - end - def to_hash - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/style_update_params.rbi b/rbi/x_twitter_scraper/models/style_update_params.rbi deleted file mode 100644 index bb2c9c6..0000000 --- a/rbi/x_twitter_scraper/models/style_update_params.rbi +++ /dev/null @@ -1,81 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - class StyleUpdateParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any( - XTwitterScraper::StyleUpdateParams, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :username - - # Display label for the style - sig { returns(String) } - attr_accessor :label - - # Array of tweet objects - sig { returns(T::Array[XTwitterScraper::StyleUpdateParams::Tweet]) } - attr_accessor :tweets - - sig do - params( - username: String, - label: String, - tweets: T::Array[XTwitterScraper::StyleUpdateParams::Tweet::OrHash], - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(T.attached_class) - end - def self.new( - username:, - # Display label for the style - label:, - # Array of tweet objects - tweets:, - request_options: {} - ) - end - - sig do - override.returns( - { - username: String, - label: String, - tweets: T::Array[XTwitterScraper::StyleUpdateParams::Tweet], - request_options: XTwitterScraper::RequestOptions - } - ) - end - def to_hash - end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::StyleUpdateParams::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :text - - sig { params(text: String).returns(T.attached_class) } - def self.new(text:) - end - - sig { override.returns({ text: String }) } - def to_hash - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/style_update_response.rbi b/rbi/x_twitter_scraper/models/style_update_response.rbi deleted file mode 100644 index 02be40d..0000000 --- a/rbi/x_twitter_scraper/models/style_update_response.rbi +++ /dev/null @@ -1,120 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - class StyleUpdateResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::StyleUpdateResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(Time) } - attr_accessor :fetched_at - - sig { returns(T::Boolean) } - attr_accessor :is_own_account - - sig { returns(Integer) } - attr_accessor :tweet_count - - sig do - returns(T::Array[XTwitterScraper::Models::StyleUpdateResponse::Tweet]) - end - attr_accessor :tweets - - sig { returns(String) } - attr_accessor :x_username - - sig do - params( - fetched_at: Time, - is_own_account: T::Boolean, - tweet_count: Integer, - tweets: - T::Array[ - XTwitterScraper::Models::StyleUpdateResponse::Tweet::OrHash - ], - x_username: String - ).returns(T.attached_class) - end - def self.new( - fetched_at:, - is_own_account:, - tweet_count:, - tweets:, - x_username: - ) - end - - sig do - override.returns( - { - fetched_at: Time, - is_own_account: T::Boolean, - tweet_count: Integer, - tweets: - T::Array[XTwitterScraper::Models::StyleUpdateResponse::Tweet], - x_username: String - } - ) - end - def to_hash - end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::StyleUpdateResponse::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :text - - sig { returns(T.nilable(String)) } - attr_reader :author_username - - sig { params(author_username: String).void } - attr_writer :author_username - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - sig do - params( - id: String, - text: String, - author_username: String, - created_at: String - ).returns(T.attached_class) - end - def self.new(id:, text:, author_username: nil, created_at: nil) - end - - sig do - override.returns( - { - id: String, - text: String, - author_username: String, - created_at: String - } - ) - end - def to_hash - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/tweet_delete_params.rbi b/rbi/x_twitter_scraper/models/x/tweet_delete_params.rbi deleted file mode 100644 index 6fb74f8..0000000 --- a/rbi/x_twitter_scraper/models/x/tweet_delete_params.rbi +++ /dev/null @@ -1,54 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class TweetDeleteParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any( - XTwitterScraper::X::TweetDeleteParams, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tweet_id - - # X account (@username or account ID) - sig { returns(String) } - attr_accessor :account - - sig do - params( - tweet_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(T.attached_class) - end - def self.new( - tweet_id:, - # X account (@username or account ID) - account:, - request_options: {} - ) - end - - sig do - override.returns( - { - tweet_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions - } - ) - end - def to_hash - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/tweet_delete_response.rbi b/rbi/x_twitter_scraper/models/x/tweet_delete_response.rbi deleted file mode 100644 index 93ac06e..0000000 --- a/rbi/x_twitter_scraper/models/x/tweet_delete_response.rbi +++ /dev/null @@ -1,28 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class TweetDeleteResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetDeleteResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :success - - sig { params(success: T::Boolean).returns(T.attached_class) } - def self.new(success: true) - end - - sig { override.returns({ success: T::Boolean }) } - def to_hash - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/tweet_retrieve_params.rbi b/rbi/x_twitter_scraper/models/x/tweet_retrieve_params.rbi deleted file mode 100644 index ece1028..0000000 --- a/rbi/x_twitter_scraper/models/x/tweet_retrieve_params.rbi +++ /dev/null @@ -1,43 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class TweetRetrieveParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any( - XTwitterScraper::X::TweetRetrieveParams, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tweet_id - - sig do - params( - tweet_id: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(T.attached_class) - end - def self.new(tweet_id:, request_options: {}) - end - - sig do - override.returns( - { - tweet_id: String, - request_options: XTwitterScraper::RequestOptions - } - ) - end - def to_hash - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/tweet_retrieve_response.rbi b/rbi/x_twitter_scraper/models/x/tweet_retrieve_response.rbi deleted file mode 100644 index 2d2ff27..0000000 --- a/rbi/x_twitter_scraper/models/x/tweet_retrieve_response.rbi +++ /dev/null @@ -1,211 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class TweetRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetRetrieveResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig do - returns(XTwitterScraper::Models::X::TweetRetrieveResponse::Tweet) - end - attr_reader :tweet - - sig do - params( - tweet: - XTwitterScraper::Models::X::TweetRetrieveResponse::Tweet::OrHash - ).void - end - attr_writer :tweet - - sig do - returns( - T.nilable(XTwitterScraper::Models::X::TweetRetrieveResponse::Author) - ) - end - attr_reader :author - - sig do - params( - author: - XTwitterScraper::Models::X::TweetRetrieveResponse::Author::OrHash - ).void - end - attr_writer :author - - sig do - params( - tweet: - XTwitterScraper::Models::X::TweetRetrieveResponse::Tweet::OrHash, - author: - XTwitterScraper::Models::X::TweetRetrieveResponse::Author::OrHash - ).returns(T.attached_class) - end - def self.new(tweet:, author: nil) - end - - sig do - override.returns( - { - tweet: XTwitterScraper::Models::X::TweetRetrieveResponse::Tweet, - author: XTwitterScraper::Models::X::TweetRetrieveResponse::Author - } - ) - end - def to_hash - end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetRetrieveResponse::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(Integer) } - attr_accessor :bookmark_count - - sig { returns(Integer) } - attr_accessor :like_count - - sig { returns(Integer) } - attr_accessor :quote_count - - sig { returns(Integer) } - attr_accessor :reply_count - - sig { returns(Integer) } - attr_accessor :retweet_count - - sig { returns(String) } - attr_accessor :text - - sig { returns(Integer) } - attr_accessor :view_count - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - sig do - params( - id: String, - bookmark_count: Integer, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - text: String, - view_count: Integer, - created_at: String - ).returns(T.attached_class) - end - def self.new( - id:, - bookmark_count:, - like_count:, - quote_count:, - reply_count:, - retweet_count:, - text:, - view_count:, - created_at: nil - ) - end - - sig do - override.returns( - { - id: String, - bookmark_count: Integer, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - text: String, - view_count: Integer, - created_at: String - } - ) - end - def to_hash - end - end - - class Author < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetRetrieveResponse::Author, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(Integer) } - attr_accessor :followers - - sig { returns(String) } - attr_accessor :username - - sig { returns(T::Boolean) } - attr_accessor :verified - - sig { returns(T.nilable(String)) } - attr_reader :profile_picture - - sig { params(profile_picture: String).void } - attr_writer :profile_picture - - sig do - params( - id: String, - followers: Integer, - username: String, - verified: T::Boolean, - profile_picture: String - ).returns(T.attached_class) - end - def self.new( - id:, - followers:, - username:, - verified:, - profile_picture: nil - ) - end - - sig do - override.returns( - { - id: String, - followers: Integer, - username: String, - verified: T::Boolean, - profile_picture: String - } - ) - end - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/tweets/like_create_params.rbi b/rbi/x_twitter_scraper/models/x/tweets/like_create_params.rbi deleted file mode 100644 index f1bca9c..0000000 --- a/rbi/x_twitter_scraper/models/x/tweets/like_create_params.rbi +++ /dev/null @@ -1,56 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - module Tweets - class LikeCreateParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any( - XTwitterScraper::X::Tweets::LikeCreateParams, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tweet_id - - # X account (@username or account ID) - sig { returns(String) } - attr_accessor :account - - sig do - params( - tweet_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(T.attached_class) - end - def self.new( - tweet_id:, - # X account (@username or account ID) - account:, - request_options: {} - ) - end - - sig do - override.returns( - { - tweet_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions - } - ) - end - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/tweets/like_create_response.rbi b/rbi/x_twitter_scraper/models/x/tweets/like_create_response.rbi deleted file mode 100644 index f656885..0000000 --- a/rbi/x_twitter_scraper/models/x/tweets/like_create_response.rbi +++ /dev/null @@ -1,30 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - module Tweets - class LikeCreateResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::Tweets::LikeCreateResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :success - - sig { params(success: T::Boolean).returns(T.attached_class) } - def self.new(success: true) - end - - sig { override.returns({ success: T::Boolean }) } - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/tweets/like_delete_params.rbi b/rbi/x_twitter_scraper/models/x/tweets/like_delete_params.rbi deleted file mode 100644 index 715c364..0000000 --- a/rbi/x_twitter_scraper/models/x/tweets/like_delete_params.rbi +++ /dev/null @@ -1,56 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - module Tweets - class LikeDeleteParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any( - XTwitterScraper::X::Tweets::LikeDeleteParams, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tweet_id - - # X account (@username or account ID) - sig { returns(String) } - attr_accessor :account - - sig do - params( - tweet_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(T.attached_class) - end - def self.new( - tweet_id:, - # X account (@username or account ID) - account:, - request_options: {} - ) - end - - sig do - override.returns( - { - tweet_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions - } - ) - end - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/tweets/like_delete_response.rbi b/rbi/x_twitter_scraper/models/x/tweets/like_delete_response.rbi deleted file mode 100644 index 0c22e81..0000000 --- a/rbi/x_twitter_scraper/models/x/tweets/like_delete_response.rbi +++ /dev/null @@ -1,30 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - module Tweets - class LikeDeleteResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::Tweets::LikeDeleteResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :success - - sig { params(success: T::Boolean).returns(T.attached_class) } - def self.new(success: true) - end - - sig { override.returns({ success: T::Boolean }) } - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/tweets/retweet_create_params.rbi b/rbi/x_twitter_scraper/models/x/tweets/retweet_create_params.rbi deleted file mode 100644 index dbcf8ad..0000000 --- a/rbi/x_twitter_scraper/models/x/tweets/retweet_create_params.rbi +++ /dev/null @@ -1,56 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - module Tweets - class RetweetCreateParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any( - XTwitterScraper::X::Tweets::RetweetCreateParams, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tweet_id - - # X account (@username or account ID) - sig { returns(String) } - attr_accessor :account - - sig do - params( - tweet_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(T.attached_class) - end - def self.new( - tweet_id:, - # X account (@username or account ID) - account:, - request_options: {} - ) - end - - sig do - override.returns( - { - tweet_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions - } - ) - end - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/tweets/retweet_create_response.rbi b/rbi/x_twitter_scraper/models/x/tweets/retweet_create_response.rbi deleted file mode 100644 index ac68181..0000000 --- a/rbi/x_twitter_scraper/models/x/tweets/retweet_create_response.rbi +++ /dev/null @@ -1,30 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - module Tweets - class RetweetCreateResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::Tweets::RetweetCreateResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :success - - sig { params(success: T::Boolean).returns(T.attached_class) } - def self.new(success: true) - end - - sig { override.returns({ success: T::Boolean }) } - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbi b/rbi/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbi deleted file mode 100644 index 1999988..0000000 --- a/rbi/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbi +++ /dev/null @@ -1,56 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - module Tweets - class RetweetDeleteParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any( - XTwitterScraper::X::Tweets::RetweetDeleteParams, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tweet_id - - # X account (@username or account ID) - sig { returns(String) } - attr_accessor :account - - sig do - params( - tweet_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(T.attached_class) - end - def self.new( - tweet_id:, - # X account (@username or account ID) - account:, - request_options: {} - ) - end - - sig do - override.returns( - { - tweet_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions - } - ) - end - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbi b/rbi/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbi deleted file mode 100644 index 7f84a36..0000000 --- a/rbi/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbi +++ /dev/null @@ -1,30 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - module Tweets - class RetweetDeleteResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::Tweets::RetweetDeleteResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :success - - sig { params(success: T::Boolean).returns(T.attached_class) } - def self.new(success: true) - end - - sig { override.returns({ success: T::Boolean }) } - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_params.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_params.rbi deleted file mode 100644 index 3107dc6..0000000 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_params.rbi +++ /dev/null @@ -1,43 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class UserRetrieveParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any( - XTwitterScraper::X::UserRetrieveParams, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :username - - sig do - params( - username: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(T.attached_class) - end - def self.new(username:, request_options: {}) - end - - sig do - override.returns( - { - username: String, - request_options: XTwitterScraper::RequestOptions - } - ) - end - def to_hash - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_response.rbi deleted file mode 100644 index 22cbac1..0000000 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_response.rbi +++ /dev/null @@ -1,124 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class UserRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - sig { returns(T.nilable(String)) } - attr_reader :description - - sig { params(description: String).void } - attr_writer :description - - sig { returns(T.nilable(Integer)) } - attr_reader :followers - - sig { params(followers: Integer).void } - attr_writer :followers - - sig { returns(T.nilable(Integer)) } - attr_reader :following - - sig { params(following: Integer).void } - attr_writer :following - - sig { returns(T.nilable(String)) } - attr_reader :location - - sig { params(location: String).void } - attr_writer :location - - sig { returns(T.nilable(String)) } - attr_reader :profile_picture - - sig { params(profile_picture: String).void } - attr_writer :profile_picture - - sig { returns(T.nilable(Integer)) } - attr_reader :statuses_count - - sig { params(statuses_count: Integer).void } - attr_writer :statuses_count - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - sig do - params( - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new( - id:, - name:, - username:, - created_at: nil, - description: nil, - followers: nil, - following: nil, - location: nil, - profile_picture: nil, - statuses_count: nil, - verified: nil - ) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/users/follow_create_params.rbi b/rbi/x_twitter_scraper/models/x/users/follow_create_params.rbi deleted file mode 100644 index df2d185..0000000 --- a/rbi/x_twitter_scraper/models/x/users/follow_create_params.rbi +++ /dev/null @@ -1,56 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - module Users - class FollowCreateParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any( - XTwitterScraper::X::Users::FollowCreateParams, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :user_id - - # X account (@username or account ID) - sig { returns(String) } - attr_accessor :account - - sig do - params( - user_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(T.attached_class) - end - def self.new( - user_id:, - # X account (@username or account ID) - account:, - request_options: {} - ) - end - - sig do - override.returns( - { - user_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions - } - ) - end - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/users/follow_create_response.rbi b/rbi/x_twitter_scraper/models/x/users/follow_create_response.rbi deleted file mode 100644 index 30b0870..0000000 --- a/rbi/x_twitter_scraper/models/x/users/follow_create_response.rbi +++ /dev/null @@ -1,30 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - module Users - class FollowCreateResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::Users::FollowCreateResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :success - - sig { params(success: T::Boolean).returns(T.attached_class) } - def self.new(success: true) - end - - sig { override.returns({ success: T::Boolean }) } - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/users/follow_delete_all_params.rbi b/rbi/x_twitter_scraper/models/x/users/follow_delete_all_params.rbi deleted file mode 100644 index 743e315..0000000 --- a/rbi/x_twitter_scraper/models/x/users/follow_delete_all_params.rbi +++ /dev/null @@ -1,56 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - module Users - class FollowDeleteAllParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any( - XTwitterScraper::X::Users::FollowDeleteAllParams, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :user_id - - # X account (@username or account ID) - sig { returns(String) } - attr_accessor :account - - sig do - params( - user_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(T.attached_class) - end - def self.new( - user_id:, - # X account (@username or account ID) - account:, - request_options: {} - ) - end - - sig do - override.returns( - { - user_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions - } - ) - end - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/users/follow_delete_all_response.rbi b/rbi/x_twitter_scraper/models/x/users/follow_delete_all_response.rbi deleted file mode 100644 index b4ba98c..0000000 --- a/rbi/x_twitter_scraper/models/x/users/follow_delete_all_response.rbi +++ /dev/null @@ -1,30 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - module Users - class FollowDeleteAllResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::Users::FollowDeleteAllResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :success - - sig { params(success: T::Boolean).returns(T.attached_class) } - def self.new(success: true) - end - - sig { override.returns({ success: T::Boolean }) } - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/resources/radar.rbi b/rbi/x_twitter_scraper/resources/radar.rbi index 6f890a3..3177d63 100644 --- a/rbi/x_twitter_scraper/resources/radar.rbi +++ b/rbi/x_twitter_scraper/resources/radar.rbi @@ -11,7 +11,8 @@ module XTwitterScraper count: Integer, hours: Integer, region: String, - source: String, + source: + XTwitterScraper::RadarRetrieveTrendingTopicsParams::Source::OrSymbol, request_options: XTwitterScraper::RequestOptions::OrHash ).returns(XTwitterScraper::Models::RadarRetrieveTrendingTopicsResponse) end diff --git a/rbi/x_twitter_scraper/resources/styles.rbi b/rbi/x_twitter_scraper/resources/styles.rbi index 50d3a99..81f3951 100644 --- a/rbi/x_twitter_scraper/resources/styles.rbi +++ b/rbi/x_twitter_scraper/resources/styles.rbi @@ -4,40 +4,6 @@ module XTwitterScraper module Resources # Tweet composition, drafts, writing styles & radar class Styles - # Get cached style profile - sig do - params( - username: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::StyleRetrieveResponse) - end - def retrieve( - # X username of cached style - username, - request_options: {} - ) - end - - # Save style profile with custom tweets - sig do - params( - username: String, - label: String, - tweets: T::Array[XTwitterScraper::StyleUpdateParams::Tweet::OrHash], - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::StyleUpdateResponse) - end - def update( - # X username of cached style - username, - # Display label for the style - label:, - # Array of tweet objects - tweets:, - request_options: {} - ) - end - # List cached style profiles sig do params( @@ -47,20 +13,6 @@ module XTwitterScraper def list(request_options: {}) end - # Delete a style profile - sig do - params( - username: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).void - end - def delete( - # X username of cached style - username, - request_options: {} - ) - end - # Analyze writing style from recent tweets sig do params( @@ -92,20 +44,6 @@ module XTwitterScraper ) end - # Get engagement metrics for style tweets - sig do - params( - username: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::StyleGetPerformanceResponse) - end - def get_performance( - # X username of cached style - username, - request_options: {} - ) - end - # @api private sig { params(client: XTwitterScraper::Client).returns(T.attached_class) } def self.new(client:) diff --git a/rbi/x_twitter_scraper/resources/x/tweets.rbi b/rbi/x_twitter_scraper/resources/x/tweets.rbi index 0113bf4..8b1ad8f 100644 --- a/rbi/x_twitter_scraper/resources/x/tweets.rbi +++ b/rbi/x_twitter_scraper/resources/x/tweets.rbi @@ -4,11 +4,9 @@ module XTwitterScraper module Resources class X class Tweets - # X write actions (tweets, likes, follows, DMs) sig { returns(XTwitterScraper::Resources::X::Tweets::Like) } attr_reader :like - # X write actions (tweets, likes, follows, DMs) sig { returns(XTwitterScraper::Resources::X::Tweets::Retweet) } attr_reader :retweet @@ -38,16 +36,6 @@ module XTwitterScraper ) end - # Look up tweet - sig do - params( - tweet_id: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::TweetRetrieveResponse) - end - def retrieve(tweet_id, request_options: {}) - end - # Get multiple tweets by IDs sig do params( @@ -62,22 +50,6 @@ module XTwitterScraper ) end - # Delete tweet - sig do - params( - tweet_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::TweetDeleteResponse) - end - def delete( - tweet_id, - # X account (@username or account ID) - account:, - request_options: {} - ) - end - # Get users who liked a tweet sig do params( diff --git a/rbi/x_twitter_scraper/resources/x/tweets/like.rbi b/rbi/x_twitter_scraper/resources/x/tweets/like.rbi index 0df8f46..9c17e6e 100644 --- a/rbi/x_twitter_scraper/resources/x/tweets/like.rbi +++ b/rbi/x_twitter_scraper/resources/x/tweets/like.rbi @@ -4,40 +4,7 @@ module XTwitterScraper module Resources class X class Tweets - # X write actions (tweets, likes, follows, DMs) class Like - # Like tweet - sig do - params( - tweet_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::Tweets::LikeCreateResponse) - end - def create( - tweet_id, - # X account (@username or account ID) - account:, - request_options: {} - ) - end - - # Unlike tweet - sig do - params( - tweet_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::Tweets::LikeDeleteResponse) - end - def delete( - tweet_id, - # X account (@username or account ID) - account:, - request_options: {} - ) - end - # @api private sig do params(client: XTwitterScraper::Client).returns(T.attached_class) diff --git a/rbi/x_twitter_scraper/resources/x/tweets/retweet.rbi b/rbi/x_twitter_scraper/resources/x/tweets/retweet.rbi index 1ae7005..f85e1a3 100644 --- a/rbi/x_twitter_scraper/resources/x/tweets/retweet.rbi +++ b/rbi/x_twitter_scraper/resources/x/tweets/retweet.rbi @@ -4,40 +4,7 @@ module XTwitterScraper module Resources class X class Tweets - # X write actions (tweets, likes, follows, DMs) class Retweet - # Retweet - sig do - params( - tweet_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::Tweets::RetweetCreateResponse) - end - def create( - tweet_id, - # X account (@username or account ID) - account:, - request_options: {} - ) - end - - # Unretweet - sig do - params( - tweet_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::Tweets::RetweetDeleteResponse) - end - def delete( - tweet_id, - # X account (@username or account ID) - account:, - request_options: {} - ) - end - # @api private sig do params(client: XTwitterScraper::Client).returns(T.attached_class) diff --git a/rbi/x_twitter_scraper/resources/x/users.rbi b/rbi/x_twitter_scraper/resources/x/users.rbi index 90e1a2e..d6f6a48 100644 --- a/rbi/x_twitter_scraper/resources/x/users.rbi +++ b/rbi/x_twitter_scraper/resources/x/users.rbi @@ -5,24 +5,9 @@ module XTwitterScraper class X # X data lookups (subscription required) class Users - # X write actions (tweets, likes, follows, DMs) sig { returns(XTwitterScraper::Resources::X::Users::Follow) } attr_reader :follow - # Look up X user - sig do - params( - username: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::UserRetrieveResponse) - end - def retrieve( - # X username (without @) - username, - request_options: {} - ) - end - # Get multiple users by IDs sig do params( diff --git a/rbi/x_twitter_scraper/resources/x/users/follow.rbi b/rbi/x_twitter_scraper/resources/x/users/follow.rbi index 837b9bb..b89730a 100644 --- a/rbi/x_twitter_scraper/resources/x/users/follow.rbi +++ b/rbi/x_twitter_scraper/resources/x/users/follow.rbi @@ -4,44 +4,7 @@ module XTwitterScraper module Resources class X class Users - # X write actions (tweets, likes, follows, DMs) class Follow - # Follow user - sig do - params( - user_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::Users::FollowCreateResponse) - end - def create( - # User ID to follow - user_id, - # X account (@username or account ID) - account:, - request_options: {} - ) - end - - # Unfollow user - sig do - params( - user_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions::OrHash - ).returns( - XTwitterScraper::Models::X::Users::FollowDeleteAllResponse - ) - end - def delete_all( - # User ID to unfollow - user_id, - # X account (@username or account ID) - account:, - request_options: {} - ) - end - # @api private sig do params(client: XTwitterScraper::Client).returns(T.attached_class) diff --git a/sig/x_twitter_scraper/models.rbs b/sig/x_twitter_scraper/models.rbs index 843876a..525b54e 100644 --- a/sig/x_twitter_scraper/models.rbs +++ b/sig/x_twitter_scraper/models.rbs @@ -111,20 +111,12 @@ module XTwitterScraper class StyleCompareParams = XTwitterScraper::Models::StyleCompareParams - class StyleDeleteParams = XTwitterScraper::Models::StyleDeleteParams - - class StyleGetPerformanceParams = XTwitterScraper::Models::StyleGetPerformanceParams - class StyleListParams = XTwitterScraper::Models::StyleListParams class StyleProfile = XTwitterScraper::Models::StyleProfile class StyleProfileSummary = XTwitterScraper::Models::StyleProfileSummary - class StyleRetrieveParams = XTwitterScraper::Models::StyleRetrieveParams - - class StyleUpdateParams = XTwitterScraper::Models::StyleUpdateParams - class SubscribeCreateParams = XTwitterScraper::Models::SubscribeCreateParams module Support = XTwitterScraper::Models::Support diff --git a/sig/x_twitter_scraper/models/radar_retrieve_trending_topics_params.rbs b/sig/x_twitter_scraper/models/radar_retrieve_trending_topics_params.rbs index a61baf7..2670f94 100644 --- a/sig/x_twitter_scraper/models/radar_retrieve_trending_topics_params.rbs +++ b/sig/x_twitter_scraper/models/radar_retrieve_trending_topics_params.rbs @@ -6,7 +6,7 @@ module XTwitterScraper count: Integer, hours: Integer, region: String, - source: String + source: XTwitterScraper::Models::RadarRetrieveTrendingTopicsParams::source } & XTwitterScraper::Internal::Type::request_parameters @@ -30,16 +30,18 @@ module XTwitterScraper def region=: (String) -> String - attr_reader source: String? + attr_reader source: XTwitterScraper::Models::RadarRetrieveTrendingTopicsParams::source? - def source=: (String) -> String + def source=: ( + XTwitterScraper::Models::RadarRetrieveTrendingTopicsParams::source + ) -> XTwitterScraper::Models::RadarRetrieveTrendingTopicsParams::source def initialize: ( ?category: String, ?count: Integer, ?hours: Integer, ?region: String, - ?source: String, + ?source: XTwitterScraper::Models::RadarRetrieveTrendingTopicsParams::source, ?request_options: XTwitterScraper::request_opts ) -> void @@ -48,9 +50,32 @@ module XTwitterScraper count: Integer, hours: Integer, region: String, - source: String, + source: XTwitterScraper::Models::RadarRetrieveTrendingTopicsParams::source, request_options: XTwitterScraper::RequestOptions } + + type source = + :github + | :google_trends + | :hacker_news + | :polymarket + | :reddit + | :trustmrr + | :wikipedia + + module Source + extend XTwitterScraper::Internal::Type::Enum + + GITHUB: :github + GOOGLE_TRENDS: :google_trends + HACKER_NEWS: :hacker_news + POLYMARKET: :polymarket + REDDIT: :reddit + TRUSTMRR: :trustmrr + WIKIPEDIA: :wikipedia + + def self?.values: -> ::Array[XTwitterScraper::Models::RadarRetrieveTrendingTopicsParams::source] + end end end end diff --git a/sig/x_twitter_scraper/models/style_delete_params.rbs b/sig/x_twitter_scraper/models/style_delete_params.rbs deleted file mode 100644 index f95c60d..0000000 --- a/sig/x_twitter_scraper/models/style_delete_params.rbs +++ /dev/null @@ -1,23 +0,0 @@ -module XTwitterScraper - module Models - type style_delete_params = - { username: String } & XTwitterScraper::Internal::Type::request_parameters - - class StyleDeleteParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - attr_accessor username: String - - def initialize: ( - username: String, - ?request_options: XTwitterScraper::request_opts - ) -> void - - def to_hash: -> { - username: String, - request_options: XTwitterScraper::RequestOptions - } - end - end -end diff --git a/sig/x_twitter_scraper/models/style_get_performance_params.rbs b/sig/x_twitter_scraper/models/style_get_performance_params.rbs deleted file mode 100644 index 66f09f7..0000000 --- a/sig/x_twitter_scraper/models/style_get_performance_params.rbs +++ /dev/null @@ -1,23 +0,0 @@ -module XTwitterScraper - module Models - type style_get_performance_params = - { username: String } & XTwitterScraper::Internal::Type::request_parameters - - class StyleGetPerformanceParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - attr_accessor username: String - - def initialize: ( - username: String, - ?request_options: XTwitterScraper::request_opts - ) -> void - - def to_hash: -> { - username: String, - request_options: XTwitterScraper::RequestOptions - } - end - end -end diff --git a/sig/x_twitter_scraper/models/style_get_performance_response.rbs b/sig/x_twitter_scraper/models/style_get_performance_response.rbs deleted file mode 100644 index e9b49ef..0000000 --- a/sig/x_twitter_scraper/models/style_get_performance_response.rbs +++ /dev/null @@ -1,87 +0,0 @@ -module XTwitterScraper - module Models - type style_get_performance_response = - { - tweet_count: Integer, - tweets: ::Array[XTwitterScraper::Models::StyleGetPerformanceResponse::Tweet], - x_username: String - } - - class StyleGetPerformanceResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor tweet_count: Integer - - attr_accessor tweets: ::Array[XTwitterScraper::Models::StyleGetPerformanceResponse::Tweet] - - attr_accessor x_username: String - - def initialize: ( - tweet_count: Integer, - tweets: ::Array[XTwitterScraper::Models::StyleGetPerformanceResponse::Tweet], - x_username: String - ) -> void - - def to_hash: -> { - tweet_count: Integer, - tweets: ::Array[XTwitterScraper::Models::StyleGetPerformanceResponse::Tweet], - x_username: String - } - - type tweet = - { - id: String, - text: String, - created_at: String, - like_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor text: String - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader like_count: Integer? - - def like_count=: (Integer) -> Integer - - attr_reader reply_count: Integer? - - def reply_count=: (Integer) -> Integer - - attr_reader retweet_count: Integer? - - def retweet_count=: (Integer) -> Integer - - attr_reader view_count: Integer? - - def view_count=: (Integer) -> Integer - - def initialize: ( - id: String, - text: String, - ?created_at: String, - ?like_count: Integer, - ?reply_count: Integer, - ?retweet_count: Integer, - ?view_count: Integer - ) -> void - - def to_hash: -> { - id: String, - text: String, - created_at: String, - like_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - end - end - end -end diff --git a/sig/x_twitter_scraper/models/style_retrieve_params.rbs b/sig/x_twitter_scraper/models/style_retrieve_params.rbs deleted file mode 100644 index 9619399..0000000 --- a/sig/x_twitter_scraper/models/style_retrieve_params.rbs +++ /dev/null @@ -1,23 +0,0 @@ -module XTwitterScraper - module Models - type style_retrieve_params = - { username: String } & XTwitterScraper::Internal::Type::request_parameters - - class StyleRetrieveParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - attr_accessor username: String - - def initialize: ( - username: String, - ?request_options: XTwitterScraper::request_opts - ) -> void - - def to_hash: -> { - username: String, - request_options: XTwitterScraper::RequestOptions - } - end - end -end diff --git a/sig/x_twitter_scraper/models/style_retrieve_response.rbs b/sig/x_twitter_scraper/models/style_retrieve_response.rbs deleted file mode 100644 index a1cd7fd..0000000 --- a/sig/x_twitter_scraper/models/style_retrieve_response.rbs +++ /dev/null @@ -1,76 +0,0 @@ -module XTwitterScraper - module Models - type style_retrieve_response = - { - fetched_at: Time, - is_own_account: bool, - tweet_count: Integer, - tweets: ::Array[XTwitterScraper::Models::StyleRetrieveResponse::Tweet], - x_username: String - } - - class StyleRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor fetched_at: Time - - attr_accessor is_own_account: bool - - attr_accessor tweet_count: Integer - - attr_accessor tweets: ::Array[XTwitterScraper::Models::StyleRetrieveResponse::Tweet] - - attr_accessor x_username: String - - def initialize: ( - fetched_at: Time, - is_own_account: bool, - tweet_count: Integer, - tweets: ::Array[XTwitterScraper::Models::StyleRetrieveResponse::Tweet], - x_username: String - ) -> void - - def to_hash: -> { - fetched_at: Time, - is_own_account: bool, - tweet_count: Integer, - tweets: ::Array[XTwitterScraper::Models::StyleRetrieveResponse::Tweet], - x_username: String - } - - type tweet = - { - id: String, - text: String, - author_username: String, - created_at: String - } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor text: String - - attr_reader author_username: String? - - def author_username=: (String) -> String - - attr_reader created_at: String? - - def created_at=: (String) -> String - - def initialize: ( - id: String, - text: String, - ?author_username: String, - ?created_at: String - ) -> void - - def to_hash: -> { - id: String, - text: String, - author_username: String, - created_at: String - } - end - end - end -end diff --git a/sig/x_twitter_scraper/models/style_update_params.rbs b/sig/x_twitter_scraper/models/style_update_params.rbs deleted file mode 100644 index 9151ed5..0000000 --- a/sig/x_twitter_scraper/models/style_update_params.rbs +++ /dev/null @@ -1,46 +0,0 @@ -module XTwitterScraper - module Models - type style_update_params = - { - username: String, - label: String, - tweets: ::Array[XTwitterScraper::StyleUpdateParams::Tweet] - } - & XTwitterScraper::Internal::Type::request_parameters - - class StyleUpdateParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - attr_accessor username: String - - attr_accessor label: String - - attr_accessor tweets: ::Array[XTwitterScraper::StyleUpdateParams::Tweet] - - def initialize: ( - username: String, - label: String, - tweets: ::Array[XTwitterScraper::StyleUpdateParams::Tweet], - ?request_options: XTwitterScraper::request_opts - ) -> void - - def to_hash: -> { - username: String, - label: String, - tweets: ::Array[XTwitterScraper::StyleUpdateParams::Tweet], - request_options: XTwitterScraper::RequestOptions - } - - type tweet = { text: String } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor text: String - - def initialize: (text: String) -> void - - def to_hash: -> { text: String } - end - end - end -end diff --git a/sig/x_twitter_scraper/models/style_update_response.rbs b/sig/x_twitter_scraper/models/style_update_response.rbs deleted file mode 100644 index 3ebb59b..0000000 --- a/sig/x_twitter_scraper/models/style_update_response.rbs +++ /dev/null @@ -1,76 +0,0 @@ -module XTwitterScraper - module Models - type style_update_response = - { - fetched_at: Time, - is_own_account: bool, - tweet_count: Integer, - tweets: ::Array[XTwitterScraper::Models::StyleUpdateResponse::Tweet], - x_username: String - } - - class StyleUpdateResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor fetched_at: Time - - attr_accessor is_own_account: bool - - attr_accessor tweet_count: Integer - - attr_accessor tweets: ::Array[XTwitterScraper::Models::StyleUpdateResponse::Tweet] - - attr_accessor x_username: String - - def initialize: ( - fetched_at: Time, - is_own_account: bool, - tweet_count: Integer, - tweets: ::Array[XTwitterScraper::Models::StyleUpdateResponse::Tweet], - x_username: String - ) -> void - - def to_hash: -> { - fetched_at: Time, - is_own_account: bool, - tweet_count: Integer, - tweets: ::Array[XTwitterScraper::Models::StyleUpdateResponse::Tweet], - x_username: String - } - - type tweet = - { - id: String, - text: String, - author_username: String, - created_at: String - } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor text: String - - attr_reader author_username: String? - - def author_username=: (String) -> String - - attr_reader created_at: String? - - def created_at=: (String) -> String - - def initialize: ( - id: String, - text: String, - ?author_username: String, - ?created_at: String - ) -> void - - def to_hash: -> { - id: String, - text: String, - author_username: String, - created_at: String - } - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/tweet_delete_params.rbs b/sig/x_twitter_scraper/models/x/tweet_delete_params.rbs deleted file mode 100644 index abfeb16..0000000 --- a/sig/x_twitter_scraper/models/x/tweet_delete_params.rbs +++ /dev/null @@ -1,30 +0,0 @@ -module XTwitterScraper - module Models - module X - type tweet_delete_params = - { tweet_id: String, account: String } - & XTwitterScraper::Internal::Type::request_parameters - - class TweetDeleteParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - attr_accessor tweet_id: String - - attr_accessor account: String - - def initialize: ( - tweet_id: String, - account: String, - ?request_options: XTwitterScraper::request_opts - ) -> void - - def to_hash: -> { - tweet_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions - } - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/tweet_delete_response.rbs b/sig/x_twitter_scraper/models/x/tweet_delete_response.rbs deleted file mode 100644 index c7435a1..0000000 --- a/sig/x_twitter_scraper/models/x/tweet_delete_response.rbs +++ /dev/null @@ -1,15 +0,0 @@ -module XTwitterScraper - module Models - module X - type tweet_delete_response = { success: true } - - class TweetDeleteResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor success: true - - def initialize: (?success: true) -> void - - def to_hash: -> { success: true } - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/tweet_retrieve_params.rbs b/sig/x_twitter_scraper/models/x/tweet_retrieve_params.rbs deleted file mode 100644 index f388d88..0000000 --- a/sig/x_twitter_scraper/models/x/tweet_retrieve_params.rbs +++ /dev/null @@ -1,26 +0,0 @@ -module XTwitterScraper - module Models - module X - type tweet_retrieve_params = - { tweet_id: String } - & XTwitterScraper::Internal::Type::request_parameters - - class TweetRetrieveParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - attr_accessor tweet_id: String - - def initialize: ( - tweet_id: String, - ?request_options: XTwitterScraper::request_opts - ) -> void - - def to_hash: -> { - tweet_id: String, - request_options: XTwitterScraper::RequestOptions - } - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/tweet_retrieve_response.rbs b/sig/x_twitter_scraper/models/x/tweet_retrieve_response.rbs deleted file mode 100644 index 74fd439..0000000 --- a/sig/x_twitter_scraper/models/x/tweet_retrieve_response.rbs +++ /dev/null @@ -1,129 +0,0 @@ -module XTwitterScraper - module Models - module X - type tweet_retrieve_response = - { - tweet: XTwitterScraper::Models::X::TweetRetrieveResponse::Tweet, - author: XTwitterScraper::Models::X::TweetRetrieveResponse::Author - } - - class TweetRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor tweet: XTwitterScraper::Models::X::TweetRetrieveResponse::Tweet - - attr_reader author: XTwitterScraper::Models::X::TweetRetrieveResponse::Author? - - def author=: ( - XTwitterScraper::Models::X::TweetRetrieveResponse::Author - ) -> XTwitterScraper::Models::X::TweetRetrieveResponse::Author - - def initialize: ( - tweet: XTwitterScraper::Models::X::TweetRetrieveResponse::Tweet, - ?author: XTwitterScraper::Models::X::TweetRetrieveResponse::Author - ) -> void - - def to_hash: -> { - tweet: XTwitterScraper::Models::X::TweetRetrieveResponse::Tweet, - author: XTwitterScraper::Models::X::TweetRetrieveResponse::Author - } - - type tweet = - { - id: String, - bookmark_count: Integer, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - text: String, - view_count: Integer, - created_at: String - } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor bookmark_count: Integer - - attr_accessor like_count: Integer - - attr_accessor quote_count: Integer - - attr_accessor reply_count: Integer - - attr_accessor retweet_count: Integer - - attr_accessor text: String - - attr_accessor view_count: Integer - - attr_reader created_at: String? - - def created_at=: (String) -> String - - def initialize: ( - id: String, - bookmark_count: Integer, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - text: String, - view_count: Integer, - ?created_at: String - ) -> void - - def to_hash: -> { - id: String, - bookmark_count: Integer, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - text: String, - view_count: Integer, - created_at: String - } - end - - type author = - { - id: String, - followers: Integer, - username: String, - verified: bool, - profile_picture: String - } - - class Author < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor followers: Integer - - attr_accessor username: String - - attr_accessor verified: bool - - attr_reader profile_picture: String? - - def profile_picture=: (String) -> String - - def initialize: ( - id: String, - followers: Integer, - username: String, - verified: bool, - ?profile_picture: String - ) -> void - - def to_hash: -> { - id: String, - followers: Integer, - username: String, - verified: bool, - profile_picture: String - } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/tweets/like_create_params.rbs b/sig/x_twitter_scraper/models/x/tweets/like_create_params.rbs deleted file mode 100644 index 8193de1..0000000 --- a/sig/x_twitter_scraper/models/x/tweets/like_create_params.rbs +++ /dev/null @@ -1,32 +0,0 @@ -module XTwitterScraper - module Models - module X - module Tweets - type like_create_params = - { tweet_id: String, account: String } - & XTwitterScraper::Internal::Type::request_parameters - - class LikeCreateParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - attr_accessor tweet_id: String - - attr_accessor account: String - - def initialize: ( - tweet_id: String, - account: String, - ?request_options: XTwitterScraper::request_opts - ) -> void - - def to_hash: -> { - tweet_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions - } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/tweets/like_create_response.rbs b/sig/x_twitter_scraper/models/x/tweets/like_create_response.rbs deleted file mode 100644 index f15fd18..0000000 --- a/sig/x_twitter_scraper/models/x/tweets/like_create_response.rbs +++ /dev/null @@ -1,17 +0,0 @@ -module XTwitterScraper - module Models - module X - module Tweets - type like_create_response = { success: true } - - class LikeCreateResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor success: true - - def initialize: (?success: true) -> void - - def to_hash: -> { success: true } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/tweets/like_delete_params.rbs b/sig/x_twitter_scraper/models/x/tweets/like_delete_params.rbs deleted file mode 100644 index 2107203..0000000 --- a/sig/x_twitter_scraper/models/x/tweets/like_delete_params.rbs +++ /dev/null @@ -1,32 +0,0 @@ -module XTwitterScraper - module Models - module X - module Tweets - type like_delete_params = - { tweet_id: String, account: String } - & XTwitterScraper::Internal::Type::request_parameters - - class LikeDeleteParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - attr_accessor tweet_id: String - - attr_accessor account: String - - def initialize: ( - tweet_id: String, - account: String, - ?request_options: XTwitterScraper::request_opts - ) -> void - - def to_hash: -> { - tweet_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions - } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/tweets/like_delete_response.rbs b/sig/x_twitter_scraper/models/x/tweets/like_delete_response.rbs deleted file mode 100644 index b14d73c..0000000 --- a/sig/x_twitter_scraper/models/x/tweets/like_delete_response.rbs +++ /dev/null @@ -1,17 +0,0 @@ -module XTwitterScraper - module Models - module X - module Tweets - type like_delete_response = { success: true } - - class LikeDeleteResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor success: true - - def initialize: (?success: true) -> void - - def to_hash: -> { success: true } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/tweets/retweet_create_params.rbs b/sig/x_twitter_scraper/models/x/tweets/retweet_create_params.rbs deleted file mode 100644 index 3a39ea4..0000000 --- a/sig/x_twitter_scraper/models/x/tweets/retweet_create_params.rbs +++ /dev/null @@ -1,32 +0,0 @@ -module XTwitterScraper - module Models - module X - module Tweets - type retweet_create_params = - { tweet_id: String, account: String } - & XTwitterScraper::Internal::Type::request_parameters - - class RetweetCreateParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - attr_accessor tweet_id: String - - attr_accessor account: String - - def initialize: ( - tweet_id: String, - account: String, - ?request_options: XTwitterScraper::request_opts - ) -> void - - def to_hash: -> { - tweet_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions - } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/tweets/retweet_create_response.rbs b/sig/x_twitter_scraper/models/x/tweets/retweet_create_response.rbs deleted file mode 100644 index f9e9ab5..0000000 --- a/sig/x_twitter_scraper/models/x/tweets/retweet_create_response.rbs +++ /dev/null @@ -1,17 +0,0 @@ -module XTwitterScraper - module Models - module X - module Tweets - type retweet_create_response = { success: true } - - class RetweetCreateResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor success: true - - def initialize: (?success: true) -> void - - def to_hash: -> { success: true } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbs b/sig/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbs deleted file mode 100644 index 7680525..0000000 --- a/sig/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbs +++ /dev/null @@ -1,32 +0,0 @@ -module XTwitterScraper - module Models - module X - module Tweets - type retweet_delete_params = - { tweet_id: String, account: String } - & XTwitterScraper::Internal::Type::request_parameters - - class RetweetDeleteParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - attr_accessor tweet_id: String - - attr_accessor account: String - - def initialize: ( - tweet_id: String, - account: String, - ?request_options: XTwitterScraper::request_opts - ) -> void - - def to_hash: -> { - tweet_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions - } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbs b/sig/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbs deleted file mode 100644 index e6da7b0..0000000 --- a/sig/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbs +++ /dev/null @@ -1,17 +0,0 @@ -module XTwitterScraper - module Models - module X - module Tweets - type retweet_delete_response = { success: true } - - class RetweetDeleteResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor success: true - - def initialize: (?success: true) -> void - - def to_hash: -> { success: true } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/user_retrieve_params.rbs b/sig/x_twitter_scraper/models/x/user_retrieve_params.rbs deleted file mode 100644 index 382fa97..0000000 --- a/sig/x_twitter_scraper/models/x/user_retrieve_params.rbs +++ /dev/null @@ -1,26 +0,0 @@ -module XTwitterScraper - module Models - module X - type user_retrieve_params = - { username: String } - & XTwitterScraper::Internal::Type::request_parameters - - class UserRetrieveParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - attr_accessor username: String - - def initialize: ( - username: String, - ?request_options: XTwitterScraper::request_opts - ) -> void - - def to_hash: -> { - username: String, - request_options: XTwitterScraper::RequestOptions - } - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/user_retrieve_response.rbs b/sig/x_twitter_scraper/models/x/user_retrieve_response.rbs deleted file mode 100644 index f8e97cb..0000000 --- a/sig/x_twitter_scraper/models/x/user_retrieve_response.rbs +++ /dev/null @@ -1,88 +0,0 @@ -module XTwitterScraper - module Models - module X - type user_retrieve_response = - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - - class UserRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader description: String? - - def description=: (String) -> String - - attr_reader followers: Integer? - - def followers=: (Integer) -> Integer - - attr_reader following: Integer? - - def following=: (Integer) -> Integer - - attr_reader location: String? - - def location=: (String) -> String - - attr_reader profile_picture: String? - - def profile_picture=: (String) -> String - - attr_reader statuses_count: Integer? - - def statuses_count=: (Integer) -> Integer - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?created_at: String, - ?description: String, - ?followers: Integer, - ?following: Integer, - ?location: String, - ?profile_picture: String, - ?statuses_count: Integer, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/users/follow_create_params.rbs b/sig/x_twitter_scraper/models/x/users/follow_create_params.rbs deleted file mode 100644 index 982f18c..0000000 --- a/sig/x_twitter_scraper/models/x/users/follow_create_params.rbs +++ /dev/null @@ -1,32 +0,0 @@ -module XTwitterScraper - module Models - module X - module Users - type follow_create_params = - { user_id: String, account: String } - & XTwitterScraper::Internal::Type::request_parameters - - class FollowCreateParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - attr_accessor user_id: String - - attr_accessor account: String - - def initialize: ( - user_id: String, - account: String, - ?request_options: XTwitterScraper::request_opts - ) -> void - - def to_hash: -> { - user_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions - } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/users/follow_create_response.rbs b/sig/x_twitter_scraper/models/x/users/follow_create_response.rbs deleted file mode 100644 index d5bd743..0000000 --- a/sig/x_twitter_scraper/models/x/users/follow_create_response.rbs +++ /dev/null @@ -1,17 +0,0 @@ -module XTwitterScraper - module Models - module X - module Users - type follow_create_response = { success: true } - - class FollowCreateResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor success: true - - def initialize: (?success: true) -> void - - def to_hash: -> { success: true } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/users/follow_delete_all_params.rbs b/sig/x_twitter_scraper/models/x/users/follow_delete_all_params.rbs deleted file mode 100644 index 0780f63..0000000 --- a/sig/x_twitter_scraper/models/x/users/follow_delete_all_params.rbs +++ /dev/null @@ -1,32 +0,0 @@ -module XTwitterScraper - module Models - module X - module Users - type follow_delete_all_params = - { user_id: String, account: String } - & XTwitterScraper::Internal::Type::request_parameters - - class FollowDeleteAllParams < XTwitterScraper::Internal::Type::BaseModel - extend XTwitterScraper::Internal::Type::RequestParameters::Converter - include XTwitterScraper::Internal::Type::RequestParameters - - attr_accessor user_id: String - - attr_accessor account: String - - def initialize: ( - user_id: String, - account: String, - ?request_options: XTwitterScraper::request_opts - ) -> void - - def to_hash: -> { - user_id: String, - account: String, - request_options: XTwitterScraper::RequestOptions - } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/users/follow_delete_all_response.rbs b/sig/x_twitter_scraper/models/x/users/follow_delete_all_response.rbs deleted file mode 100644 index e773c2a..0000000 --- a/sig/x_twitter_scraper/models/x/users/follow_delete_all_response.rbs +++ /dev/null @@ -1,17 +0,0 @@ -module XTwitterScraper - module Models - module X - module Users - type follow_delete_all_response = { success: true } - - class FollowDeleteAllResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor success: true - - def initialize: (?success: true) -> void - - def to_hash: -> { success: true } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/resources/radar.rbs b/sig/x_twitter_scraper/resources/radar.rbs index 2e4521a..ecd4b00 100644 --- a/sig/x_twitter_scraper/resources/radar.rbs +++ b/sig/x_twitter_scraper/resources/radar.rbs @@ -6,7 +6,7 @@ module XTwitterScraper ?count: Integer, ?hours: Integer, ?region: String, - ?source: String, + ?source: XTwitterScraper::Models::RadarRetrieveTrendingTopicsParams::source, ?request_options: XTwitterScraper::request_opts ) -> XTwitterScraper::Models::RadarRetrieveTrendingTopicsResponse diff --git a/sig/x_twitter_scraper/resources/styles.rbs b/sig/x_twitter_scraper/resources/styles.rbs index 485c949..0864ba5 100644 --- a/sig/x_twitter_scraper/resources/styles.rbs +++ b/sig/x_twitter_scraper/resources/styles.rbs @@ -1,27 +1,10 @@ module XTwitterScraper module Resources class Styles - def retrieve: ( - String username, - ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::StyleRetrieveResponse - - def update: ( - String username, - label: String, - tweets: ::Array[XTwitterScraper::StyleUpdateParams::Tweet], - ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::StyleUpdateResponse - def list: ( ?request_options: XTwitterScraper::request_opts ) -> XTwitterScraper::Models::StyleListResponse - def delete: ( - String username, - ?request_options: XTwitterScraper::request_opts - ) -> nil - def analyze: ( username: String, ?request_options: XTwitterScraper::request_opts @@ -33,11 +16,6 @@ module XTwitterScraper ?request_options: XTwitterScraper::request_opts ) -> XTwitterScraper::Models::StyleCompareResponse - def get_performance: ( - String username, - ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::StyleGetPerformanceResponse - def initialize: (client: XTwitterScraper::Client) -> void end end diff --git a/sig/x_twitter_scraper/resources/x/tweets.rbs b/sig/x_twitter_scraper/resources/x/tweets.rbs index 9cd68f8..a1dab3c 100644 --- a/sig/x_twitter_scraper/resources/x/tweets.rbs +++ b/sig/x_twitter_scraper/resources/x/tweets.rbs @@ -17,22 +17,11 @@ module XTwitterScraper ?request_options: XTwitterScraper::request_opts ) -> XTwitterScraper::Models::X::TweetCreateResponse - def retrieve: ( - String tweet_id, - ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::TweetRetrieveResponse - def list: ( ids: String, ?request_options: XTwitterScraper::request_opts ) -> nil - def delete: ( - String tweet_id, - account: String, - ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::TweetDeleteResponse - def get_favoriters: ( String id, ?cursor: String, diff --git a/sig/x_twitter_scraper/resources/x/tweets/like.rbs b/sig/x_twitter_scraper/resources/x/tweets/like.rbs index 4b01300..e017b38 100644 --- a/sig/x_twitter_scraper/resources/x/tweets/like.rbs +++ b/sig/x_twitter_scraper/resources/x/tweets/like.rbs @@ -3,18 +3,6 @@ module XTwitterScraper class X class Tweets class Like - def create: ( - String tweet_id, - account: String, - ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::Tweets::LikeCreateResponse - - def delete: ( - String tweet_id, - account: String, - ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::Tweets::LikeDeleteResponse - def initialize: (client: XTwitterScraper::Client) -> void end end diff --git a/sig/x_twitter_scraper/resources/x/tweets/retweet.rbs b/sig/x_twitter_scraper/resources/x/tweets/retweet.rbs index ae70e7d..aac9657 100644 --- a/sig/x_twitter_scraper/resources/x/tweets/retweet.rbs +++ b/sig/x_twitter_scraper/resources/x/tweets/retweet.rbs @@ -3,18 +3,6 @@ module XTwitterScraper class X class Tweets class Retweet - def create: ( - String tweet_id, - account: String, - ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::Tweets::RetweetCreateResponse - - def delete: ( - String tweet_id, - account: String, - ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::Tweets::RetweetDeleteResponse - def initialize: (client: XTwitterScraper::Client) -> void end end diff --git a/sig/x_twitter_scraper/resources/x/users.rbs b/sig/x_twitter_scraper/resources/x/users.rbs index 53396fb..489a079 100644 --- a/sig/x_twitter_scraper/resources/x/users.rbs +++ b/sig/x_twitter_scraper/resources/x/users.rbs @@ -4,11 +4,6 @@ module XTwitterScraper class Users attr_reader follow: XTwitterScraper::Resources::X::Users::Follow - def retrieve: ( - String username, - ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::UserRetrieveResponse - def retrieve_batch: ( ids: String, ?request_options: XTwitterScraper::request_opts diff --git a/sig/x_twitter_scraper/resources/x/users/follow.rbs b/sig/x_twitter_scraper/resources/x/users/follow.rbs index 97be5e3..7ed075d 100644 --- a/sig/x_twitter_scraper/resources/x/users/follow.rbs +++ b/sig/x_twitter_scraper/resources/x/users/follow.rbs @@ -3,18 +3,6 @@ module XTwitterScraper class X class Users class Follow - def create: ( - String user_id, - account: String, - ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::Users::FollowCreateResponse - - def delete_all: ( - String user_id, - account: String, - ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::Users::FollowDeleteAllResponse - def initialize: (client: XTwitterScraper::Client) -> void end end diff --git a/test/x_twitter_scraper/resources/styles_test.rb b/test/x_twitter_scraper/resources/styles_test.rb index 1df6447..8576de6 100644 --- a/test/x_twitter_scraper/resources/styles_test.rb +++ b/test/x_twitter_scraper/resources/styles_test.rb @@ -3,46 +3,6 @@ require_relative "../test_helper" class XTwitterScraper::Test::Resources::StylesTest < XTwitterScraper::Test::ResourceTest - def test_retrieve - skip("Mock server tests are disabled") - - response = @x_twitter_scraper.styles.retrieve("username") - - assert_pattern do - response => XTwitterScraper::Models::StyleRetrieveResponse - end - - assert_pattern do - response => { - fetched_at: Time, - is_own_account: XTwitterScraper::Internal::Type::Boolean, - tweet_count: Integer, - tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::StyleRetrieveResponse::Tweet]), - x_username: String - } - end - end - - def test_update_required_params - skip("Mock server tests are disabled") - - response = @x_twitter_scraper.styles.update("username", label: "label", tweets: [{text: "text"}]) - - assert_pattern do - response => XTwitterScraper::Models::StyleUpdateResponse - end - - assert_pattern do - response => { - fetched_at: Time, - is_own_account: XTwitterScraper::Internal::Type::Boolean, - tweet_count: Integer, - tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::StyleUpdateResponse::Tweet]), - x_username: String - } - end - end - def test_list skip("Mock server tests are disabled") @@ -59,16 +19,6 @@ def test_list end end - def test_delete - skip("Mock server tests are disabled") - - response = @x_twitter_scraper.styles.delete("username") - - assert_pattern do - response => nil - end - end - def test_analyze_required_params skip("Mock server tests are disabled") @@ -105,22 +55,4 @@ def test_compare_required_params } end end - - def test_get_performance - skip("Mock server tests are disabled") - - response = @x_twitter_scraper.styles.get_performance("username") - - assert_pattern do - response => XTwitterScraper::Models::StyleGetPerformanceResponse - end - - assert_pattern do - response => { - tweet_count: Integer, - tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::StyleGetPerformanceResponse::Tweet]), - x_username: String - } - end - end end diff --git a/test/x_twitter_scraper/resources/x/tweets/like_test.rb b/test/x_twitter_scraper/resources/x/tweets/like_test.rb index 57eca4c..3c85b0c 100644 --- a/test/x_twitter_scraper/resources/x/tweets/like_test.rb +++ b/test/x_twitter_scraper/resources/x/tweets/like_test.rb @@ -3,35 +3,4 @@ require_relative "../../../test_helper" class XTwitterScraper::Test::Resources::X::Tweets::LikeTest < XTwitterScraper::Test::ResourceTest - def test_create_required_params - skip("Mock server tests are disabled") - - response = @x_twitter_scraper.x.tweets.like.create("tweetId", account: "account") - - assert_pattern do - response => XTwitterScraper::Models::X::Tweets::LikeCreateResponse - end - - assert_pattern do - response => { - success: true | false - } - end - end - - def test_delete_required_params - skip("Mock server tests are disabled") - - response = @x_twitter_scraper.x.tweets.like.delete("tweetId", account: "account") - - assert_pattern do - response => XTwitterScraper::Models::X::Tweets::LikeDeleteResponse - end - - assert_pattern do - response => { - success: true | false - } - end - end end diff --git a/test/x_twitter_scraper/resources/x/tweets/retweet_test.rb b/test/x_twitter_scraper/resources/x/tweets/retweet_test.rb index b235edb..247a93f 100644 --- a/test/x_twitter_scraper/resources/x/tweets/retweet_test.rb +++ b/test/x_twitter_scraper/resources/x/tweets/retweet_test.rb @@ -3,35 +3,4 @@ require_relative "../../../test_helper" class XTwitterScraper::Test::Resources::X::Tweets::RetweetTest < XTwitterScraper::Test::ResourceTest - def test_create_required_params - skip("Mock server tests are disabled") - - response = @x_twitter_scraper.x.tweets.retweet.create("tweetId", account: "account") - - assert_pattern do - response => XTwitterScraper::Models::X::Tweets::RetweetCreateResponse - end - - assert_pattern do - response => { - success: true | false - } - end - end - - def test_delete_required_params - skip("Mock server tests are disabled") - - response = @x_twitter_scraper.x.tweets.retweet.delete("tweetId", account: "account") - - assert_pattern do - response => XTwitterScraper::Models::X::Tweets::RetweetDeleteResponse - end - - assert_pattern do - response => { - success: true | false - } - end - end end diff --git a/test/x_twitter_scraper/resources/x/tweets_test.rb b/test/x_twitter_scraper/resources/x/tweets_test.rb index 276d134..34b6017 100644 --- a/test/x_twitter_scraper/resources/x/tweets_test.rb +++ b/test/x_twitter_scraper/resources/x/tweets_test.rb @@ -20,23 +20,6 @@ def test_create_required_params end end - def test_retrieve - skip("Mock server tests are disabled") - - response = @x_twitter_scraper.x.tweets.retrieve("tweetId") - - assert_pattern do - response => XTwitterScraper::Models::X::TweetRetrieveResponse - end - - assert_pattern do - response => { - tweet: XTwitterScraper::Models::X::TweetRetrieveResponse::Tweet, - author: XTwitterScraper::Models::X::TweetRetrieveResponse::Author | nil - } - end - end - def test_list_required_params skip("Mock server tests are disabled") @@ -47,22 +30,6 @@ def test_list_required_params end end - def test_delete_required_params - skip("Mock server tests are disabled") - - response = @x_twitter_scraper.x.tweets.delete("tweetId", account: "account") - - assert_pattern do - response => XTwitterScraper::Models::X::TweetDeleteResponse - end - - assert_pattern do - response => { - success: true | false - } - end - end - def test_get_favoriters skip("Mock server tests are disabled") diff --git a/test/x_twitter_scraper/resources/x/users/follow_test.rb b/test/x_twitter_scraper/resources/x/users/follow_test.rb index 3ae9cb9..7fc114e 100644 --- a/test/x_twitter_scraper/resources/x/users/follow_test.rb +++ b/test/x_twitter_scraper/resources/x/users/follow_test.rb @@ -3,35 +3,4 @@ require_relative "../../../test_helper" class XTwitterScraper::Test::Resources::X::Users::FollowTest < XTwitterScraper::Test::ResourceTest - def test_create_required_params - skip("Mock server tests are disabled") - - response = @x_twitter_scraper.x.users.follow.create("userId", account: "account") - - assert_pattern do - response => XTwitterScraper::Models::X::Users::FollowCreateResponse - end - - assert_pattern do - response => { - success: true | false - } - end - end - - def test_delete_all_required_params - skip("Mock server tests are disabled") - - response = @x_twitter_scraper.x.users.follow.delete_all("userId", account: "account") - - assert_pattern do - response => XTwitterScraper::Models::X::Users::FollowDeleteAllResponse - end - - assert_pattern do - response => { - success: true | false - } - end - end end diff --git a/test/x_twitter_scraper/resources/x/users_test.rb b/test/x_twitter_scraper/resources/x/users_test.rb index dbfb451..4d8aa4c 100644 --- a/test/x_twitter_scraper/resources/x/users_test.rb +++ b/test/x_twitter_scraper/resources/x/users_test.rb @@ -3,32 +3,6 @@ require_relative "../../test_helper" class XTwitterScraper::Test::Resources::X::UsersTest < XTwitterScraper::Test::ResourceTest - def test_retrieve - skip("Mock server tests are disabled") - - response = @x_twitter_scraper.x.users.retrieve("username") - - assert_pattern do - response => XTwitterScraper::Models::X::UserRetrieveResponse - end - - assert_pattern do - response => { - id: String, - name: String, - username: String, - created_at: String | nil, - description: String | nil, - followers: Integer | nil, - following: Integer | nil, - location: String | nil, - profile_picture: String | nil, - statuses_count: Integer | nil, - verified: XTwitterScraper::Internal::Type::Boolean | nil - } - end - end - def test_retrieve_batch_required_params skip("Mock server tests are disabled") From 010f63f7206d47f41d7a227c870d7e0ccbafa21e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 18:15:44 +0000 Subject: [PATCH 02/27] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5fb34d8..6527155 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 102 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-f4a2baf44e99ee3fa87e08d50099bc70680c9ef2e612290ab1f749396266455d.yml -openapi_spec_hash: 1b7655f5b5cc5ffb69e41461cd4d9158 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-46a9af86900d469595bc007c73410022306d0863a896758d9c3c1250fbe937a3.yml +openapi_spec_hash: d858851b15eb367466f343da3cb2d556 config_hash: 8894c96caeb6df84c9394518810221bd From 0fe06011c3b2a58a6e1ba0fe855991308b5e4ffa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 4 Apr 2026 00:15:42 +0000 Subject: [PATCH 03/27] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6527155..6ecd182 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 102 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-46a9af86900d469595bc007c73410022306d0863a896758d9c3c1250fbe937a3.yml -openapi_spec_hash: d858851b15eb367466f343da3cb2d556 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-88d47b7e48bca9b85d068845f7d100d3e6fb5d488b848ce3c47448990afdb9f9.yml +openapi_spec_hash: 55e7bd0cceeebe8fd4a89fc918336531 config_hash: 8894c96caeb6df84c9394518810221bd From dbe6467a33987dcd3a65b78bfefca13b5123ae63 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 4 Apr 2026 13:15:41 +0000 Subject: [PATCH 04/27] feat(api): api update --- .stats.yml | 4 ++-- lib/x_twitter_scraper/models/x/tweet_search_params.rb | 4 ++-- lib/x_twitter_scraper/resources/x/tweets.rb | 2 +- rbi/x_twitter_scraper/models/x/tweet_search_params.rbi | 4 ++-- rbi/x_twitter_scraper/resources/x/tweets.rbi | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6ecd182..8500022 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 102 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-88d47b7e48bca9b85d068845f7d100d3e6fb5d488b848ce3c47448990afdb9f9.yml -openapi_spec_hash: 55e7bd0cceeebe8fd4a89fc918336531 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-cc76e6e9b7122fdacc45fbd7cf4603aaaca4906ae2de0984b51a5fc7cf8dadd6.yml +openapi_spec_hash: 0b1bc061a669d7c77e5bf1476d083a2d config_hash: 8894c96caeb6df84c9394518810221bd diff --git a/lib/x_twitter_scraper/models/x/tweet_search_params.rb b/lib/x_twitter_scraper/models/x/tweet_search_params.rb index 6988a46..0704d7c 100644 --- a/lib/x_twitter_scraper/models/x/tweet_search_params.rb +++ b/lib/x_twitter_scraper/models/x/tweet_search_params.rb @@ -21,7 +21,7 @@ class TweetSearchParams < XTwitterScraper::Internal::Type::BaseModel optional :cursor, String # @!attribute limit - # Deprecated — use cursor-based pagination instead + # Max tweets to return (server paginates internally). Omit for single page (~20). # # @return [Integer, nil] optional :limit, Integer @@ -49,7 +49,7 @@ class TweetSearchParams < XTwitterScraper::Internal::Type::BaseModel # # @param cursor [String] Pagination cursor from previous response # - # @param limit [Integer] Deprecated — use cursor-based pagination instead + # @param limit [Integer] Max tweets to return (server paginates internally). Omit for single page (~20). # # @param query_type [Symbol, XTwitterScraper::Models::X::TweetSearchParams::QueryType] Sort order — Latest (chronological) or Top (engagement-ranked) # diff --git a/lib/x_twitter_scraper/resources/x/tweets.rb b/lib/x_twitter_scraper/resources/x/tweets.rb index 1554d1a..0ad4cb2 100644 --- a/lib/x_twitter_scraper/resources/x/tweets.rb +++ b/lib/x_twitter_scraper/resources/x/tweets.rb @@ -208,7 +208,7 @@ def get_thread(id, params = {}) # # @param cursor [String] Pagination cursor from previous response # - # @param limit [Integer] Deprecated — use cursor-based pagination instead + # @param limit [Integer] Max tweets to return (server paginates internally). Omit for single page (~20). # # @param query_type [Symbol, XTwitterScraper::Models::X::TweetSearchParams::QueryType] Sort order — Latest (chronological) or Top (engagement-ranked) # diff --git a/rbi/x_twitter_scraper/models/x/tweet_search_params.rbi b/rbi/x_twitter_scraper/models/x/tweet_search_params.rbi index 798bae8..5cb9a13 100644 --- a/rbi/x_twitter_scraper/models/x/tweet_search_params.rbi +++ b/rbi/x_twitter_scraper/models/x/tweet_search_params.rbi @@ -26,7 +26,7 @@ module XTwitterScraper sig { params(cursor: String).void } attr_writer :cursor - # Deprecated — use cursor-based pagination instead + # Max tweets to return (server paginates internally). Omit for single page (~20). sig { returns(T.nilable(Integer)) } attr_reader :limit @@ -82,7 +82,7 @@ module XTwitterScraper q:, # Pagination cursor from previous response cursor: nil, - # Deprecated — use cursor-based pagination instead + # Max tweets to return (server paginates internally). Omit for single page (~20). limit: nil, # Sort order — Latest (chronological) or Top (engagement-ranked) query_type: nil, diff --git a/rbi/x_twitter_scraper/resources/x/tweets.rbi b/rbi/x_twitter_scraper/resources/x/tweets.rbi index 8b1ad8f..fcd3aba 100644 --- a/rbi/x_twitter_scraper/resources/x/tweets.rbi +++ b/rbi/x_twitter_scraper/resources/x/tweets.rbi @@ -168,7 +168,7 @@ module XTwitterScraper q:, # Pagination cursor from previous response cursor: nil, - # Deprecated — use cursor-based pagination instead + # Max tweets to return (server paginates internally). Omit for single page (~20). limit: nil, # Sort order — Latest (chronological) or Top (engagement-ranked) query_type: nil, From 89e3ff5905185e6223233618819d6dc87a2e87d7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Apr 2026 14:15:43 +0000 Subject: [PATCH 05/27] feat(api): api update --- .stats.yml | 4 +- .../models/paginated_tweets.rb | 19 +- .../models/x/bookmark_list_response.rb | 19 +- .../models/x/search_tweet.rb | 19 +- .../models/x/tweet_detail.rb | 108 +++++++++- .../models/x/tweet_get_quotes_response.rb | 19 +- .../models/x/tweet_get_replies_response.rb | 19 +- .../models/x/tweet_get_thread_response.rb | 19 +- .../models/x/tweet_search_response.rb | 19 +- .../models/x/user_retrieve_likes_response.rb | 19 +- .../models/x/user_retrieve_media_response.rb | 19 +- .../models/x/user_retrieve_tweets_response.rb | 19 +- .../models/x_get_home_timeline_response.rb | 19 +- .../models/paginated_tweets.rbi | 11 + .../models/x/bookmark_list_response.rbi | 11 + .../models/x/search_tweet.rbi | 11 + .../models/x/tweet_detail.rbi | 194 +++++++++++++++++- .../models/x/tweet_get_quotes_response.rbi | 11 + .../models/x/tweet_get_replies_response.rbi | 11 + .../models/x/tweet_get_thread_response.rbi | 11 + .../models/x/tweet_search_response.rbi | 11 + .../models/x/user_retrieve_likes_response.rbi | 11 + .../models/x/user_retrieve_media_response.rbi | 11 + .../x/user_retrieve_tweets_response.rbi | 11 + .../models/x_get_home_timeline_response.rbi | 11 + .../models/paginated_tweets.rbs | 7 + .../models/x/bookmark_list_response.rbs | 7 + .../models/x/search_tweet.rbs | 7 + .../models/x/tweet_detail.rbs | 111 +++++++++- .../models/x/tweet_get_quotes_response.rbs | 7 + .../models/x/tweet_get_replies_response.rbs | 7 + .../models/x/tweet_get_thread_response.rbs | 7 + .../models/x/tweet_search_response.rbs | 7 + .../models/x/user_retrieve_likes_response.rbs | 7 + .../models/x/user_retrieve_media_response.rbs | 7 + .../x/user_retrieve_tweets_response.rbs | 7 + .../models/x_get_home_timeline_response.rbs | 7 + 37 files changed, 804 insertions(+), 20 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8500022..193a413 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 102 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-cc76e6e9b7122fdacc45fbd7cf4603aaaca4906ae2de0984b51a5fc7cf8dadd6.yml -openapi_spec_hash: 0b1bc061a669d7c77e5bf1476d083a2d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-61e27e87d4182e5230beae1edaf864a00a5c5f9b96defcdb9a4503544463328f.yml +openapi_spec_hash: 782f8974cd27e51c8a7993f61b139f72 config_hash: 8894c96caeb6df84c9394518810221bd diff --git a/lib/x_twitter_scraper/models/paginated_tweets.rb b/lib/x_twitter_scraper/models/paginated_tweets.rb index 8471541..a7e1052 100644 --- a/lib/x_twitter_scraper/models/paginated_tweets.rb +++ b/lib/x_twitter_scraper/models/paginated_tweets.rb @@ -49,6 +49,12 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # @return [String, nil] optional :created_at, String, api_name: :createdAt + # @!attribute is_note_tweet + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # + # @return [Boolean, nil] + optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet + # @!attribute like_count # # @return [Integer, nil] @@ -74,16 +80,27 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # @return [Integer, nil] optional :view_count, Integer, api_name: :viewCount - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) # @param id [String] + # # @param text [String] + # # @param author [XTwitterScraper::Models::PaginatedTweets::Tweet::Author] + # # @param bookmark_count [Integer] + # # @param created_at [String] + # + # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # # @param like_count [Integer] + # # @param quote_count [Integer] + # # @param reply_count [Integer] + # # @param retweet_count [Integer] + # # @param view_count [Integer] # @see XTwitterScraper::Models::PaginatedTweets::Tweet#author diff --git a/lib/x_twitter_scraper/models/x/bookmark_list_response.rb b/lib/x_twitter_scraper/models/x/bookmark_list_response.rb index d887b6c..9941b23 100644 --- a/lib/x_twitter_scraper/models/x/bookmark_list_response.rb +++ b/lib/x_twitter_scraper/models/x/bookmark_list_response.rb @@ -52,6 +52,12 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # @return [String, nil] optional :created_at, String, api_name: :createdAt + # @!attribute is_note_tweet + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # + # @return [Boolean, nil] + optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet + # @!attribute like_count # # @return [Integer, nil] @@ -77,16 +83,27 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # @return [Integer, nil] optional :view_count, Integer, api_name: :viewCount - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) # @param id [String] + # # @param text [String] + # # @param author [XTwitterScraper::Models::X::BookmarkListResponse::Tweet::Author] + # # @param bookmark_count [Integer] + # # @param created_at [String] + # + # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # # @param like_count [Integer] + # # @param quote_count [Integer] + # # @param reply_count [Integer] + # # @param retweet_count [Integer] + # # @param view_count [Integer] # @see XTwitterScraper::Models::X::BookmarkListResponse::Tweet#author diff --git a/lib/x_twitter_scraper/models/x/search_tweet.rb b/lib/x_twitter_scraper/models/x/search_tweet.rb index 64df0ce..e538dc1 100644 --- a/lib/x_twitter_scraper/models/x/search_tweet.rb +++ b/lib/x_twitter_scraper/models/x/search_tweet.rb @@ -29,6 +29,12 @@ class SearchTweet < XTwitterScraper::Internal::Type::BaseModel # @return [String, nil] optional :created_at, String, api_name: :createdAt + # @!attribute is_note_tweet + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # + # @return [Boolean, nil] + optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet + # @!attribute like_count # # @return [Integer, nil] @@ -54,16 +60,27 @@ class SearchTweet < XTwitterScraper::Internal::Type::BaseModel # @return [Integer, nil] optional :view_count, Integer, api_name: :viewCount - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) # @param id [String] + # # @param text [String] + # # @param author [XTwitterScraper::Models::X::SearchTweet::Author] + # # @param bookmark_count [Integer] + # # @param created_at [String] + # + # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # # @param like_count [Integer] + # # @param quote_count [Integer] + # # @param reply_count [Integer] + # # @param retweet_count [Integer] + # # @param view_count [Integer] # @see XTwitterScraper::Models::X::SearchTweet#author diff --git a/lib/x_twitter_scraper/models/x/tweet_detail.rb b/lib/x_twitter_scraper/models/x/tweet_detail.rb index 1d2924a..70cc92a 100644 --- a/lib/x_twitter_scraper/models/x/tweet_detail.rb +++ b/lib/x_twitter_scraper/models/x/tweet_detail.rb @@ -44,21 +44,127 @@ class TweetDetail < XTwitterScraper::Internal::Type::BaseModel # @return [Integer] required :view_count, Integer, api_name: :viewCount + # @!attribute conversation_id + # ID of the root tweet in the conversation thread + # + # @return [String, nil] + optional :conversation_id, String, api_name: :conversationId + # @!attribute created_at # # @return [String, nil] optional :created_at, String, api_name: :createdAt - # @!method initialize(id:, bookmark_count:, like_count:, quote_count:, reply_count:, retweet_count:, text:, view_count:, created_at: nil) + # @!attribute entities + # Parsed entities from the tweet text (URLs, mentions, hashtags, media) + # + # @return [Object, nil] + optional :entities, XTwitterScraper::Internal::Type::Unknown + + # @!attribute is_note_tweet + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # + # @return [Boolean, nil] + optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet + + # @!attribute is_quote_status + # Whether this tweet quotes another tweet + # + # @return [Boolean, nil] + optional :is_quote_status, XTwitterScraper::Internal::Type::Boolean, api_name: :isQuoteStatus + + # @!attribute is_reply + # Whether this tweet is a reply to another tweet + # + # @return [Boolean, nil] + optional :is_reply, XTwitterScraper::Internal::Type::Boolean, api_name: :isReply + + # @!attribute media + # Attached media items, omitted when the tweet has no media + # + # @return [Array, nil] + optional :media, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::TweetDetail::Media] } + + # @!attribute quoted_tweet + # The quoted tweet object, present when isQuoteStatus is true + # + # @return [Object, nil] + optional :quoted_tweet, XTwitterScraper::Internal::Type::Unknown + + # @!attribute source + # Client application used to post this tweet + # + # @return [String, nil] + optional :source, String + + # @!method initialize(id:, bookmark_count:, like_count:, quote_count:, reply_count:, retweet_count:, text:, view_count:, conversation_id: nil, created_at: nil, entities: nil, is_note_tweet: nil, is_quote_status: nil, is_reply: nil, media: nil, quoted_tweet: nil, source: nil) # @param id [String] + # # @param bookmark_count [Integer] + # # @param like_count [Integer] + # # @param quote_count [Integer] + # # @param reply_count [Integer] + # # @param retweet_count [Integer] + # # @param text [String] + # # @param view_count [Integer] + # + # @param conversation_id [String] ID of the root tweet in the conversation thread + # # @param created_at [String] + # + # @param entities [Object] Parsed entities from the tweet text (URLs, mentions, hashtags, media) + # + # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # + # @param is_quote_status [Boolean] Whether this tweet quotes another tweet + # + # @param is_reply [Boolean] Whether this tweet is a reply to another tweet + # + # @param media [Array] Attached media items, omitted when the tweet has no media + # + # @param quoted_tweet [Object] The quoted tweet object, present when isQuoteStatus is true + # + # @param source [String] Client application used to post this tweet + + class Media < XTwitterScraper::Internal::Type::BaseModel + # @!attribute media_url + # + # @return [String, nil] + optional :media_url, String, api_name: :mediaUrl + + # @!attribute type + # + # @return [Symbol, XTwitterScraper::Models::X::TweetDetail::Media::Type, nil] + optional :type, enum: -> { XTwitterScraper::X::TweetDetail::Media::Type } + + # @!attribute url + # + # @return [String, nil] + optional :url, String + + # @!method initialize(media_url: nil, type: nil, url: nil) + # @param media_url [String] + # @param type [Symbol, XTwitterScraper::Models::X::TweetDetail::Media::Type] + # @param url [String] + + # @see XTwitterScraper::Models::X::TweetDetail::Media#type + module Type + extend XTwitterScraper::Internal::Type::Enum + + PHOTO = :photo + VIDEO = :video + ANIMATED_GIF = :animated_gif + + # @!method self.values + # @return [Array] + end + end end end end diff --git a/lib/x_twitter_scraper/models/x/tweet_get_quotes_response.rb b/lib/x_twitter_scraper/models/x/tweet_get_quotes_response.rb index f5fa93c..09759f7 100644 --- a/lib/x_twitter_scraper/models/x/tweet_get_quotes_response.rb +++ b/lib/x_twitter_scraper/models/x/tweet_get_quotes_response.rb @@ -52,6 +52,12 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # @return [String, nil] optional :created_at, String, api_name: :createdAt + # @!attribute is_note_tweet + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # + # @return [Boolean, nil] + optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet + # @!attribute like_count # # @return [Integer, nil] @@ -77,16 +83,27 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # @return [Integer, nil] optional :view_count, Integer, api_name: :viewCount - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) # @param id [String] + # # @param text [String] + # # @param author [XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet::Author] + # # @param bookmark_count [Integer] + # # @param created_at [String] + # + # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # # @param like_count [Integer] + # # @param quote_count [Integer] + # # @param reply_count [Integer] + # # @param retweet_count [Integer] + # # @param view_count [Integer] # @see XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet#author diff --git a/lib/x_twitter_scraper/models/x/tweet_get_replies_response.rb b/lib/x_twitter_scraper/models/x/tweet_get_replies_response.rb index 3a80f25..0e13f27 100644 --- a/lib/x_twitter_scraper/models/x/tweet_get_replies_response.rb +++ b/lib/x_twitter_scraper/models/x/tweet_get_replies_response.rb @@ -52,6 +52,12 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # @return [String, nil] optional :created_at, String, api_name: :createdAt + # @!attribute is_note_tweet + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # + # @return [Boolean, nil] + optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet + # @!attribute like_count # # @return [Integer, nil] @@ -77,16 +83,27 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # @return [Integer, nil] optional :view_count, Integer, api_name: :viewCount - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) # @param id [String] + # # @param text [String] + # # @param author [XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet::Author] + # # @param bookmark_count [Integer] + # # @param created_at [String] + # + # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # # @param like_count [Integer] + # # @param quote_count [Integer] + # # @param reply_count [Integer] + # # @param retweet_count [Integer] + # # @param view_count [Integer] # @see XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet#author diff --git a/lib/x_twitter_scraper/models/x/tweet_get_thread_response.rb b/lib/x_twitter_scraper/models/x/tweet_get_thread_response.rb index bf7d8ac..999739c 100644 --- a/lib/x_twitter_scraper/models/x/tweet_get_thread_response.rb +++ b/lib/x_twitter_scraper/models/x/tweet_get_thread_response.rb @@ -52,6 +52,12 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # @return [String, nil] optional :created_at, String, api_name: :createdAt + # @!attribute is_note_tweet + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # + # @return [Boolean, nil] + optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet + # @!attribute like_count # # @return [Integer, nil] @@ -77,16 +83,27 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # @return [Integer, nil] optional :view_count, Integer, api_name: :viewCount - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) # @param id [String] + # # @param text [String] + # # @param author [XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet::Author] + # # @param bookmark_count [Integer] + # # @param created_at [String] + # + # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # # @param like_count [Integer] + # # @param quote_count [Integer] + # # @param reply_count [Integer] + # # @param retweet_count [Integer] + # # @param view_count [Integer] # @see XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet#author diff --git a/lib/x_twitter_scraper/models/x/tweet_search_response.rb b/lib/x_twitter_scraper/models/x/tweet_search_response.rb index 71b172b..27f137c 100644 --- a/lib/x_twitter_scraper/models/x/tweet_search_response.rb +++ b/lib/x_twitter_scraper/models/x/tweet_search_response.rb @@ -52,6 +52,12 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # @return [String, nil] optional :created_at, String, api_name: :createdAt + # @!attribute is_note_tweet + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # + # @return [Boolean, nil] + optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet + # @!attribute like_count # # @return [Integer, nil] @@ -77,16 +83,27 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # @return [Integer, nil] optional :view_count, Integer, api_name: :viewCount - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) # @param id [String] + # # @param text [String] + # # @param author [XTwitterScraper::Models::X::TweetSearchResponse::Tweet::Author] + # # @param bookmark_count [Integer] + # # @param created_at [String] + # + # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # # @param like_count [Integer] + # # @param quote_count [Integer] + # # @param reply_count [Integer] + # # @param retweet_count [Integer] + # # @param view_count [Integer] # @see XTwitterScraper::Models::X::TweetSearchResponse::Tweet#author diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_likes_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_likes_response.rb index d30dcfd..aa83e5e 100644 --- a/lib/x_twitter_scraper/models/x/user_retrieve_likes_response.rb +++ b/lib/x_twitter_scraper/models/x/user_retrieve_likes_response.rb @@ -52,6 +52,12 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # @return [String, nil] optional :created_at, String, api_name: :createdAt + # @!attribute is_note_tweet + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # + # @return [Boolean, nil] + optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet + # @!attribute like_count # # @return [Integer, nil] @@ -77,16 +83,27 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # @return [Integer, nil] optional :view_count, Integer, api_name: :viewCount - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) # @param id [String] + # # @param text [String] + # # @param author [XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet::Author] + # # @param bookmark_count [Integer] + # # @param created_at [String] + # + # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # # @param like_count [Integer] + # # @param quote_count [Integer] + # # @param reply_count [Integer] + # # @param retweet_count [Integer] + # # @param view_count [Integer] # @see XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet#author diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_media_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_media_response.rb index 31106aa..07f0452 100644 --- a/lib/x_twitter_scraper/models/x/user_retrieve_media_response.rb +++ b/lib/x_twitter_scraper/models/x/user_retrieve_media_response.rb @@ -52,6 +52,12 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # @return [String, nil] optional :created_at, String, api_name: :createdAt + # @!attribute is_note_tweet + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # + # @return [Boolean, nil] + optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet + # @!attribute like_count # # @return [Integer, nil] @@ -77,16 +83,27 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # @return [Integer, nil] optional :view_count, Integer, api_name: :viewCount - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) # @param id [String] + # # @param text [String] + # # @param author [XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet::Author] + # # @param bookmark_count [Integer] + # # @param created_at [String] + # + # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # # @param like_count [Integer] + # # @param quote_count [Integer] + # # @param reply_count [Integer] + # # @param retweet_count [Integer] + # # @param view_count [Integer] # @see XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet#author diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_tweets_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_tweets_response.rb index 4c77b97..3183008 100644 --- a/lib/x_twitter_scraper/models/x/user_retrieve_tweets_response.rb +++ b/lib/x_twitter_scraper/models/x/user_retrieve_tweets_response.rb @@ -52,6 +52,12 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # @return [String, nil] optional :created_at, String, api_name: :createdAt + # @!attribute is_note_tweet + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # + # @return [Boolean, nil] + optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet + # @!attribute like_count # # @return [Integer, nil] @@ -77,16 +83,27 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # @return [Integer, nil] optional :view_count, Integer, api_name: :viewCount - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) # @param id [String] + # # @param text [String] + # # @param author [XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet::Author] + # # @param bookmark_count [Integer] + # # @param created_at [String] + # + # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # # @param like_count [Integer] + # # @param quote_count [Integer] + # # @param reply_count [Integer] + # # @param retweet_count [Integer] + # # @param view_count [Integer] # @see XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet#author diff --git a/lib/x_twitter_scraper/models/x_get_home_timeline_response.rb b/lib/x_twitter_scraper/models/x_get_home_timeline_response.rb index f52f36b..649ef5f 100644 --- a/lib/x_twitter_scraper/models/x_get_home_timeline_response.rb +++ b/lib/x_twitter_scraper/models/x_get_home_timeline_response.rb @@ -51,6 +51,12 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # @return [String, nil] optional :created_at, String, api_name: :createdAt + # @!attribute is_note_tweet + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # + # @return [Boolean, nil] + optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet + # @!attribute like_count # # @return [Integer, nil] @@ -76,16 +82,27 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # @return [Integer, nil] optional :view_count, Integer, api_name: :viewCount - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) # @param id [String] + # # @param text [String] + # # @param author [XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet::Author] + # # @param bookmark_count [Integer] + # # @param created_at [String] + # + # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # # @param like_count [Integer] + # # @param quote_count [Integer] + # # @param reply_count [Integer] + # # @param retweet_count [Integer] + # # @param view_count [Integer] # @see XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet#author diff --git a/rbi/x_twitter_scraper/models/paginated_tweets.rbi b/rbi/x_twitter_scraper/models/paginated_tweets.rbi index 7325230..192a881 100644 --- a/rbi/x_twitter_scraper/models/paginated_tweets.rbi +++ b/rbi/x_twitter_scraper/models/paginated_tweets.rbi @@ -81,6 +81,13 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + sig { returns(T.nilable(T::Boolean)) } + attr_reader :is_note_tweet + + sig { params(is_note_tweet: T::Boolean).void } + attr_writer :is_note_tweet + sig { returns(T.nilable(Integer)) } attr_reader :like_count @@ -118,6 +125,7 @@ module XTwitterScraper author: XTwitterScraper::PaginatedTweets::Tweet::Author::OrHash, bookmark_count: Integer, created_at: String, + is_note_tweet: T::Boolean, like_count: Integer, quote_count: Integer, reply_count: Integer, @@ -131,6 +139,8 @@ module XTwitterScraper author: nil, bookmark_count: nil, created_at: nil, + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, @@ -147,6 +157,7 @@ module XTwitterScraper author: XTwitterScraper::PaginatedTweets::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: T::Boolean, like_count: Integer, quote_count: Integer, reply_count: Integer, diff --git a/rbi/x_twitter_scraper/models/x/bookmark_list_response.rbi b/rbi/x_twitter_scraper/models/x/bookmark_list_response.rbi index e34af4d..5419a61 100644 --- a/rbi/x_twitter_scraper/models/x/bookmark_list_response.rbi +++ b/rbi/x_twitter_scraper/models/x/bookmark_list_response.rbi @@ -97,6 +97,13 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + sig { returns(T.nilable(T::Boolean)) } + attr_reader :is_note_tweet + + sig { params(is_note_tweet: T::Boolean).void } + attr_writer :is_note_tweet + sig { returns(T.nilable(Integer)) } attr_reader :like_count @@ -135,6 +142,7 @@ module XTwitterScraper XTwitterScraper::Models::X::BookmarkListResponse::Tweet::Author::OrHash, bookmark_count: Integer, created_at: String, + is_note_tweet: T::Boolean, like_count: Integer, quote_count: Integer, reply_count: Integer, @@ -148,6 +156,8 @@ module XTwitterScraper author: nil, bookmark_count: nil, created_at: nil, + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, @@ -165,6 +175,7 @@ module XTwitterScraper XTwitterScraper::Models::X::BookmarkListResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: T::Boolean, like_count: Integer, quote_count: Integer, reply_count: Integer, diff --git a/rbi/x_twitter_scraper/models/x/search_tweet.rbi b/rbi/x_twitter_scraper/models/x/search_tweet.rbi index 88e4d43..14ec9dd 100644 --- a/rbi/x_twitter_scraper/models/x/search_tweet.rbi +++ b/rbi/x_twitter_scraper/models/x/search_tweet.rbi @@ -38,6 +38,13 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + sig { returns(T.nilable(T::Boolean)) } + attr_reader :is_note_tweet + + sig { params(is_note_tweet: T::Boolean).void } + attr_writer :is_note_tweet + sig { returns(T.nilable(Integer)) } attr_reader :like_count @@ -75,6 +82,7 @@ module XTwitterScraper author: XTwitterScraper::X::SearchTweet::Author::OrHash, bookmark_count: Integer, created_at: String, + is_note_tweet: T::Boolean, like_count: Integer, quote_count: Integer, reply_count: Integer, @@ -88,6 +96,8 @@ module XTwitterScraper author: nil, bookmark_count: nil, created_at: nil, + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, @@ -104,6 +114,7 @@ module XTwitterScraper author: XTwitterScraper::X::SearchTweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: T::Boolean, like_count: Integer, quote_count: Integer, reply_count: Integer, diff --git a/rbi/x_twitter_scraper/models/x/tweet_detail.rbi b/rbi/x_twitter_scraper/models/x/tweet_detail.rbi index da80ae4..69688c0 100644 --- a/rbi/x_twitter_scraper/models/x/tweet_detail.rbi +++ b/rbi/x_twitter_scraper/models/x/tweet_detail.rbi @@ -36,12 +36,74 @@ module XTwitterScraper sig { returns(Integer) } attr_accessor :view_count + # ID of the root tweet in the conversation thread + sig { returns(T.nilable(String)) } + attr_reader :conversation_id + + sig { params(conversation_id: String).void } + attr_writer :conversation_id + sig { returns(T.nilable(String)) } attr_reader :created_at sig { params(created_at: String).void } attr_writer :created_at + # Parsed entities from the tweet text (URLs, mentions, hashtags, media) + sig { returns(T.nilable(T.anything)) } + attr_reader :entities + + sig { params(entities: T.anything).void } + attr_writer :entities + + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + sig { returns(T.nilable(T::Boolean)) } + attr_reader :is_note_tweet + + sig { params(is_note_tweet: T::Boolean).void } + attr_writer :is_note_tweet + + # Whether this tweet quotes another tweet + sig { returns(T.nilable(T::Boolean)) } + attr_reader :is_quote_status + + sig { params(is_quote_status: T::Boolean).void } + attr_writer :is_quote_status + + # Whether this tweet is a reply to another tweet + sig { returns(T.nilable(T::Boolean)) } + attr_reader :is_reply + + sig { params(is_reply: T::Boolean).void } + attr_writer :is_reply + + # Attached media items, omitted when the tweet has no media + sig do + returns(T.nilable(T::Array[XTwitterScraper::X::TweetDetail::Media])) + end + attr_reader :media + + sig do + params( + media: T::Array[XTwitterScraper::X::TweetDetail::Media::OrHash] + ).void + end + attr_writer :media + + # The quoted tweet object, present when isQuoteStatus is true + sig { returns(T.nilable(T.anything)) } + attr_reader :quoted_tweet + + sig { params(quoted_tweet: T.anything).void } + attr_writer :quoted_tweet + + # Client application used to post this tweet + sig { returns(T.nilable(String)) } + attr_reader :source + + sig { params(source: String).void } + attr_writer :source + sig do params( id: String, @@ -52,7 +114,15 @@ module XTwitterScraper retweet_count: Integer, text: String, view_count: Integer, - created_at: String + conversation_id: String, + created_at: String, + entities: T.anything, + is_note_tweet: T::Boolean, + is_quote_status: T::Boolean, + is_reply: T::Boolean, + media: T::Array[XTwitterScraper::X::TweetDetail::Media::OrHash], + quoted_tweet: T.anything, + source: String ).returns(T.attached_class) end def self.new( @@ -64,7 +134,23 @@ module XTwitterScraper retweet_count:, text:, view_count:, - created_at: nil + # ID of the root tweet in the conversation thread + conversation_id: nil, + created_at: nil, + # Parsed entities from the tweet text (URLs, mentions, hashtags, media) + entities: nil, + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + is_note_tweet: nil, + # Whether this tweet quotes another tweet + is_quote_status: nil, + # Whether this tweet is a reply to another tweet + is_reply: nil, + # Attached media items, omitted when the tweet has no media + media: nil, + # The quoted tweet object, present when isQuoteStatus is true + quoted_tweet: nil, + # Client application used to post this tweet + source: nil ) end @@ -79,12 +165,114 @@ module XTwitterScraper retweet_count: Integer, text: String, view_count: Integer, - created_at: String + conversation_id: String, + created_at: String, + entities: T.anything, + is_note_tweet: T::Boolean, + is_quote_status: T::Boolean, + is_reply: T::Boolean, + media: T::Array[XTwitterScraper::X::TweetDetail::Media], + quoted_tweet: T.anything, + source: String } ) end def to_hash end + + class Media < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::X::TweetDetail::Media, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(T.nilable(String)) } + attr_reader :media_url + + sig { params(media_url: String).void } + attr_writer :media_url + + sig do + returns( + T.nilable(XTwitterScraper::X::TweetDetail::Media::Type::OrSymbol) + ) + end + attr_reader :type + + sig do + params( + type: XTwitterScraper::X::TweetDetail::Media::Type::OrSymbol + ).void + end + attr_writer :type + + sig { returns(T.nilable(String)) } + attr_reader :url + + sig { params(url: String).void } + attr_writer :url + + sig do + params( + media_url: String, + type: XTwitterScraper::X::TweetDetail::Media::Type::OrSymbol, + url: String + ).returns(T.attached_class) + end + def self.new(media_url: nil, type: nil, url: nil) + end + + sig do + override.returns( + { + media_url: String, + type: XTwitterScraper::X::TweetDetail::Media::Type::OrSymbol, + url: String + } + ) + end + def to_hash + end + + module Type + extend XTwitterScraper::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, XTwitterScraper::X::TweetDetail::Media::Type) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PHOTO = + T.let( + :photo, + XTwitterScraper::X::TweetDetail::Media::Type::TaggedSymbol + ) + VIDEO = + T.let( + :video, + XTwitterScraper::X::TweetDetail::Media::Type::TaggedSymbol + ) + ANIMATED_GIF = + T.let( + :animated_gif, + XTwitterScraper::X::TweetDetail::Media::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + XTwitterScraper::X::TweetDetail::Media::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end end end end diff --git a/rbi/x_twitter_scraper/models/x/tweet_get_quotes_response.rbi b/rbi/x_twitter_scraper/models/x/tweet_get_quotes_response.rbi index 171dc79..8e81482 100644 --- a/rbi/x_twitter_scraper/models/x/tweet_get_quotes_response.rbi +++ b/rbi/x_twitter_scraper/models/x/tweet_get_quotes_response.rbi @@ -97,6 +97,13 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + sig { returns(T.nilable(T::Boolean)) } + attr_reader :is_note_tweet + + sig { params(is_note_tweet: T::Boolean).void } + attr_writer :is_note_tweet + sig { returns(T.nilable(Integer)) } attr_reader :like_count @@ -135,6 +142,7 @@ module XTwitterScraper XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet::Author::OrHash, bookmark_count: Integer, created_at: String, + is_note_tweet: T::Boolean, like_count: Integer, quote_count: Integer, reply_count: Integer, @@ -148,6 +156,8 @@ module XTwitterScraper author: nil, bookmark_count: nil, created_at: nil, + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, @@ -165,6 +175,7 @@ module XTwitterScraper XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: T::Boolean, like_count: Integer, quote_count: Integer, reply_count: Integer, diff --git a/rbi/x_twitter_scraper/models/x/tweet_get_replies_response.rbi b/rbi/x_twitter_scraper/models/x/tweet_get_replies_response.rbi index 943f062..98b704f 100644 --- a/rbi/x_twitter_scraper/models/x/tweet_get_replies_response.rbi +++ b/rbi/x_twitter_scraper/models/x/tweet_get_replies_response.rbi @@ -97,6 +97,13 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + sig { returns(T.nilable(T::Boolean)) } + attr_reader :is_note_tweet + + sig { params(is_note_tweet: T::Boolean).void } + attr_writer :is_note_tweet + sig { returns(T.nilable(Integer)) } attr_reader :like_count @@ -135,6 +142,7 @@ module XTwitterScraper XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet::Author::OrHash, bookmark_count: Integer, created_at: String, + is_note_tweet: T::Boolean, like_count: Integer, quote_count: Integer, reply_count: Integer, @@ -148,6 +156,8 @@ module XTwitterScraper author: nil, bookmark_count: nil, created_at: nil, + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, @@ -165,6 +175,7 @@ module XTwitterScraper XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: T::Boolean, like_count: Integer, quote_count: Integer, reply_count: Integer, diff --git a/rbi/x_twitter_scraper/models/x/tweet_get_thread_response.rbi b/rbi/x_twitter_scraper/models/x/tweet_get_thread_response.rbi index 8a4886b..473f140 100644 --- a/rbi/x_twitter_scraper/models/x/tweet_get_thread_response.rbi +++ b/rbi/x_twitter_scraper/models/x/tweet_get_thread_response.rbi @@ -97,6 +97,13 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + sig { returns(T.nilable(T::Boolean)) } + attr_reader :is_note_tweet + + sig { params(is_note_tweet: T::Boolean).void } + attr_writer :is_note_tweet + sig { returns(T.nilable(Integer)) } attr_reader :like_count @@ -135,6 +142,7 @@ module XTwitterScraper XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet::Author::OrHash, bookmark_count: Integer, created_at: String, + is_note_tweet: T::Boolean, like_count: Integer, quote_count: Integer, reply_count: Integer, @@ -148,6 +156,8 @@ module XTwitterScraper author: nil, bookmark_count: nil, created_at: nil, + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, @@ -165,6 +175,7 @@ module XTwitterScraper XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: T::Boolean, like_count: Integer, quote_count: Integer, reply_count: Integer, diff --git a/rbi/x_twitter_scraper/models/x/tweet_search_response.rbi b/rbi/x_twitter_scraper/models/x/tweet_search_response.rbi index 07b505f..a5a84b2 100644 --- a/rbi/x_twitter_scraper/models/x/tweet_search_response.rbi +++ b/rbi/x_twitter_scraper/models/x/tweet_search_response.rbi @@ -95,6 +95,13 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + sig { returns(T.nilable(T::Boolean)) } + attr_reader :is_note_tweet + + sig { params(is_note_tweet: T::Boolean).void } + attr_writer :is_note_tweet + sig { returns(T.nilable(Integer)) } attr_reader :like_count @@ -133,6 +140,7 @@ module XTwitterScraper XTwitterScraper::Models::X::TweetSearchResponse::Tweet::Author::OrHash, bookmark_count: Integer, created_at: String, + is_note_tweet: T::Boolean, like_count: Integer, quote_count: Integer, reply_count: Integer, @@ -146,6 +154,8 @@ module XTwitterScraper author: nil, bookmark_count: nil, created_at: nil, + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, @@ -163,6 +173,7 @@ module XTwitterScraper XTwitterScraper::Models::X::TweetSearchResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: T::Boolean, like_count: Integer, quote_count: Integer, reply_count: Integer, diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_likes_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_likes_response.rbi index 291e6e5..86a32fd 100644 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_likes_response.rbi +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_likes_response.rbi @@ -99,6 +99,13 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + sig { returns(T.nilable(T::Boolean)) } + attr_reader :is_note_tweet + + sig { params(is_note_tweet: T::Boolean).void } + attr_writer :is_note_tweet + sig { returns(T.nilable(Integer)) } attr_reader :like_count @@ -137,6 +144,7 @@ module XTwitterScraper XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet::Author::OrHash, bookmark_count: Integer, created_at: String, + is_note_tweet: T::Boolean, like_count: Integer, quote_count: Integer, reply_count: Integer, @@ -150,6 +158,8 @@ module XTwitterScraper author: nil, bookmark_count: nil, created_at: nil, + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, @@ -167,6 +177,7 @@ module XTwitterScraper XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: T::Boolean, like_count: Integer, quote_count: Integer, reply_count: Integer, diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_media_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_media_response.rbi index a37c912..03dfcfc 100644 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_media_response.rbi +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_media_response.rbi @@ -99,6 +99,13 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + sig { returns(T.nilable(T::Boolean)) } + attr_reader :is_note_tweet + + sig { params(is_note_tweet: T::Boolean).void } + attr_writer :is_note_tweet + sig { returns(T.nilable(Integer)) } attr_reader :like_count @@ -137,6 +144,7 @@ module XTwitterScraper XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet::Author::OrHash, bookmark_count: Integer, created_at: String, + is_note_tweet: T::Boolean, like_count: Integer, quote_count: Integer, reply_count: Integer, @@ -150,6 +158,8 @@ module XTwitterScraper author: nil, bookmark_count: nil, created_at: nil, + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, @@ -167,6 +177,7 @@ module XTwitterScraper XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: T::Boolean, like_count: Integer, quote_count: Integer, reply_count: Integer, diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_response.rbi index 3de82ec..e778ae9 100644 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_response.rbi +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_response.rbi @@ -99,6 +99,13 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + sig { returns(T.nilable(T::Boolean)) } + attr_reader :is_note_tweet + + sig { params(is_note_tweet: T::Boolean).void } + attr_writer :is_note_tweet + sig { returns(T.nilable(Integer)) } attr_reader :like_count @@ -137,6 +144,7 @@ module XTwitterScraper XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet::Author::OrHash, bookmark_count: Integer, created_at: String, + is_note_tweet: T::Boolean, like_count: Integer, quote_count: Integer, reply_count: Integer, @@ -150,6 +158,8 @@ module XTwitterScraper author: nil, bookmark_count: nil, created_at: nil, + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, @@ -167,6 +177,7 @@ module XTwitterScraper XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: T::Boolean, like_count: Integer, quote_count: Integer, reply_count: Integer, diff --git a/rbi/x_twitter_scraper/models/x_get_home_timeline_response.rbi b/rbi/x_twitter_scraper/models/x_get_home_timeline_response.rbi index 8d95a4e..d10d4e4 100644 --- a/rbi/x_twitter_scraper/models/x_get_home_timeline_response.rbi +++ b/rbi/x_twitter_scraper/models/x_get_home_timeline_response.rbi @@ -94,6 +94,13 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + sig { returns(T.nilable(T::Boolean)) } + attr_reader :is_note_tweet + + sig { params(is_note_tweet: T::Boolean).void } + attr_writer :is_note_tweet + sig { returns(T.nilable(Integer)) } attr_reader :like_count @@ -132,6 +139,7 @@ module XTwitterScraper XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet::Author::OrHash, bookmark_count: Integer, created_at: String, + is_note_tweet: T::Boolean, like_count: Integer, quote_count: Integer, reply_count: Integer, @@ -145,6 +153,8 @@ module XTwitterScraper author: nil, bookmark_count: nil, created_at: nil, + # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, @@ -162,6 +172,7 @@ module XTwitterScraper XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: T::Boolean, like_count: Integer, quote_count: Integer, reply_count: Integer, diff --git a/sig/x_twitter_scraper/models/paginated_tweets.rbs b/sig/x_twitter_scraper/models/paginated_tweets.rbs index bfb7cf2..43507e2 100644 --- a/sig/x_twitter_scraper/models/paginated_tweets.rbs +++ b/sig/x_twitter_scraper/models/paginated_tweets.rbs @@ -33,6 +33,7 @@ module XTwitterScraper author: XTwitterScraper::PaginatedTweets::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: bool, like_count: Integer, quote_count: Integer, reply_count: Integer, @@ -59,6 +60,10 @@ module XTwitterScraper def created_at=: (String) -> String + attr_reader is_note_tweet: bool? + + def is_note_tweet=: (bool) -> bool + attr_reader like_count: Integer? def like_count=: (Integer) -> Integer @@ -85,6 +90,7 @@ module XTwitterScraper ?author: XTwitterScraper::PaginatedTweets::Tweet::Author, ?bookmark_count: Integer, ?created_at: String, + ?is_note_tweet: bool, ?like_count: Integer, ?quote_count: Integer, ?reply_count: Integer, @@ -98,6 +104,7 @@ module XTwitterScraper author: XTwitterScraper::PaginatedTweets::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: bool, like_count: Integer, quote_count: Integer, reply_count: Integer, diff --git a/sig/x_twitter_scraper/models/x/bookmark_list_response.rbs b/sig/x_twitter_scraper/models/x/bookmark_list_response.rbs index 3a53e97..4fc5a12 100644 --- a/sig/x_twitter_scraper/models/x/bookmark_list_response.rbs +++ b/sig/x_twitter_scraper/models/x/bookmark_list_response.rbs @@ -34,6 +34,7 @@ module XTwitterScraper author: XTwitterScraper::Models::X::BookmarkListResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: bool, like_count: Integer, quote_count: Integer, reply_count: Integer, @@ -60,6 +61,10 @@ module XTwitterScraper def created_at=: (String) -> String + attr_reader is_note_tweet: bool? + + def is_note_tweet=: (bool) -> bool + attr_reader like_count: Integer? def like_count=: (Integer) -> Integer @@ -86,6 +91,7 @@ module XTwitterScraper ?author: XTwitterScraper::Models::X::BookmarkListResponse::Tweet::Author, ?bookmark_count: Integer, ?created_at: String, + ?is_note_tweet: bool, ?like_count: Integer, ?quote_count: Integer, ?reply_count: Integer, @@ -99,6 +105,7 @@ module XTwitterScraper author: XTwitterScraper::Models::X::BookmarkListResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: bool, like_count: Integer, quote_count: Integer, reply_count: Integer, diff --git a/sig/x_twitter_scraper/models/x/search_tweet.rbs b/sig/x_twitter_scraper/models/x/search_tweet.rbs index bd4470b..9256302 100644 --- a/sig/x_twitter_scraper/models/x/search_tweet.rbs +++ b/sig/x_twitter_scraper/models/x/search_tweet.rbs @@ -8,6 +8,7 @@ module XTwitterScraper author: XTwitterScraper::X::SearchTweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: bool, like_count: Integer, quote_count: Integer, reply_count: Integer, @@ -34,6 +35,10 @@ module XTwitterScraper def created_at=: (String) -> String + attr_reader is_note_tweet: bool? + + def is_note_tweet=: (bool) -> bool + attr_reader like_count: Integer? def like_count=: (Integer) -> Integer @@ -60,6 +65,7 @@ module XTwitterScraper ?author: XTwitterScraper::X::SearchTweet::Author, ?bookmark_count: Integer, ?created_at: String, + ?is_note_tweet: bool, ?like_count: Integer, ?quote_count: Integer, ?reply_count: Integer, @@ -73,6 +79,7 @@ module XTwitterScraper author: XTwitterScraper::X::SearchTweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: bool, like_count: Integer, quote_count: Integer, reply_count: Integer, diff --git a/sig/x_twitter_scraper/models/x/tweet_detail.rbs b/sig/x_twitter_scraper/models/x/tweet_detail.rbs index b59029a..3f6d7e9 100644 --- a/sig/x_twitter_scraper/models/x/tweet_detail.rbs +++ b/sig/x_twitter_scraper/models/x/tweet_detail.rbs @@ -11,7 +11,15 @@ module XTwitterScraper retweet_count: Integer, text: String, view_count: Integer, - created_at: String + conversation_id: String, + created_at: String, + entities: top, + is_note_tweet: bool, + is_quote_status: bool, + is_reply: bool, + media: ::Array[XTwitterScraper::X::TweetDetail::Media], + quoted_tweet: top, + source: String } class TweetDetail < XTwitterScraper::Internal::Type::BaseModel @@ -31,10 +39,44 @@ module XTwitterScraper attr_accessor view_count: Integer + attr_reader conversation_id: String? + + def conversation_id=: (String) -> String + attr_reader created_at: String? def created_at=: (String) -> String + attr_reader entities: top? + + def entities=: (top) -> top + + attr_reader is_note_tweet: bool? + + def is_note_tweet=: (bool) -> bool + + attr_reader is_quote_status: bool? + + def is_quote_status=: (bool) -> bool + + attr_reader is_reply: bool? + + def is_reply=: (bool) -> bool + + attr_reader media: ::Array[XTwitterScraper::X::TweetDetail::Media]? + + def media=: ( + ::Array[XTwitterScraper::X::TweetDetail::Media] + ) -> ::Array[XTwitterScraper::X::TweetDetail::Media] + + attr_reader quoted_tweet: top? + + def quoted_tweet=: (top) -> top + + attr_reader source: String? + + def source=: (String) -> String + def initialize: ( id: String, bookmark_count: Integer, @@ -44,7 +86,15 @@ module XTwitterScraper retweet_count: Integer, text: String, view_count: Integer, - ?created_at: String + ?conversation_id: String, + ?created_at: String, + ?entities: top, + ?is_note_tweet: bool, + ?is_quote_status: bool, + ?is_reply: bool, + ?media: ::Array[XTwitterScraper::X::TweetDetail::Media], + ?quoted_tweet: top, + ?source: String ) -> void def to_hash: -> { @@ -56,8 +106,63 @@ module XTwitterScraper retweet_count: Integer, text: String, view_count: Integer, - created_at: String + conversation_id: String, + created_at: String, + entities: top, + is_note_tweet: bool, + is_quote_status: bool, + is_reply: bool, + media: ::Array[XTwitterScraper::X::TweetDetail::Media], + quoted_tweet: top, + source: String } + + type media = + { + media_url: String, + type: XTwitterScraper::Models::X::TweetDetail::Media::type_, + url: String + } + + class Media < XTwitterScraper::Internal::Type::BaseModel + attr_reader media_url: String? + + def media_url=: (String) -> String + + attr_reader type: XTwitterScraper::Models::X::TweetDetail::Media::type_? + + def type=: ( + XTwitterScraper::Models::X::TweetDetail::Media::type_ + ) -> XTwitterScraper::Models::X::TweetDetail::Media::type_ + + attr_reader url: String? + + def url=: (String) -> String + + def initialize: ( + ?media_url: String, + ?type: XTwitterScraper::Models::X::TweetDetail::Media::type_, + ?url: String + ) -> void + + def to_hash: -> { + media_url: String, + type: XTwitterScraper::Models::X::TweetDetail::Media::type_, + url: String + } + + type type_ = :photo | :video | :animated_gif + + module Type + extend XTwitterScraper::Internal::Type::Enum + + PHOTO: :photo + VIDEO: :video + ANIMATED_GIF: :animated_gif + + def self?.values: -> ::Array[XTwitterScraper::Models::X::TweetDetail::Media::type_] + end + end end end end diff --git a/sig/x_twitter_scraper/models/x/tweet_get_quotes_response.rbs b/sig/x_twitter_scraper/models/x/tweet_get_quotes_response.rbs index 66b2750..7d2bca0 100644 --- a/sig/x_twitter_scraper/models/x/tweet_get_quotes_response.rbs +++ b/sig/x_twitter_scraper/models/x/tweet_get_quotes_response.rbs @@ -34,6 +34,7 @@ module XTwitterScraper author: XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: bool, like_count: Integer, quote_count: Integer, reply_count: Integer, @@ -60,6 +61,10 @@ module XTwitterScraper def created_at=: (String) -> String + attr_reader is_note_tweet: bool? + + def is_note_tweet=: (bool) -> bool + attr_reader like_count: Integer? def like_count=: (Integer) -> Integer @@ -86,6 +91,7 @@ module XTwitterScraper ?author: XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet::Author, ?bookmark_count: Integer, ?created_at: String, + ?is_note_tweet: bool, ?like_count: Integer, ?quote_count: Integer, ?reply_count: Integer, @@ -99,6 +105,7 @@ module XTwitterScraper author: XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: bool, like_count: Integer, quote_count: Integer, reply_count: Integer, diff --git a/sig/x_twitter_scraper/models/x/tweet_get_replies_response.rbs b/sig/x_twitter_scraper/models/x/tweet_get_replies_response.rbs index 26fdd53..1c168aa 100644 --- a/sig/x_twitter_scraper/models/x/tweet_get_replies_response.rbs +++ b/sig/x_twitter_scraper/models/x/tweet_get_replies_response.rbs @@ -34,6 +34,7 @@ module XTwitterScraper author: XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: bool, like_count: Integer, quote_count: Integer, reply_count: Integer, @@ -60,6 +61,10 @@ module XTwitterScraper def created_at=: (String) -> String + attr_reader is_note_tweet: bool? + + def is_note_tweet=: (bool) -> bool + attr_reader like_count: Integer? def like_count=: (Integer) -> Integer @@ -86,6 +91,7 @@ module XTwitterScraper ?author: XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet::Author, ?bookmark_count: Integer, ?created_at: String, + ?is_note_tweet: bool, ?like_count: Integer, ?quote_count: Integer, ?reply_count: Integer, @@ -99,6 +105,7 @@ module XTwitterScraper author: XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: bool, like_count: Integer, quote_count: Integer, reply_count: Integer, diff --git a/sig/x_twitter_scraper/models/x/tweet_get_thread_response.rbs b/sig/x_twitter_scraper/models/x/tweet_get_thread_response.rbs index 9d843da..1dfff68 100644 --- a/sig/x_twitter_scraper/models/x/tweet_get_thread_response.rbs +++ b/sig/x_twitter_scraper/models/x/tweet_get_thread_response.rbs @@ -34,6 +34,7 @@ module XTwitterScraper author: XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: bool, like_count: Integer, quote_count: Integer, reply_count: Integer, @@ -60,6 +61,10 @@ module XTwitterScraper def created_at=: (String) -> String + attr_reader is_note_tweet: bool? + + def is_note_tweet=: (bool) -> bool + attr_reader like_count: Integer? def like_count=: (Integer) -> Integer @@ -86,6 +91,7 @@ module XTwitterScraper ?author: XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet::Author, ?bookmark_count: Integer, ?created_at: String, + ?is_note_tweet: bool, ?like_count: Integer, ?quote_count: Integer, ?reply_count: Integer, @@ -99,6 +105,7 @@ module XTwitterScraper author: XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: bool, like_count: Integer, quote_count: Integer, reply_count: Integer, diff --git a/sig/x_twitter_scraper/models/x/tweet_search_response.rbs b/sig/x_twitter_scraper/models/x/tweet_search_response.rbs index de40294..07b3edd 100644 --- a/sig/x_twitter_scraper/models/x/tweet_search_response.rbs +++ b/sig/x_twitter_scraper/models/x/tweet_search_response.rbs @@ -34,6 +34,7 @@ module XTwitterScraper author: XTwitterScraper::Models::X::TweetSearchResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: bool, like_count: Integer, quote_count: Integer, reply_count: Integer, @@ -60,6 +61,10 @@ module XTwitterScraper def created_at=: (String) -> String + attr_reader is_note_tweet: bool? + + def is_note_tweet=: (bool) -> bool + attr_reader like_count: Integer? def like_count=: (Integer) -> Integer @@ -86,6 +91,7 @@ module XTwitterScraper ?author: XTwitterScraper::Models::X::TweetSearchResponse::Tweet::Author, ?bookmark_count: Integer, ?created_at: String, + ?is_note_tweet: bool, ?like_count: Integer, ?quote_count: Integer, ?reply_count: Integer, @@ -99,6 +105,7 @@ module XTwitterScraper author: XTwitterScraper::Models::X::TweetSearchResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: bool, like_count: Integer, quote_count: Integer, reply_count: Integer, diff --git a/sig/x_twitter_scraper/models/x/user_retrieve_likes_response.rbs b/sig/x_twitter_scraper/models/x/user_retrieve_likes_response.rbs index 0e92f90..666d502 100644 --- a/sig/x_twitter_scraper/models/x/user_retrieve_likes_response.rbs +++ b/sig/x_twitter_scraper/models/x/user_retrieve_likes_response.rbs @@ -34,6 +34,7 @@ module XTwitterScraper author: XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: bool, like_count: Integer, quote_count: Integer, reply_count: Integer, @@ -60,6 +61,10 @@ module XTwitterScraper def created_at=: (String) -> String + attr_reader is_note_tweet: bool? + + def is_note_tweet=: (bool) -> bool + attr_reader like_count: Integer? def like_count=: (Integer) -> Integer @@ -86,6 +91,7 @@ module XTwitterScraper ?author: XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet::Author, ?bookmark_count: Integer, ?created_at: String, + ?is_note_tweet: bool, ?like_count: Integer, ?quote_count: Integer, ?reply_count: Integer, @@ -99,6 +105,7 @@ module XTwitterScraper author: XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: bool, like_count: Integer, quote_count: Integer, reply_count: Integer, diff --git a/sig/x_twitter_scraper/models/x/user_retrieve_media_response.rbs b/sig/x_twitter_scraper/models/x/user_retrieve_media_response.rbs index 0836f8a..dadef21 100644 --- a/sig/x_twitter_scraper/models/x/user_retrieve_media_response.rbs +++ b/sig/x_twitter_scraper/models/x/user_retrieve_media_response.rbs @@ -34,6 +34,7 @@ module XTwitterScraper author: XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: bool, like_count: Integer, quote_count: Integer, reply_count: Integer, @@ -60,6 +61,10 @@ module XTwitterScraper def created_at=: (String) -> String + attr_reader is_note_tweet: bool? + + def is_note_tweet=: (bool) -> bool + attr_reader like_count: Integer? def like_count=: (Integer) -> Integer @@ -86,6 +91,7 @@ module XTwitterScraper ?author: XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet::Author, ?bookmark_count: Integer, ?created_at: String, + ?is_note_tweet: bool, ?like_count: Integer, ?quote_count: Integer, ?reply_count: Integer, @@ -99,6 +105,7 @@ module XTwitterScraper author: XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: bool, like_count: Integer, quote_count: Integer, reply_count: Integer, diff --git a/sig/x_twitter_scraper/models/x/user_retrieve_tweets_response.rbs b/sig/x_twitter_scraper/models/x/user_retrieve_tweets_response.rbs index 117b557..01f8177 100644 --- a/sig/x_twitter_scraper/models/x/user_retrieve_tweets_response.rbs +++ b/sig/x_twitter_scraper/models/x/user_retrieve_tweets_response.rbs @@ -34,6 +34,7 @@ module XTwitterScraper author: XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: bool, like_count: Integer, quote_count: Integer, reply_count: Integer, @@ -60,6 +61,10 @@ module XTwitterScraper def created_at=: (String) -> String + attr_reader is_note_tweet: bool? + + def is_note_tweet=: (bool) -> bool + attr_reader like_count: Integer? def like_count=: (Integer) -> Integer @@ -86,6 +91,7 @@ module XTwitterScraper ?author: XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet::Author, ?bookmark_count: Integer, ?created_at: String, + ?is_note_tweet: bool, ?like_count: Integer, ?quote_count: Integer, ?reply_count: Integer, @@ -99,6 +105,7 @@ module XTwitterScraper author: XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: bool, like_count: Integer, quote_count: Integer, reply_count: Integer, diff --git a/sig/x_twitter_scraper/models/x_get_home_timeline_response.rbs b/sig/x_twitter_scraper/models/x_get_home_timeline_response.rbs index 14e3eb6..5db7346 100644 --- a/sig/x_twitter_scraper/models/x_get_home_timeline_response.rbs +++ b/sig/x_twitter_scraper/models/x_get_home_timeline_response.rbs @@ -33,6 +33,7 @@ module XTwitterScraper author: XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: bool, like_count: Integer, quote_count: Integer, reply_count: Integer, @@ -59,6 +60,10 @@ module XTwitterScraper def created_at=: (String) -> String + attr_reader is_note_tweet: bool? + + def is_note_tweet=: (bool) -> bool + attr_reader like_count: Integer? def like_count=: (Integer) -> Integer @@ -85,6 +90,7 @@ module XTwitterScraper ?author: XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet::Author, ?bookmark_count: Integer, ?created_at: String, + ?is_note_tweet: bool, ?like_count: Integer, ?quote_count: Integer, ?reply_count: Integer, @@ -98,6 +104,7 @@ module XTwitterScraper author: XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet::Author, bookmark_count: Integer, created_at: String, + is_note_tweet: bool, like_count: Integer, quote_count: Integer, reply_count: Integer, From f9c02a49240130a307fcbd1cfbcfaf999966fb06 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 20:42:06 +0000 Subject: [PATCH 06/27] feat(api): api update --- .stats.yml | 4 +- lib/x_twitter_scraper.rb | 15 ++ lib/x_twitter_scraper/models/api_key.rb | 2 + .../models/api_key_list_response.rb | 2 + lib/x_twitter_scraper/models/delivery.rb | 2 + lib/x_twitter_scraper/models/draft.rb | 2 + .../models/draft_create_response.rb | 2 + lib/x_twitter_scraper/models/draft_detail.rb | 2 + .../models/draft_list_params.rb | 3 +- .../models/draft_list_response.rb | 2 + .../models/draft_retrieve_response.rb | 2 + lib/x_twitter_scraper/models/draw_detail.rb | 2 + .../models/draw_export_params.rb | 4 +- .../models/draw_list_item.rb | 2 + .../models/draw_list_params.rb | 7 +- .../models/draw_list_response.rb | 2 + .../models/draw_retrieve_response.rb | 8 +- .../models/draw_run_response.rb | 2 + lib/x_twitter_scraper/models/error.rb | 2 + lib/x_twitter_scraper/models/event.rb | 12 +- lib/x_twitter_scraper/models/event_detail.rb | 7 +- .../models/event_list_params.rb | 14 +- .../models/event_list_response.rb | 12 +- .../models/event_retrieve_response.rb | 7 +- lib/x_twitter_scraper/models/event_type.rb | 1 + .../models/extraction_estimate_cost_params.rb | 16 +- .../extraction_export_results_params.rb | 6 +- .../models/extraction_job.rb | 12 +- .../models/extraction_list_params.rb | 15 +- .../models/extraction_list_response.rb | 12 +- .../models/extraction_retrieve_params.rb | 7 +- .../models/extraction_run_params.rb | 4 +- .../models/extraction_run_response.rb | 7 +- lib/x_twitter_scraper/models/integration.rb | 6 +- .../models/integration_create_params.rb | 4 +- .../models/integration_create_response.rb | 6 +- .../models/integration_delivery.rb | 2 + .../integration_list_deliveries_params.rb | 5 +- .../integration_list_deliveries_response.rb | 2 + .../models/integration_list_response.rb | 6 +- .../models/integration_retrieve_response.rb | 6 +- .../models/integration_update_params.rb | 4 +- .../models/integration_update_response.rb | 6 +- lib/x_twitter_scraper/models/monitor.rb | 11 +- .../models/monitor_create_params.rb | 4 +- .../models/monitor_create_response.rb | 8 +- .../models/monitor_list_response.rb | 11 +- .../models/monitor_retrieve_response.rb | 11 +- .../models/monitor_update_params.rb | 7 +- .../models/monitor_update_response.rb | 11 +- .../models/paginated_tweets.rb | 8 +- .../models/paginated_users.rb | 4 + lib/x_twitter_scraper/models/radar_item.rb | 2 + ...radar_retrieve_trending_topics_response.rb | 2 + .../models/style_analyze_response.rb | 2 + .../models/style_compare_response.rb | 11 +- .../models/style_list_response.rb | 2 + lib/x_twitter_scraper/models/style_profile.rb | 2 + .../models/style_profile_summary.rb | 2 + .../models/trend_list_params.rb | 3 +- lib/x_twitter_scraper/models/webhook.rb | 10 +- .../models/webhook_create_params.rb | 4 +- .../models/webhook_create_response.rb | 8 +- .../webhook_list_deliveries_response.rb | 2 + .../models/webhook_list_response.rb | 10 +- .../models/webhook_update_params.rb | 8 +- .../models/webhook_update_response.rb | 10 +- lib/x_twitter_scraper/models/winner.rb | 2 + .../models/x/account_list_response.rb | 2 + .../models/x/account_reauth_params.rb | 8 +- .../models/x/account_retrieve_response.rb | 2 + .../models/x/bookmark_list_params.rb | 4 +- .../models/x/bookmark_list_response.rb | 8 +- .../x/communities/join_create_params.rb | 4 +- .../x/communities/join_create_response.rb | 2 + .../x/communities/join_delete_all_params.rb | 4 +- .../x/communities/join_delete_all_response.rb | 2 + .../models/x/communities/tweet_list_params.rb | 12 +- .../x/communities/tweet_list_response.rb | 147 +++++++++++ .../models/x/community_action_result.rb | 2 + .../models/x/community_create_params.rb | 4 +- .../models/x/community_delete_params.rb | 4 +- .../x/community_retrieve_info_response.rb | 12 +- .../x/community_retrieve_members_response.rb | 105 ++++++++ .../x/community_retrieve_moderators_params.rb | 4 +- .../community_retrieve_moderators_response.rb | 105 ++++++++ .../x/community_retrieve_search_params.rb | 4 +- .../x/community_retrieve_search_response.rb | 145 ++++++++++ .../models/x/dm_retrieve_history_params.rb | 4 +- .../models/x/dm_send_params.rb | 4 +- .../x/list_retrieve_followers_params.rb | 4 +- .../x/list_retrieve_followers_response.rb | 105 ++++++++ .../models/x/list_retrieve_members_params.rb | 4 +- .../x/list_retrieve_members_response.rb | 105 ++++++++ .../models/x/list_retrieve_tweets_params.rb | 4 +- .../models/x/list_retrieve_tweets_response.rb | 145 ++++++++++ .../models/x/media_upload_params.rb | 4 +- .../models/x/profile_update_avatar_params.rb | 4 +- .../models/x/profile_update_banner_params.rb | 4 +- .../models/x/profile_update_params.rb | 4 +- .../models/x/search_tweet.rb | 6 +- .../models/x/tweet_author.rb | 2 + .../models/x/tweet_detail.rb | 14 +- .../models/x/tweet_get_favoriters_params.rb | 4 +- .../models/x/tweet_get_favoriters_response.rb | 4 + .../models/x/tweet_get_quotes_params.rb | 16 +- .../models/x/tweet_get_quotes_response.rb | 8 +- .../models/x/tweet_get_replies_params.rb | 12 +- .../models/x/tweet_get_replies_response.rb | 8 +- .../models/x/tweet_get_retweeters_params.rb | 4 +- .../models/x/tweet_get_retweeters_response.rb | 4 + .../models/x/tweet_get_thread_params.rb | 4 +- .../models/x/tweet_get_thread_response.rb | 8 +- .../models/x/tweet_list_response.rb | 145 ++++++++++ .../models/x/tweet_search_response.rb | 8 +- .../models/x/user_profile.rb | 2 + .../models/x/user_retrieve_batch_response.rb | 105 ++++++++ .../x/user_retrieve_followers_params.rb | 4 +- .../x/user_retrieve_followers_response.rb | 105 ++++++++ ...user_retrieve_followers_you_know_params.rb | 4 +- ...er_retrieve_followers_you_know_response.rb | 4 + .../x/user_retrieve_following_params.rb | 8 +- .../x/user_retrieve_following_response.rb | 105 ++++++++ .../models/x/user_retrieve_likes_params.rb | 4 +- .../models/x/user_retrieve_likes_response.rb | 8 +- .../models/x/user_retrieve_media_params.rb | 4 +- .../models/x/user_retrieve_media_response.rb | 8 +- .../models/x/user_retrieve_mentions_params.rb | 12 +- .../x/user_retrieve_mentions_response.rb | 145 ++++++++++ .../models/x/user_retrieve_search_params.rb | 8 +- .../models/x/user_retrieve_search_response.rb | 105 ++++++++ .../models/x/user_retrieve_tweets_params.rb | 4 +- .../models/x/user_retrieve_tweets_response.rb | 8 +- ...user_retrieve_verified_followers_params.rb | 4 +- ...er_retrieve_verified_followers_response.rb | 105 ++++++++ lib/x_twitter_scraper/models/x/x_account.rb | 2 + .../models/x/x_account_detail.rb | 2 + .../models/x_get_article_response.rb | 6 +- .../models/x_get_home_timeline_params.rb | 4 +- .../models/x_get_home_timeline_response.rb | 8 +- .../models/x_get_notifications_params.rb | 4 +- .../models/x_get_trends_response.rb | 57 ++++ lib/x_twitter_scraper/resources/drafts.rb | 2 +- lib/x_twitter_scraper/resources/draws.rb | 6 +- lib/x_twitter_scraper/resources/events.rb | 8 +- .../resources/extractions.rb | 24 +- .../resources/integrations.rb | 6 +- lib/x_twitter_scraper/resources/monitors.rb | 4 +- .../resources/support/tickets.rb | 11 +- lib/x_twitter_scraper/resources/trends.rb | 4 +- lib/x_twitter_scraper/resources/webhooks.rb | 4 +- lib/x_twitter_scraper/resources/x.rb | 16 +- lib/x_twitter_scraper/resources/x/accounts.rb | 4 +- .../resources/x/bookmarks.rb | 2 +- .../resources/x/communities.rb | 24 +- .../resources/x/communities/join.rb | 4 +- .../resources/x/communities/tweets.rb | 10 +- lib/x_twitter_scraper/resources/x/dm.rb | 4 +- lib/x_twitter_scraper/resources/x/lists.rb | 22 +- lib/x_twitter_scraper/resources/x/media.rb | 2 +- lib/x_twitter_scraper/resources/x/profile.rb | 6 +- lib/x_twitter_scraper/resources/x/tweets.rb | 40 +-- lib/x_twitter_scraper/resources/x/users.rb | 62 ++--- rbi/x_twitter_scraper/models/api_key.rbi | 1 + .../models/api_key_list_response.rbi | 1 + rbi/x_twitter_scraper/models/delivery.rbi | 1 + rbi/x_twitter_scraper/models/draft.rbi | 1 + .../models/draft_create_response.rbi | 1 + rbi/x_twitter_scraper/models/draft_detail.rbi | 1 + .../models/draft_list_params.rbi | 2 + .../models/draft_list_response.rbi | 1 + .../models/draft_retrieve_response.rbi | 1 + rbi/x_twitter_scraper/models/draw_detail.rbi | 1 + .../models/draw_export_params.rbi | 3 + .../models/draw_list_item.rbi | 1 + .../models/draw_list_params.rbi | 6 +- .../models/draw_list_response.rbi | 1 + .../models/draw_retrieve_response.rbi | 9 +- .../models/draw_run_response.rbi | 1 + rbi/x_twitter_scraper/models/error.rbi | 1 + rbi/x_twitter_scraper/models/event.rbi | 13 +- rbi/x_twitter_scraper/models/event_detail.rbi | 4 + .../models/event_list_params.rbi | 11 +- .../models/event_list_response.rbi | 13 +- .../models/event_retrieve_response.rbi | 4 + rbi/x_twitter_scraper/models/event_type.rbi | 1 + .../extraction_estimate_cost_params.rbi | 15 +- .../extraction_export_results_params.rbi | 9 +- .../models/extraction_job.rbi | 4 + .../models/extraction_list_params.rbi | 12 +- .../models/extraction_list_response.rbi | 4 + .../models/extraction_retrieve_params.rbi | 6 +- .../models/extraction_run_params.rbi | 3 + .../models/extraction_run_response.rbi | 9 +- rbi/x_twitter_scraper/models/integration.rbi | 4 + .../models/integration_create_params.rbi | 3 + .../models/integration_create_response.rbi | 4 + .../models/integration_delivery.rbi | 1 + .../integration_list_deliveries_params.rbi | 8 +- .../integration_list_deliveries_response.rbi | 1 + .../models/integration_list_response.rbi | 4 + .../models/integration_retrieve_response.rbi | 4 + .../models/integration_update_params.rbi | 3 + .../models/integration_update_response.rbi | 4 + rbi/x_twitter_scraper/models/monitor.rbi | 4 + .../models/monitor_create_params.rbi | 3 + .../models/monitor_create_response.rbi | 11 +- .../models/monitor_list_response.rbi | 4 + .../models/monitor_retrieve_response.rbi | 4 + .../models/monitor_update_params.rbi | 10 +- .../models/monitor_update_response.rbi | 4 + .../models/paginated_tweets.rbi | 6 +- .../models/paginated_users.rbi | 2 + rbi/x_twitter_scraper/models/radar_item.rbi | 1 + ...adar_retrieve_trending_topics_response.rbi | 1 + .../models/style_analyze_response.rbi | 1 + .../models/style_compare_response.rbi | 11 +- .../models/style_list_response.rbi | 1 + .../models/style_profile.rbi | 1 + .../models/style_profile_summary.rbi | 1 + .../models/trend_list_params.rbi | 2 + rbi/x_twitter_scraper/models/webhook.rbi | 12 +- .../models/webhook_create_params.rbi | 3 + .../models/webhook_create_response.rbi | 11 +- .../webhook_list_deliveries_response.rbi | 1 + .../models/webhook_list_response.rbi | 12 +- .../models/webhook_update_params.rbi | 3 + .../models/webhook_update_response.rbi | 12 +- rbi/x_twitter_scraper/models/winner.rbi | 1 + .../models/x/account_list_response.rbi | 1 + .../models/x/account_reauth_params.rbi | 8 +- .../models/x/account_retrieve_response.rbi | 1 + .../models/x/bookmark_list_params.rbi | 4 +- .../models/x/bookmark_list_response.rbi | 6 +- .../x/communities/join_create_params.rbi | 4 +- .../x/communities/join_create_response.rbi | 1 + .../x/communities/join_delete_all_params.rbi | 4 +- .../communities/join_delete_all_response.rbi | 1 + .../x/communities/tweet_list_params.rbi | 12 +- .../x/communities/tweet_list_response.rbi | 248 ++++++++++++++++++ .../models/x/community_action_result.rbi | 1 + .../models/x/community_create_params.rbi | 4 +- .../models/x/community_delete_params.rbi | 4 +- .../x/community_retrieve_info_response.rbi | 12 +- .../x/community_retrieve_members_response.rbi | 179 +++++++++++++ .../community_retrieve_moderators_params.rbi | 4 +- ...community_retrieve_moderators_response.rbi | 179 +++++++++++++ .../x/community_retrieve_search_params.rbi | 4 +- .../x/community_retrieve_search_response.rbi | 246 +++++++++++++++++ .../models/x/dm_retrieve_history_params.rbi | 4 +- .../models/x/dm_send_params.rbi | 4 +- .../x/list_retrieve_followers_params.rbi | 4 +- .../x/list_retrieve_followers_response.rbi | 179 +++++++++++++ .../models/x/list_retrieve_members_params.rbi | 4 +- .../x/list_retrieve_members_response.rbi | 179 +++++++++++++ .../models/x/list_retrieve_tweets_params.rbi | 4 +- .../x/list_retrieve_tweets_response.rbi | 246 +++++++++++++++++ .../models/x/media_upload_params.rbi | 4 +- .../models/x/profile_update_avatar_params.rbi | 4 +- .../models/x/profile_update_banner_params.rbi | 4 +- .../models/x/profile_update_params.rbi | 4 +- .../models/x/search_tweet.rbi | 5 +- .../models/x/tweet_author.rbi | 1 + .../models/x/tweet_detail.rbi | 17 +- .../models/x/tweet_get_favoriters_params.rbi | 4 +- .../x/tweet_get_favoriters_response.rbi | 2 + .../models/x/tweet_get_quotes_params.rbi | 16 +- .../models/x/tweet_get_quotes_response.rbi | 6 +- .../models/x/tweet_get_replies_params.rbi | 12 +- .../models/x/tweet_get_replies_response.rbi | 6 +- .../models/x/tweet_get_retweeters_params.rbi | 4 +- .../x/tweet_get_retweeters_response.rbi | 2 + .../models/x/tweet_get_thread_params.rbi | 4 +- .../models/x/tweet_get_thread_response.rbi | 6 +- .../models/x/tweet_list_response.rbi | 242 +++++++++++++++++ .../models/x/tweet_search_response.rbi | 6 +- .../models/x/user_profile.rbi | 1 + .../models/x/user_retrieve_batch_response.rbi | 179 +++++++++++++ .../x/user_retrieve_followers_params.rbi | 4 +- .../x/user_retrieve_followers_response.rbi | 179 +++++++++++++ ...ser_retrieve_followers_you_know_params.rbi | 4 +- ...r_retrieve_followers_you_know_response.rbi | 2 + .../x/user_retrieve_following_params.rbi | 8 +- .../x/user_retrieve_following_response.rbi | 179 +++++++++++++ .../models/x/user_retrieve_likes_params.rbi | 4 +- .../models/x/user_retrieve_likes_response.rbi | 6 +- .../models/x/user_retrieve_media_params.rbi | 4 +- .../models/x/user_retrieve_media_response.rbi | 6 +- .../x/user_retrieve_mentions_params.rbi | 12 +- .../x/user_retrieve_mentions_response.rbi | 246 +++++++++++++++++ .../models/x/user_retrieve_search_params.rbi | 8 +- .../x/user_retrieve_search_response.rbi | 179 +++++++++++++ .../models/x/user_retrieve_tweets_params.rbi | 4 +- .../x/user_retrieve_tweets_response.rbi | 6 +- ...ser_retrieve_verified_followers_params.rbi | 4 +- ...r_retrieve_verified_followers_response.rbi | 179 +++++++++++++ rbi/x_twitter_scraper/models/x/x_account.rbi | 1 + .../models/x/x_account_detail.rbi | 1 + .../models/x_get_article_response.rbi | 8 +- .../models/x_get_home_timeline_params.rbi | 4 +- .../models/x_get_home_timeline_response.rbi | 6 +- .../models/x_get_notifications_params.rbi | 4 +- .../models/x_get_trends_response.rbi | 102 +++++++ rbi/x_twitter_scraper/resources/drafts.rbi | 1 + rbi/x_twitter_scraper/resources/draws.rbi | 4 +- rbi/x_twitter_scraper/resources/events.rbi | 5 +- .../resources/extractions.rbi | 17 +- .../resources/integrations.rbi | 3 + rbi/x_twitter_scraper/resources/monitors.rbi | 2 + .../resources/support/tickets.rbi | 20 +- rbi/x_twitter_scraper/resources/trends.rbi | 3 +- rbi/x_twitter_scraper/resources/webhooks.rbi | 2 + rbi/x_twitter_scraper/resources/x.rbi | 14 +- .../resources/x/accounts.rbi | 4 +- .../resources/x/bookmarks.rbi | 2 +- .../resources/x/communities.rbi | 22 +- .../resources/x/communities/join.rbi | 4 +- .../resources/x/communities/tweets.rbi | 10 +- rbi/x_twitter_scraper/resources/x/dm.rbi | 4 +- rbi/x_twitter_scraper/resources/x/lists.rbi | 16 +- rbi/x_twitter_scraper/resources/x/media.rbi | 2 +- rbi/x_twitter_scraper/resources/x/profile.rbi | 6 +- rbi/x_twitter_scraper/resources/x/tweets.rbi | 32 +-- rbi/x_twitter_scraper/resources/x/users.rbi | 51 ++-- .../x/communities/tweet_list_response.rbs | 150 +++++++++++ .../x/community_retrieve_members_response.rbs | 115 ++++++++ ...community_retrieve_moderators_response.rbs | 115 ++++++++ .../x/community_retrieve_search_response.rbs | 148 +++++++++++ .../x/list_retrieve_followers_response.rbs | 115 ++++++++ .../x/list_retrieve_members_response.rbs | 115 ++++++++ .../x/list_retrieve_tweets_response.rbs | 148 +++++++++++ .../models/x/tweet_detail.rbs | 20 +- .../models/x/tweet_list_response.rbs | 148 +++++++++++ .../models/x/user_retrieve_batch_response.rbs | 115 ++++++++ .../x/user_retrieve_followers_response.rbs | 115 ++++++++ .../x/user_retrieve_following_response.rbs | 115 ++++++++ .../x/user_retrieve_mentions_response.rbs | 148 +++++++++++ .../x/user_retrieve_search_response.rbs | 115 ++++++++ ...r_retrieve_verified_followers_response.rbs | 115 ++++++++ .../models/x_get_trends_response.rbs | 63 +++++ sig/x_twitter_scraper/resources/x.rbs | 4 +- .../resources/x/communities.rbs | 6 +- .../resources/x/communities/tweets.rbs | 2 +- sig/x_twitter_scraper/resources/x/lists.rbs | 6 +- sig/x_twitter_scraper/resources/x/tweets.rbs | 2 +- sig/x_twitter_scraper/resources/x/users.rbs | 12 +- .../resources/account_test.rb | 2 +- .../resources/credits_test.rb | 2 +- .../resources/drafts_test.rb | 2 +- .../x_twitter_scraper/resources/draws_test.rb | 2 +- .../resources/extractions_test.rb | 4 +- .../resources/integrations_test.rb | 6 +- .../resources/monitors_test.rb | 6 +- .../resources/styles_test.rb | 2 +- .../resources/support/tickets_test.rb | 12 +- .../resources/webhooks_test.rb | 6 +- .../resources/x/accounts_test.rb | 8 +- .../resources/x/communities/join_test.rb | 4 +- .../resources/x/communities/tweets_test.rb | 10 +- .../resources/x/communities_test.rb | 34 ++- test/x_twitter_scraper/resources/x/dm_test.rb | 2 +- .../resources/x/lists_test.rb | 30 ++- .../resources/x/media_test.rb | 2 +- .../resources/x/profile_test.rb | 6 +- .../resources/x/tweets_test.rb | 13 +- .../resources/x/users_test.rb | 60 ++++- test/x_twitter_scraper/resources/x_test.rb | 10 +- 367 files changed, 7970 insertions(+), 623 deletions(-) create mode 100644 lib/x_twitter_scraper/models/x/communities/tweet_list_response.rb create mode 100644 lib/x_twitter_scraper/models/x/community_retrieve_members_response.rb create mode 100644 lib/x_twitter_scraper/models/x/community_retrieve_moderators_response.rb create mode 100644 lib/x_twitter_scraper/models/x/community_retrieve_search_response.rb create mode 100644 lib/x_twitter_scraper/models/x/list_retrieve_followers_response.rb create mode 100644 lib/x_twitter_scraper/models/x/list_retrieve_members_response.rb create mode 100644 lib/x_twitter_scraper/models/x/list_retrieve_tweets_response.rb create mode 100644 lib/x_twitter_scraper/models/x/tweet_list_response.rb create mode 100644 lib/x_twitter_scraper/models/x/user_retrieve_batch_response.rb create mode 100644 lib/x_twitter_scraper/models/x/user_retrieve_followers_response.rb create mode 100644 lib/x_twitter_scraper/models/x/user_retrieve_following_response.rb create mode 100644 lib/x_twitter_scraper/models/x/user_retrieve_mentions_response.rb create mode 100644 lib/x_twitter_scraper/models/x/user_retrieve_search_response.rb create mode 100644 lib/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rb create mode 100644 lib/x_twitter_scraper/models/x_get_trends_response.rb create mode 100644 rbi/x_twitter_scraper/models/x/communities/tweet_list_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/community_retrieve_members_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/community_retrieve_moderators_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/community_retrieve_search_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/list_retrieve_followers_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/list_retrieve_members_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/list_retrieve_tweets_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/tweet_list_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/user_retrieve_batch_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/user_retrieve_followers_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/user_retrieve_following_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/user_retrieve_mentions_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/user_retrieve_search_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x_get_trends_response.rbi create mode 100644 sig/x_twitter_scraper/models/x/communities/tweet_list_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/community_retrieve_members_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/community_retrieve_moderators_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/community_retrieve_search_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/list_retrieve_followers_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/list_retrieve_members_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/list_retrieve_tweets_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/tweet_list_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/user_retrieve_batch_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/user_retrieve_followers_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/user_retrieve_following_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/user_retrieve_mentions_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/user_retrieve_search_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rbs create mode 100644 sig/x_twitter_scraper/models/x_get_trends_response.rbs diff --git a/.stats.yml b/.stats.yml index 193a413..d99ab81 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 102 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-61e27e87d4182e5230beae1edaf864a00a5c5f9b96defcdb9a4503544463328f.yml -openapi_spec_hash: 782f8974cd27e51c8a7993f61b139f72 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-ec9b23603f987503f8837da5992b5db4c59a2bc627b090557539791a2b2b64a5.yml +openapi_spec_hash: faf6a6deaadba884a07e970fd05ac570 config_hash: 8894c96caeb6df84c9394518810221bd diff --git a/lib/x_twitter_scraper.rb b/lib/x_twitter_scraper.rb index 882c6db..dd663eb 100644 --- a/lib/x_twitter_scraper.rb +++ b/lib/x_twitter_scraper.rb @@ -195,6 +195,7 @@ require_relative "x_twitter_scraper/models/x/communities/join_delete_all_params" require_relative "x_twitter_scraper/models/x/communities/join_delete_all_response" require_relative "x_twitter_scraper/models/x/communities/tweet_list_params" +require_relative "x_twitter_scraper/models/x/communities/tweet_list_response" require_relative "x_twitter_scraper/models/x/community_action_result" require_relative "x_twitter_scraper/models/x/community_create_params" require_relative "x_twitter_scraper/models/x/community_create_response" @@ -203,8 +204,11 @@ require_relative "x_twitter_scraper/models/x/community_retrieve_info_params" require_relative "x_twitter_scraper/models/x/community_retrieve_info_response" require_relative "x_twitter_scraper/models/x/community_retrieve_members_params" +require_relative "x_twitter_scraper/models/x/community_retrieve_members_response" require_relative "x_twitter_scraper/models/x/community_retrieve_moderators_params" +require_relative "x_twitter_scraper/models/x/community_retrieve_moderators_response" require_relative "x_twitter_scraper/models/x/community_retrieve_search_params" +require_relative "x_twitter_scraper/models/x/community_retrieve_search_response" require_relative "x_twitter_scraper/models/x/dm_retrieve_history_params" require_relative "x_twitter_scraper/models/x/dm_retrieve_history_response" require_relative "x_twitter_scraper/models/x/dm_send_params" @@ -212,8 +216,11 @@ require_relative "x_twitter_scraper/models/x/follower_check_params" require_relative "x_twitter_scraper/models/x/follower_check_response" require_relative "x_twitter_scraper/models/x/list_retrieve_followers_params" +require_relative "x_twitter_scraper/models/x/list_retrieve_followers_response" require_relative "x_twitter_scraper/models/x/list_retrieve_members_params" +require_relative "x_twitter_scraper/models/x/list_retrieve_members_response" require_relative "x_twitter_scraper/models/x/list_retrieve_tweets_params" +require_relative "x_twitter_scraper/models/x/list_retrieve_tweets_response" require_relative "x_twitter_scraper/models/x/media_download_params" require_relative "x_twitter_scraper/models/x/media_download_response" require_relative "x_twitter_scraper/models/x/media_upload_params" @@ -240,23 +247,30 @@ require_relative "x_twitter_scraper/models/x/tweet_get_thread_params" require_relative "x_twitter_scraper/models/x/tweet_get_thread_response" require_relative "x_twitter_scraper/models/x/tweet_list_params" +require_relative "x_twitter_scraper/models/x/tweet_list_response" require_relative "x_twitter_scraper/models/x/tweet_search_params" require_relative "x_twitter_scraper/models/x/tweet_search_response" require_relative "x_twitter_scraper/models/x/user_profile" require_relative "x_twitter_scraper/models/x/user_retrieve_batch_params" +require_relative "x_twitter_scraper/models/x/user_retrieve_batch_response" require_relative "x_twitter_scraper/models/x/user_retrieve_followers_params" +require_relative "x_twitter_scraper/models/x/user_retrieve_followers_response" require_relative "x_twitter_scraper/models/x/user_retrieve_followers_you_know_params" require_relative "x_twitter_scraper/models/x/user_retrieve_followers_you_know_response" require_relative "x_twitter_scraper/models/x/user_retrieve_following_params" +require_relative "x_twitter_scraper/models/x/user_retrieve_following_response" require_relative "x_twitter_scraper/models/x/user_retrieve_likes_params" require_relative "x_twitter_scraper/models/x/user_retrieve_likes_response" require_relative "x_twitter_scraper/models/x/user_retrieve_media_params" require_relative "x_twitter_scraper/models/x/user_retrieve_media_response" require_relative "x_twitter_scraper/models/x/user_retrieve_mentions_params" +require_relative "x_twitter_scraper/models/x/user_retrieve_mentions_response" require_relative "x_twitter_scraper/models/x/user_retrieve_search_params" +require_relative "x_twitter_scraper/models/x/user_retrieve_search_response" require_relative "x_twitter_scraper/models/x/user_retrieve_tweets_params" require_relative "x_twitter_scraper/models/x/user_retrieve_tweets_response" require_relative "x_twitter_scraper/models/x/user_retrieve_verified_followers_params" +require_relative "x_twitter_scraper/models/x/user_retrieve_verified_followers_response" require_relative "x_twitter_scraper/models/x/x_account" require_relative "x_twitter_scraper/models/x/x_account_detail" require_relative "x_twitter_scraper/models/x_get_article_params" @@ -266,6 +280,7 @@ require_relative "x_twitter_scraper/models/x_get_notifications_params" require_relative "x_twitter_scraper/models/x_get_notifications_response" require_relative "x_twitter_scraper/models/x_get_trends_params" +require_relative "x_twitter_scraper/models/x_get_trends_response" require_relative "x_twitter_scraper/models" require_relative "x_twitter_scraper/resources/account" require_relative "x_twitter_scraper/resources/api_keys" diff --git a/lib/x_twitter_scraper/models/api_key.rb b/lib/x_twitter_scraper/models/api_key.rb index 4de62af..6334482 100644 --- a/lib/x_twitter_scraper/models/api_key.rb +++ b/lib/x_twitter_scraper/models/api_key.rb @@ -34,6 +34,8 @@ class APIKey < XTwitterScraper::Internal::Type::BaseModel optional :last_used_at, Time, api_name: :lastUsedAt # @!method initialize(id:, created_at:, is_active:, name:, prefix:, last_used_at: nil) + # API key metadata returned when listing keys. + # # @param id [String] # @param created_at [Time] # @param is_active [Boolean] diff --git a/lib/x_twitter_scraper/models/api_key_list_response.rb b/lib/x_twitter_scraper/models/api_key_list_response.rb index b06bc6d..3c95233 100644 --- a/lib/x_twitter_scraper/models/api_key_list_response.rb +++ b/lib/x_twitter_scraper/models/api_key_list_response.rb @@ -45,6 +45,8 @@ class Key < XTwitterScraper::Internal::Type::BaseModel optional :last_used_at, Time, api_name: :lastUsedAt # @!method initialize(id:, created_at:, is_active:, name:, prefix:, last_used_at: nil) + # API key metadata returned when listing keys. + # # @param id [String] # @param created_at [Time] # @param is_active [Boolean] diff --git a/lib/x_twitter_scraper/models/delivery.rb b/lib/x_twitter_scraper/models/delivery.rb index 02e3e99..5e125f0 100644 --- a/lib/x_twitter_scraper/models/delivery.rb +++ b/lib/x_twitter_scraper/models/delivery.rb @@ -44,6 +44,8 @@ class Delivery < XTwitterScraper::Internal::Type::BaseModel optional :last_status_code, Integer, api_name: :lastStatusCode # @!method initialize(id:, attempts:, created_at:, status:, stream_event_id:, delivered_at: nil, last_error: nil, last_status_code: nil) + # Webhook delivery attempt record with status and retry count. + # # @param id [String] # @param attempts [Integer] # @param created_at [Time] diff --git a/lib/x_twitter_scraper/models/draft.rb b/lib/x_twitter_scraper/models/draft.rb index 6d56b32..a0636f2 100644 --- a/lib/x_twitter_scraper/models/draft.rb +++ b/lib/x_twitter_scraper/models/draft.rb @@ -29,6 +29,8 @@ class Draft < XTwitterScraper::Internal::Type::BaseModel optional :topic, String # @!method initialize(id:, created_at:, text:, goal: nil, topic: nil) + # Saved tweet draft with optional topic and goal. + # # @param id [String] # @param created_at [Time] # @param text [String] diff --git a/lib/x_twitter_scraper/models/draft_create_response.rb b/lib/x_twitter_scraper/models/draft_create_response.rb index 4e07ae0..2b837c6 100644 --- a/lib/x_twitter_scraper/models/draft_create_response.rb +++ b/lib/x_twitter_scraper/models/draft_create_response.rb @@ -35,6 +35,8 @@ class DraftCreateResponse < XTwitterScraper::Internal::Type::BaseModel optional :topic, String # @!method initialize(id:, created_at:, text:, updated_at:, goal: nil, topic: nil) + # Full tweet draft including update timestamp. + # # @param id [String] # @param created_at [Time] # @param text [String] diff --git a/lib/x_twitter_scraper/models/draft_detail.rb b/lib/x_twitter_scraper/models/draft_detail.rb index 7bdb74c..d9ff415 100644 --- a/lib/x_twitter_scraper/models/draft_detail.rb +++ b/lib/x_twitter_scraper/models/draft_detail.rb @@ -34,6 +34,8 @@ class DraftDetail < XTwitterScraper::Internal::Type::BaseModel optional :topic, String # @!method initialize(id:, created_at:, text:, updated_at:, goal: nil, topic: nil) + # Full tweet draft including update timestamp. + # # @param id [String] # @param created_at [Time] # @param text [String] diff --git a/lib/x_twitter_scraper/models/draft_list_params.rb b/lib/x_twitter_scraper/models/draft_list_params.rb index 6bbfbba..2dfbeb3 100644 --- a/lib/x_twitter_scraper/models/draft_list_params.rb +++ b/lib/x_twitter_scraper/models/draft_list_params.rb @@ -14,6 +14,7 @@ class DraftListParams < XTwitterScraper::Internal::Type::BaseModel optional :after_cursor, String # @!attribute limit + # Maximum number of items to return (1-100, default 50) # # @return [Integer, nil] optional :limit, Integer @@ -21,7 +22,7 @@ class DraftListParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(after_cursor: nil, limit: nil, request_options: {}) # @param after_cursor [String] Cursor for pagination # - # @param limit [Integer] + # @param limit [Integer] Maximum number of items to return (1-100, default 50) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/x_twitter_scraper/models/draft_list_response.rb b/lib/x_twitter_scraper/models/draft_list_response.rb index f1df738..4880809 100644 --- a/lib/x_twitter_scraper/models/draft_list_response.rb +++ b/lib/x_twitter_scraper/models/draft_list_response.rb @@ -52,6 +52,8 @@ class Draft < XTwitterScraper::Internal::Type::BaseModel optional :topic, String # @!method initialize(id:, created_at:, text:, goal: nil, topic: nil) + # Saved tweet draft with optional topic and goal. + # # @param id [String] # @param created_at [Time] # @param text [String] diff --git a/lib/x_twitter_scraper/models/draft_retrieve_response.rb b/lib/x_twitter_scraper/models/draft_retrieve_response.rb index c6a7eb4..2f0e9ad 100644 --- a/lib/x_twitter_scraper/models/draft_retrieve_response.rb +++ b/lib/x_twitter_scraper/models/draft_retrieve_response.rb @@ -35,6 +35,8 @@ class DraftRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel optional :topic, String # @!method initialize(id:, created_at:, text:, updated_at:, goal: nil, topic: nil) + # Full tweet draft including update timestamp. + # # @param id [String] # @param created_at [Time] # @param text [String] diff --git a/lib/x_twitter_scraper/models/draw_detail.rb b/lib/x_twitter_scraper/models/draw_detail.rb index ae206b2..bbadc13 100644 --- a/lib/x_twitter_scraper/models/draw_detail.rb +++ b/lib/x_twitter_scraper/models/draw_detail.rb @@ -74,6 +74,8 @@ class DrawDetail < XTwitterScraper::Internal::Type::BaseModel optional :drawn_at, Time, api_name: :drawnAt # @!method initialize(id:, created_at:, status:, total_entries:, tweet_author_username:, tweet_id:, tweet_like_count:, tweet_quote_count:, tweet_reply_count:, tweet_retweet_count:, tweet_text:, tweet_url:, valid_entries:, drawn_at: nil) + # Full giveaway draw with tweet metrics, entries, and timing. + # # @param id [String] # @param created_at [Time] # @param status [String] diff --git a/lib/x_twitter_scraper/models/draw_export_params.rb b/lib/x_twitter_scraper/models/draw_export_params.rb index dc28898..b5e8200 100644 --- a/lib/x_twitter_scraper/models/draw_export_params.rb +++ b/lib/x_twitter_scraper/models/draw_export_params.rb @@ -13,6 +13,7 @@ class DrawExportParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute format_ + # Export output format # # @return [Symbol, XTwitterScraper::Models::DrawExportParams::Format, nil] optional :format_, enum: -> { XTwitterScraper::DrawExportParams::Format } @@ -26,12 +27,13 @@ class DrawExportParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, format_: nil, type: nil, request_options: {}) # @param id [String] # - # @param format_ [Symbol, XTwitterScraper::Models::DrawExportParams::Format] + # @param format_ [Symbol, XTwitterScraper::Models::DrawExportParams::Format] Export output format # # @param type [Symbol, XTwitterScraper::Models::DrawExportParams::Type] Export winners or all entries # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + # Export output format module Format extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/draw_list_item.rb b/lib/x_twitter_scraper/models/draw_list_item.rb index efa2f03..a33f06d 100644 --- a/lib/x_twitter_scraper/models/draw_list_item.rb +++ b/lib/x_twitter_scraper/models/draw_list_item.rb @@ -39,6 +39,8 @@ class DrawListItem < XTwitterScraper::Internal::Type::BaseModel optional :drawn_at, Time, api_name: :drawnAt # @!method initialize(id:, created_at:, status:, total_entries:, tweet_url:, valid_entries:, drawn_at: nil) + # Giveaway draw summary with entry counts and status. + # # @param id [String] # @param created_at [Time] # @param status [String] diff --git a/lib/x_twitter_scraper/models/draw_list_params.rb b/lib/x_twitter_scraper/models/draw_list_params.rb index 0400420..41cf8af 100644 --- a/lib/x_twitter_scraper/models/draw_list_params.rb +++ b/lib/x_twitter_scraper/models/draw_list_params.rb @@ -8,20 +8,21 @@ class DrawListParams < XTwitterScraper::Internal::Type::BaseModel include XTwitterScraper::Internal::Type::RequestParameters # @!attribute after - # Cursor for pagination + # Cursor for keyset pagination # # @return [String, nil] optional :after, String # @!attribute limit + # Maximum number of items to return (1-100, default 50) # # @return [Integer, nil] optional :limit, Integer # @!method initialize(after: nil, limit: nil, request_options: {}) - # @param after [String] Cursor for pagination + # @param after [String] Cursor for keyset pagination # - # @param limit [Integer] + # @param limit [Integer] Maximum number of items to return (1-100, default 50) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/x_twitter_scraper/models/draw_list_response.rb b/lib/x_twitter_scraper/models/draw_list_response.rb index 038b4ad..62d5424 100644 --- a/lib/x_twitter_scraper/models/draw_list_response.rb +++ b/lib/x_twitter_scraper/models/draw_list_response.rb @@ -62,6 +62,8 @@ class Draw < XTwitterScraper::Internal::Type::BaseModel optional :drawn_at, Time, api_name: :drawnAt # @!method initialize(id:, created_at:, status:, total_entries:, tweet_url:, valid_entries:, drawn_at: nil) + # Giveaway draw summary with entry counts and status. + # # @param id [String] # @param created_at [Time] # @param status [String] diff --git a/lib/x_twitter_scraper/models/draw_retrieve_response.rb b/lib/x_twitter_scraper/models/draw_retrieve_response.rb index ca76c5e..f682bb0 100644 --- a/lib/x_twitter_scraper/models/draw_retrieve_response.rb +++ b/lib/x_twitter_scraper/models/draw_retrieve_response.rb @@ -5,6 +5,7 @@ module Models # @see XTwitterScraper::Resources::Draws#retrieve class DrawRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel # @!attribute draw + # Full giveaway draw with tweet metrics, entries, and timing. # # @return [XTwitterScraper::Models::DrawRetrieveResponse::Draw] required :draw, -> { XTwitterScraper::Models::DrawRetrieveResponse::Draw } @@ -16,7 +17,8 @@ class DrawRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::DrawRetrieveResponse::Winner] } # @!method initialize(draw:, winners:) - # @param draw [XTwitterScraper::Models::DrawRetrieveResponse::Draw] + # @param draw [XTwitterScraper::Models::DrawRetrieveResponse::Draw] Full giveaway draw with tweet metrics, entries, and timing. + # # @param winners [Array] # @see XTwitterScraper::Models::DrawRetrieveResponse#draw @@ -92,6 +94,8 @@ class Draw < XTwitterScraper::Internal::Type::BaseModel optional :drawn_at, Time, api_name: :drawnAt # @!method initialize(id:, created_at:, status:, total_entries:, tweet_author_username:, tweet_id:, tweet_like_count:, tweet_quote_count:, tweet_reply_count:, tweet_retweet_count:, tweet_text:, tweet_url:, valid_entries:, drawn_at: nil) + # Full giveaway draw with tweet metrics, entries, and timing. + # # @param id [String] # @param created_at [Time] # @param status [String] @@ -130,6 +134,8 @@ class Winner < XTwitterScraper::Internal::Type::BaseModel required :tweet_id, String, api_name: :tweetId # @!method initialize(author_username:, is_backup:, position:, tweet_id:) + # Giveaway draw winner with position and backup flag. + # # @param author_username [String] # @param is_backup [Boolean] # @param position [Integer] diff --git a/lib/x_twitter_scraper/models/draw_run_response.rb b/lib/x_twitter_scraper/models/draw_run_response.rb index 6e7eaa3..53ce0c9 100644 --- a/lib/x_twitter_scraper/models/draw_run_response.rb +++ b/lib/x_twitter_scraper/models/draw_run_response.rb @@ -59,6 +59,8 @@ class Winner < XTwitterScraper::Internal::Type::BaseModel required :tweet_id, String, api_name: :tweetId # @!method initialize(author_username:, is_backup:, position:, tweet_id:) + # Giveaway draw winner with position and backup flag. + # # @param author_username [String] # @param is_backup [Boolean] # @param position [Integer] diff --git a/lib/x_twitter_scraper/models/error.rb b/lib/x_twitter_scraper/models/error.rb index ae5bc7f..d8d81c8 100644 --- a/lib/x_twitter_scraper/models/error.rb +++ b/lib/x_twitter_scraper/models/error.rb @@ -9,6 +9,8 @@ class Error < XTwitterScraper::Internal::Type::BaseModel required :error, enum: -> { XTwitterScraper::Error::Error } # @!method initialize(error:) + # Error response containing a machine-readable error code. + # # @param error [Symbol, XTwitterScraper::Models::Error::Error] # @see XTwitterScraper::Models::Error#error diff --git a/lib/x_twitter_scraper/models/event.rb b/lib/x_twitter_scraper/models/event.rb index a35358b..e503351 100644 --- a/lib/x_twitter_scraper/models/event.rb +++ b/lib/x_twitter_scraper/models/event.rb @@ -24,6 +24,7 @@ class Event < XTwitterScraper::Internal::Type::BaseModel required :occurred_at, Time, api_name: :occurredAt # @!attribute type + # Type of monitor event fired when account activity occurs. # # @return [Symbol, XTwitterScraper::Models::Event::Type] required :type, enum: -> { XTwitterScraper::Event::Type } @@ -34,13 +35,22 @@ class Event < XTwitterScraper::Internal::Type::BaseModel required :username, String # @!method initialize(id:, data:, monitor_id:, occurred_at:, type:, username:) + # Monitor event summary with type, username, and occurrence time. + # # @param id [String] + # # @param data [Hash{Symbol=>Object}] + # # @param monitor_id [String] + # # @param occurred_at [Time] - # @param type [Symbol, XTwitterScraper::Models::Event::Type] + # + # @param type [Symbol, XTwitterScraper::Models::Event::Type] Type of monitor event fired when account activity occurs. + # # @param username [String] + # Type of monitor event fired when account activity occurs. + # # @see XTwitterScraper::Models::Event#type module Type extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/event_detail.rb b/lib/x_twitter_scraper/models/event_detail.rb index 299db4c..e101b66 100644 --- a/lib/x_twitter_scraper/models/event_detail.rb +++ b/lib/x_twitter_scraper/models/event_detail.rb @@ -25,6 +25,7 @@ class EventDetail < XTwitterScraper::Internal::Type::BaseModel required :occurred_at, Time, api_name: :occurredAt # @!attribute type + # Type of monitor event fired when account activity occurs. # # @return [Symbol, XTwitterScraper::Models::EventDetail::Type] required :type, enum: -> { XTwitterScraper::EventDetail::Type } @@ -40,6 +41,8 @@ class EventDetail < XTwitterScraper::Internal::Type::BaseModel optional :x_event_id, String, api_name: :xEventId # @!method initialize(id:, data:, monitor_id:, occurred_at:, type:, username:, x_event_id: nil) + # Full monitor event including payload data and optional X event ID. + # # @param id [String] # # @param data [Hash{Symbol=>Object}] Event payload — shape varies by event type (JSON) @@ -48,12 +51,14 @@ class EventDetail < XTwitterScraper::Internal::Type::BaseModel # # @param occurred_at [Time] # - # @param type [Symbol, XTwitterScraper::Models::EventDetail::Type] + # @param type [Symbol, XTwitterScraper::Models::EventDetail::Type] Type of monitor event fired when account activity occurs. # # @param username [String] # # @param x_event_id [String] + # Type of monitor event fired when account activity occurs. + # # @see XTwitterScraper::Models::EventDetail#type module Type extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/event_list_params.rb b/lib/x_twitter_scraper/models/event_list_params.rb index 13db128..acca003 100644 --- a/lib/x_twitter_scraper/models/event_list_params.rb +++ b/lib/x_twitter_scraper/models/event_list_params.rb @@ -8,37 +8,41 @@ class EventListParams < XTwitterScraper::Internal::Type::BaseModel include XTwitterScraper::Internal::Type::RequestParameters # @!attribute after - # Cursor for pagination + # Cursor for keyset pagination # # @return [String, nil] optional :after, String # @!attribute event_type + # Filter events by type # # @return [Symbol, XTwitterScraper::Models::EventListParams::EventType, nil] optional :event_type, enum: -> { XTwitterScraper::EventListParams::EventType } # @!attribute limit + # Maximum number of items to return (1-100, default 50) # # @return [Integer, nil] optional :limit, Integer # @!attribute monitor_id + # Filter events by monitor ID # # @return [String, nil] optional :monitor_id, String # @!method initialize(after: nil, event_type: nil, limit: nil, monitor_id: nil, request_options: {}) - # @param after [String] Cursor for pagination + # @param after [String] Cursor for keyset pagination # - # @param event_type [Symbol, XTwitterScraper::Models::EventListParams::EventType] + # @param event_type [Symbol, XTwitterScraper::Models::EventListParams::EventType] Filter events by type # - # @param limit [Integer] + # @param limit [Integer] Maximum number of items to return (1-100, default 50) # - # @param monitor_id [String] + # @param monitor_id [String] Filter events by monitor ID # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + # Filter events by type module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/event_list_response.rb b/lib/x_twitter_scraper/models/event_list_response.rb index f9755db..113e505 100644 --- a/lib/x_twitter_scraper/models/event_list_response.rb +++ b/lib/x_twitter_scraper/models/event_list_response.rb @@ -47,6 +47,7 @@ class Event < XTwitterScraper::Internal::Type::BaseModel required :occurred_at, Time, api_name: :occurredAt # @!attribute type + # Type of monitor event fired when account activity occurs. # # @return [Symbol, XTwitterScraper::Models::EventListResponse::Event::Type] required :type, enum: -> { XTwitterScraper::Models::EventListResponse::Event::Type } @@ -57,13 +58,22 @@ class Event < XTwitterScraper::Internal::Type::BaseModel required :username, String # @!method initialize(id:, data:, monitor_id:, occurred_at:, type:, username:) + # Monitor event summary with type, username, and occurrence time. + # # @param id [String] + # # @param data [Hash{Symbol=>Object}] + # # @param monitor_id [String] + # # @param occurred_at [Time] - # @param type [Symbol, XTwitterScraper::Models::EventListResponse::Event::Type] + # + # @param type [Symbol, XTwitterScraper::Models::EventListResponse::Event::Type] Type of monitor event fired when account activity occurs. + # # @param username [String] + # Type of monitor event fired when account activity occurs. + # # @see XTwitterScraper::Models::EventListResponse::Event#type module Type extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/event_retrieve_response.rb b/lib/x_twitter_scraper/models/event_retrieve_response.rb index 09193e0..ef5539c 100644 --- a/lib/x_twitter_scraper/models/event_retrieve_response.rb +++ b/lib/x_twitter_scraper/models/event_retrieve_response.rb @@ -26,6 +26,7 @@ class EventRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel required :occurred_at, Time, api_name: :occurredAt # @!attribute type + # Type of monitor event fired when account activity occurs. # # @return [Symbol, XTwitterScraper::Models::EventRetrieveResponse::Type] required :type, enum: -> { XTwitterScraper::Models::EventRetrieveResponse::Type } @@ -41,6 +42,8 @@ class EventRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel optional :x_event_id, String, api_name: :xEventId # @!method initialize(id:, data:, monitor_id:, occurred_at:, type:, username:, x_event_id: nil) + # Full monitor event including payload data and optional X event ID. + # # @param id [String] # # @param data [Hash{Symbol=>Object}] Event payload — shape varies by event type (JSON) @@ -49,12 +52,14 @@ class EventRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel # # @param occurred_at [Time] # - # @param type [Symbol, XTwitterScraper::Models::EventRetrieveResponse::Type] + # @param type [Symbol, XTwitterScraper::Models::EventRetrieveResponse::Type] Type of monitor event fired when account activity occurs. # # @param username [String] # # @param x_event_id [String] + # Type of monitor event fired when account activity occurs. + # # @see XTwitterScraper::Models::EventRetrieveResponse#type module Type extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/event_type.rb b/lib/x_twitter_scraper/models/event_type.rb index 7ca187b..05de66d 100644 --- a/lib/x_twitter_scraper/models/event_type.rb +++ b/lib/x_twitter_scraper/models/event_type.rb @@ -2,6 +2,7 @@ module XTwitterScraper module Models + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/extraction_estimate_cost_params.rb b/lib/x_twitter_scraper/models/extraction_estimate_cost_params.rb index fceb8ca..9e89691 100644 --- a/lib/x_twitter_scraper/models/extraction_estimate_cost_params.rb +++ b/lib/x_twitter_scraper/models/extraction_estimate_cost_params.rb @@ -8,6 +8,7 @@ class ExtractionEstimateCostParams < XTwitterScraper::Internal::Type::BaseModel include XTwitterScraper::Internal::Type::RequestParameters # @!attribute tool_type + # Identifier for the extraction tool used to run a job. # # @return [Symbol, XTwitterScraper::Models::ExtractionEstimateCostParams::ToolType] required :tool_type, @@ -15,19 +16,19 @@ class ExtractionEstimateCostParams < XTwitterScraper::Internal::Type::BaseModel api_name: :toolType # @!attribute advanced_query - # Raw advanced search query appended as-is (tweet_search_extractor) + # Raw advanced query string appended to the estimate (tweet_search_extractor) # # @return [String, nil] optional :advanced_query, String, api_name: :advancedQuery # @!attribute exact_phrase - # Exact phrase to match (tweet_search_extractor) + # Exact phrase filter for search estimation # # @return [String, nil] optional :exact_phrase, String, api_name: :exactPhrase # @!attribute exclude_words - # Words to exclude from results (tweet_search_extractor) + # Words excluded from estimated search results # # @return [String, nil] optional :exclude_words, String, api_name: :excludeWords @@ -63,13 +64,13 @@ class ExtractionEstimateCostParams < XTwitterScraper::Internal::Type::BaseModel optional :target_username, String, api_name: :targetUsername # @!method initialize(tool_type:, advanced_query: nil, exact_phrase: nil, exclude_words: nil, search_query: nil, target_community_id: nil, target_list_id: nil, target_space_id: nil, target_tweet_id: nil, target_username: nil, request_options: {}) - # @param tool_type [Symbol, XTwitterScraper::Models::ExtractionEstimateCostParams::ToolType] + # @param tool_type [Symbol, XTwitterScraper::Models::ExtractionEstimateCostParams::ToolType] Identifier for the extraction tool used to run a job. # - # @param advanced_query [String] Raw advanced search query appended as-is (tweet_search_extractor) + # @param advanced_query [String] Raw advanced query string appended to the estimate (tweet_search_extractor) # - # @param exact_phrase [String] Exact phrase to match (tweet_search_extractor) + # @param exact_phrase [String] Exact phrase filter for search estimation # - # @param exclude_words [String] Words to exclude from results (tweet_search_extractor) + # @param exclude_words [String] Words excluded from estimated search results # # @param search_query [String] # @@ -85,6 +86,7 @@ class ExtractionEstimateCostParams < XTwitterScraper::Internal::Type::BaseModel # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + # Identifier for the extraction tool used to run a job. module ToolType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/extraction_export_results_params.rb b/lib/x_twitter_scraper/models/extraction_export_results_params.rb index f7b8b44..4b0ac77 100644 --- a/lib/x_twitter_scraper/models/extraction_export_results_params.rb +++ b/lib/x_twitter_scraper/models/extraction_export_results_params.rb @@ -13,15 +13,19 @@ class ExtractionExportResultsParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute format_ + # Export file format # # @return [Symbol, XTwitterScraper::Models::ExtractionExportResultsParams::Format, nil] optional :format_, enum: -> { XTwitterScraper::ExtractionExportResultsParams::Format } # @!method initialize(id:, format_: nil, request_options: {}) # @param id [String] - # @param format_ [Symbol, XTwitterScraper::Models::ExtractionExportResultsParams::Format] + # + # @param format_ [Symbol, XTwitterScraper::Models::ExtractionExportResultsParams::Format] Export file format + # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + # Export file format module Format extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/extraction_job.rb b/lib/x_twitter_scraper/models/extraction_job.rb index 7015b46..f899fe0 100644 --- a/lib/x_twitter_scraper/models/extraction_job.rb +++ b/lib/x_twitter_scraper/models/extraction_job.rb @@ -19,6 +19,7 @@ class ExtractionJob < XTwitterScraper::Internal::Type::BaseModel required :status, enum: -> { XTwitterScraper::ExtractionJob::Status } # @!attribute tool_type + # Identifier for the extraction tool used to run a job. # # @return [Symbol, XTwitterScraper::Models::ExtractionJob::ToolType] required :tool_type, enum: -> { XTwitterScraper::ExtractionJob::ToolType }, api_name: :toolType @@ -34,11 +35,18 @@ class ExtractionJob < XTwitterScraper::Internal::Type::BaseModel optional :completed_at, Time, api_name: :completedAt # @!method initialize(id:, created_at:, status:, tool_type:, total_results:, completed_at: nil) + # Extraction job tracking status, tool type, and result count. + # # @param id [String] + # # @param created_at [Time] + # # @param status [Symbol, XTwitterScraper::Models::ExtractionJob::Status] - # @param tool_type [Symbol, XTwitterScraper::Models::ExtractionJob::ToolType] + # + # @param tool_type [Symbol, XTwitterScraper::Models::ExtractionJob::ToolType] Identifier for the extraction tool used to run a job. + # # @param total_results [Integer] + # # @param completed_at [Time] # @see XTwitterScraper::Models::ExtractionJob#status @@ -53,6 +61,8 @@ module Status # @return [Array] end + # Identifier for the extraction tool used to run a job. + # # @see XTwitterScraper::Models::ExtractionJob#tool_type module ToolType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/extraction_list_params.rb b/lib/x_twitter_scraper/models/extraction_list_params.rb index d81be77..940f521 100644 --- a/lib/x_twitter_scraper/models/extraction_list_params.rb +++ b/lib/x_twitter_scraper/models/extraction_list_params.rb @@ -8,37 +8,41 @@ class ExtractionListParams < XTwitterScraper::Internal::Type::BaseModel include XTwitterScraper::Internal::Type::RequestParameters # @!attribute after - # Cursor for pagination + # Cursor for keyset pagination # # @return [String, nil] optional :after, String # @!attribute limit + # Maximum number of items to return (1-100, default 50) # # @return [Integer, nil] optional :limit, Integer # @!attribute status + # Filter by job status # # @return [Symbol, XTwitterScraper::Models::ExtractionListParams::Status, nil] optional :status, enum: -> { XTwitterScraper::ExtractionListParams::Status } # @!attribute tool_type + # Filter by extraction tool type # # @return [Symbol, XTwitterScraper::Models::ExtractionListParams::ToolType, nil] optional :tool_type, enum: -> { XTwitterScraper::ExtractionListParams::ToolType } # @!method initialize(after: nil, limit: nil, status: nil, tool_type: nil, request_options: {}) - # @param after [String] Cursor for pagination + # @param after [String] Cursor for keyset pagination # - # @param limit [Integer] + # @param limit [Integer] Maximum number of items to return (1-100, default 50) # - # @param status [Symbol, XTwitterScraper::Models::ExtractionListParams::Status] + # @param status [Symbol, XTwitterScraper::Models::ExtractionListParams::Status] Filter by job status # - # @param tool_type [Symbol, XTwitterScraper::Models::ExtractionListParams::ToolType] + # @param tool_type [Symbol, XTwitterScraper::Models::ExtractionListParams::ToolType] Filter by extraction tool type # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + # Filter by job status module Status extend XTwitterScraper::Internal::Type::Enum @@ -50,6 +54,7 @@ module Status # @return [Array] end + # Filter by extraction tool type module ToolType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/extraction_list_response.rb b/lib/x_twitter_scraper/models/extraction_list_response.rb index 7b780a9..20efe36 100644 --- a/lib/x_twitter_scraper/models/extraction_list_response.rb +++ b/lib/x_twitter_scraper/models/extraction_list_response.rb @@ -42,6 +42,7 @@ class Extraction < XTwitterScraper::Internal::Type::BaseModel required :status, enum: -> { XTwitterScraper::Models::ExtractionListResponse::Extraction::Status } # @!attribute tool_type + # Identifier for the extraction tool used to run a job. # # @return [Symbol, XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType] required :tool_type, @@ -59,11 +60,18 @@ class Extraction < XTwitterScraper::Internal::Type::BaseModel optional :completed_at, Time, api_name: :completedAt # @!method initialize(id:, created_at:, status:, tool_type:, total_results:, completed_at: nil) + # Extraction job tracking status, tool type, and result count. + # # @param id [String] + # # @param created_at [Time] + # # @param status [Symbol, XTwitterScraper::Models::ExtractionListResponse::Extraction::Status] - # @param tool_type [Symbol, XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType] + # + # @param tool_type [Symbol, XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType] Identifier for the extraction tool used to run a job. + # # @param total_results [Integer] + # # @param completed_at [Time] # @see XTwitterScraper::Models::ExtractionListResponse::Extraction#status @@ -78,6 +86,8 @@ module Status # @return [Array] end + # Identifier for the extraction tool used to run a job. + # # @see XTwitterScraper::Models::ExtractionListResponse::Extraction#tool_type module ToolType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/extraction_retrieve_params.rb b/lib/x_twitter_scraper/models/extraction_retrieve_params.rb index e05d31a..c0fdd21 100644 --- a/lib/x_twitter_scraper/models/extraction_retrieve_params.rb +++ b/lib/x_twitter_scraper/models/extraction_retrieve_params.rb @@ -13,12 +13,13 @@ class ExtractionRetrieveParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute after - # Cursor for pagination + # Cursor for keyset pagination # # @return [String, nil] optional :after, String # @!attribute limit + # Maximum number of results to return (1-1000, default 100) # # @return [Integer, nil] optional :limit, Integer @@ -26,9 +27,9 @@ class ExtractionRetrieveParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, after: nil, limit: nil, request_options: {}) # @param id [String] # - # @param after [String] Cursor for pagination + # @param after [String] Cursor for keyset pagination # - # @param limit [Integer] + # @param limit [Integer] Maximum number of results to return (1-1000, default 100) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/x_twitter_scraper/models/extraction_run_params.rb b/lib/x_twitter_scraper/models/extraction_run_params.rb index 0c24e34..9026fbf 100644 --- a/lib/x_twitter_scraper/models/extraction_run_params.rb +++ b/lib/x_twitter_scraper/models/extraction_run_params.rb @@ -8,6 +8,7 @@ class ExtractionRunParams < XTwitterScraper::Internal::Type::BaseModel include XTwitterScraper::Internal::Type::RequestParameters # @!attribute tool_type + # Identifier for the extraction tool used to run a job. # # @return [Symbol, XTwitterScraper::Models::ExtractionRunParams::ToolType] required :tool_type, enum: -> { XTwitterScraper::ExtractionRunParams::ToolType }, api_name: :toolType @@ -61,7 +62,7 @@ class ExtractionRunParams < XTwitterScraper::Internal::Type::BaseModel optional :target_username, String, api_name: :targetUsername # @!method initialize(tool_type:, advanced_query: nil, exact_phrase: nil, exclude_words: nil, search_query: nil, target_community_id: nil, target_list_id: nil, target_space_id: nil, target_tweet_id: nil, target_username: nil, request_options: {}) - # @param tool_type [Symbol, XTwitterScraper::Models::ExtractionRunParams::ToolType] + # @param tool_type [Symbol, XTwitterScraper::Models::ExtractionRunParams::ToolType] Identifier for the extraction tool used to run a job. # # @param advanced_query [String] Raw advanced search query appended as-is (tweet_search_extractor) # @@ -83,6 +84,7 @@ class ExtractionRunParams < XTwitterScraper::Internal::Type::BaseModel # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + # Identifier for the extraction tool used to run a job. module ToolType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/extraction_run_response.rb b/lib/x_twitter_scraper/models/extraction_run_response.rb index b56aa38..d8e1dd2 100644 --- a/lib/x_twitter_scraper/models/extraction_run_response.rb +++ b/lib/x_twitter_scraper/models/extraction_run_response.rb @@ -15,6 +15,7 @@ class ExtractionRunResponse < XTwitterScraper::Internal::Type::BaseModel required :status, enum: -> { XTwitterScraper::Models::ExtractionRunResponse::Status } # @!attribute tool_type + # Identifier for the extraction tool used to run a job. # # @return [Symbol, XTwitterScraper::Models::ExtractionRunResponse::ToolType] required :tool_type, @@ -23,8 +24,10 @@ class ExtractionRunResponse < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, status:, tool_type:) # @param id [String] + # # @param status [Symbol, XTwitterScraper::Models::ExtractionRunResponse::Status] - # @param tool_type [Symbol, XTwitterScraper::Models::ExtractionRunResponse::ToolType] + # + # @param tool_type [Symbol, XTwitterScraper::Models::ExtractionRunResponse::ToolType] Identifier for the extraction tool used to run a job. # @see XTwitterScraper::Models::ExtractionRunResponse#status module Status @@ -36,6 +39,8 @@ module Status # @return [Array] end + # Identifier for the extraction tool used to run a job. + # # @see XTwitterScraper::Models::ExtractionRunResponse#tool_type module ToolType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/integration.rb b/lib/x_twitter_scraper/models/integration.rb index ab6ff49..2450b69 100644 --- a/lib/x_twitter_scraper/models/integration.rb +++ b/lib/x_twitter_scraper/models/integration.rb @@ -20,6 +20,7 @@ class Integration < XTwitterScraper::Internal::Type::BaseModel required :created_at, Time, api_name: :createdAt # @!attribute event_types + # Array of event types to subscribe to. # # @return [Array] required :event_types, @@ -63,13 +64,15 @@ class Integration < XTwitterScraper::Internal::Type::BaseModel optional :silent_push, XTwitterScraper::Internal::Type::Boolean, api_name: :silentPush # @!method initialize(id:, config:, created_at:, event_types:, is_active:, name:, type:, filters: nil, message_template: nil, scope_all_monitors: nil, silent_push: nil) + # Third-party integration (e.g. Telegram) subscribed to monitor events. + # # @param id [String] # # @param config [Hash{Symbol=>Object}] Integration config — shape varies by type (JSON) # # @param created_at [Time] # - # @param event_types [Array] + # @param event_types [Array] Array of event types to subscribe to. # # @param is_active [Boolean] # @@ -85,6 +88,7 @@ class Integration < XTwitterScraper::Internal::Type::BaseModel # # @param silent_push [Boolean] + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/integration_create_params.rb b/lib/x_twitter_scraper/models/integration_create_params.rb index 529ebe9..c0fd4c6 100644 --- a/lib/x_twitter_scraper/models/integration_create_params.rb +++ b/lib/x_twitter_scraper/models/integration_create_params.rb @@ -14,6 +14,7 @@ class IntegrationCreateParams < XTwitterScraper::Internal::Type::BaseModel required :config, -> { XTwitterScraper::IntegrationCreateParams::Config } # @!attribute event_types + # Array of event types to subscribe to. # # @return [Array] required :event_types, @@ -35,7 +36,7 @@ class IntegrationCreateParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(config:, event_types:, name:, type:, request_options: {}) # @param config [XTwitterScraper::Models::IntegrationCreateParams::Config] Integration config (e.g. Telegram chatId) # - # @param event_types [Array] + # @param event_types [Array] Array of event types to subscribe to. # # @param name [String] # @@ -55,6 +56,7 @@ class Config < XTwitterScraper::Internal::Type::BaseModel # @param chat_id [String] end + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/integration_create_response.rb b/lib/x_twitter_scraper/models/integration_create_response.rb index 163ca88..1d63e97 100644 --- a/lib/x_twitter_scraper/models/integration_create_response.rb +++ b/lib/x_twitter_scraper/models/integration_create_response.rb @@ -21,6 +21,7 @@ class IntegrationCreateResponse < XTwitterScraper::Internal::Type::BaseModel required :created_at, Time, api_name: :createdAt # @!attribute event_types + # Array of event types to subscribe to. # # @return [Array] required :event_types, @@ -64,13 +65,15 @@ class IntegrationCreateResponse < XTwitterScraper::Internal::Type::BaseModel optional :silent_push, XTwitterScraper::Internal::Type::Boolean, api_name: :silentPush # @!method initialize(id:, config:, created_at:, event_types:, is_active:, name:, type:, filters: nil, message_template: nil, scope_all_monitors: nil, silent_push: nil) + # Third-party integration (e.g. Telegram) subscribed to monitor events. + # # @param id [String] # # @param config [Hash{Symbol=>Object}] Integration config — shape varies by type (JSON) # # @param created_at [Time] # - # @param event_types [Array] + # @param event_types [Array] Array of event types to subscribe to. # # @param is_active [Boolean] # @@ -86,6 +89,7 @@ class IntegrationCreateResponse < XTwitterScraper::Internal::Type::BaseModel # # @param silent_push [Boolean] + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/integration_delivery.rb b/lib/x_twitter_scraper/models/integration_delivery.rb index 7745a29..57a428f 100644 --- a/lib/x_twitter_scraper/models/integration_delivery.rb +++ b/lib/x_twitter_scraper/models/integration_delivery.rb @@ -54,6 +54,8 @@ class IntegrationDelivery < XTwitterScraper::Internal::Type::BaseModel optional :source_type, String, api_name: :sourceType # @!method initialize(id:, attempts:, created_at:, event_type:, status:, delivered_at: nil, last_error: nil, last_status_code: nil, source_id: nil, source_type: nil) + # Integration delivery attempt record with status and retry count. + # # @param id [String] # @param attempts [Integer] # @param created_at [Time] diff --git a/lib/x_twitter_scraper/models/integration_list_deliveries_params.rb b/lib/x_twitter_scraper/models/integration_list_deliveries_params.rb index 481c79f..ddf885e 100644 --- a/lib/x_twitter_scraper/models/integration_list_deliveries_params.rb +++ b/lib/x_twitter_scraper/models/integration_list_deliveries_params.rb @@ -13,13 +13,16 @@ class IntegrationListDeliveriesParams < XTwitterScraper::Internal::Type::BaseMod required :id, String # @!attribute limit + # Maximum number of items to return (1-100, default 50) # # @return [Integer, nil] optional :limit, Integer # @!method initialize(id:, limit: nil, request_options: {}) # @param id [String] - # @param limit [Integer] + # + # @param limit [Integer] Maximum number of items to return (1-100, default 50) + # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/x_twitter_scraper/models/integration_list_deliveries_response.rb b/lib/x_twitter_scraper/models/integration_list_deliveries_response.rb index e8d21e1..e687e49 100644 --- a/lib/x_twitter_scraper/models/integration_list_deliveries_response.rb +++ b/lib/x_twitter_scraper/models/integration_list_deliveries_response.rb @@ -65,6 +65,8 @@ class Delivery < XTwitterScraper::Internal::Type::BaseModel optional :source_type, String, api_name: :sourceType # @!method initialize(id:, attempts:, created_at:, event_type:, status:, delivered_at: nil, last_error: nil, last_status_code: nil, source_id: nil, source_type: nil) + # Integration delivery attempt record with status and retry count. + # # @param id [String] # @param attempts [Integer] # @param created_at [Time] diff --git a/lib/x_twitter_scraper/models/integration_list_response.rb b/lib/x_twitter_scraper/models/integration_list_response.rb index 1c79c68..39aab47 100644 --- a/lib/x_twitter_scraper/models/integration_list_response.rb +++ b/lib/x_twitter_scraper/models/integration_list_response.rb @@ -31,6 +31,7 @@ class Integration < XTwitterScraper::Internal::Type::BaseModel required :created_at, Time, api_name: :createdAt # @!attribute event_types + # Array of event types to subscribe to. # # @return [Array] required :event_types, @@ -74,13 +75,15 @@ class Integration < XTwitterScraper::Internal::Type::BaseModel optional :silent_push, XTwitterScraper::Internal::Type::Boolean, api_name: :silentPush # @!method initialize(id:, config:, created_at:, event_types:, is_active:, name:, type:, filters: nil, message_template: nil, scope_all_monitors: nil, silent_push: nil) + # Third-party integration (e.g. Telegram) subscribed to monitor events. + # # @param id [String] # # @param config [Hash{Symbol=>Object}] Integration config — shape varies by type (JSON) # # @param created_at [Time] # - # @param event_types [Array] + # @param event_types [Array] Array of event types to subscribe to. # # @param is_active [Boolean] # @@ -96,6 +99,7 @@ class Integration < XTwitterScraper::Internal::Type::BaseModel # # @param silent_push [Boolean] + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/integration_retrieve_response.rb b/lib/x_twitter_scraper/models/integration_retrieve_response.rb index 25ef1dc..f46126d 100644 --- a/lib/x_twitter_scraper/models/integration_retrieve_response.rb +++ b/lib/x_twitter_scraper/models/integration_retrieve_response.rb @@ -21,6 +21,7 @@ class IntegrationRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel required :created_at, Time, api_name: :createdAt # @!attribute event_types + # Array of event types to subscribe to. # # @return [Array] required :event_types, @@ -64,13 +65,15 @@ class IntegrationRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel optional :silent_push, XTwitterScraper::Internal::Type::Boolean, api_name: :silentPush # @!method initialize(id:, config:, created_at:, event_types:, is_active:, name:, type:, filters: nil, message_template: nil, scope_all_monitors: nil, silent_push: nil) + # Third-party integration (e.g. Telegram) subscribed to monitor events. + # # @param id [String] # # @param config [Hash{Symbol=>Object}] Integration config — shape varies by type (JSON) # # @param created_at [Time] # - # @param event_types [Array] + # @param event_types [Array] Array of event types to subscribe to. # # @param is_active [Boolean] # @@ -86,6 +89,7 @@ class IntegrationRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel # # @param silent_push [Boolean] + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/integration_update_params.rb b/lib/x_twitter_scraper/models/integration_update_params.rb index 736a455..935dd3b 100644 --- a/lib/x_twitter_scraper/models/integration_update_params.rb +++ b/lib/x_twitter_scraper/models/integration_update_params.rb @@ -13,6 +13,7 @@ class IntegrationUpdateParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute event_types + # Array of event types to subscribe to. # # @return [Array, nil] optional :event_types, @@ -58,7 +59,7 @@ class IntegrationUpdateParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, event_types: nil, filters: nil, is_active: nil, message_template: nil, name: nil, scope_all_monitors: nil, silent_push: nil, request_options: {}) # @param id [String] # - # @param event_types [Array] + # @param event_types [Array] Array of event types to subscribe to. # # @param filters [Hash{Symbol=>Object}] Event filter rules (JSON) # @@ -74,6 +75,7 @@ class IntegrationUpdateParams < XTwitterScraper::Internal::Type::BaseModel # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/integration_update_response.rb b/lib/x_twitter_scraper/models/integration_update_response.rb index e8a2723..1b4c030 100644 --- a/lib/x_twitter_scraper/models/integration_update_response.rb +++ b/lib/x_twitter_scraper/models/integration_update_response.rb @@ -21,6 +21,7 @@ class IntegrationUpdateResponse < XTwitterScraper::Internal::Type::BaseModel required :created_at, Time, api_name: :createdAt # @!attribute event_types + # Array of event types to subscribe to. # # @return [Array] required :event_types, @@ -64,13 +65,15 @@ class IntegrationUpdateResponse < XTwitterScraper::Internal::Type::BaseModel optional :silent_push, XTwitterScraper::Internal::Type::Boolean, api_name: :silentPush # @!method initialize(id:, config:, created_at:, event_types:, is_active:, name:, type:, filters: nil, message_template: nil, scope_all_monitors: nil, silent_push: nil) + # Third-party integration (e.g. Telegram) subscribed to monitor events. + # # @param id [String] # # @param config [Hash{Symbol=>Object}] Integration config — shape varies by type (JSON) # # @param created_at [Time] # - # @param event_types [Array] + # @param event_types [Array] Array of event types to subscribe to. # # @param is_active [Boolean] # @@ -86,6 +89,7 @@ class IntegrationUpdateResponse < XTwitterScraper::Internal::Type::BaseModel # # @param silent_push [Boolean] + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/monitor.rb b/lib/x_twitter_scraper/models/monitor.rb index a29cdf1..d54f409 100644 --- a/lib/x_twitter_scraper/models/monitor.rb +++ b/lib/x_twitter_scraper/models/monitor.rb @@ -14,6 +14,7 @@ class Monitor < XTwitterScraper::Internal::Type::BaseModel required :created_at, Time, api_name: :createdAt # @!attribute event_types + # Array of event types to subscribe to. # # @return [Array] required :event_types, @@ -36,13 +37,21 @@ class Monitor < XTwitterScraper::Internal::Type::BaseModel required :x_user_id, String, api_name: :xUserId # @!method initialize(id:, created_at:, event_types:, is_active:, username:, x_user_id:) + # Account monitor that tracks activity for a given X user. + # # @param id [String] + # # @param created_at [Time] - # @param event_types [Array] + # + # @param event_types [Array] Array of event types to subscribe to. + # # @param is_active [Boolean] + # # @param username [String] + # # @param x_user_id [String] + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/monitor_create_params.rb b/lib/x_twitter_scraper/models/monitor_create_params.rb index b5bc254..10abddd 100644 --- a/lib/x_twitter_scraper/models/monitor_create_params.rb +++ b/lib/x_twitter_scraper/models/monitor_create_params.rb @@ -8,6 +8,7 @@ class MonitorCreateParams < XTwitterScraper::Internal::Type::BaseModel include XTwitterScraper::Internal::Type::RequestParameters # @!attribute event_types + # Array of event types to subscribe to. # # @return [Array] required :event_types, @@ -23,12 +24,13 @@ class MonitorCreateParams < XTwitterScraper::Internal::Type::BaseModel required :username, String # @!method initialize(event_types:, username:, request_options: {}) - # @param event_types [Array] + # @param event_types [Array] Array of event types to subscribe to. # # @param username [String] X username (without @) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/monitor_create_response.rb b/lib/x_twitter_scraper/models/monitor_create_response.rb index 70afcbb..59a0b4a 100644 --- a/lib/x_twitter_scraper/models/monitor_create_response.rb +++ b/lib/x_twitter_scraper/models/monitor_create_response.rb @@ -15,6 +15,7 @@ class MonitorCreateResponse < XTwitterScraper::Internal::Type::BaseModel required :created_at, Time, api_name: :createdAt # @!attribute event_types + # Array of event types to subscribe to. # # @return [Array] required :event_types, @@ -33,11 +34,16 @@ class MonitorCreateResponse < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, created_at:, event_types:, username:, x_user_id:) # @param id [String] + # # @param created_at [Time] - # @param event_types [Array] + # + # @param event_types [Array] Array of event types to subscribe to. + # # @param username [String] + # # @param x_user_id [String] + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/monitor_list_response.rb b/lib/x_twitter_scraper/models/monitor_list_response.rb index c66b58f..a0b3aeb 100644 --- a/lib/x_twitter_scraper/models/monitor_list_response.rb +++ b/lib/x_twitter_scraper/models/monitor_list_response.rb @@ -31,6 +31,7 @@ class Monitor < XTwitterScraper::Internal::Type::BaseModel required :created_at, Time, api_name: :createdAt # @!attribute event_types + # Array of event types to subscribe to. # # @return [Array] required :event_types, @@ -53,13 +54,21 @@ class Monitor < XTwitterScraper::Internal::Type::BaseModel required :x_user_id, String, api_name: :xUserId # @!method initialize(id:, created_at:, event_types:, is_active:, username:, x_user_id:) + # Account monitor that tracks activity for a given X user. + # # @param id [String] + # # @param created_at [Time] - # @param event_types [Array] + # + # @param event_types [Array] Array of event types to subscribe to. + # # @param is_active [Boolean] + # # @param username [String] + # # @param x_user_id [String] + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/monitor_retrieve_response.rb b/lib/x_twitter_scraper/models/monitor_retrieve_response.rb index f05d572..37a3cae 100644 --- a/lib/x_twitter_scraper/models/monitor_retrieve_response.rb +++ b/lib/x_twitter_scraper/models/monitor_retrieve_response.rb @@ -15,6 +15,7 @@ class MonitorRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel required :created_at, Time, api_name: :createdAt # @!attribute event_types + # Array of event types to subscribe to. # # @return [Array] required :event_types, @@ -37,13 +38,21 @@ class MonitorRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel required :x_user_id, String, api_name: :xUserId # @!method initialize(id:, created_at:, event_types:, is_active:, username:, x_user_id:) + # Account monitor that tracks activity for a given X user. + # # @param id [String] + # # @param created_at [Time] - # @param event_types [Array] + # + # @param event_types [Array] Array of event types to subscribe to. + # # @param is_active [Boolean] + # # @param username [String] + # # @param x_user_id [String] + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/monitor_update_params.rb b/lib/x_twitter_scraper/models/monitor_update_params.rb index 978dd11..2a5e252 100644 --- a/lib/x_twitter_scraper/models/monitor_update_params.rb +++ b/lib/x_twitter_scraper/models/monitor_update_params.rb @@ -13,6 +13,7 @@ class MonitorUpdateParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute event_types + # Array of event types to subscribe to. # # @return [Array, nil] optional :event_types, @@ -28,10 +29,14 @@ class MonitorUpdateParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, event_types: nil, is_active: nil, request_options: {}) # @param id [String] - # @param event_types [Array] + # + # @param event_types [Array] Array of event types to subscribe to. + # # @param is_active [Boolean] + # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/monitor_update_response.rb b/lib/x_twitter_scraper/models/monitor_update_response.rb index bf5e0c2..e230dcf 100644 --- a/lib/x_twitter_scraper/models/monitor_update_response.rb +++ b/lib/x_twitter_scraper/models/monitor_update_response.rb @@ -15,6 +15,7 @@ class MonitorUpdateResponse < XTwitterScraper::Internal::Type::BaseModel required :created_at, Time, api_name: :createdAt # @!attribute event_types + # Array of event types to subscribe to. # # @return [Array] required :event_types, @@ -37,13 +38,21 @@ class MonitorUpdateResponse < XTwitterScraper::Internal::Type::BaseModel required :x_user_id, String, api_name: :xUserId # @!method initialize(id:, created_at:, event_types:, is_active:, username:, x_user_id:) + # Account monitor that tracks activity for a given X user. + # # @param id [String] + # # @param created_at [Time] - # @param event_types [Array] + # + # @param event_types [Array] Array of event types to subscribe to. + # # @param is_active [Boolean] + # # @param username [String] + # # @param x_user_id [String] + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/paginated_tweets.rb b/lib/x_twitter_scraper/models/paginated_tweets.rb index a7e1052..75f0d41 100644 --- a/lib/x_twitter_scraper/models/paginated_tweets.rb +++ b/lib/x_twitter_scraper/models/paginated_tweets.rb @@ -19,6 +19,8 @@ class PaginatedTweets < XTwitterScraper::Internal::Type::BaseModel required :tweets, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::PaginatedTweets::Tweet] } # @!method initialize(has_next_page:, next_cursor:, tweets:) + # Paginated list of tweets with cursor-based navigation. + # # @param has_next_page [Boolean] # @param next_cursor [String] # @param tweets [Array] @@ -50,7 +52,7 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel optional :created_at, String, api_name: :createdAt # @!attribute is_note_tweet - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) # # @return [Boolean, nil] optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet @@ -81,6 +83,8 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel optional :view_count, Integer, api_name: :viewCount # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # Tweet returned from search results with inline author info. + # # @param id [String] # # @param text [String] @@ -91,7 +95,7 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # # @param created_at [String] # - # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) # # @param like_count [Integer] # diff --git a/lib/x_twitter_scraper/models/paginated_users.rb b/lib/x_twitter_scraper/models/paginated_users.rb index 8b8976f..1507445 100644 --- a/lib/x_twitter_scraper/models/paginated_users.rb +++ b/lib/x_twitter_scraper/models/paginated_users.rb @@ -19,6 +19,8 @@ class PaginatedUsers < XTwitterScraper::Internal::Type::BaseModel required :users, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::PaginatedUsers::User] } # @!method initialize(has_next_page:, next_cursor:, users:) + # Paginated list of user profiles with cursor-based navigation. + # # @param has_next_page [Boolean] # @param next_cursor [String] # @param users [Array] @@ -80,6 +82,8 @@ class User < XTwitterScraper::Internal::Type::BaseModel optional :verified, XTwitterScraper::Internal::Type::Boolean # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) + # X user profile with bio, follower counts, and verification status. + # # @param id [String] # @param name [String] # @param username [String] diff --git a/lib/x_twitter_scraper/models/radar_item.rb b/lib/x_twitter_scraper/models/radar_item.rb index 45c3e43..4509867 100644 --- a/lib/x_twitter_scraper/models/radar_item.rb +++ b/lib/x_twitter_scraper/models/radar_item.rb @@ -49,6 +49,8 @@ class RadarItem < XTwitterScraper::Internal::Type::BaseModel optional :url, String # @!method initialize(category:, published_at:, region:, score:, source:, title:, description: nil, image_url: nil, url: nil) + # Trending topic with score, category, source, and region. + # # @param category [String] # @param published_at [Time] # @param region [String] diff --git a/lib/x_twitter_scraper/models/radar_retrieve_trending_topics_response.rb b/lib/x_twitter_scraper/models/radar_retrieve_trending_topics_response.rb index 0828e7c..fbcfee7 100644 --- a/lib/x_twitter_scraper/models/radar_retrieve_trending_topics_response.rb +++ b/lib/x_twitter_scraper/models/radar_retrieve_trending_topics_response.rb @@ -66,6 +66,8 @@ class Item < XTwitterScraper::Internal::Type::BaseModel optional :url, String # @!method initialize(category:, published_at:, region:, score:, source:, title:, description: nil, image_url: nil, url: nil) + # Trending topic with score, category, source, and region. + # # @param category [String] # @param published_at [Time] # @param region [String] diff --git a/lib/x_twitter_scraper/models/style_analyze_response.rb b/lib/x_twitter_scraper/models/style_analyze_response.rb index 24acdde..f8e8a95 100644 --- a/lib/x_twitter_scraper/models/style_analyze_response.rb +++ b/lib/x_twitter_scraper/models/style_analyze_response.rb @@ -31,6 +31,8 @@ class StyleAnalyzeResponse < XTwitterScraper::Internal::Type::BaseModel required :x_username, String, api_name: :xUsername # @!method initialize(fetched_at:, is_own_account:, tweet_count:, tweets:, x_username:) + # Full style profile with sampled tweets used for tone analysis. + # # @param fetched_at [Time] # @param is_own_account [Boolean] # @param tweet_count [Integer] diff --git a/lib/x_twitter_scraper/models/style_compare_response.rb b/lib/x_twitter_scraper/models/style_compare_response.rb index 2c1d28f..65ca692 100644 --- a/lib/x_twitter_scraper/models/style_compare_response.rb +++ b/lib/x_twitter_scraper/models/style_compare_response.rb @@ -5,18 +5,21 @@ module Models # @see XTwitterScraper::Resources::Styles#compare class StyleCompareResponse < XTwitterScraper::Internal::Type::BaseModel # @!attribute style1 + # Full style profile with sampled tweets used for tone analysis. # # @return [XTwitterScraper::Models::StyleCompareResponse::Style1] required :style1, -> { XTwitterScraper::Models::StyleCompareResponse::Style1 } # @!attribute style2 + # Full style profile with sampled tweets used for tone analysis. # # @return [XTwitterScraper::Models::StyleCompareResponse::Style2] required :style2, -> { XTwitterScraper::Models::StyleCompareResponse::Style2 } # @!method initialize(style1:, style2:) - # @param style1 [XTwitterScraper::Models::StyleCompareResponse::Style1] - # @param style2 [XTwitterScraper::Models::StyleCompareResponse::Style2] + # @param style1 [XTwitterScraper::Models::StyleCompareResponse::Style1] Full style profile with sampled tweets used for tone analysis. + # + # @param style2 [XTwitterScraper::Models::StyleCompareResponse::Style2] Full style profile with sampled tweets used for tone analysis. # @see XTwitterScraper::Models::StyleCompareResponse#style1 class Style1 < XTwitterScraper::Internal::Type::BaseModel @@ -47,6 +50,8 @@ class Style1 < XTwitterScraper::Internal::Type::BaseModel required :x_username, String, api_name: :xUsername # @!method initialize(fetched_at:, is_own_account:, tweet_count:, tweets:, x_username:) + # Full style profile with sampled tweets used for tone analysis. + # # @param fetched_at [Time] # @param is_own_account [Boolean] # @param tweet_count [Integer] @@ -111,6 +116,8 @@ class Style2 < XTwitterScraper::Internal::Type::BaseModel required :x_username, String, api_name: :xUsername # @!method initialize(fetched_at:, is_own_account:, tweet_count:, tweets:, x_username:) + # Full style profile with sampled tweets used for tone analysis. + # # @param fetched_at [Time] # @param is_own_account [Boolean] # @param tweet_count [Integer] diff --git a/lib/x_twitter_scraper/models/style_list_response.rb b/lib/x_twitter_scraper/models/style_list_response.rb index 63f3656..6657c92 100644 --- a/lib/x_twitter_scraper/models/style_list_response.rb +++ b/lib/x_twitter_scraper/models/style_list_response.rb @@ -35,6 +35,8 @@ class Style < XTwitterScraper::Internal::Type::BaseModel required :x_username, String, api_name: :xUsername # @!method initialize(fetched_at:, is_own_account:, tweet_count:, x_username:) + # Style profile summary with tweet count and ownership flag. + # # @param fetched_at [Time] # @param is_own_account [Boolean] # @param tweet_count [Integer] diff --git a/lib/x_twitter_scraper/models/style_profile.rb b/lib/x_twitter_scraper/models/style_profile.rb index 729ca7f..ae1dd82 100644 --- a/lib/x_twitter_scraper/models/style_profile.rb +++ b/lib/x_twitter_scraper/models/style_profile.rb @@ -29,6 +29,8 @@ class StyleProfile < XTwitterScraper::Internal::Type::BaseModel required :x_username, String, api_name: :xUsername # @!method initialize(fetched_at:, is_own_account:, tweet_count:, tweets:, x_username:) + # Full style profile with sampled tweets used for tone analysis. + # # @param fetched_at [Time] # @param is_own_account [Boolean] # @param tweet_count [Integer] diff --git a/lib/x_twitter_scraper/models/style_profile_summary.rb b/lib/x_twitter_scraper/models/style_profile_summary.rb index 0fca962..8e54968 100644 --- a/lib/x_twitter_scraper/models/style_profile_summary.rb +++ b/lib/x_twitter_scraper/models/style_profile_summary.rb @@ -24,6 +24,8 @@ class StyleProfileSummary < XTwitterScraper::Internal::Type::BaseModel required :x_username, String, api_name: :xUsername # @!method initialize(fetched_at:, is_own_account:, tweet_count:, x_username:) + # Style profile summary with tweet count and ownership flag. + # # @param fetched_at [Time] # @param is_own_account [Boolean] # @param tweet_count [Integer] diff --git a/lib/x_twitter_scraper/models/trend_list_params.rb b/lib/x_twitter_scraper/models/trend_list_params.rb index 6f3e610..7219bed 100644 --- a/lib/x_twitter_scraper/models/trend_list_params.rb +++ b/lib/x_twitter_scraper/models/trend_list_params.rb @@ -8,6 +8,7 @@ class TrendListParams < XTwitterScraper::Internal::Type::BaseModel include XTwitterScraper::Internal::Type::RequestParameters # @!attribute count + # Number of trending topics to return (1-50, default 30) # # @return [Integer, nil] optional :count, Integer @@ -19,7 +20,7 @@ class TrendListParams < XTwitterScraper::Internal::Type::BaseModel optional :woeid, Integer # @!method initialize(count: nil, woeid: nil, request_options: {}) - # @param count [Integer] + # @param count [Integer] Number of trending topics to return (1-50, default 30) # # @param woeid [Integer] Region WOEID (1=Worldwide, 23424977=US, 23424975=UK, 23424969=Turkey) # diff --git a/lib/x_twitter_scraper/models/webhook.rb b/lib/x_twitter_scraper/models/webhook.rb index 23cf702..e44a8b4 100644 --- a/lib/x_twitter_scraper/models/webhook.rb +++ b/lib/x_twitter_scraper/models/webhook.rb @@ -14,6 +14,7 @@ class Webhook < XTwitterScraper::Internal::Type::BaseModel required :created_at, Time, api_name: :createdAt # @!attribute event_types + # Array of event types to subscribe to. # # @return [Array] required :event_types, @@ -31,12 +32,19 @@ class Webhook < XTwitterScraper::Internal::Type::BaseModel required :url, String # @!method initialize(id:, created_at:, event_types:, is_active:, url:) + # Webhook endpoint registered to receive event deliveries. + # # @param id [String] + # # @param created_at [Time] - # @param event_types [Array] + # + # @param event_types [Array] Array of event types to subscribe to. + # # @param is_active [Boolean] + # # @param url [String] + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/webhook_create_params.rb b/lib/x_twitter_scraper/models/webhook_create_params.rb index 8589c07..bf89269 100644 --- a/lib/x_twitter_scraper/models/webhook_create_params.rb +++ b/lib/x_twitter_scraper/models/webhook_create_params.rb @@ -8,6 +8,7 @@ class WebhookCreateParams < XTwitterScraper::Internal::Type::BaseModel include XTwitterScraper::Internal::Type::RequestParameters # @!attribute event_types + # Array of event types to subscribe to. # # @return [Array] required :event_types, @@ -23,12 +24,13 @@ class WebhookCreateParams < XTwitterScraper::Internal::Type::BaseModel required :url, String # @!method initialize(event_types:, url:, request_options: {}) - # @param event_types [Array] + # @param event_types [Array] Array of event types to subscribe to. # # @param url [String] HTTPS URL # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/webhook_create_response.rb b/lib/x_twitter_scraper/models/webhook_create_response.rb index 50b0e3f..f2b4ccd 100644 --- a/lib/x_twitter_scraper/models/webhook_create_response.rb +++ b/lib/x_twitter_scraper/models/webhook_create_response.rb @@ -15,6 +15,7 @@ class WebhookCreateResponse < XTwitterScraper::Internal::Type::BaseModel required :created_at, Time, api_name: :createdAt # @!attribute event_types + # Array of event types to subscribe to. # # @return [Array] required :event_types, @@ -33,11 +34,16 @@ class WebhookCreateResponse < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, created_at:, event_types:, secret:, url:) # @param id [String] + # # @param created_at [Time] - # @param event_types [Array] + # + # @param event_types [Array] Array of event types to subscribe to. + # # @param secret [String] + # # @param url [String] + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/webhook_list_deliveries_response.rb b/lib/x_twitter_scraper/models/webhook_list_deliveries_response.rb index 38401e7..9b2ac0a 100644 --- a/lib/x_twitter_scraper/models/webhook_list_deliveries_response.rb +++ b/lib/x_twitter_scraper/models/webhook_list_deliveries_response.rb @@ -55,6 +55,8 @@ class Delivery < XTwitterScraper::Internal::Type::BaseModel optional :last_status_code, Integer, api_name: :lastStatusCode # @!method initialize(id:, attempts:, created_at:, status:, stream_event_id:, delivered_at: nil, last_error: nil, last_status_code: nil) + # Webhook delivery attempt record with status and retry count. + # # @param id [String] # @param attempts [Integer] # @param created_at [Time] diff --git a/lib/x_twitter_scraper/models/webhook_list_response.rb b/lib/x_twitter_scraper/models/webhook_list_response.rb index 80ff66e..31c0f51 100644 --- a/lib/x_twitter_scraper/models/webhook_list_response.rb +++ b/lib/x_twitter_scraper/models/webhook_list_response.rb @@ -25,6 +25,7 @@ class Webhook < XTwitterScraper::Internal::Type::BaseModel required :created_at, Time, api_name: :createdAt # @!attribute event_types + # Array of event types to subscribe to. # # @return [Array] required :event_types, @@ -42,12 +43,19 @@ class Webhook < XTwitterScraper::Internal::Type::BaseModel required :url, String # @!method initialize(id:, created_at:, event_types:, is_active:, url:) + # Webhook endpoint registered to receive event deliveries. + # # @param id [String] + # # @param created_at [Time] - # @param event_types [Array] + # + # @param event_types [Array] Array of event types to subscribe to. + # # @param is_active [Boolean] + # # @param url [String] + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/webhook_update_params.rb b/lib/x_twitter_scraper/models/webhook_update_params.rb index 7e648e0..4e25831 100644 --- a/lib/x_twitter_scraper/models/webhook_update_params.rb +++ b/lib/x_twitter_scraper/models/webhook_update_params.rb @@ -13,6 +13,7 @@ class WebhookUpdateParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute event_types + # Array of event types to subscribe to. # # @return [Array, nil] optional :event_types, @@ -33,11 +34,16 @@ class WebhookUpdateParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, event_types: nil, is_active: nil, url: nil, request_options: {}) # @param id [String] - # @param event_types [Array] + # + # @param event_types [Array] Array of event types to subscribe to. + # # @param is_active [Boolean] + # # @param url [String] + # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/webhook_update_response.rb b/lib/x_twitter_scraper/models/webhook_update_response.rb index 618ec55..9539d95 100644 --- a/lib/x_twitter_scraper/models/webhook_update_response.rb +++ b/lib/x_twitter_scraper/models/webhook_update_response.rb @@ -15,6 +15,7 @@ class WebhookUpdateResponse < XTwitterScraper::Internal::Type::BaseModel required :created_at, Time, api_name: :createdAt # @!attribute event_types + # Array of event types to subscribe to. # # @return [Array] required :event_types, @@ -32,12 +33,19 @@ class WebhookUpdateResponse < XTwitterScraper::Internal::Type::BaseModel required :url, String # @!method initialize(id:, created_at:, event_types:, is_active:, url:) + # Webhook endpoint registered to receive event deliveries. + # # @param id [String] + # # @param created_at [Time] - # @param event_types [Array] + # + # @param event_types [Array] Array of event types to subscribe to. + # # @param is_active [Boolean] + # # @param url [String] + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/winner.rb b/lib/x_twitter_scraper/models/winner.rb index 8558ac3..2afd506 100644 --- a/lib/x_twitter_scraper/models/winner.rb +++ b/lib/x_twitter_scraper/models/winner.rb @@ -24,6 +24,8 @@ class Winner < XTwitterScraper::Internal::Type::BaseModel required :tweet_id, String, api_name: :tweetId # @!method initialize(author_username:, is_backup:, position:, tweet_id:) + # Giveaway draw winner with position and backup flag. + # # @param author_username [String] # @param is_backup [Boolean] # @param position [Integer] diff --git a/lib/x_twitter_scraper/models/x/account_list_response.rb b/lib/x_twitter_scraper/models/x/account_list_response.rb index 147d140..0968837 100644 --- a/lib/x_twitter_scraper/models/x/account_list_response.rb +++ b/lib/x_twitter_scraper/models/x/account_list_response.rb @@ -41,6 +41,8 @@ class Account < XTwitterScraper::Internal::Type::BaseModel required :x_username, String, api_name: :xUsername # @!method initialize(id:, created_at:, status:, x_user_id:, x_username:) + # Linked X account summary with username and connection status. + # # @param id [String] # @param created_at [Time] # @param status [String] diff --git a/lib/x_twitter_scraper/models/x/account_reauth_params.rb b/lib/x_twitter_scraper/models/x/account_reauth_params.rb index d5129ea..90107bc 100644 --- a/lib/x_twitter_scraper/models/x/account_reauth_params.rb +++ b/lib/x_twitter_scraper/models/x/account_reauth_params.rb @@ -14,13 +14,13 @@ class AccountReauthParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute password - # Account password + # Updated account password # # @return [String] required :password, String # @!attribute totp_secret - # TOTP secret for 2FA + # TOTP secret for 2FA re-authentication # # @return [String, nil] optional :totp_secret, String @@ -28,9 +28,9 @@ class AccountReauthParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, password:, totp_secret: nil, request_options: {}) # @param id [String] # - # @param password [String] Account password + # @param password [String] Updated account password # - # @param totp_secret [String] TOTP secret for 2FA + # @param totp_secret [String] TOTP secret for 2FA re-authentication # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/x_twitter_scraper/models/x/account_retrieve_response.rb b/lib/x_twitter_scraper/models/x/account_retrieve_response.rb index e7fcc00..722fbef 100644 --- a/lib/x_twitter_scraper/models/x/account_retrieve_response.rb +++ b/lib/x_twitter_scraper/models/x/account_retrieve_response.rb @@ -46,6 +46,8 @@ class AccountRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel optional :updated_at, Time, api_name: :updatedAt # @!method initialize(id:, created_at:, status:, x_user_id:, x_username:, cookies_obtained_at: nil, proxy_country: nil, updated_at: nil) + # Full X account details including proxy, cookies, and update timestamp. + # # @param id [String] # @param created_at [Time] # @param status [String] diff --git a/lib/x_twitter_scraper/models/x/bookmark_list_params.rb b/lib/x_twitter_scraper/models/x/bookmark_list_params.rb index 72c7e73..287a626 100644 --- a/lib/x_twitter_scraper/models/x/bookmark_list_params.rb +++ b/lib/x_twitter_scraper/models/x/bookmark_list_params.rb @@ -9,7 +9,7 @@ class BookmarkListParams < XTwitterScraper::Internal::Type::BaseModel include XTwitterScraper::Internal::Type::RequestParameters # @!attribute cursor - # Pagination cursor from previous response + # Pagination cursor for bookmarks # # @return [String, nil] optional :cursor, String @@ -21,7 +21,7 @@ class BookmarkListParams < XTwitterScraper::Internal::Type::BaseModel optional :folder_id, String # @!method initialize(cursor: nil, folder_id: nil, request_options: {}) - # @param cursor [String] Pagination cursor from previous response + # @param cursor [String] Pagination cursor for bookmarks # # @param folder_id [String] Optional bookmark folder ID # diff --git a/lib/x_twitter_scraper/models/x/bookmark_list_response.rb b/lib/x_twitter_scraper/models/x/bookmark_list_response.rb index 9941b23..7480d7c 100644 --- a/lib/x_twitter_scraper/models/x/bookmark_list_response.rb +++ b/lib/x_twitter_scraper/models/x/bookmark_list_response.rb @@ -22,6 +22,8 @@ class BookmarkListResponse < XTwitterScraper::Internal::Type::BaseModel -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::BookmarkListResponse::Tweet] } # @!method initialize(has_next_page:, next_cursor:, tweets:) + # Paginated list of tweets with cursor-based navigation. + # # @param has_next_page [Boolean] # @param next_cursor [String] # @param tweets [Array] @@ -53,7 +55,7 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel optional :created_at, String, api_name: :createdAt # @!attribute is_note_tweet - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) # # @return [Boolean, nil] optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet @@ -84,6 +86,8 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel optional :view_count, Integer, api_name: :viewCount # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # Tweet returned from search results with inline author info. + # # @param id [String] # # @param text [String] @@ -94,7 +98,7 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # # @param created_at [String] # - # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) # # @param like_count [Integer] # diff --git a/lib/x_twitter_scraper/models/x/communities/join_create_params.rb b/lib/x_twitter_scraper/models/x/communities/join_create_params.rb index 9292001..239256b 100644 --- a/lib/x_twitter_scraper/models/x/communities/join_create_params.rb +++ b/lib/x_twitter_scraper/models/x/communities/join_create_params.rb @@ -15,7 +15,7 @@ class JoinCreateParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute account - # X account (@username or account ID) + # X account identifier (@username or account ID) # # @return [String] required :account, String @@ -23,7 +23,7 @@ class JoinCreateParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, account:, request_options: {}) # @param id [String] # - # @param account [String] X account (@username or account ID) + # @param account [String] X account identifier (@username or account ID) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/x_twitter_scraper/models/x/communities/join_create_response.rb b/lib/x_twitter_scraper/models/x/communities/join_create_response.rb index 1151f66..1fea207 100644 --- a/lib/x_twitter_scraper/models/x/communities/join_create_response.rb +++ b/lib/x_twitter_scraper/models/x/communities/join_create_response.rb @@ -22,6 +22,8 @@ class JoinCreateResponse < XTwitterScraper::Internal::Type::BaseModel required :success, const: true # @!method initialize(community_id:, community_name:, success: true) + # Result of a community join or leave action. + # # @param community_id [String] # @param community_name [String] # @param success [Boolean, true] diff --git a/lib/x_twitter_scraper/models/x/communities/join_delete_all_params.rb b/lib/x_twitter_scraper/models/x/communities/join_delete_all_params.rb index dc49347..7b3e401 100644 --- a/lib/x_twitter_scraper/models/x/communities/join_delete_all_params.rb +++ b/lib/x_twitter_scraper/models/x/communities/join_delete_all_params.rb @@ -15,7 +15,7 @@ class JoinDeleteAllParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute account - # X account (@username or account ID) + # X account identifier (@username or account ID) # # @return [String] required :account, String @@ -23,7 +23,7 @@ class JoinDeleteAllParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, account:, request_options: {}) # @param id [String] # - # @param account [String] X account (@username or account ID) + # @param account [String] X account identifier (@username or account ID) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/x_twitter_scraper/models/x/communities/join_delete_all_response.rb b/lib/x_twitter_scraper/models/x/communities/join_delete_all_response.rb index 155334c..76b168d 100644 --- a/lib/x_twitter_scraper/models/x/communities/join_delete_all_response.rb +++ b/lib/x_twitter_scraper/models/x/communities/join_delete_all_response.rb @@ -22,6 +22,8 @@ class JoinDeleteAllResponse < XTwitterScraper::Internal::Type::BaseModel required :success, const: true # @!method initialize(community_id:, community_name:, success: true) + # Result of a community join or leave action. + # # @param community_id [String] # @param community_name [String] # @param success [Boolean, true] diff --git a/lib/x_twitter_scraper/models/x/communities/tweet_list_params.rb b/lib/x_twitter_scraper/models/x/communities/tweet_list_params.rb index f2371cb..a68015c 100644 --- a/lib/x_twitter_scraper/models/x/communities/tweet_list_params.rb +++ b/lib/x_twitter_scraper/models/x/communities/tweet_list_params.rb @@ -10,29 +10,29 @@ class TweetListParams < XTwitterScraper::Internal::Type::BaseModel include XTwitterScraper::Internal::Type::RequestParameters # @!attribute q - # Search query + # Search query for cross-community tweets # # @return [String] required :q, String # @!attribute cursor - # Pagination cursor + # Pagination cursor for cross-community results # # @return [String, nil] optional :cursor, String # @!attribute query_type - # Sort order (Latest or Top) + # Sort order for cross-community results (Latest or Top) # # @return [String, nil] optional :query_type, String # @!method initialize(q:, cursor: nil, query_type: nil, request_options: {}) - # @param q [String] Search query + # @param q [String] Search query for cross-community tweets # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for cross-community results # - # @param query_type [String] Sort order (Latest or Top) + # @param query_type [String] Sort order for cross-community results (Latest or Top) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/x_twitter_scraper/models/x/communities/tweet_list_response.rb b/lib/x_twitter_scraper/models/x/communities/tweet_list_response.rb new file mode 100644 index 0000000..4d589e2 --- /dev/null +++ b/lib/x_twitter_scraper/models/x/communities/tweet_list_response.rb @@ -0,0 +1,147 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + module Communities + # @see XTwitterScraper::Resources::X::Communities::Tweets#list + class TweetListResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute has_next_page + # + # @return [Boolean] + required :has_next_page, XTwitterScraper::Internal::Type::Boolean + + # @!attribute next_cursor + # + # @return [String] + required :next_cursor, String + + # @!attribute tweets + # + # @return [Array] + required :tweets, + -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet] } + + # @!method initialize(has_next_page:, next_cursor:, tweets:) + # Paginated list of tweets with cursor-based navigation. + # + # @param has_next_page [Boolean] + # @param next_cursor [String] + # @param tweets [Array] + + class Tweet < XTwitterScraper::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute text + # + # @return [String] + required :text, String + + # @!attribute author + # + # @return [XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author, nil] + optional :author, -> { XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author } + + # @!attribute bookmark_count + # + # @return [Integer, nil] + optional :bookmark_count, Integer, api_name: :bookmarkCount + + # @!attribute created_at + # + # @return [String, nil] + optional :created_at, String, api_name: :createdAt + + # @!attribute is_note_tweet + # True for Note Tweets (long-form content, up to 25,000 characters) + # + # @return [Boolean, nil] + optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet + + # @!attribute like_count + # + # @return [Integer, nil] + optional :like_count, Integer, api_name: :likeCount + + # @!attribute quote_count + # + # @return [Integer, nil] + optional :quote_count, Integer, api_name: :quoteCount + + # @!attribute reply_count + # + # @return [Integer, nil] + optional :reply_count, Integer, api_name: :replyCount + + # @!attribute retweet_count + # + # @return [Integer, nil] + optional :retweet_count, Integer, api_name: :retweetCount + + # @!attribute view_count + # + # @return [Integer, nil] + optional :view_count, Integer, api_name: :viewCount + + # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # Tweet returned from search results with inline author info. + # + # @param id [String] + # + # @param text [String] + # + # @param author [XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author] + # + # @param bookmark_count [Integer] + # + # @param created_at [String] + # + # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) + # + # @param like_count [Integer] + # + # @param quote_count [Integer] + # + # @param reply_count [Integer] + # + # @param retweet_count [Integer] + # + # @param view_count [Integer] + + # @see XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet#author + class Author < XTwitterScraper::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute username + # + # @return [String] + required :username, String + + # @!attribute verified + # + # @return [Boolean, nil] + optional :verified, XTwitterScraper::Internal::Type::Boolean + + # @!method initialize(id:, name:, username:, verified: nil) + # @param id [String] + # @param name [String] + # @param username [String] + # @param verified [Boolean] + end + end + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/community_action_result.rb b/lib/x_twitter_scraper/models/x/community_action_result.rb index 6ae3266..c5759d7 100644 --- a/lib/x_twitter_scraper/models/x/community_action_result.rb +++ b/lib/x_twitter_scraper/models/x/community_action_result.rb @@ -20,6 +20,8 @@ class CommunityActionResult < XTwitterScraper::Internal::Type::BaseModel required :success, const: true # @!method initialize(community_id:, community_name:, success: true) + # Result of a community join or leave action. + # # @param community_id [String] # @param community_name [String] # @param success [Boolean, true] diff --git a/lib/x_twitter_scraper/models/x/community_create_params.rb b/lib/x_twitter_scraper/models/x/community_create_params.rb index 7ae8079..fcab891 100644 --- a/lib/x_twitter_scraper/models/x/community_create_params.rb +++ b/lib/x_twitter_scraper/models/x/community_create_params.rb @@ -9,7 +9,7 @@ class CommunityCreateParams < XTwitterScraper::Internal::Type::BaseModel include XTwitterScraper::Internal::Type::RequestParameters # @!attribute account - # X account (@username or account ID) + # X account (@username or ID) creating the community # # @return [String] required :account, String @@ -27,7 +27,7 @@ class CommunityCreateParams < XTwitterScraper::Internal::Type::BaseModel optional :description, String # @!method initialize(account:, name:, description: nil, request_options: {}) - # @param account [String] X account (@username or account ID) + # @param account [String] X account (@username or ID) creating the community # # @param name [String] Community name # diff --git a/lib/x_twitter_scraper/models/x/community_delete_params.rb b/lib/x_twitter_scraper/models/x/community_delete_params.rb index fb24b9f..fbc8a83 100644 --- a/lib/x_twitter_scraper/models/x/community_delete_params.rb +++ b/lib/x_twitter_scraper/models/x/community_delete_params.rb @@ -14,7 +14,7 @@ class CommunityDeleteParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute account - # X account (@username or account ID) + # X account (@username or ID) deleting the community # # @return [String] required :account, String @@ -28,7 +28,7 @@ class CommunityDeleteParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, account:, community_name:, request_options: {}) # @param id [String] # - # @param account [String] X account (@username or account ID) + # @param account [String] X account (@username or ID) deleting the community # # @param community_name [String] Community name for confirmation # diff --git a/lib/x_twitter_scraper/models/x/community_retrieve_info_response.rb b/lib/x_twitter_scraper/models/x/community_retrieve_info_response.rb index 7da5eac..a8bcf72 100644 --- a/lib/x_twitter_scraper/models/x/community_retrieve_info_response.rb +++ b/lib/x_twitter_scraper/models/x/community_retrieve_info_response.rb @@ -17,7 +17,7 @@ class CommunityRetrieveInfoResponse < XTwitterScraper::Internal::Type::BaseModel # @see XTwitterScraper::Models::X::CommunityRetrieveInfoResponse#community class Community < XTwitterScraper::Internal::Type::BaseModel # @!attribute id - # Community ID + # Unique community identifier # # @return [String] required :id, String @@ -35,7 +35,7 @@ class Community < XTwitterScraper::Internal::Type::BaseModel optional :created_at, String # @!attribute description - # Community description + # About text for the community # # @return [String, nil] optional :description, String @@ -59,7 +59,7 @@ class Community < XTwitterScraper::Internal::Type::BaseModel optional :moderator_count, Integer # @!attribute name - # Community name + # Display name of the community # # @return [String, nil] optional :name, String @@ -81,13 +81,13 @@ class Community < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, banner_url: nil, created_at: nil, description: nil, join_policy: nil, member_count: nil, moderator_count: nil, name: nil, primary_topic: nil, rules: nil) # Community info object # - # @param id [String] Community ID + # @param id [String] Unique community identifier # # @param banner_url [String] Community banner image URL # # @param created_at [String] Community creation timestamp # - # @param description [String] Community description + # @param description [String] About text for the community # # @param join_policy [String] Join policy (open or restricted) # @@ -95,7 +95,7 @@ class Community < XTwitterScraper::Internal::Type::BaseModel # # @param moderator_count [Integer] Total moderator count # - # @param name [String] Community name + # @param name [String] Display name of the community # # @param primary_topic [XTwitterScraper::Models::X::CommunityRetrieveInfoResponse::Community::PrimaryTopic] Primary topic # diff --git a/lib/x_twitter_scraper/models/x/community_retrieve_members_response.rb b/lib/x_twitter_scraper/models/x/community_retrieve_members_response.rb new file mode 100644 index 0000000..036bf82 --- /dev/null +++ b/lib/x_twitter_scraper/models/x/community_retrieve_members_response.rb @@ -0,0 +1,105 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + # @see XTwitterScraper::Resources::X::Communities#retrieve_members + class CommunityRetrieveMembersResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute has_next_page + # + # @return [Boolean] + required :has_next_page, XTwitterScraper::Internal::Type::Boolean + + # @!attribute next_cursor + # + # @return [String] + required :next_cursor, String + + # @!attribute users + # + # @return [Array] + required :users, + -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::CommunityRetrieveMembersResponse::User] } + + # @!method initialize(has_next_page:, next_cursor:, users:) + # Paginated list of user profiles with cursor-based navigation. + # + # @param has_next_page [Boolean] + # @param next_cursor [String] + # @param users [Array] + + class User < XTwitterScraper::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute username + # + # @return [String] + required :username, String + + # @!attribute created_at + # + # @return [String, nil] + optional :created_at, String, api_name: :createdAt + + # @!attribute description + # + # @return [String, nil] + optional :description, String + + # @!attribute followers + # + # @return [Integer, nil] + optional :followers, Integer + + # @!attribute following + # + # @return [Integer, nil] + optional :following, Integer + + # @!attribute location + # + # @return [String, nil] + optional :location, String + + # @!attribute profile_picture + # + # @return [String, nil] + optional :profile_picture, String, api_name: :profilePicture + + # @!attribute statuses_count + # + # @return [Integer, nil] + optional :statuses_count, Integer, api_name: :statusesCount + + # @!attribute verified + # + # @return [Boolean, nil] + optional :verified, XTwitterScraper::Internal::Type::Boolean + + # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) + # X user profile with bio, follower counts, and verification status. + # + # @param id [String] + # @param name [String] + # @param username [String] + # @param created_at [String] + # @param description [String] + # @param followers [Integer] + # @param following [Integer] + # @param location [String] + # @param profile_picture [String] + # @param statuses_count [Integer] + # @param verified [Boolean] + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/community_retrieve_moderators_params.rb b/lib/x_twitter_scraper/models/x/community_retrieve_moderators_params.rb index 2f85823..bf0d6f7 100644 --- a/lib/x_twitter_scraper/models/x/community_retrieve_moderators_params.rb +++ b/lib/x_twitter_scraper/models/x/community_retrieve_moderators_params.rb @@ -14,7 +14,7 @@ class CommunityRetrieveModeratorsParams < XTwitterScraper::Internal::Type::BaseM required :id, String # @!attribute cursor - # Pagination cursor + # Pagination cursor for community moderators # # @return [String, nil] optional :cursor, String @@ -22,7 +22,7 @@ class CommunityRetrieveModeratorsParams < XTwitterScraper::Internal::Type::BaseM # @!method initialize(id:, cursor: nil, request_options: {}) # @param id [String] # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for community moderators # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/x_twitter_scraper/models/x/community_retrieve_moderators_response.rb b/lib/x_twitter_scraper/models/x/community_retrieve_moderators_response.rb new file mode 100644 index 0000000..7feb6fa --- /dev/null +++ b/lib/x_twitter_scraper/models/x/community_retrieve_moderators_response.rb @@ -0,0 +1,105 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + # @see XTwitterScraper::Resources::X::Communities#retrieve_moderators + class CommunityRetrieveModeratorsResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute has_next_page + # + # @return [Boolean] + required :has_next_page, XTwitterScraper::Internal::Type::Boolean + + # @!attribute next_cursor + # + # @return [String] + required :next_cursor, String + + # @!attribute users + # + # @return [Array] + required :users, + -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse::User] } + + # @!method initialize(has_next_page:, next_cursor:, users:) + # Paginated list of user profiles with cursor-based navigation. + # + # @param has_next_page [Boolean] + # @param next_cursor [String] + # @param users [Array] + + class User < XTwitterScraper::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute username + # + # @return [String] + required :username, String + + # @!attribute created_at + # + # @return [String, nil] + optional :created_at, String, api_name: :createdAt + + # @!attribute description + # + # @return [String, nil] + optional :description, String + + # @!attribute followers + # + # @return [Integer, nil] + optional :followers, Integer + + # @!attribute following + # + # @return [Integer, nil] + optional :following, Integer + + # @!attribute location + # + # @return [String, nil] + optional :location, String + + # @!attribute profile_picture + # + # @return [String, nil] + optional :profile_picture, String, api_name: :profilePicture + + # @!attribute statuses_count + # + # @return [Integer, nil] + optional :statuses_count, Integer, api_name: :statusesCount + + # @!attribute verified + # + # @return [Boolean, nil] + optional :verified, XTwitterScraper::Internal::Type::Boolean + + # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) + # X user profile with bio, follower counts, and verification status. + # + # @param id [String] + # @param name [String] + # @param username [String] + # @param created_at [String] + # @param description [String] + # @param followers [Integer] + # @param following [Integer] + # @param location [String] + # @param profile_picture [String] + # @param statuses_count [Integer] + # @param verified [Boolean] + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/community_retrieve_search_params.rb b/lib/x_twitter_scraper/models/x/community_retrieve_search_params.rb index f4c3ead..9df60ca 100644 --- a/lib/x_twitter_scraper/models/x/community_retrieve_search_params.rb +++ b/lib/x_twitter_scraper/models/x/community_retrieve_search_params.rb @@ -15,7 +15,7 @@ class CommunityRetrieveSearchParams < XTwitterScraper::Internal::Type::BaseModel required :q, String # @!attribute cursor - # Pagination cursor + # Pagination cursor for community search # # @return [String, nil] optional :cursor, String @@ -29,7 +29,7 @@ class CommunityRetrieveSearchParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(q:, cursor: nil, query_type: nil, request_options: {}) # @param q [String] Search query # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for community search # # @param query_type [String] Sort order (Latest or Top) # diff --git a/lib/x_twitter_scraper/models/x/community_retrieve_search_response.rb b/lib/x_twitter_scraper/models/x/community_retrieve_search_response.rb new file mode 100644 index 0000000..18c709b --- /dev/null +++ b/lib/x_twitter_scraper/models/x/community_retrieve_search_response.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + # @see XTwitterScraper::Resources::X::Communities#retrieve_search + class CommunityRetrieveSearchResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute has_next_page + # + # @return [Boolean] + required :has_next_page, XTwitterScraper::Internal::Type::Boolean + + # @!attribute next_cursor + # + # @return [String] + required :next_cursor, String + + # @!attribute tweets + # + # @return [Array] + required :tweets, + -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet] } + + # @!method initialize(has_next_page:, next_cursor:, tweets:) + # Paginated list of tweets with cursor-based navigation. + # + # @param has_next_page [Boolean] + # @param next_cursor [String] + # @param tweets [Array] + + class Tweet < XTwitterScraper::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute text + # + # @return [String] + required :text, String + + # @!attribute author + # + # @return [XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author, nil] + optional :author, -> { XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author } + + # @!attribute bookmark_count + # + # @return [Integer, nil] + optional :bookmark_count, Integer, api_name: :bookmarkCount + + # @!attribute created_at + # + # @return [String, nil] + optional :created_at, String, api_name: :createdAt + + # @!attribute is_note_tweet + # True for Note Tweets (long-form content, up to 25,000 characters) + # + # @return [Boolean, nil] + optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet + + # @!attribute like_count + # + # @return [Integer, nil] + optional :like_count, Integer, api_name: :likeCount + + # @!attribute quote_count + # + # @return [Integer, nil] + optional :quote_count, Integer, api_name: :quoteCount + + # @!attribute reply_count + # + # @return [Integer, nil] + optional :reply_count, Integer, api_name: :replyCount + + # @!attribute retweet_count + # + # @return [Integer, nil] + optional :retweet_count, Integer, api_name: :retweetCount + + # @!attribute view_count + # + # @return [Integer, nil] + optional :view_count, Integer, api_name: :viewCount + + # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # Tweet returned from search results with inline author info. + # + # @param id [String] + # + # @param text [String] + # + # @param author [XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author] + # + # @param bookmark_count [Integer] + # + # @param created_at [String] + # + # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) + # + # @param like_count [Integer] + # + # @param quote_count [Integer] + # + # @param reply_count [Integer] + # + # @param retweet_count [Integer] + # + # @param view_count [Integer] + + # @see XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet#author + class Author < XTwitterScraper::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute username + # + # @return [String] + required :username, String + + # @!attribute verified + # + # @return [Boolean, nil] + optional :verified, XTwitterScraper::Internal::Type::Boolean + + # @!method initialize(id:, name:, username:, verified: nil) + # @param id [String] + # @param name [String] + # @param username [String] + # @param verified [Boolean] + end + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/dm_retrieve_history_params.rb b/lib/x_twitter_scraper/models/x/dm_retrieve_history_params.rb index 45abbff..1e38998 100644 --- a/lib/x_twitter_scraper/models/x/dm_retrieve_history_params.rb +++ b/lib/x_twitter_scraper/models/x/dm_retrieve_history_params.rb @@ -14,7 +14,7 @@ class DmRetrieveHistoryParams < XTwitterScraper::Internal::Type::BaseModel required :user_id, String # @!attribute cursor - # Pagination cursor from previous response + # Pagination cursor for DM history # # @return [String, nil] optional :cursor, String @@ -28,7 +28,7 @@ class DmRetrieveHistoryParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(user_id:, cursor: nil, max_id: nil, request_options: {}) # @param user_id [String] # - # @param cursor [String] Pagination cursor from previous response + # @param cursor [String] Pagination cursor for DM history # # @param max_id [String] Legacy pagination cursor (backward compat) # diff --git a/lib/x_twitter_scraper/models/x/dm_send_params.rb b/lib/x_twitter_scraper/models/x/dm_send_params.rb index df124fc..8921ae9 100644 --- a/lib/x_twitter_scraper/models/x/dm_send_params.rb +++ b/lib/x_twitter_scraper/models/x/dm_send_params.rb @@ -14,7 +14,7 @@ class DmSendParams < XTwitterScraper::Internal::Type::BaseModel required :user_id, String # @!attribute account - # X account (@username or account ID) + # X account (@username or ID) sending the DM # # @return [String] required :account, String @@ -37,7 +37,7 @@ class DmSendParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(user_id:, account:, text:, media_ids: nil, reply_to_message_id: nil, request_options: {}) # @param user_id [String] # - # @param account [String] X account (@username or account ID) + # @param account [String] X account (@username or ID) sending the DM # # @param text [String] # diff --git a/lib/x_twitter_scraper/models/x/list_retrieve_followers_params.rb b/lib/x_twitter_scraper/models/x/list_retrieve_followers_params.rb index f63a74a..be0e53d 100644 --- a/lib/x_twitter_scraper/models/x/list_retrieve_followers_params.rb +++ b/lib/x_twitter_scraper/models/x/list_retrieve_followers_params.rb @@ -14,7 +14,7 @@ class ListRetrieveFollowersParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute cursor - # Pagination cursor + # Pagination cursor for list followers # # @return [String, nil] optional :cursor, String @@ -22,7 +22,7 @@ class ListRetrieveFollowersParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, cursor: nil, request_options: {}) # @param id [String] # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for list followers # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/x_twitter_scraper/models/x/list_retrieve_followers_response.rb b/lib/x_twitter_scraper/models/x/list_retrieve_followers_response.rb new file mode 100644 index 0000000..2257458 --- /dev/null +++ b/lib/x_twitter_scraper/models/x/list_retrieve_followers_response.rb @@ -0,0 +1,105 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + # @see XTwitterScraper::Resources::X::Lists#retrieve_followers + class ListRetrieveFollowersResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute has_next_page + # + # @return [Boolean] + required :has_next_page, XTwitterScraper::Internal::Type::Boolean + + # @!attribute next_cursor + # + # @return [String] + required :next_cursor, String + + # @!attribute users + # + # @return [Array] + required :users, + -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::ListRetrieveFollowersResponse::User] } + + # @!method initialize(has_next_page:, next_cursor:, users:) + # Paginated list of user profiles with cursor-based navigation. + # + # @param has_next_page [Boolean] + # @param next_cursor [String] + # @param users [Array] + + class User < XTwitterScraper::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute username + # + # @return [String] + required :username, String + + # @!attribute created_at + # + # @return [String, nil] + optional :created_at, String, api_name: :createdAt + + # @!attribute description + # + # @return [String, nil] + optional :description, String + + # @!attribute followers + # + # @return [Integer, nil] + optional :followers, Integer + + # @!attribute following + # + # @return [Integer, nil] + optional :following, Integer + + # @!attribute location + # + # @return [String, nil] + optional :location, String + + # @!attribute profile_picture + # + # @return [String, nil] + optional :profile_picture, String, api_name: :profilePicture + + # @!attribute statuses_count + # + # @return [Integer, nil] + optional :statuses_count, Integer, api_name: :statusesCount + + # @!attribute verified + # + # @return [Boolean, nil] + optional :verified, XTwitterScraper::Internal::Type::Boolean + + # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) + # X user profile with bio, follower counts, and verification status. + # + # @param id [String] + # @param name [String] + # @param username [String] + # @param created_at [String] + # @param description [String] + # @param followers [Integer] + # @param following [Integer] + # @param location [String] + # @param profile_picture [String] + # @param statuses_count [Integer] + # @param verified [Boolean] + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/list_retrieve_members_params.rb b/lib/x_twitter_scraper/models/x/list_retrieve_members_params.rb index 96c3f6a..663b6cb 100644 --- a/lib/x_twitter_scraper/models/x/list_retrieve_members_params.rb +++ b/lib/x_twitter_scraper/models/x/list_retrieve_members_params.rb @@ -14,7 +14,7 @@ class ListRetrieveMembersParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute cursor - # Pagination cursor + # Pagination cursor for list members # # @return [String, nil] optional :cursor, String @@ -22,7 +22,7 @@ class ListRetrieveMembersParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, cursor: nil, request_options: {}) # @param id [String] # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for list members # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/x_twitter_scraper/models/x/list_retrieve_members_response.rb b/lib/x_twitter_scraper/models/x/list_retrieve_members_response.rb new file mode 100644 index 0000000..0867380 --- /dev/null +++ b/lib/x_twitter_scraper/models/x/list_retrieve_members_response.rb @@ -0,0 +1,105 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + # @see XTwitterScraper::Resources::X::Lists#retrieve_members + class ListRetrieveMembersResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute has_next_page + # + # @return [Boolean] + required :has_next_page, XTwitterScraper::Internal::Type::Boolean + + # @!attribute next_cursor + # + # @return [String] + required :next_cursor, String + + # @!attribute users + # + # @return [Array] + required :users, + -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::ListRetrieveMembersResponse::User] } + + # @!method initialize(has_next_page:, next_cursor:, users:) + # Paginated list of user profiles with cursor-based navigation. + # + # @param has_next_page [Boolean] + # @param next_cursor [String] + # @param users [Array] + + class User < XTwitterScraper::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute username + # + # @return [String] + required :username, String + + # @!attribute created_at + # + # @return [String, nil] + optional :created_at, String, api_name: :createdAt + + # @!attribute description + # + # @return [String, nil] + optional :description, String + + # @!attribute followers + # + # @return [Integer, nil] + optional :followers, Integer + + # @!attribute following + # + # @return [Integer, nil] + optional :following, Integer + + # @!attribute location + # + # @return [String, nil] + optional :location, String + + # @!attribute profile_picture + # + # @return [String, nil] + optional :profile_picture, String, api_name: :profilePicture + + # @!attribute statuses_count + # + # @return [Integer, nil] + optional :statuses_count, Integer, api_name: :statusesCount + + # @!attribute verified + # + # @return [Boolean, nil] + optional :verified, XTwitterScraper::Internal::Type::Boolean + + # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) + # X user profile with bio, follower counts, and verification status. + # + # @param id [String] + # @param name [String] + # @param username [String] + # @param created_at [String] + # @param description [String] + # @param followers [Integer] + # @param following [Integer] + # @param location [String] + # @param profile_picture [String] + # @param statuses_count [Integer] + # @param verified [Boolean] + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/list_retrieve_tweets_params.rb b/lib/x_twitter_scraper/models/x/list_retrieve_tweets_params.rb index ed89485..9cd2cdc 100644 --- a/lib/x_twitter_scraper/models/x/list_retrieve_tweets_params.rb +++ b/lib/x_twitter_scraper/models/x/list_retrieve_tweets_params.rb @@ -14,7 +14,7 @@ class ListRetrieveTweetsParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute cursor - # Pagination cursor + # Pagination cursor for list tweets # # @return [String, nil] optional :cursor, String @@ -40,7 +40,7 @@ class ListRetrieveTweetsParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, cursor: nil, include_replies: nil, since_time: nil, until_time: nil, request_options: {}) # @param id [String] # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for list tweets # # @param include_replies [Boolean] Include replies (default false) # diff --git a/lib/x_twitter_scraper/models/x/list_retrieve_tweets_response.rb b/lib/x_twitter_scraper/models/x/list_retrieve_tweets_response.rb new file mode 100644 index 0000000..70358b4 --- /dev/null +++ b/lib/x_twitter_scraper/models/x/list_retrieve_tweets_response.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + # @see XTwitterScraper::Resources::X::Lists#retrieve_tweets + class ListRetrieveTweetsResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute has_next_page + # + # @return [Boolean] + required :has_next_page, XTwitterScraper::Internal::Type::Boolean + + # @!attribute next_cursor + # + # @return [String] + required :next_cursor, String + + # @!attribute tweets + # + # @return [Array] + required :tweets, + -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet] } + + # @!method initialize(has_next_page:, next_cursor:, tweets:) + # Paginated list of tweets with cursor-based navigation. + # + # @param has_next_page [Boolean] + # @param next_cursor [String] + # @param tweets [Array] + + class Tweet < XTwitterScraper::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute text + # + # @return [String] + required :text, String + + # @!attribute author + # + # @return [XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author, nil] + optional :author, -> { XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author } + + # @!attribute bookmark_count + # + # @return [Integer, nil] + optional :bookmark_count, Integer, api_name: :bookmarkCount + + # @!attribute created_at + # + # @return [String, nil] + optional :created_at, String, api_name: :createdAt + + # @!attribute is_note_tweet + # True for Note Tweets (long-form content, up to 25,000 characters) + # + # @return [Boolean, nil] + optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet + + # @!attribute like_count + # + # @return [Integer, nil] + optional :like_count, Integer, api_name: :likeCount + + # @!attribute quote_count + # + # @return [Integer, nil] + optional :quote_count, Integer, api_name: :quoteCount + + # @!attribute reply_count + # + # @return [Integer, nil] + optional :reply_count, Integer, api_name: :replyCount + + # @!attribute retweet_count + # + # @return [Integer, nil] + optional :retweet_count, Integer, api_name: :retweetCount + + # @!attribute view_count + # + # @return [Integer, nil] + optional :view_count, Integer, api_name: :viewCount + + # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # Tweet returned from search results with inline author info. + # + # @param id [String] + # + # @param text [String] + # + # @param author [XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author] + # + # @param bookmark_count [Integer] + # + # @param created_at [String] + # + # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) + # + # @param like_count [Integer] + # + # @param quote_count [Integer] + # + # @param reply_count [Integer] + # + # @param retweet_count [Integer] + # + # @param view_count [Integer] + + # @see XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet#author + class Author < XTwitterScraper::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute username + # + # @return [String] + required :username, String + + # @!attribute verified + # + # @return [Boolean, nil] + optional :verified, XTwitterScraper::Internal::Type::Boolean + + # @!method initialize(id:, name:, username:, verified: nil) + # @param id [String] + # @param name [String] + # @param username [String] + # @param verified [Boolean] + end + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/media_upload_params.rb b/lib/x_twitter_scraper/models/x/media_upload_params.rb index 7d79196..b23b4e7 100644 --- a/lib/x_twitter_scraper/models/x/media_upload_params.rb +++ b/lib/x_twitter_scraper/models/x/media_upload_params.rb @@ -9,7 +9,7 @@ class MediaUploadParams < XTwitterScraper::Internal::Type::BaseModel include XTwitterScraper::Internal::Type::RequestParameters # @!attribute account - # X account (@username or account ID) + # X account (@username or ID) uploading media # # @return [String] required :account, String @@ -26,7 +26,7 @@ class MediaUploadParams < XTwitterScraper::Internal::Type::BaseModel optional :is_long_video, XTwitterScraper::Internal::Type::Boolean # @!method initialize(account:, file:, is_long_video: nil, request_options: {}) - # @param account [String] X account (@username or account ID) + # @param account [String] X account (@username or ID) uploading media # # @param file [Pathname, StringIO, IO, String, XTwitterScraper::FilePart] Media file to upload # diff --git a/lib/x_twitter_scraper/models/x/profile_update_avatar_params.rb b/lib/x_twitter_scraper/models/x/profile_update_avatar_params.rb index 3c0bb5f..8918f53 100644 --- a/lib/x_twitter_scraper/models/x/profile_update_avatar_params.rb +++ b/lib/x_twitter_scraper/models/x/profile_update_avatar_params.rb @@ -9,7 +9,7 @@ class ProfileUpdateAvatarParams < XTwitterScraper::Internal::Type::BaseModel include XTwitterScraper::Internal::Type::RequestParameters # @!attribute account - # X account (@username or account ID) + # X account (@username or ID) for avatar update # # @return [String] required :account, String @@ -21,7 +21,7 @@ class ProfileUpdateAvatarParams < XTwitterScraper::Internal::Type::BaseModel required :file, XTwitterScraper::Internal::Type::FileInput # @!method initialize(account:, file:, request_options: {}) - # @param account [String] X account (@username or account ID) + # @param account [String] X account (@username or ID) for avatar update # # @param file [Pathname, StringIO, IO, String, XTwitterScraper::FilePart] Avatar image (max 716KB) # diff --git a/lib/x_twitter_scraper/models/x/profile_update_banner_params.rb b/lib/x_twitter_scraper/models/x/profile_update_banner_params.rb index 283c5ba..9b12227 100644 --- a/lib/x_twitter_scraper/models/x/profile_update_banner_params.rb +++ b/lib/x_twitter_scraper/models/x/profile_update_banner_params.rb @@ -9,7 +9,7 @@ class ProfileUpdateBannerParams < XTwitterScraper::Internal::Type::BaseModel include XTwitterScraper::Internal::Type::RequestParameters # @!attribute account - # X account (@username or account ID) + # X account (@username or ID) for banner update # # @return [String] required :account, String @@ -21,7 +21,7 @@ class ProfileUpdateBannerParams < XTwitterScraper::Internal::Type::BaseModel required :file, XTwitterScraper::Internal::Type::FileInput # @!method initialize(account:, file:, request_options: {}) - # @param account [String] X account (@username or account ID) + # @param account [String] X account (@username or ID) for banner update # # @param file [Pathname, StringIO, IO, String, XTwitterScraper::FilePart] Banner image (max 2MB) # diff --git a/lib/x_twitter_scraper/models/x/profile_update_params.rb b/lib/x_twitter_scraper/models/x/profile_update_params.rb index 5e85cc9..b96a96a 100644 --- a/lib/x_twitter_scraper/models/x/profile_update_params.rb +++ b/lib/x_twitter_scraper/models/x/profile_update_params.rb @@ -9,7 +9,7 @@ class ProfileUpdateParams < XTwitterScraper::Internal::Type::BaseModel include XTwitterScraper::Internal::Type::RequestParameters # @!attribute account - # X account (@username or account ID) + # X account (@username or ID) to update profile # # @return [String] required :account, String @@ -38,7 +38,7 @@ class ProfileUpdateParams < XTwitterScraper::Internal::Type::BaseModel optional :url, String # @!method initialize(account:, description: nil, location: nil, name: nil, url: nil, request_options: {}) - # @param account [String] X account (@username or account ID) + # @param account [String] X account (@username or ID) to update profile # # @param description [String] Bio description # diff --git a/lib/x_twitter_scraper/models/x/search_tweet.rb b/lib/x_twitter_scraper/models/x/search_tweet.rb index e538dc1..9f6f293 100644 --- a/lib/x_twitter_scraper/models/x/search_tweet.rb +++ b/lib/x_twitter_scraper/models/x/search_tweet.rb @@ -30,7 +30,7 @@ class SearchTweet < XTwitterScraper::Internal::Type::BaseModel optional :created_at, String, api_name: :createdAt # @!attribute is_note_tweet - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) # # @return [Boolean, nil] optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet @@ -61,6 +61,8 @@ class SearchTweet < XTwitterScraper::Internal::Type::BaseModel optional :view_count, Integer, api_name: :viewCount # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # Tweet returned from search results with inline author info. + # # @param id [String] # # @param text [String] @@ -71,7 +73,7 @@ class SearchTweet < XTwitterScraper::Internal::Type::BaseModel # # @param created_at [String] # - # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) # # @param like_count [Integer] # diff --git a/lib/x_twitter_scraper/models/x/tweet_author.rb b/lib/x_twitter_scraper/models/x/tweet_author.rb index 5dd442a..e441342 100644 --- a/lib/x_twitter_scraper/models/x/tweet_author.rb +++ b/lib/x_twitter_scraper/models/x/tweet_author.rb @@ -30,6 +30,8 @@ class TweetAuthor < XTwitterScraper::Internal::Type::BaseModel optional :profile_picture, String, api_name: :profilePicture # @!method initialize(id:, followers:, username:, verified:, profile_picture: nil) + # Author of a tweet with follower count and verification status. + # # @param id [String] # @param followers [Integer] # @param username [String] diff --git a/lib/x_twitter_scraper/models/x/tweet_detail.rb b/lib/x_twitter_scraper/models/x/tweet_detail.rb index 70cc92a..61c2e05 100644 --- a/lib/x_twitter_scraper/models/x/tweet_detail.rb +++ b/lib/x_twitter_scraper/models/x/tweet_detail.rb @@ -58,8 +58,8 @@ class TweetDetail < XTwitterScraper::Internal::Type::BaseModel # @!attribute entities # Parsed entities from the tweet text (URLs, mentions, hashtags, media) # - # @return [Object, nil] - optional :entities, XTwitterScraper::Internal::Type::Unknown + # @return [Hash{Symbol=>Object}, nil] + optional :entities, XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown] # @!attribute is_note_tweet # Whether this is a Note Tweet (long-form post, up to 25,000 characters) @@ -88,8 +88,8 @@ class TweetDetail < XTwitterScraper::Internal::Type::BaseModel # @!attribute quoted_tweet # The quoted tweet object, present when isQuoteStatus is true # - # @return [Object, nil] - optional :quoted_tweet, XTwitterScraper::Internal::Type::Unknown + # @return [Hash{Symbol=>Object}, nil] + optional :quoted_tweet, XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown] # @!attribute source # Client application used to post this tweet @@ -98,6 +98,8 @@ class TweetDetail < XTwitterScraper::Internal::Type::BaseModel optional :source, String # @!method initialize(id:, bookmark_count:, like_count:, quote_count:, reply_count:, retweet_count:, text:, view_count:, conversation_id: nil, created_at: nil, entities: nil, is_note_tweet: nil, is_quote_status: nil, is_reply: nil, media: nil, quoted_tweet: nil, source: nil) + # Full tweet with text, engagement metrics, media, and metadata. + # # @param id [String] # # @param bookmark_count [Integer] @@ -118,7 +120,7 @@ class TweetDetail < XTwitterScraper::Internal::Type::BaseModel # # @param created_at [String] # - # @param entities [Object] Parsed entities from the tweet text (URLs, mentions, hashtags, media) + # @param entities [Hash{Symbol=>Object}] Parsed entities from the tweet text (URLs, mentions, hashtags, media) # # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) # @@ -128,7 +130,7 @@ class TweetDetail < XTwitterScraper::Internal::Type::BaseModel # # @param media [Array] Attached media items, omitted when the tweet has no media # - # @param quoted_tweet [Object] The quoted tweet object, present when isQuoteStatus is true + # @param quoted_tweet [Hash{Symbol=>Object}] The quoted tweet object, present when isQuoteStatus is true # # @param source [String] Client application used to post this tweet diff --git a/lib/x_twitter_scraper/models/x/tweet_get_favoriters_params.rb b/lib/x_twitter_scraper/models/x/tweet_get_favoriters_params.rb index f7e0810..e325ee2 100644 --- a/lib/x_twitter_scraper/models/x/tweet_get_favoriters_params.rb +++ b/lib/x_twitter_scraper/models/x/tweet_get_favoriters_params.rb @@ -14,7 +14,7 @@ class TweetGetFavoritersParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute cursor - # Pagination cursor from previous response + # Pagination cursor for favoriters # # @return [String, nil] optional :cursor, String @@ -22,7 +22,7 @@ class TweetGetFavoritersParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, cursor: nil, request_options: {}) # @param id [String] # - # @param cursor [String] Pagination cursor from previous response + # @param cursor [String] Pagination cursor for favoriters # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/x_twitter_scraper/models/x/tweet_get_favoriters_response.rb b/lib/x_twitter_scraper/models/x/tweet_get_favoriters_response.rb index f2bd76f..42b5f19 100644 --- a/lib/x_twitter_scraper/models/x/tweet_get_favoriters_response.rb +++ b/lib/x_twitter_scraper/models/x/tweet_get_favoriters_response.rb @@ -22,6 +22,8 @@ class TweetGetFavoritersResponse < XTwitterScraper::Internal::Type::BaseModel -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetGetFavoritersResponse::User] } # @!method initialize(has_next_page:, next_cursor:, users:) + # Paginated list of user profiles with cursor-based navigation. + # # @param has_next_page [Boolean] # @param next_cursor [String] # @param users [Array] @@ -83,6 +85,8 @@ class User < XTwitterScraper::Internal::Type::BaseModel optional :verified, XTwitterScraper::Internal::Type::Boolean # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) + # X user profile with bio, follower counts, and verification status. + # # @param id [String] # @param name [String] # @param username [String] diff --git a/lib/x_twitter_scraper/models/x/tweet_get_quotes_params.rb b/lib/x_twitter_scraper/models/x/tweet_get_quotes_params.rb index 10f67b4..cac3055 100644 --- a/lib/x_twitter_scraper/models/x/tweet_get_quotes_params.rb +++ b/lib/x_twitter_scraper/models/x/tweet_get_quotes_params.rb @@ -14,25 +14,25 @@ class TweetGetQuotesParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute cursor - # Pagination cursor + # Pagination cursor for quote tweets # # @return [String, nil] optional :cursor, String # @!attribute include_replies - # Include replies (default false) + # Include reply quotes (default false) # # @return [Boolean, nil] optional :include_replies, XTwitterScraper::Internal::Type::Boolean # @!attribute since_time - # Unix timestamp - filter after + # Unix timestamp - return quotes posted after this time # # @return [String, nil] optional :since_time, String # @!attribute until_time - # Unix timestamp - filter before + # Unix timestamp - return quotes posted before this time # # @return [String, nil] optional :until_time, String @@ -40,13 +40,13 @@ class TweetGetQuotesParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, cursor: nil, include_replies: nil, since_time: nil, until_time: nil, request_options: {}) # @param id [String] # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for quote tweets # - # @param include_replies [Boolean] Include replies (default false) + # @param include_replies [Boolean] Include reply quotes (default false) # - # @param since_time [String] Unix timestamp - filter after + # @param since_time [String] Unix timestamp - return quotes posted after this time # - # @param until_time [String] Unix timestamp - filter before + # @param until_time [String] Unix timestamp - return quotes posted before this time # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/x_twitter_scraper/models/x/tweet_get_quotes_response.rb b/lib/x_twitter_scraper/models/x/tweet_get_quotes_response.rb index 09759f7..a6cb11b 100644 --- a/lib/x_twitter_scraper/models/x/tweet_get_quotes_response.rb +++ b/lib/x_twitter_scraper/models/x/tweet_get_quotes_response.rb @@ -22,6 +22,8 @@ class TweetGetQuotesResponse < XTwitterScraper::Internal::Type::BaseModel -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet] } # @!method initialize(has_next_page:, next_cursor:, tweets:) + # Paginated list of tweets with cursor-based navigation. + # # @param has_next_page [Boolean] # @param next_cursor [String] # @param tweets [Array] @@ -53,7 +55,7 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel optional :created_at, String, api_name: :createdAt # @!attribute is_note_tweet - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) # # @return [Boolean, nil] optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet @@ -84,6 +86,8 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel optional :view_count, Integer, api_name: :viewCount # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # Tweet returned from search results with inline author info. + # # @param id [String] # # @param text [String] @@ -94,7 +98,7 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # # @param created_at [String] # - # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) # # @param like_count [Integer] # diff --git a/lib/x_twitter_scraper/models/x/tweet_get_replies_params.rb b/lib/x_twitter_scraper/models/x/tweet_get_replies_params.rb index d2651c6..97d916e 100644 --- a/lib/x_twitter_scraper/models/x/tweet_get_replies_params.rb +++ b/lib/x_twitter_scraper/models/x/tweet_get_replies_params.rb @@ -14,19 +14,19 @@ class TweetGetRepliesParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute cursor - # Pagination cursor + # Pagination cursor for tweet replies # # @return [String, nil] optional :cursor, String # @!attribute since_time - # Unix timestamp - filter after + # Unix timestamp - return replies posted after this time # # @return [String, nil] optional :since_time, String # @!attribute until_time - # Unix timestamp - filter before + # Unix timestamp - return replies posted before this time # # @return [String, nil] optional :until_time, String @@ -34,11 +34,11 @@ class TweetGetRepliesParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, cursor: nil, since_time: nil, until_time: nil, request_options: {}) # @param id [String] # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for tweet replies # - # @param since_time [String] Unix timestamp - filter after + # @param since_time [String] Unix timestamp - return replies posted after this time # - # @param until_time [String] Unix timestamp - filter before + # @param until_time [String] Unix timestamp - return replies posted before this time # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/x_twitter_scraper/models/x/tweet_get_replies_response.rb b/lib/x_twitter_scraper/models/x/tweet_get_replies_response.rb index 0e13f27..3c4d9a2 100644 --- a/lib/x_twitter_scraper/models/x/tweet_get_replies_response.rb +++ b/lib/x_twitter_scraper/models/x/tweet_get_replies_response.rb @@ -22,6 +22,8 @@ class TweetGetRepliesResponse < XTwitterScraper::Internal::Type::BaseModel -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet] } # @!method initialize(has_next_page:, next_cursor:, tweets:) + # Paginated list of tweets with cursor-based navigation. + # # @param has_next_page [Boolean] # @param next_cursor [String] # @param tweets [Array] @@ -53,7 +55,7 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel optional :created_at, String, api_name: :createdAt # @!attribute is_note_tweet - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) # # @return [Boolean, nil] optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet @@ -84,6 +86,8 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel optional :view_count, Integer, api_name: :viewCount # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # Tweet returned from search results with inline author info. + # # @param id [String] # # @param text [String] @@ -94,7 +98,7 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # # @param created_at [String] # - # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) # # @param like_count [Integer] # diff --git a/lib/x_twitter_scraper/models/x/tweet_get_retweeters_params.rb b/lib/x_twitter_scraper/models/x/tweet_get_retweeters_params.rb index 105e679..b92b475 100644 --- a/lib/x_twitter_scraper/models/x/tweet_get_retweeters_params.rb +++ b/lib/x_twitter_scraper/models/x/tweet_get_retweeters_params.rb @@ -14,7 +14,7 @@ class TweetGetRetweetersParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute cursor - # Pagination cursor + # Pagination cursor for retweeters # # @return [String, nil] optional :cursor, String @@ -22,7 +22,7 @@ class TweetGetRetweetersParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, cursor: nil, request_options: {}) # @param id [String] # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for retweeters # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/x_twitter_scraper/models/x/tweet_get_retweeters_response.rb b/lib/x_twitter_scraper/models/x/tweet_get_retweeters_response.rb index 67f3821..8db37bb 100644 --- a/lib/x_twitter_scraper/models/x/tweet_get_retweeters_response.rb +++ b/lib/x_twitter_scraper/models/x/tweet_get_retweeters_response.rb @@ -22,6 +22,8 @@ class TweetGetRetweetersResponse < XTwitterScraper::Internal::Type::BaseModel -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetGetRetweetersResponse::User] } # @!method initialize(has_next_page:, next_cursor:, users:) + # Paginated list of user profiles with cursor-based navigation. + # # @param has_next_page [Boolean] # @param next_cursor [String] # @param users [Array] @@ -83,6 +85,8 @@ class User < XTwitterScraper::Internal::Type::BaseModel optional :verified, XTwitterScraper::Internal::Type::Boolean # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) + # X user profile with bio, follower counts, and verification status. + # # @param id [String] # @param name [String] # @param username [String] diff --git a/lib/x_twitter_scraper/models/x/tweet_get_thread_params.rb b/lib/x_twitter_scraper/models/x/tweet_get_thread_params.rb index b1fbcd9..f395e34 100644 --- a/lib/x_twitter_scraper/models/x/tweet_get_thread_params.rb +++ b/lib/x_twitter_scraper/models/x/tweet_get_thread_params.rb @@ -14,7 +14,7 @@ class TweetGetThreadParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute cursor - # Pagination cursor + # Pagination cursor for thread tweets # # @return [String, nil] optional :cursor, String @@ -22,7 +22,7 @@ class TweetGetThreadParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, cursor: nil, request_options: {}) # @param id [String] # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for thread tweets # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/x_twitter_scraper/models/x/tweet_get_thread_response.rb b/lib/x_twitter_scraper/models/x/tweet_get_thread_response.rb index 999739c..a168ec5 100644 --- a/lib/x_twitter_scraper/models/x/tweet_get_thread_response.rb +++ b/lib/x_twitter_scraper/models/x/tweet_get_thread_response.rb @@ -22,6 +22,8 @@ class TweetGetThreadResponse < XTwitterScraper::Internal::Type::BaseModel -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet] } # @!method initialize(has_next_page:, next_cursor:, tweets:) + # Paginated list of tweets with cursor-based navigation. + # # @param has_next_page [Boolean] # @param next_cursor [String] # @param tweets [Array] @@ -53,7 +55,7 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel optional :created_at, String, api_name: :createdAt # @!attribute is_note_tweet - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) # # @return [Boolean, nil] optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet @@ -84,6 +86,8 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel optional :view_count, Integer, api_name: :viewCount # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # Tweet returned from search results with inline author info. + # # @param id [String] # # @param text [String] @@ -94,7 +98,7 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # # @param created_at [String] # - # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) # # @param like_count [Integer] # diff --git a/lib/x_twitter_scraper/models/x/tweet_list_response.rb b/lib/x_twitter_scraper/models/x/tweet_list_response.rb new file mode 100644 index 0000000..9aa1e1e --- /dev/null +++ b/lib/x_twitter_scraper/models/x/tweet_list_response.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + # @see XTwitterScraper::Resources::X::Tweets#list + class TweetListResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute has_next_page + # + # @return [Boolean] + required :has_next_page, XTwitterScraper::Internal::Type::Boolean + + # @!attribute next_cursor + # + # @return [String] + required :next_cursor, String + + # @!attribute tweets + # + # @return [Array] + required :tweets, + -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetListResponse::Tweet] } + + # @!method initialize(has_next_page:, next_cursor:, tweets:) + # Paginated list of tweets with cursor-based navigation. + # + # @param has_next_page [Boolean] + # @param next_cursor [String] + # @param tweets [Array] + + class Tweet < XTwitterScraper::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute text + # + # @return [String] + required :text, String + + # @!attribute author + # + # @return [XTwitterScraper::Models::X::TweetListResponse::Tweet::Author, nil] + optional :author, -> { XTwitterScraper::Models::X::TweetListResponse::Tweet::Author } + + # @!attribute bookmark_count + # + # @return [Integer, nil] + optional :bookmark_count, Integer, api_name: :bookmarkCount + + # @!attribute created_at + # + # @return [String, nil] + optional :created_at, String, api_name: :createdAt + + # @!attribute is_note_tweet + # True for Note Tweets (long-form content, up to 25,000 characters) + # + # @return [Boolean, nil] + optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet + + # @!attribute like_count + # + # @return [Integer, nil] + optional :like_count, Integer, api_name: :likeCount + + # @!attribute quote_count + # + # @return [Integer, nil] + optional :quote_count, Integer, api_name: :quoteCount + + # @!attribute reply_count + # + # @return [Integer, nil] + optional :reply_count, Integer, api_name: :replyCount + + # @!attribute retweet_count + # + # @return [Integer, nil] + optional :retweet_count, Integer, api_name: :retweetCount + + # @!attribute view_count + # + # @return [Integer, nil] + optional :view_count, Integer, api_name: :viewCount + + # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # Tweet returned from search results with inline author info. + # + # @param id [String] + # + # @param text [String] + # + # @param author [XTwitterScraper::Models::X::TweetListResponse::Tweet::Author] + # + # @param bookmark_count [Integer] + # + # @param created_at [String] + # + # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) + # + # @param like_count [Integer] + # + # @param quote_count [Integer] + # + # @param reply_count [Integer] + # + # @param retweet_count [Integer] + # + # @param view_count [Integer] + + # @see XTwitterScraper::Models::X::TweetListResponse::Tweet#author + class Author < XTwitterScraper::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute username + # + # @return [String] + required :username, String + + # @!attribute verified + # + # @return [Boolean, nil] + optional :verified, XTwitterScraper::Internal::Type::Boolean + + # @!method initialize(id:, name:, username:, verified: nil) + # @param id [String] + # @param name [String] + # @param username [String] + # @param verified [Boolean] + end + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/tweet_search_response.rb b/lib/x_twitter_scraper/models/x/tweet_search_response.rb index 27f137c..85003c3 100644 --- a/lib/x_twitter_scraper/models/x/tweet_search_response.rb +++ b/lib/x_twitter_scraper/models/x/tweet_search_response.rb @@ -22,6 +22,8 @@ class TweetSearchResponse < XTwitterScraper::Internal::Type::BaseModel -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetSearchResponse::Tweet] } # @!method initialize(has_next_page:, next_cursor:, tweets:) + # Paginated list of tweets with cursor-based navigation. + # # @param has_next_page [Boolean] # @param next_cursor [String] # @param tweets [Array] @@ -53,7 +55,7 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel optional :created_at, String, api_name: :createdAt # @!attribute is_note_tweet - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) # # @return [Boolean, nil] optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet @@ -84,6 +86,8 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel optional :view_count, Integer, api_name: :viewCount # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # Tweet returned from search results with inline author info. + # # @param id [String] # # @param text [String] @@ -94,7 +98,7 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # # @param created_at [String] # - # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) # # @param like_count [Integer] # diff --git a/lib/x_twitter_scraper/models/x/user_profile.rb b/lib/x_twitter_scraper/models/x/user_profile.rb index a833e96..274de80 100644 --- a/lib/x_twitter_scraper/models/x/user_profile.rb +++ b/lib/x_twitter_scraper/models/x/user_profile.rb @@ -60,6 +60,8 @@ class UserProfile < XTwitterScraper::Internal::Type::BaseModel optional :verified, XTwitterScraper::Internal::Type::Boolean # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) + # X user profile with bio, follower counts, and verification status. + # # @param id [String] # @param name [String] # @param username [String] diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_batch_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_batch_response.rb new file mode 100644 index 0000000..fea807f --- /dev/null +++ b/lib/x_twitter_scraper/models/x/user_retrieve_batch_response.rb @@ -0,0 +1,105 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + # @see XTwitterScraper::Resources::X::Users#retrieve_batch + class UserRetrieveBatchResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute has_next_page + # + # @return [Boolean] + required :has_next_page, XTwitterScraper::Internal::Type::Boolean + + # @!attribute next_cursor + # + # @return [String] + required :next_cursor, String + + # @!attribute users + # + # @return [Array] + required :users, + -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveBatchResponse::User] } + + # @!method initialize(has_next_page:, next_cursor:, users:) + # Paginated list of user profiles with cursor-based navigation. + # + # @param has_next_page [Boolean] + # @param next_cursor [String] + # @param users [Array] + + class User < XTwitterScraper::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute username + # + # @return [String] + required :username, String + + # @!attribute created_at + # + # @return [String, nil] + optional :created_at, String, api_name: :createdAt + + # @!attribute description + # + # @return [String, nil] + optional :description, String + + # @!attribute followers + # + # @return [Integer, nil] + optional :followers, Integer + + # @!attribute following + # + # @return [Integer, nil] + optional :following, Integer + + # @!attribute location + # + # @return [String, nil] + optional :location, String + + # @!attribute profile_picture + # + # @return [String, nil] + optional :profile_picture, String, api_name: :profilePicture + + # @!attribute statuses_count + # + # @return [Integer, nil] + optional :statuses_count, Integer, api_name: :statusesCount + + # @!attribute verified + # + # @return [Boolean, nil] + optional :verified, XTwitterScraper::Internal::Type::Boolean + + # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) + # X user profile with bio, follower counts, and verification status. + # + # @param id [String] + # @param name [String] + # @param username [String] + # @param created_at [String] + # @param description [String] + # @param followers [Integer] + # @param following [Integer] + # @param location [String] + # @param profile_picture [String] + # @param statuses_count [Integer] + # @param verified [Boolean] + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_followers_params.rb b/lib/x_twitter_scraper/models/x/user_retrieve_followers_params.rb index 8807277..d7026d8 100644 --- a/lib/x_twitter_scraper/models/x/user_retrieve_followers_params.rb +++ b/lib/x_twitter_scraper/models/x/user_retrieve_followers_params.rb @@ -14,7 +14,7 @@ class UserRetrieveFollowersParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute cursor - # Pagination cursor + # Pagination cursor for followers list # # @return [String, nil] optional :cursor, String @@ -28,7 +28,7 @@ class UserRetrieveFollowersParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, cursor: nil, page_size: nil, request_options: {}) # @param id [String] # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for followers list # # @param page_size [Integer] Items per page (20-200, default 200) # diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_followers_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_followers_response.rb new file mode 100644 index 0000000..9444e46 --- /dev/null +++ b/lib/x_twitter_scraper/models/x/user_retrieve_followers_response.rb @@ -0,0 +1,105 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + # @see XTwitterScraper::Resources::X::Users#retrieve_followers + class UserRetrieveFollowersResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute has_next_page + # + # @return [Boolean] + required :has_next_page, XTwitterScraper::Internal::Type::Boolean + + # @!attribute next_cursor + # + # @return [String] + required :next_cursor, String + + # @!attribute users + # + # @return [Array] + required :users, + -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveFollowersResponse::User] } + + # @!method initialize(has_next_page:, next_cursor:, users:) + # Paginated list of user profiles with cursor-based navigation. + # + # @param has_next_page [Boolean] + # @param next_cursor [String] + # @param users [Array] + + class User < XTwitterScraper::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute username + # + # @return [String] + required :username, String + + # @!attribute created_at + # + # @return [String, nil] + optional :created_at, String, api_name: :createdAt + + # @!attribute description + # + # @return [String, nil] + optional :description, String + + # @!attribute followers + # + # @return [Integer, nil] + optional :followers, Integer + + # @!attribute following + # + # @return [Integer, nil] + optional :following, Integer + + # @!attribute location + # + # @return [String, nil] + optional :location, String + + # @!attribute profile_picture + # + # @return [String, nil] + optional :profile_picture, String, api_name: :profilePicture + + # @!attribute statuses_count + # + # @return [Integer, nil] + optional :statuses_count, Integer, api_name: :statusesCount + + # @!attribute verified + # + # @return [Boolean, nil] + optional :verified, XTwitterScraper::Internal::Type::Boolean + + # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) + # X user profile with bio, follower counts, and verification status. + # + # @param id [String] + # @param name [String] + # @param username [String] + # @param created_at [String] + # @param description [String] + # @param followers [Integer] + # @param following [Integer] + # @param location [String] + # @param profile_picture [String] + # @param statuses_count [Integer] + # @param verified [Boolean] + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_followers_you_know_params.rb b/lib/x_twitter_scraper/models/x/user_retrieve_followers_you_know_params.rb index 9c06136..a403f5f 100644 --- a/lib/x_twitter_scraper/models/x/user_retrieve_followers_you_know_params.rb +++ b/lib/x_twitter_scraper/models/x/user_retrieve_followers_you_know_params.rb @@ -14,7 +14,7 @@ class UserRetrieveFollowersYouKnowParams < XTwitterScraper::Internal::Type::Base required :id, String # @!attribute cursor - # Pagination cursor from previous response + # Pagination cursor for followers-you-know # # @return [String, nil] optional :cursor, String @@ -22,7 +22,7 @@ class UserRetrieveFollowersYouKnowParams < XTwitterScraper::Internal::Type::Base # @!method initialize(id:, cursor: nil, request_options: {}) # @param id [String] # - # @param cursor [String] Pagination cursor from previous response + # @param cursor [String] Pagination cursor for followers-you-know # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_followers_you_know_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_followers_you_know_response.rb index 7235e1b..3777b7d 100644 --- a/lib/x_twitter_scraper/models/x/user_retrieve_followers_you_know_response.rb +++ b/lib/x_twitter_scraper/models/x/user_retrieve_followers_you_know_response.rb @@ -22,6 +22,8 @@ class UserRetrieveFollowersYouKnowResponse < XTwitterScraper::Internal::Type::Ba -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveFollowersYouKnowResponse::User] } # @!method initialize(has_next_page:, next_cursor:, users:) + # Paginated list of user profiles with cursor-based navigation. + # # @param has_next_page [Boolean] # @param next_cursor [String] # @param users [Array] @@ -83,6 +85,8 @@ class User < XTwitterScraper::Internal::Type::BaseModel optional :verified, XTwitterScraper::Internal::Type::Boolean # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) + # X user profile with bio, follower counts, and verification status. + # # @param id [String] # @param name [String] # @param username [String] diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_following_params.rb b/lib/x_twitter_scraper/models/x/user_retrieve_following_params.rb index a7c2d5a..21d3736 100644 --- a/lib/x_twitter_scraper/models/x/user_retrieve_following_params.rb +++ b/lib/x_twitter_scraper/models/x/user_retrieve_following_params.rb @@ -14,13 +14,13 @@ class UserRetrieveFollowingParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute cursor - # Pagination cursor + # Pagination cursor for following list # # @return [String, nil] optional :cursor, String # @!attribute page_size - # Items per page (20-200, default 200) + # Results per page (20-200, default 200) # # @return [Integer, nil] optional :page_size, Integer @@ -28,9 +28,9 @@ class UserRetrieveFollowingParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, cursor: nil, page_size: nil, request_options: {}) # @param id [String] # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for following list # - # @param page_size [Integer] Items per page (20-200, default 200) + # @param page_size [Integer] Results per page (20-200, default 200) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_following_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_following_response.rb new file mode 100644 index 0000000..68f67fb --- /dev/null +++ b/lib/x_twitter_scraper/models/x/user_retrieve_following_response.rb @@ -0,0 +1,105 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + # @see XTwitterScraper::Resources::X::Users#retrieve_following + class UserRetrieveFollowingResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute has_next_page + # + # @return [Boolean] + required :has_next_page, XTwitterScraper::Internal::Type::Boolean + + # @!attribute next_cursor + # + # @return [String] + required :next_cursor, String + + # @!attribute users + # + # @return [Array] + required :users, + -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveFollowingResponse::User] } + + # @!method initialize(has_next_page:, next_cursor:, users:) + # Paginated list of user profiles with cursor-based navigation. + # + # @param has_next_page [Boolean] + # @param next_cursor [String] + # @param users [Array] + + class User < XTwitterScraper::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute username + # + # @return [String] + required :username, String + + # @!attribute created_at + # + # @return [String, nil] + optional :created_at, String, api_name: :createdAt + + # @!attribute description + # + # @return [String, nil] + optional :description, String + + # @!attribute followers + # + # @return [Integer, nil] + optional :followers, Integer + + # @!attribute following + # + # @return [Integer, nil] + optional :following, Integer + + # @!attribute location + # + # @return [String, nil] + optional :location, String + + # @!attribute profile_picture + # + # @return [String, nil] + optional :profile_picture, String, api_name: :profilePicture + + # @!attribute statuses_count + # + # @return [Integer, nil] + optional :statuses_count, Integer, api_name: :statusesCount + + # @!attribute verified + # + # @return [Boolean, nil] + optional :verified, XTwitterScraper::Internal::Type::Boolean + + # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) + # X user profile with bio, follower counts, and verification status. + # + # @param id [String] + # @param name [String] + # @param username [String] + # @param created_at [String] + # @param description [String] + # @param followers [Integer] + # @param following [Integer] + # @param location [String] + # @param profile_picture [String] + # @param statuses_count [Integer] + # @param verified [Boolean] + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_likes_params.rb b/lib/x_twitter_scraper/models/x/user_retrieve_likes_params.rb index 9cdcf08..d774710 100644 --- a/lib/x_twitter_scraper/models/x/user_retrieve_likes_params.rb +++ b/lib/x_twitter_scraper/models/x/user_retrieve_likes_params.rb @@ -14,7 +14,7 @@ class UserRetrieveLikesParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute cursor - # Pagination cursor from previous response + # Pagination cursor for liked tweets # # @return [String, nil] optional :cursor, String @@ -22,7 +22,7 @@ class UserRetrieveLikesParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, cursor: nil, request_options: {}) # @param id [String] # - # @param cursor [String] Pagination cursor from previous response + # @param cursor [String] Pagination cursor for liked tweets # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_likes_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_likes_response.rb index aa83e5e..4894b9f 100644 --- a/lib/x_twitter_scraper/models/x/user_retrieve_likes_response.rb +++ b/lib/x_twitter_scraper/models/x/user_retrieve_likes_response.rb @@ -22,6 +22,8 @@ class UserRetrieveLikesResponse < XTwitterScraper::Internal::Type::BaseModel -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet] } # @!method initialize(has_next_page:, next_cursor:, tweets:) + # Paginated list of tweets with cursor-based navigation. + # # @param has_next_page [Boolean] # @param next_cursor [String] # @param tweets [Array] @@ -53,7 +55,7 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel optional :created_at, String, api_name: :createdAt # @!attribute is_note_tweet - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) # # @return [Boolean, nil] optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet @@ -84,6 +86,8 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel optional :view_count, Integer, api_name: :viewCount # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # Tweet returned from search results with inline author info. + # # @param id [String] # # @param text [String] @@ -94,7 +98,7 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # # @param created_at [String] # - # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) # # @param like_count [Integer] # diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_media_params.rb b/lib/x_twitter_scraper/models/x/user_retrieve_media_params.rb index 7c7183c..47f3528 100644 --- a/lib/x_twitter_scraper/models/x/user_retrieve_media_params.rb +++ b/lib/x_twitter_scraper/models/x/user_retrieve_media_params.rb @@ -14,7 +14,7 @@ class UserRetrieveMediaParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute cursor - # Pagination cursor from previous response + # Pagination cursor for media tweets # # @return [String, nil] optional :cursor, String @@ -22,7 +22,7 @@ class UserRetrieveMediaParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, cursor: nil, request_options: {}) # @param id [String] # - # @param cursor [String] Pagination cursor from previous response + # @param cursor [String] Pagination cursor for media tweets # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_media_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_media_response.rb index 07f0452..ad86001 100644 --- a/lib/x_twitter_scraper/models/x/user_retrieve_media_response.rb +++ b/lib/x_twitter_scraper/models/x/user_retrieve_media_response.rb @@ -22,6 +22,8 @@ class UserRetrieveMediaResponse < XTwitterScraper::Internal::Type::BaseModel -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet] } # @!method initialize(has_next_page:, next_cursor:, tweets:) + # Paginated list of tweets with cursor-based navigation. + # # @param has_next_page [Boolean] # @param next_cursor [String] # @param tweets [Array] @@ -53,7 +55,7 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel optional :created_at, String, api_name: :createdAt # @!attribute is_note_tweet - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) # # @return [Boolean, nil] optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet @@ -84,6 +86,8 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel optional :view_count, Integer, api_name: :viewCount # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # Tweet returned from search results with inline author info. + # # @param id [String] # # @param text [String] @@ -94,7 +98,7 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # # @param created_at [String] # - # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) # # @param like_count [Integer] # diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_mentions_params.rb b/lib/x_twitter_scraper/models/x/user_retrieve_mentions_params.rb index 6f5f643..7965ff4 100644 --- a/lib/x_twitter_scraper/models/x/user_retrieve_mentions_params.rb +++ b/lib/x_twitter_scraper/models/x/user_retrieve_mentions_params.rb @@ -14,19 +14,19 @@ class UserRetrieveMentionsParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute cursor - # Pagination cursor + # Pagination cursor for mentions # # @return [String, nil] optional :cursor, String # @!attribute since_time - # Unix timestamp - filter after + # Unix timestamp - return mentions after this time # # @return [String, nil] optional :since_time, String # @!attribute until_time - # Unix timestamp - filter before + # Unix timestamp - return mentions before this time # # @return [String, nil] optional :until_time, String @@ -34,11 +34,11 @@ class UserRetrieveMentionsParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, cursor: nil, since_time: nil, until_time: nil, request_options: {}) # @param id [String] # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for mentions # - # @param since_time [String] Unix timestamp - filter after + # @param since_time [String] Unix timestamp - return mentions after this time # - # @param until_time [String] Unix timestamp - filter before + # @param until_time [String] Unix timestamp - return mentions before this time # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_mentions_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_mentions_response.rb new file mode 100644 index 0000000..1c6fc65 --- /dev/null +++ b/lib/x_twitter_scraper/models/x/user_retrieve_mentions_response.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + # @see XTwitterScraper::Resources::X::Users#retrieve_mentions + class UserRetrieveMentionsResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute has_next_page + # + # @return [Boolean] + required :has_next_page, XTwitterScraper::Internal::Type::Boolean + + # @!attribute next_cursor + # + # @return [String] + required :next_cursor, String + + # @!attribute tweets + # + # @return [Array] + required :tweets, + -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet] } + + # @!method initialize(has_next_page:, next_cursor:, tweets:) + # Paginated list of tweets with cursor-based navigation. + # + # @param has_next_page [Boolean] + # @param next_cursor [String] + # @param tweets [Array] + + class Tweet < XTwitterScraper::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute text + # + # @return [String] + required :text, String + + # @!attribute author + # + # @return [XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author, nil] + optional :author, -> { XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author } + + # @!attribute bookmark_count + # + # @return [Integer, nil] + optional :bookmark_count, Integer, api_name: :bookmarkCount + + # @!attribute created_at + # + # @return [String, nil] + optional :created_at, String, api_name: :createdAt + + # @!attribute is_note_tweet + # True for Note Tweets (long-form content, up to 25,000 characters) + # + # @return [Boolean, nil] + optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet + + # @!attribute like_count + # + # @return [Integer, nil] + optional :like_count, Integer, api_name: :likeCount + + # @!attribute quote_count + # + # @return [Integer, nil] + optional :quote_count, Integer, api_name: :quoteCount + + # @!attribute reply_count + # + # @return [Integer, nil] + optional :reply_count, Integer, api_name: :replyCount + + # @!attribute retweet_count + # + # @return [Integer, nil] + optional :retweet_count, Integer, api_name: :retweetCount + + # @!attribute view_count + # + # @return [Integer, nil] + optional :view_count, Integer, api_name: :viewCount + + # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # Tweet returned from search results with inline author info. + # + # @param id [String] + # + # @param text [String] + # + # @param author [XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author] + # + # @param bookmark_count [Integer] + # + # @param created_at [String] + # + # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) + # + # @param like_count [Integer] + # + # @param quote_count [Integer] + # + # @param reply_count [Integer] + # + # @param retweet_count [Integer] + # + # @param view_count [Integer] + + # @see XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet#author + class Author < XTwitterScraper::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute username + # + # @return [String] + required :username, String + + # @!attribute verified + # + # @return [Boolean, nil] + optional :verified, XTwitterScraper::Internal::Type::Boolean + + # @!method initialize(id:, name:, username:, verified: nil) + # @param id [String] + # @param name [String] + # @param username [String] + # @param verified [Boolean] + end + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_search_params.rb b/lib/x_twitter_scraper/models/x/user_retrieve_search_params.rb index 243d9de..2e48715 100644 --- a/lib/x_twitter_scraper/models/x/user_retrieve_search_params.rb +++ b/lib/x_twitter_scraper/models/x/user_retrieve_search_params.rb @@ -9,21 +9,21 @@ class UserRetrieveSearchParams < XTwitterScraper::Internal::Type::BaseModel include XTwitterScraper::Internal::Type::RequestParameters # @!attribute q - # Search query + # User search query # # @return [String] required :q, String # @!attribute cursor - # Pagination cursor + # Pagination cursor for user search # # @return [String, nil] optional :cursor, String # @!method initialize(q:, cursor: nil, request_options: {}) - # @param q [String] Search query + # @param q [String] User search query # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for user search # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_search_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_search_response.rb new file mode 100644 index 0000000..bd5282e --- /dev/null +++ b/lib/x_twitter_scraper/models/x/user_retrieve_search_response.rb @@ -0,0 +1,105 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + # @see XTwitterScraper::Resources::X::Users#retrieve_search + class UserRetrieveSearchResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute has_next_page + # + # @return [Boolean] + required :has_next_page, XTwitterScraper::Internal::Type::Boolean + + # @!attribute next_cursor + # + # @return [String] + required :next_cursor, String + + # @!attribute users + # + # @return [Array] + required :users, + -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveSearchResponse::User] } + + # @!method initialize(has_next_page:, next_cursor:, users:) + # Paginated list of user profiles with cursor-based navigation. + # + # @param has_next_page [Boolean] + # @param next_cursor [String] + # @param users [Array] + + class User < XTwitterScraper::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute username + # + # @return [String] + required :username, String + + # @!attribute created_at + # + # @return [String, nil] + optional :created_at, String, api_name: :createdAt + + # @!attribute description + # + # @return [String, nil] + optional :description, String + + # @!attribute followers + # + # @return [Integer, nil] + optional :followers, Integer + + # @!attribute following + # + # @return [Integer, nil] + optional :following, Integer + + # @!attribute location + # + # @return [String, nil] + optional :location, String + + # @!attribute profile_picture + # + # @return [String, nil] + optional :profile_picture, String, api_name: :profilePicture + + # @!attribute statuses_count + # + # @return [Integer, nil] + optional :statuses_count, Integer, api_name: :statusesCount + + # @!attribute verified + # + # @return [Boolean, nil] + optional :verified, XTwitterScraper::Internal::Type::Boolean + + # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) + # X user profile with bio, follower counts, and verification status. + # + # @param id [String] + # @param name [String] + # @param username [String] + # @param created_at [String] + # @param description [String] + # @param followers [Integer] + # @param following [Integer] + # @param location [String] + # @param profile_picture [String] + # @param statuses_count [Integer] + # @param verified [Boolean] + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_tweets_params.rb b/lib/x_twitter_scraper/models/x/user_retrieve_tweets_params.rb index 01f62af..e4a987c 100644 --- a/lib/x_twitter_scraper/models/x/user_retrieve_tweets_params.rb +++ b/lib/x_twitter_scraper/models/x/user_retrieve_tweets_params.rb @@ -14,7 +14,7 @@ class UserRetrieveTweetsParams < XTwitterScraper::Internal::Type::BaseModel required :id, String # @!attribute cursor - # Pagination cursor from previous response + # Pagination cursor for user tweets # # @return [String, nil] optional :cursor, String @@ -34,7 +34,7 @@ class UserRetrieveTweetsParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, cursor: nil, include_parent_tweet: nil, include_replies: nil, request_options: {}) # @param id [String] # - # @param cursor [String] Pagination cursor from previous response + # @param cursor [String] Pagination cursor for user tweets # # @param include_parent_tweet [Boolean] Include parent tweet for replies # diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_tweets_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_tweets_response.rb index 3183008..35b4c25 100644 --- a/lib/x_twitter_scraper/models/x/user_retrieve_tweets_response.rb +++ b/lib/x_twitter_scraper/models/x/user_retrieve_tweets_response.rb @@ -22,6 +22,8 @@ class UserRetrieveTweetsResponse < XTwitterScraper::Internal::Type::BaseModel -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet] } # @!method initialize(has_next_page:, next_cursor:, tweets:) + # Paginated list of tweets with cursor-based navigation. + # # @param has_next_page [Boolean] # @param next_cursor [String] # @param tweets [Array] @@ -53,7 +55,7 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel optional :created_at, String, api_name: :createdAt # @!attribute is_note_tweet - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) # # @return [Boolean, nil] optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet @@ -84,6 +86,8 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel optional :view_count, Integer, api_name: :viewCount # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # Tweet returned from search results with inline author info. + # # @param id [String] # # @param text [String] @@ -94,7 +98,7 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # # @param created_at [String] # - # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) # # @param like_count [Integer] # diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_verified_followers_params.rb b/lib/x_twitter_scraper/models/x/user_retrieve_verified_followers_params.rb index d868d77..ae01891 100644 --- a/lib/x_twitter_scraper/models/x/user_retrieve_verified_followers_params.rb +++ b/lib/x_twitter_scraper/models/x/user_retrieve_verified_followers_params.rb @@ -14,7 +14,7 @@ class UserRetrieveVerifiedFollowersParams < XTwitterScraper::Internal::Type::Bas required :id, String # @!attribute cursor - # Pagination cursor + # Pagination cursor for verified followers # # @return [String, nil] optional :cursor, String @@ -22,7 +22,7 @@ class UserRetrieveVerifiedFollowersParams < XTwitterScraper::Internal::Type::Bas # @!method initialize(id:, cursor: nil, request_options: {}) # @param id [String] # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for verified followers # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rb new file mode 100644 index 0000000..fbc00ec --- /dev/null +++ b/lib/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rb @@ -0,0 +1,105 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + # @see XTwitterScraper::Resources::X::Users#retrieve_verified_followers + class UserRetrieveVerifiedFollowersResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute has_next_page + # + # @return [Boolean] + required :has_next_page, XTwitterScraper::Internal::Type::Boolean + + # @!attribute next_cursor + # + # @return [String] + required :next_cursor, String + + # @!attribute users + # + # @return [Array] + required :users, + -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse::User] } + + # @!method initialize(has_next_page:, next_cursor:, users:) + # Paginated list of user profiles with cursor-based navigation. + # + # @param has_next_page [Boolean] + # @param next_cursor [String] + # @param users [Array] + + class User < XTwitterScraper::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute username + # + # @return [String] + required :username, String + + # @!attribute created_at + # + # @return [String, nil] + optional :created_at, String, api_name: :createdAt + + # @!attribute description + # + # @return [String, nil] + optional :description, String + + # @!attribute followers + # + # @return [Integer, nil] + optional :followers, Integer + + # @!attribute following + # + # @return [Integer, nil] + optional :following, Integer + + # @!attribute location + # + # @return [String, nil] + optional :location, String + + # @!attribute profile_picture + # + # @return [String, nil] + optional :profile_picture, String, api_name: :profilePicture + + # @!attribute statuses_count + # + # @return [Integer, nil] + optional :statuses_count, Integer, api_name: :statusesCount + + # @!attribute verified + # + # @return [Boolean, nil] + optional :verified, XTwitterScraper::Internal::Type::Boolean + + # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) + # X user profile with bio, follower counts, and verification status. + # + # @param id [String] + # @param name [String] + # @param username [String] + # @param created_at [String] + # @param description [String] + # @param followers [Integer] + # @param following [Integer] + # @param location [String] + # @param profile_picture [String] + # @param statuses_count [Integer] + # @param verified [Boolean] + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/x_account.rb b/lib/x_twitter_scraper/models/x/x_account.rb index 0a3a271..3e3e1b9 100644 --- a/lib/x_twitter_scraper/models/x/x_account.rb +++ b/lib/x_twitter_scraper/models/x/x_account.rb @@ -30,6 +30,8 @@ class XAccount < XTwitterScraper::Internal::Type::BaseModel required :x_username, String, api_name: :xUsername # @!method initialize(id:, created_at:, status:, x_user_id:, x_username:) + # Linked X account summary with username and connection status. + # # @param id [String] # @param created_at [Time] # @param status [String] diff --git a/lib/x_twitter_scraper/models/x/x_account_detail.rb b/lib/x_twitter_scraper/models/x/x_account_detail.rb index ae69e2f..77b3dcf 100644 --- a/lib/x_twitter_scraper/models/x/x_account_detail.rb +++ b/lib/x_twitter_scraper/models/x/x_account_detail.rb @@ -45,6 +45,8 @@ class XAccountDetail < XTwitterScraper::Internal::Type::BaseModel optional :updated_at, Time, api_name: :updatedAt # @!method initialize(id:, created_at:, status:, x_user_id:, x_username:, cookies_obtained_at: nil, proxy_country: nil, updated_at: nil) + # Full X account details including proxy, cookies, and update timestamp. + # # @param id [String] # @param created_at [Time] # @param status [String] diff --git a/lib/x_twitter_scraper/models/x_get_article_response.rb b/lib/x_twitter_scraper/models/x_get_article_response.rb index 6d692cd..45ab992 100644 --- a/lib/x_twitter_scraper/models/x_get_article_response.rb +++ b/lib/x_twitter_scraper/models/x_get_article_response.rb @@ -10,13 +10,15 @@ class XGetArticleResponse < XTwitterScraper::Internal::Type::BaseModel required :article, -> { XTwitterScraper::Models::XGetArticleResponse::Article } # @!attribute author + # Author of a tweet with follower count and verification status. # # @return [XTwitterScraper::Models::XGetArticleResponse::Author, nil] optional :author, -> { XTwitterScraper::Models::XGetArticleResponse::Author } # @!method initialize(article:, author: nil) # @param article [XTwitterScraper::Models::XGetArticleResponse::Article] - # @param author [XTwitterScraper::Models::XGetArticleResponse::Author] + # + # @param author [XTwitterScraper::Models::XGetArticleResponse::Author] Author of a tweet with follower count and verification status. # @see XTwitterScraper::Models::XGetArticleResponse#article class Article < XTwitterScraper::Internal::Type::BaseModel @@ -151,6 +153,8 @@ class Author < XTwitterScraper::Internal::Type::BaseModel optional :profile_picture, String, api_name: :profilePicture # @!method initialize(id:, followers:, username:, verified:, profile_picture: nil) + # Author of a tweet with follower count and verification status. + # # @param id [String] # @param followers [Integer] # @param username [String] diff --git a/lib/x_twitter_scraper/models/x_get_home_timeline_params.rb b/lib/x_twitter_scraper/models/x_get_home_timeline_params.rb index f595c20..4a1d44d 100644 --- a/lib/x_twitter_scraper/models/x_get_home_timeline_params.rb +++ b/lib/x_twitter_scraper/models/x_get_home_timeline_params.rb @@ -8,7 +8,7 @@ class XGetHomeTimelineParams < XTwitterScraper::Internal::Type::BaseModel include XTwitterScraper::Internal::Type::RequestParameters # @!attribute cursor - # Pagination cursor from previous response + # Pagination cursor for timeline # # @return [String, nil] optional :cursor, String @@ -20,7 +20,7 @@ class XGetHomeTimelineParams < XTwitterScraper::Internal::Type::BaseModel optional :seen_tweet_ids, String # @!method initialize(cursor: nil, seen_tweet_ids: nil, request_options: {}) - # @param cursor [String] Pagination cursor from previous response + # @param cursor [String] Pagination cursor for timeline # # @param seen_tweet_ids [String] Comma-separated tweet IDs to exclude from results # diff --git a/lib/x_twitter_scraper/models/x_get_home_timeline_response.rb b/lib/x_twitter_scraper/models/x_get_home_timeline_response.rb index 649ef5f..89f4b74 100644 --- a/lib/x_twitter_scraper/models/x_get_home_timeline_response.rb +++ b/lib/x_twitter_scraper/models/x_get_home_timeline_response.rb @@ -21,6 +21,8 @@ class XGetHomeTimelineResponse < XTwitterScraper::Internal::Type::BaseModel -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet] } # @!method initialize(has_next_page:, next_cursor:, tweets:) + # Paginated list of tweets with cursor-based navigation. + # # @param has_next_page [Boolean] # @param next_cursor [String] # @param tweets [Array] @@ -52,7 +54,7 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel optional :created_at, String, api_name: :createdAt # @!attribute is_note_tweet - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) # # @return [Boolean, nil] optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet @@ -83,6 +85,8 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel optional :view_count, Integer, api_name: :viewCount # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # Tweet returned from search results with inline author info. + # # @param id [String] # # @param text [String] @@ -93,7 +97,7 @@ class Tweet < XTwitterScraper::Internal::Type::BaseModel # # @param created_at [String] # - # @param is_note_tweet [Boolean] Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) # # @param like_count [Integer] # diff --git a/lib/x_twitter_scraper/models/x_get_notifications_params.rb b/lib/x_twitter_scraper/models/x_get_notifications_params.rb index 9ea6b6e..b061a4f 100644 --- a/lib/x_twitter_scraper/models/x_get_notifications_params.rb +++ b/lib/x_twitter_scraper/models/x_get_notifications_params.rb @@ -8,7 +8,7 @@ class XGetNotificationsParams < XTwitterScraper::Internal::Type::BaseModel include XTwitterScraper::Internal::Type::RequestParameters # @!attribute cursor - # Pagination cursor from previous response + # Pagination cursor for notifications # # @return [String, nil] optional :cursor, String @@ -20,7 +20,7 @@ class XGetNotificationsParams < XTwitterScraper::Internal::Type::BaseModel optional :type, enum: -> { XTwitterScraper::XGetNotificationsParams::Type } # @!method initialize(cursor: nil, type: nil, request_options: {}) - # @param cursor [String] Pagination cursor from previous response + # @param cursor [String] Pagination cursor for notifications # # @param type [Symbol, XTwitterScraper::Models::XGetNotificationsParams::Type] Notification type filter # diff --git a/lib/x_twitter_scraper/models/x_get_trends_response.rb b/lib/x_twitter_scraper/models/x_get_trends_response.rb new file mode 100644 index 0000000..105147d --- /dev/null +++ b/lib/x_twitter_scraper/models/x_get_trends_response.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + # @see XTwitterScraper::Resources::X#get_trends + class XGetTrendsResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute count + # + # @return [Integer] + required :count, Integer + + # @!attribute trends + # + # @return [Array] + required :trends, + -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::XGetTrendsResponse::Trend] } + + # @!attribute woeid + # + # @return [Integer] + required :woeid, Integer + + # @!method initialize(count:, trends:, woeid:) + # @param count [Integer] + # @param trends [Array] + # @param woeid [Integer] + + class Trend < XTwitterScraper::Internal::Type::BaseModel + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String + + # @!attribute query + # + # @return [String, nil] + optional :query, String + + # @!attribute rank + # + # @return [Integer, nil] + optional :rank, Integer + + # @!method initialize(name:, description: nil, query: nil, rank: nil) + # @param name [String] + # @param description [String] + # @param query [String] + # @param rank [Integer] + end + end + end +end diff --git a/lib/x_twitter_scraper/resources/drafts.rb b/lib/x_twitter_scraper/resources/drafts.rb index 4764ca2..69beb08 100644 --- a/lib/x_twitter_scraper/resources/drafts.rb +++ b/lib/x_twitter_scraper/resources/drafts.rb @@ -53,7 +53,7 @@ def retrieve(id, params = {}) # # @param after_cursor [String] Cursor for pagination # - # @param limit [Integer] + # @param limit [Integer] Maximum number of items to return (1-100, default 50) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/x_twitter_scraper/resources/draws.rb b/lib/x_twitter_scraper/resources/draws.rb index f77b974..1ad74e0 100644 --- a/lib/x_twitter_scraper/resources/draws.rb +++ b/lib/x_twitter_scraper/resources/draws.rb @@ -28,9 +28,9 @@ def retrieve(id, params = {}) # # @overload list(after: nil, limit: nil, request_options: {}) # - # @param after [String] Cursor for pagination + # @param after [String] Cursor for keyset pagination # - # @param limit [Integer] + # @param limit [Integer] Maximum number of items to return (1-100, default 50) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -55,7 +55,7 @@ def list(params = {}) # # @param id [String] Resource ID (stringified bigint) # - # @param format_ [Symbol, XTwitterScraper::Models::DrawExportParams::Format] + # @param format_ [Symbol, XTwitterScraper::Models::DrawExportParams::Format] Export output format # # @param type [Symbol, XTwitterScraper::Models::DrawExportParams::Type] Export winners or all entries # diff --git a/lib/x_twitter_scraper/resources/events.rb b/lib/x_twitter_scraper/resources/events.rb index 95445d1..c2f6b5d 100644 --- a/lib/x_twitter_scraper/resources/events.rb +++ b/lib/x_twitter_scraper/resources/events.rb @@ -28,13 +28,13 @@ def retrieve(id, params = {}) # # @overload list(after: nil, event_type: nil, limit: nil, monitor_id: nil, request_options: {}) # - # @param after [String] Cursor for pagination + # @param after [String] Cursor for keyset pagination # - # @param event_type [Symbol, XTwitterScraper::Models::EventListParams::EventType] + # @param event_type [Symbol, XTwitterScraper::Models::EventListParams::EventType] Filter events by type # - # @param limit [Integer] + # @param limit [Integer] Maximum number of items to return (1-100, default 50) # - # @param monitor_id [String] + # @param monitor_id [String] Filter events by monitor ID # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/x_twitter_scraper/resources/extractions.rb b/lib/x_twitter_scraper/resources/extractions.rb index c8b142c..bcd54f3 100644 --- a/lib/x_twitter_scraper/resources/extractions.rb +++ b/lib/x_twitter_scraper/resources/extractions.rb @@ -10,9 +10,9 @@ class Extractions # # @param id [String] Extraction public ID (UUID) # - # @param after [String] Cursor for pagination + # @param after [String] Cursor for keyset pagination # - # @param limit [Integer] + # @param limit [Integer] Maximum number of results to return (1-1000, default 100) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -35,13 +35,13 @@ def retrieve(id, params = {}) # # @overload list(after: nil, limit: nil, status: nil, tool_type: nil, request_options: {}) # - # @param after [String] Cursor for pagination + # @param after [String] Cursor for keyset pagination # - # @param limit [Integer] + # @param limit [Integer] Maximum number of items to return (1-100, default 50) # - # @param status [Symbol, XTwitterScraper::Models::ExtractionListParams::Status] + # @param status [Symbol, XTwitterScraper::Models::ExtractionListParams::Status] Filter by job status # - # @param tool_type [Symbol, XTwitterScraper::Models::ExtractionListParams::ToolType] + # @param tool_type [Symbol, XTwitterScraper::Models::ExtractionListParams::ToolType] Filter by extraction tool type # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -64,13 +64,13 @@ def list(params = {}) # # @overload estimate_cost(tool_type:, advanced_query: nil, exact_phrase: nil, exclude_words: nil, search_query: nil, target_community_id: nil, target_list_id: nil, target_space_id: nil, target_tweet_id: nil, target_username: nil, request_options: {}) # - # @param tool_type [Symbol, XTwitterScraper::Models::ExtractionEstimateCostParams::ToolType] + # @param tool_type [Symbol, XTwitterScraper::Models::ExtractionEstimateCostParams::ToolType] Identifier for the extraction tool used to run a job. # - # @param advanced_query [String] Raw advanced search query appended as-is (tweet_search_extractor) + # @param advanced_query [String] Raw advanced query string appended to the estimate (tweet_search_extractor) # - # @param exact_phrase [String] Exact phrase to match (tweet_search_extractor) + # @param exact_phrase [String] Exact phrase filter for search estimation # - # @param exclude_words [String] Words to exclude from results (tweet_search_extractor) + # @param exclude_words [String] Words excluded from estimated search results # # @param search_query [String] # @@ -106,7 +106,7 @@ def estimate_cost(params) # # @param id [String] Extraction public ID # - # @param format_ [Symbol, XTwitterScraper::Models::ExtractionExportResultsParams::Format] + # @param format_ [Symbol, XTwitterScraper::Models::ExtractionExportResultsParams::Format] Export file format # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -130,7 +130,7 @@ def export_results(id, params = {}) # # @overload run(tool_type:, advanced_query: nil, exact_phrase: nil, exclude_words: nil, search_query: nil, target_community_id: nil, target_list_id: nil, target_space_id: nil, target_tweet_id: nil, target_username: nil, request_options: {}) # - # @param tool_type [Symbol, XTwitterScraper::Models::ExtractionRunParams::ToolType] + # @param tool_type [Symbol, XTwitterScraper::Models::ExtractionRunParams::ToolType] Identifier for the extraction tool used to run a job. # # @param advanced_query [String] Raw advanced search query appended as-is (tweet_search_extractor) # diff --git a/lib/x_twitter_scraper/resources/integrations.rb b/lib/x_twitter_scraper/resources/integrations.rb index 661a62f..1d78ffc 100644 --- a/lib/x_twitter_scraper/resources/integrations.rb +++ b/lib/x_twitter_scraper/resources/integrations.rb @@ -10,7 +10,7 @@ class Integrations # # @param config [XTwitterScraper::Models::IntegrationCreateParams::Config] Integration config (e.g. Telegram chatId) # - # @param event_types [Array] + # @param event_types [Array] Array of event types to subscribe to. # # @param name [String] # @@ -58,7 +58,7 @@ def retrieve(id, params = {}) # # @param id [String] Resource ID (stringified bigint) # - # @param event_types [Array] + # @param event_types [Array] Array of event types to subscribe to. # # @param filters [Hash{Symbol=>Object}] Event filter rules (JSON) # @@ -132,7 +132,7 @@ def delete(id, params = {}) # # @param id [String] Resource ID (stringified bigint) # - # @param limit [Integer] + # @param limit [Integer] Maximum number of items to return (1-100, default 50) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/x_twitter_scraper/resources/monitors.rb b/lib/x_twitter_scraper/resources/monitors.rb index 9c9fc79..d827f8a 100644 --- a/lib/x_twitter_scraper/resources/monitors.rb +++ b/lib/x_twitter_scraper/resources/monitors.rb @@ -8,7 +8,7 @@ class Monitors # # @overload create(event_types:, username:, request_options: {}) # - # @param event_types [Array] + # @param event_types [Array] Array of event types to subscribe to. # # @param username [String] X username (without @) # @@ -54,7 +54,7 @@ def retrieve(id, params = {}) # # @param id [String] Resource ID (stringified bigint) # - # @param event_types [Array] + # @param event_types [Array] Array of event types to subscribe to. # # @param is_active [Boolean] # diff --git a/lib/x_twitter_scraper/resources/support/tickets.rb b/lib/x_twitter_scraper/resources/support/tickets.rb index cd5fa5d..89eef61 100644 --- a/lib/x_twitter_scraper/resources/support/tickets.rb +++ b/lib/x_twitter_scraper/resources/support/tickets.rb @@ -31,7 +31,8 @@ def create(params) # # @overload retrieve(id, request_options: {}) # - # @param id [String] + # @param id [String] Support ticket ID + # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [XTwitterScraper::Models::Support::TicketRetrieveResponse] @@ -50,8 +51,10 @@ def retrieve(id, params = {}) # # @overload update(id, status:, request_options: {}) # - # @param id [String] + # @param id [String] Support ticket ID to update + # # @param status [Symbol, XTwitterScraper::Models::Support::TicketUpdateParams::Status] + # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [XTwitterScraper::Models::Support::TicketUpdateResponse] @@ -90,8 +93,10 @@ def list(params = {}) # # @overload reply(id, body:, request_options: {}) # - # @param id [String] + # @param id [String] Support ticket ID for the reply + # # @param body [String] + # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [XTwitterScraper::Models::Support::TicketReplyResponse] diff --git a/lib/x_twitter_scraper/resources/trends.rb b/lib/x_twitter_scraper/resources/trends.rb index a22483c..134894e 100644 --- a/lib/x_twitter_scraper/resources/trends.rb +++ b/lib/x_twitter_scraper/resources/trends.rb @@ -4,11 +4,11 @@ module XTwitterScraper module Resources # Trending topics by region class Trends - # Get trending topics + # Get regional trending topics # # @overload list(count: nil, woeid: nil, request_options: {}) # - # @param count [Integer] + # @param count [Integer] Number of trending topics to return (1-50, default 30) # # @param woeid [Integer] Region WOEID (1=Worldwide, 23424977=US, 23424975=UK, 23424969=Turkey) # diff --git a/lib/x_twitter_scraper/resources/webhooks.rb b/lib/x_twitter_scraper/resources/webhooks.rb index 875c9c9..767a1a9 100644 --- a/lib/x_twitter_scraper/resources/webhooks.rb +++ b/lib/x_twitter_scraper/resources/webhooks.rb @@ -8,7 +8,7 @@ class Webhooks # # @overload create(event_types:, url:, request_options: {}) # - # @param event_types [Array] + # @param event_types [Array] Array of event types to subscribe to. # # @param url [String] HTTPS URL # @@ -34,7 +34,7 @@ def create(params) # # @param id [String] Resource ID (stringified bigint) # - # @param event_types [Array] + # @param event_types [Array] Array of event types to subscribe to. # # @param is_active [Boolean] # diff --git a/lib/x_twitter_scraper/resources/x.rb b/lib/x_twitter_scraper/resources/x.rb index a7bcdbc..7270b56 100644 --- a/lib/x_twitter_scraper/resources/x.rb +++ b/lib/x_twitter_scraper/resources/x.rb @@ -45,7 +45,8 @@ class X # # @overload get_article(tweet_id, request_options: {}) # - # @param tweet_id [String] + # @param tweet_id [String] Tweet ID of the article + # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [XTwitterScraper::Models::XGetArticleResponse] @@ -64,7 +65,7 @@ def get_article(tweet_id, params = {}) # # @overload get_home_timeline(cursor: nil, seen_tweet_ids: nil, request_options: {}) # - # @param cursor [String] Pagination cursor from previous response + # @param cursor [String] Pagination cursor for timeline # # @param seen_tweet_ids [String] Comma-separated tweet IDs to exclude from results # @@ -89,7 +90,7 @@ def get_home_timeline(params = {}) # # @overload get_notifications(cursor: nil, type: nil, request_options: {}) # - # @param cursor [String] Pagination cursor from previous response + # @param cursor [String] Pagination cursor for notifications # # @param type [Symbol, XTwitterScraper::Models::XGetNotificationsParams::Type] Notification type filter # @@ -116,11 +117,16 @@ def get_notifications(params = {}) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [nil] + # @return [XTwitterScraper::Models::XGetTrendsResponse] # # @see XTwitterScraper::Models::XGetTrendsParams def get_trends(params = {}) - @client.request(method: :get, path: "x/trends", model: NilClass, options: params[:request_options]) + @client.request( + method: :get, + path: "x/trends", + model: XTwitterScraper::Models::XGetTrendsResponse, + options: params[:request_options] + ) end # @api private diff --git a/lib/x_twitter_scraper/resources/x/accounts.rb b/lib/x_twitter_scraper/resources/x/accounts.rb index d04a93c..a59c6c8 100644 --- a/lib/x_twitter_scraper/resources/x/accounts.rb +++ b/lib/x_twitter_scraper/resources/x/accounts.rb @@ -103,9 +103,9 @@ def delete(id, params = {}) # # @param id [String] Resource ID (stringified bigint) # - # @param password [String] Account password + # @param password [String] Updated account password # - # @param totp_secret [String] TOTP secret for 2FA + # @param totp_secret [String] TOTP secret for 2FA re-authentication # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/x_twitter_scraper/resources/x/bookmarks.rb b/lib/x_twitter_scraper/resources/x/bookmarks.rb index 05e89ea..a7cbabb 100644 --- a/lib/x_twitter_scraper/resources/x/bookmarks.rb +++ b/lib/x_twitter_scraper/resources/x/bookmarks.rb @@ -9,7 +9,7 @@ class Bookmarks # # @overload list(cursor: nil, folder_id: nil, request_options: {}) # - # @param cursor [String] Pagination cursor from previous response + # @param cursor [String] Pagination cursor for bookmarks # # @param folder_id [String] Optional bookmark folder ID # diff --git a/lib/x_twitter_scraper/resources/x/communities.rb b/lib/x_twitter_scraper/resources/x/communities.rb index f8a0a59..cde37ee 100644 --- a/lib/x_twitter_scraper/resources/x/communities.rb +++ b/lib/x_twitter_scraper/resources/x/communities.rb @@ -16,7 +16,7 @@ class Communities # # @overload create(account:, name:, description: nil, request_options: {}) # - # @param account [String] X account (@username or account ID) + # @param account [String] X account (@username or ID) creating the community # # @param name [String] Community name # @@ -44,7 +44,7 @@ def create(params) # # @param id [String] Resource ID (stringified bigint) # - # @param account [String] X account (@username or account ID) + # @param account [String] X account (@username or ID) deleting the community # # @param community_name [String] Community name for confirmation # @@ -88,13 +88,13 @@ def retrieve_info(id, params = {}) # # @overload retrieve_members(id, cursor: nil, request_options: {}) # - # @param id [String] Community ID + # @param id [String] Community ID for member lookup # # @param cursor [String] Pagination cursor # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [nil] + # @return [XTwitterScraper::Models::X::CommunityRetrieveMembersResponse] # # @see XTwitterScraper::Models::X::CommunityRetrieveMembersParams def retrieve_members(id, params = {}) @@ -104,7 +104,7 @@ def retrieve_members(id, params = {}) method: :get, path: ["x/communities/%1$s/members", id], query: query, - model: NilClass, + model: XTwitterScraper::Models::X::CommunityRetrieveMembersResponse, options: options ) end @@ -113,13 +113,13 @@ def retrieve_members(id, params = {}) # # @overload retrieve_moderators(id, cursor: nil, request_options: {}) # - # @param id [String] Community ID + # @param id [String] Community ID for moderator lookup # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for community moderators # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [nil] + # @return [XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse] # # @see XTwitterScraper::Models::X::CommunityRetrieveModeratorsParams def retrieve_moderators(id, params = {}) @@ -129,7 +129,7 @@ def retrieve_moderators(id, params = {}) method: :get, path: ["x/communities/%1$s/moderators", id], query: query, - model: NilClass, + model: XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse, options: options ) end @@ -140,13 +140,13 @@ def retrieve_moderators(id, params = {}) # # @param q [String] Search query # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for community search # # @param query_type [String] Sort order (Latest or Top) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [nil] + # @return [XTwitterScraper::Models::X::CommunityRetrieveSearchResponse] # # @see XTwitterScraper::Models::X::CommunityRetrieveSearchParams def retrieve_search(params) @@ -156,7 +156,7 @@ def retrieve_search(params) method: :get, path: "x/communities/search", query: query.transform_keys(query_type: "queryType"), - model: NilClass, + model: XTwitterScraper::Models::X::CommunityRetrieveSearchResponse, options: options ) end diff --git a/lib/x_twitter_scraper/resources/x/communities/join.rb b/lib/x_twitter_scraper/resources/x/communities/join.rb index 17fe772..1317d46 100644 --- a/lib/x_twitter_scraper/resources/x/communities/join.rb +++ b/lib/x_twitter_scraper/resources/x/communities/join.rb @@ -12,7 +12,7 @@ class Join # # @param id [String] Resource ID (stringified bigint) # - # @param account [String] X account (@username or account ID) + # @param account [String] X account identifier (@username or account ID) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -36,7 +36,7 @@ def create(id, params) # # @param id [String] Resource ID (stringified bigint) # - # @param account [String] X account (@username or account ID) + # @param account [String] X account identifier (@username or account ID) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/x_twitter_scraper/resources/x/communities/tweets.rb b/lib/x_twitter_scraper/resources/x/communities/tweets.rb index d540b27..e99302b 100644 --- a/lib/x_twitter_scraper/resources/x/communities/tweets.rb +++ b/lib/x_twitter_scraper/resources/x/communities/tweets.rb @@ -10,15 +10,15 @@ class Tweets # # @overload list(q:, cursor: nil, query_type: nil, request_options: {}) # - # @param q [String] Search query + # @param q [String] Search query for cross-community tweets # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for cross-community results # - # @param query_type [String] Sort order (Latest or Top) + # @param query_type [String] Sort order for cross-community results (Latest or Top) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [nil] + # @return [XTwitterScraper::Models::X::Communities::TweetListResponse] # # @see XTwitterScraper::Models::X::Communities::TweetListParams def list(params) @@ -28,7 +28,7 @@ def list(params) method: :get, path: "x/communities/tweets", query: query.transform_keys(query_type: "queryType"), - model: NilClass, + model: XTwitterScraper::Models::X::Communities::TweetListResponse, options: options ) end diff --git a/lib/x_twitter_scraper/resources/x/dm.rb b/lib/x_twitter_scraper/resources/x/dm.rb index 8762497..8cf352d 100644 --- a/lib/x_twitter_scraper/resources/x/dm.rb +++ b/lib/x_twitter_scraper/resources/x/dm.rb @@ -10,7 +10,7 @@ class Dm # # @param user_id [String] Target user ID # - # @param cursor [String] Pagination cursor from previous response + # @param cursor [String] Pagination cursor for DM history # # @param max_id [String] Legacy pagination cursor (backward compat) # @@ -37,7 +37,7 @@ def retrieve_history(user_id, params = {}) # # @param user_id [String] Recipient user ID # - # @param account [String] X account (@username or account ID) + # @param account [String] X account (@username or ID) sending the DM # # @param text [String] # diff --git a/lib/x_twitter_scraper/resources/x/lists.rb b/lib/x_twitter_scraper/resources/x/lists.rb index af67cd5..ffac086 100644 --- a/lib/x_twitter_scraper/resources/x/lists.rb +++ b/lib/x_twitter_scraper/resources/x/lists.rb @@ -11,11 +11,11 @@ class Lists # # @param id [String] List ID # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for list followers # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [nil] + # @return [XTwitterScraper::Models::X::ListRetrieveFollowersResponse] # # @see XTwitterScraper::Models::X::ListRetrieveFollowersParams def retrieve_followers(id, params = {}) @@ -25,7 +25,7 @@ def retrieve_followers(id, params = {}) method: :get, path: ["x/lists/%1$s/followers", id], query: query, - model: NilClass, + model: XTwitterScraper::Models::X::ListRetrieveFollowersResponse, options: options ) end @@ -34,13 +34,13 @@ def retrieve_followers(id, params = {}) # # @overload retrieve_members(id, cursor: nil, request_options: {}) # - # @param id [String] List ID + # @param id [String] List ID for member lookup # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for list members # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [nil] + # @return [XTwitterScraper::Models::X::ListRetrieveMembersResponse] # # @see XTwitterScraper::Models::X::ListRetrieveMembersParams def retrieve_members(id, params = {}) @@ -50,7 +50,7 @@ def retrieve_members(id, params = {}) method: :get, path: ["x/lists/%1$s/members", id], query: query, - model: NilClass, + model: XTwitterScraper::Models::X::ListRetrieveMembersResponse, options: options ) end @@ -59,9 +59,9 @@ def retrieve_members(id, params = {}) # # @overload retrieve_tweets(id, cursor: nil, include_replies: nil, since_time: nil, until_time: nil, request_options: {}) # - # @param id [String] List ID + # @param id [String] List ID for tweet lookup # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for list tweets # # @param include_replies [Boolean] Include replies (default false) # @@ -71,7 +71,7 @@ def retrieve_members(id, params = {}) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [nil] + # @return [XTwitterScraper::Models::X::ListRetrieveTweetsResponse] # # @see XTwitterScraper::Models::X::ListRetrieveTweetsParams def retrieve_tweets(id, params = {}) @@ -85,7 +85,7 @@ def retrieve_tweets(id, params = {}) since_time: "sinceTime", until_time: "untilTime" ), - model: NilClass, + model: XTwitterScraper::Models::X::ListRetrieveTweetsResponse, options: options ) end diff --git a/lib/x_twitter_scraper/resources/x/media.rb b/lib/x_twitter_scraper/resources/x/media.rb index 32fa984..10af42c 100644 --- a/lib/x_twitter_scraper/resources/x/media.rb +++ b/lib/x_twitter_scraper/resources/x/media.rb @@ -33,7 +33,7 @@ def download(params = {}) # # @overload upload(account:, file:, is_long_video: nil, request_options: {}) # - # @param account [String] X account (@username or account ID) + # @param account [String] X account (@username or ID) uploading media # # @param file [Pathname, StringIO, IO, String, XTwitterScraper::FilePart] Media file to upload # diff --git a/lib/x_twitter_scraper/resources/x/profile.rb b/lib/x_twitter_scraper/resources/x/profile.rb index 22cad34..cafdcb9 100644 --- a/lib/x_twitter_scraper/resources/x/profile.rb +++ b/lib/x_twitter_scraper/resources/x/profile.rb @@ -9,7 +9,7 @@ class Profile # # @overload update(account:, description: nil, location: nil, name: nil, url: nil, request_options: {}) # - # @param account [String] X account (@username or account ID) + # @param account [String] X account (@username or ID) to update profile # # @param description [String] Bio description # @@ -39,7 +39,7 @@ def update(params) # # @overload update_avatar(account:, file:, request_options: {}) # - # @param account [String] X account (@username or account ID) + # @param account [String] X account (@username or ID) for avatar update # # @param file [Pathname, StringIO, IO, String, XTwitterScraper::FilePart] Avatar image (max 716KB) # @@ -64,7 +64,7 @@ def update_avatar(params) # # @overload update_banner(account:, file:, request_options: {}) # - # @param account [String] X account (@username or account ID) + # @param account [String] X account (@username or ID) for banner update # # @param file [Pathname, StringIO, IO, String, XTwitterScraper::FilePart] Banner image (max 2MB) # diff --git a/lib/x_twitter_scraper/resources/x/tweets.rb b/lib/x_twitter_scraper/resources/x/tweets.rb index 0ad4cb2..0ff0df5 100644 --- a/lib/x_twitter_scraper/resources/x/tweets.rb +++ b/lib/x_twitter_scraper/resources/x/tweets.rb @@ -52,22 +52,28 @@ def create(params) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [nil] + # @return [XTwitterScraper::Models::X::TweetListResponse] # # @see XTwitterScraper::Models::X::TweetListParams def list(params) parsed, options = XTwitterScraper::X::TweetListParams.dump_request(params) query = XTwitterScraper::Internal::Util.encode_query_params(parsed) - @client.request(method: :get, path: "x/tweets", query: query, model: NilClass, options: options) + @client.request( + method: :get, + path: "x/tweets", + query: query, + model: XTwitterScraper::Models::X::TweetListResponse, + options: options + ) end # Get users who liked a tweet # # @overload get_favoriters(id, cursor: nil, request_options: {}) # - # @param id [String] Tweet ID + # @param id [String] Tweet ID to get favoriters # - # @param cursor [String] Pagination cursor from previous response + # @param cursor [String] Pagination cursor for favoriters # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -90,15 +96,15 @@ def get_favoriters(id, params = {}) # # @overload get_quotes(id, cursor: nil, include_replies: nil, since_time: nil, until_time: nil, request_options: {}) # - # @param id [String] Tweet ID + # @param id [String] Tweet ID to get quotes # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for quote tweets # - # @param include_replies [Boolean] Include replies (default false) + # @param include_replies [Boolean] Include reply quotes (default false) # - # @param since_time [String] Unix timestamp - filter after + # @param since_time [String] Unix timestamp - return quotes posted after this time # - # @param until_time [String] Unix timestamp - filter before + # @param until_time [String] Unix timestamp - return quotes posted before this time # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -125,13 +131,13 @@ def get_quotes(id, params = {}) # # @overload get_replies(id, cursor: nil, since_time: nil, until_time: nil, request_options: {}) # - # @param id [String] Tweet ID + # @param id [String] Tweet ID to get replies # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for tweet replies # - # @param since_time [String] Unix timestamp - filter after + # @param since_time [String] Unix timestamp - return replies posted after this time # - # @param until_time [String] Unix timestamp - filter before + # @param until_time [String] Unix timestamp - return replies posted before this time # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -154,9 +160,9 @@ def get_replies(id, params = {}) # # @overload get_retweeters(id, cursor: nil, request_options: {}) # - # @param id [String] Tweet ID + # @param id [String] Tweet ID to get retweeters # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for retweeters # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -179,9 +185,9 @@ def get_retweeters(id, params = {}) # # @overload get_thread(id, cursor: nil, request_options: {}) # - # @param id [String] Tweet ID + # @param id [String] Tweet ID to get thread context # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for thread tweets # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/x_twitter_scraper/resources/x/users.rb b/lib/x_twitter_scraper/resources/x/users.rb index db49695..fb95429 100644 --- a/lib/x_twitter_scraper/resources/x/users.rb +++ b/lib/x_twitter_scraper/resources/x/users.rb @@ -16,7 +16,7 @@ class Users # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [nil] + # @return [XTwitterScraper::Models::X::UserRetrieveBatchResponse] # # @see XTwitterScraper::Models::X::UserRetrieveBatchParams def retrieve_batch(params) @@ -26,7 +26,7 @@ def retrieve_batch(params) method: :get, path: "x/users/batch", query: query, - model: NilClass, + model: XTwitterScraper::Models::X::UserRetrieveBatchResponse, options: options ) end @@ -37,13 +37,13 @@ def retrieve_batch(params) # # @param id [String] User ID or username # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for followers list # # @param page_size [Integer] Items per page (20-200, default 200) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [nil] + # @return [XTwitterScraper::Models::X::UserRetrieveFollowersResponse] # # @see XTwitterScraper::Models::X::UserRetrieveFollowersParams def retrieve_followers(id, params = {}) @@ -53,7 +53,7 @@ def retrieve_followers(id, params = {}) method: :get, path: ["x/users/%1$s/followers", id], query: query.transform_keys(page_size: "pageSize"), - model: NilClass, + model: XTwitterScraper::Models::X::UserRetrieveFollowersResponse, options: options ) end @@ -62,9 +62,9 @@ def retrieve_followers(id, params = {}) # # @overload retrieve_followers_you_know(id, cursor: nil, request_options: {}) # - # @param id [String] User ID + # @param id [String] User ID for followers-you-know lookup # - # @param cursor [String] Pagination cursor from previous response + # @param cursor [String] Pagination cursor for followers-you-know # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -87,15 +87,15 @@ def retrieve_followers_you_know(id, params = {}) # # @overload retrieve_following(id, cursor: nil, page_size: nil, request_options: {}) # - # @param id [String] User ID or username + # @param id [String] User ID or username for following lookup # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for following list # - # @param page_size [Integer] Items per page (20-200, default 200) + # @param page_size [Integer] Results per page (20-200, default 200) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [nil] + # @return [XTwitterScraper::Models::X::UserRetrieveFollowingResponse] # # @see XTwitterScraper::Models::X::UserRetrieveFollowingParams def retrieve_following(id, params = {}) @@ -105,7 +105,7 @@ def retrieve_following(id, params = {}) method: :get, path: ["x/users/%1$s/following", id], query: query.transform_keys(page_size: "pageSize"), - model: NilClass, + model: XTwitterScraper::Models::X::UserRetrieveFollowingResponse, options: options ) end @@ -116,7 +116,7 @@ def retrieve_following(id, params = {}) # # @param id [String] User ID # - # @param cursor [String] Pagination cursor from previous response + # @param cursor [String] Pagination cursor for liked tweets # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -139,9 +139,9 @@ def retrieve_likes(id, params = {}) # # @overload retrieve_media(id, cursor: nil, request_options: {}) # - # @param id [String] User ID + # @param id [String] User ID for media lookup # - # @param cursor [String] Pagination cursor from previous response + # @param cursor [String] Pagination cursor for media tweets # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -164,17 +164,17 @@ def retrieve_media(id, params = {}) # # @overload retrieve_mentions(id, cursor: nil, since_time: nil, until_time: nil, request_options: {}) # - # @param id [String] User ID or username + # @param id [String] User ID or username for mentions lookup # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for mentions # - # @param since_time [String] Unix timestamp - filter after + # @param since_time [String] Unix timestamp - return mentions after this time # - # @param until_time [String] Unix timestamp - filter before + # @param until_time [String] Unix timestamp - return mentions before this time # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [nil] + # @return [XTwitterScraper::Models::X::UserRetrieveMentionsResponse] # # @see XTwitterScraper::Models::X::UserRetrieveMentionsParams def retrieve_mentions(id, params = {}) @@ -184,7 +184,7 @@ def retrieve_mentions(id, params = {}) method: :get, path: ["x/users/%1$s/mentions", id], query: query.transform_keys(since_time: "sinceTime", until_time: "untilTime"), - model: NilClass, + model: XTwitterScraper::Models::X::UserRetrieveMentionsResponse, options: options ) end @@ -193,13 +193,13 @@ def retrieve_mentions(id, params = {}) # # @overload retrieve_search(q:, cursor: nil, request_options: {}) # - # @param q [String] Search query + # @param q [String] User search query # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for user search # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [nil] + # @return [XTwitterScraper::Models::X::UserRetrieveSearchResponse] # # @see XTwitterScraper::Models::X::UserRetrieveSearchParams def retrieve_search(params) @@ -209,7 +209,7 @@ def retrieve_search(params) method: :get, path: "x/users/search", query: query, - model: NilClass, + model: XTwitterScraper::Models::X::UserRetrieveSearchResponse, options: options ) end @@ -218,9 +218,9 @@ def retrieve_search(params) # # @overload retrieve_tweets(id, cursor: nil, include_parent_tweet: nil, include_replies: nil, request_options: {}) # - # @param id [String] + # @param id [String] X user ID or username # - # @param cursor [String] Pagination cursor from previous response + # @param cursor [String] Pagination cursor for user tweets # # @param include_parent_tweet [Boolean] Include parent tweet for replies # @@ -250,13 +250,13 @@ def retrieve_tweets(id, params = {}) # # @overload retrieve_verified_followers(id, cursor: nil, request_options: {}) # - # @param id [String] User ID or username + # @param id [String] User ID or username for verified followers # - # @param cursor [String] Pagination cursor + # @param cursor [String] Pagination cursor for verified followers # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [nil] + # @return [XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse] # # @see XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersParams def retrieve_verified_followers(id, params = {}) @@ -266,7 +266,7 @@ def retrieve_verified_followers(id, params = {}) method: :get, path: ["x/users/%1$s/verified-followers", id], query: query, - model: NilClass, + model: XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse, options: options ) end diff --git a/rbi/x_twitter_scraper/models/api_key.rbi b/rbi/x_twitter_scraper/models/api_key.rbi index 8dcd825..a6d9126 100644 --- a/rbi/x_twitter_scraper/models/api_key.rbi +++ b/rbi/x_twitter_scraper/models/api_key.rbi @@ -29,6 +29,7 @@ module XTwitterScraper sig { params(last_used_at: Time).void } attr_writer :last_used_at + # API key metadata returned when listing keys. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/api_key_list_response.rbi b/rbi/x_twitter_scraper/models/api_key_list_response.rbi index ab7150b..0b3365c 100644 --- a/rbi/x_twitter_scraper/models/api_key_list_response.rbi +++ b/rbi/x_twitter_scraper/models/api_key_list_response.rbi @@ -63,6 +63,7 @@ module XTwitterScraper sig { params(last_used_at: Time).void } attr_writer :last_used_at + # API key metadata returned when listing keys. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/delivery.rbi b/rbi/x_twitter_scraper/models/delivery.rbi index 3e87327..d0f5bc6 100644 --- a/rbi/x_twitter_scraper/models/delivery.rbi +++ b/rbi/x_twitter_scraper/models/delivery.rbi @@ -41,6 +41,7 @@ module XTwitterScraper sig { params(last_status_code: Integer).void } attr_writer :last_status_code + # Webhook delivery attempt record with status and retry count. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/draft.rbi b/rbi/x_twitter_scraper/models/draft.rbi index 457eed3..d51cbfa 100644 --- a/rbi/x_twitter_scraper/models/draft.rbi +++ b/rbi/x_twitter_scraper/models/draft.rbi @@ -29,6 +29,7 @@ module XTwitterScraper sig { params(topic: String).void } attr_writer :topic + # Saved tweet draft with optional topic and goal. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/draft_create_response.rbi b/rbi/x_twitter_scraper/models/draft_create_response.rbi index 8682972..ab87ff9 100644 --- a/rbi/x_twitter_scraper/models/draft_create_response.rbi +++ b/rbi/x_twitter_scraper/models/draft_create_response.rbi @@ -35,6 +35,7 @@ module XTwitterScraper sig { params(topic: String).void } attr_writer :topic + # Full tweet draft including update timestamp. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/draft_detail.rbi b/rbi/x_twitter_scraper/models/draft_detail.rbi index 3ad3318..047678c 100644 --- a/rbi/x_twitter_scraper/models/draft_detail.rbi +++ b/rbi/x_twitter_scraper/models/draft_detail.rbi @@ -35,6 +35,7 @@ module XTwitterScraper sig { params(topic: String).void } attr_writer :topic + # Full tweet draft including update timestamp. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/draft_list_params.rbi b/rbi/x_twitter_scraper/models/draft_list_params.rbi index 99cceca..d8639d4 100644 --- a/rbi/x_twitter_scraper/models/draft_list_params.rbi +++ b/rbi/x_twitter_scraper/models/draft_list_params.rbi @@ -21,6 +21,7 @@ module XTwitterScraper sig { params(after_cursor: String).void } attr_writer :after_cursor + # Maximum number of items to return (1-100, default 50) sig { returns(T.nilable(Integer)) } attr_reader :limit @@ -37,6 +38,7 @@ module XTwitterScraper def self.new( # Cursor for pagination after_cursor: nil, + # Maximum number of items to return (1-100, default 50) limit: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/models/draft_list_response.rbi b/rbi/x_twitter_scraper/models/draft_list_response.rbi index dfb8449..ae180c2 100644 --- a/rbi/x_twitter_scraper/models/draft_list_response.rbi +++ b/rbi/x_twitter_scraper/models/draft_list_response.rbi @@ -78,6 +78,7 @@ module XTwitterScraper sig { params(topic: String).void } attr_writer :topic + # Saved tweet draft with optional topic and goal. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/draft_retrieve_response.rbi b/rbi/x_twitter_scraper/models/draft_retrieve_response.rbi index e76e428..3ba981b 100644 --- a/rbi/x_twitter_scraper/models/draft_retrieve_response.rbi +++ b/rbi/x_twitter_scraper/models/draft_retrieve_response.rbi @@ -35,6 +35,7 @@ module XTwitterScraper sig { params(topic: String).void } attr_writer :topic + # Full tweet draft including update timestamp. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/draw_detail.rbi b/rbi/x_twitter_scraper/models/draw_detail.rbi index aa9bb9a..ee9f32f 100644 --- a/rbi/x_twitter_scraper/models/draw_detail.rbi +++ b/rbi/x_twitter_scraper/models/draw_detail.rbi @@ -53,6 +53,7 @@ module XTwitterScraper sig { params(drawn_at: Time).void } attr_writer :drawn_at + # Full giveaway draw with tweet metrics, entries, and timing. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/draw_export_params.rbi b/rbi/x_twitter_scraper/models/draw_export_params.rbi index c79407b..60bd8f4 100644 --- a/rbi/x_twitter_scraper/models/draw_export_params.rbi +++ b/rbi/x_twitter_scraper/models/draw_export_params.rbi @@ -17,6 +17,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id + # Export output format sig do returns(T.nilable(XTwitterScraper::DrawExportParams::Format::OrSymbol)) end @@ -50,6 +51,7 @@ module XTwitterScraper end def self.new( id:, + # Export output format format_: nil, # Export winners or all entries type: nil, @@ -70,6 +72,7 @@ module XTwitterScraper def to_hash end + # Export output format module Format extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/draw_list_item.rbi b/rbi/x_twitter_scraper/models/draw_list_item.rbi index ac76826..16387e7 100644 --- a/rbi/x_twitter_scraper/models/draw_list_item.rbi +++ b/rbi/x_twitter_scraper/models/draw_list_item.rbi @@ -35,6 +35,7 @@ module XTwitterScraper sig { params(drawn_at: Time).void } attr_writer :drawn_at + # Giveaway draw summary with entry counts and status. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/draw_list_params.rbi b/rbi/x_twitter_scraper/models/draw_list_params.rbi index 9a59400..fc1b5bd 100644 --- a/rbi/x_twitter_scraper/models/draw_list_params.rbi +++ b/rbi/x_twitter_scraper/models/draw_list_params.rbi @@ -14,13 +14,14 @@ module XTwitterScraper ) end - # Cursor for pagination + # Cursor for keyset pagination sig { returns(T.nilable(String)) } attr_reader :after sig { params(after: String).void } attr_writer :after + # Maximum number of items to return (1-100, default 50) sig { returns(T.nilable(Integer)) } attr_reader :limit @@ -35,8 +36,9 @@ module XTwitterScraper ).returns(T.attached_class) end def self.new( - # Cursor for pagination + # Cursor for keyset pagination after: nil, + # Maximum number of items to return (1-100, default 50) limit: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/models/draw_list_response.rbi b/rbi/x_twitter_scraper/models/draw_list_response.rbi index ff4cb3e..5ab0661 100644 --- a/rbi/x_twitter_scraper/models/draw_list_response.rbi +++ b/rbi/x_twitter_scraper/models/draw_list_response.rbi @@ -79,6 +79,7 @@ module XTwitterScraper sig { params(drawn_at: Time).void } attr_writer :drawn_at + # Giveaway draw summary with entry counts and status. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/draw_retrieve_response.rbi b/rbi/x_twitter_scraper/models/draw_retrieve_response.rbi index 4886465..bf0935e 100644 --- a/rbi/x_twitter_scraper/models/draw_retrieve_response.rbi +++ b/rbi/x_twitter_scraper/models/draw_retrieve_response.rbi @@ -11,6 +11,7 @@ module XTwitterScraper ) end + # Full giveaway draw with tweet metrics, entries, and timing. sig { returns(XTwitterScraper::Models::DrawRetrieveResponse::Draw) } attr_reader :draw @@ -35,7 +36,11 @@ module XTwitterScraper ] ).returns(T.attached_class) end - def self.new(draw:, winners:) + def self.new( + # Full giveaway draw with tweet metrics, entries, and timing. + draw:, + winners: + ) end sig do @@ -104,6 +109,7 @@ module XTwitterScraper sig { params(drawn_at: Time).void } attr_writer :drawn_at + # Full giveaway draw with tweet metrics, entries, and timing. sig do params( id: String, @@ -185,6 +191,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :tweet_id + # Giveaway draw winner with position and backup flag. sig do params( author_username: String, diff --git a/rbi/x_twitter_scraper/models/draw_run_response.rbi b/rbi/x_twitter_scraper/models/draw_run_response.rbi index 0c26238..251252e 100644 --- a/rbi/x_twitter_scraper/models/draw_run_response.rbi +++ b/rbi/x_twitter_scraper/models/draw_run_response.rbi @@ -76,6 +76,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :tweet_id + # Giveaway draw winner with position and backup flag. sig do params( author_username: String, diff --git a/rbi/x_twitter_scraper/models/error.rbi b/rbi/x_twitter_scraper/models/error.rbi index 049d07e..1bff9f2 100644 --- a/rbi/x_twitter_scraper/models/error.rbi +++ b/rbi/x_twitter_scraper/models/error.rbi @@ -11,6 +11,7 @@ module XTwitterScraper sig { returns(XTwitterScraper::Error::Error::OrSymbol) } attr_accessor :error + # Error response containing a machine-readable error code. sig do params(error: XTwitterScraper::Error::Error::OrSymbol).returns( T.attached_class diff --git a/rbi/x_twitter_scraper/models/event.rbi b/rbi/x_twitter_scraper/models/event.rbi index 21515f8..be8ab8e 100644 --- a/rbi/x_twitter_scraper/models/event.rbi +++ b/rbi/x_twitter_scraper/models/event.rbi @@ -20,12 +20,14 @@ module XTwitterScraper sig { returns(Time) } attr_accessor :occurred_at + # Type of monitor event fired when account activity occurs. sig { returns(XTwitterScraper::Event::Type::OrSymbol) } attr_accessor :type sig { returns(String) } attr_accessor :username + # Monitor event summary with type, username, and occurrence time. sig do params( id: String, @@ -36,7 +38,15 @@ module XTwitterScraper username: String ).returns(T.attached_class) end - def self.new(id:, data:, monitor_id:, occurred_at:, type:, username:) + def self.new( + id:, + data:, + monitor_id:, + occurred_at:, + # Type of monitor event fired when account activity occurs. + type:, + username: + ) end sig do @@ -54,6 +64,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module Type extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/event_detail.rbi b/rbi/x_twitter_scraper/models/event_detail.rbi index 9b52aa0..1261ab8 100644 --- a/rbi/x_twitter_scraper/models/event_detail.rbi +++ b/rbi/x_twitter_scraper/models/event_detail.rbi @@ -24,6 +24,7 @@ module XTwitterScraper sig { returns(Time) } attr_accessor :occurred_at + # Type of monitor event fired when account activity occurs. sig { returns(XTwitterScraper::EventDetail::Type::OrSymbol) } attr_accessor :type @@ -36,6 +37,7 @@ module XTwitterScraper sig { params(x_event_id: String).void } attr_writer :x_event_id + # Full monitor event including payload data and optional X event ID. sig do params( id: String, @@ -53,6 +55,7 @@ module XTwitterScraper data:, monitor_id:, occurred_at:, + # Type of monitor event fired when account activity occurs. type:, username:, x_event_id: nil @@ -75,6 +78,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module Type extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/event_list_params.rbi b/rbi/x_twitter_scraper/models/event_list_params.rbi index 4af1461..eb47a81 100644 --- a/rbi/x_twitter_scraper/models/event_list_params.rbi +++ b/rbi/x_twitter_scraper/models/event_list_params.rbi @@ -14,13 +14,14 @@ module XTwitterScraper ) end - # Cursor for pagination + # Cursor for keyset pagination sig { returns(T.nilable(String)) } attr_reader :after sig { params(after: String).void } attr_writer :after + # Filter events by type sig do returns( T.nilable(XTwitterScraper::EventListParams::EventType::OrSymbol) @@ -35,12 +36,14 @@ module XTwitterScraper end attr_writer :event_type + # Maximum number of items to return (1-100, default 50) sig { returns(T.nilable(Integer)) } attr_reader :limit sig { params(limit: Integer).void } attr_writer :limit + # Filter events by monitor ID sig { returns(T.nilable(String)) } attr_reader :monitor_id @@ -57,10 +60,13 @@ module XTwitterScraper ).returns(T.attached_class) end def self.new( - # Cursor for pagination + # Cursor for keyset pagination after: nil, + # Filter events by type event_type: nil, + # Maximum number of items to return (1-100, default 50) limit: nil, + # Filter events by monitor ID monitor_id: nil, request_options: {} ) @@ -80,6 +86,7 @@ module XTwitterScraper def to_hash end + # Filter events by type module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/event_list_response.rbi b/rbi/x_twitter_scraper/models/event_list_response.rbi index b2d1baf..fe34fb5 100644 --- a/rbi/x_twitter_scraper/models/event_list_response.rbi +++ b/rbi/x_twitter_scraper/models/event_list_response.rbi @@ -69,6 +69,7 @@ module XTwitterScraper sig { returns(Time) } attr_accessor :occurred_at + # Type of monitor event fired when account activity occurs. sig do returns( XTwitterScraper::Models::EventListResponse::Event::Type::TaggedSymbol @@ -79,6 +80,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :username + # Monitor event summary with type, username, and occurrence time. sig do params( id: String, @@ -90,7 +92,15 @@ module XTwitterScraper username: String ).returns(T.attached_class) end - def self.new(id:, data:, monitor_id:, occurred_at:, type:, username:) + def self.new( + id:, + data:, + monitor_id:, + occurred_at:, + # Type of monitor event fired when account activity occurs. + type:, + username: + ) end sig do @@ -109,6 +119,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module Type extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/event_retrieve_response.rbi b/rbi/x_twitter_scraper/models/event_retrieve_response.rbi index 78cf7e8..e09dc08 100644 --- a/rbi/x_twitter_scraper/models/event_retrieve_response.rbi +++ b/rbi/x_twitter_scraper/models/event_retrieve_response.rbi @@ -24,6 +24,7 @@ module XTwitterScraper sig { returns(Time) } attr_accessor :occurred_at + # Type of monitor event fired when account activity occurs. sig do returns( XTwitterScraper::Models::EventRetrieveResponse::Type::TaggedSymbol @@ -40,6 +41,7 @@ module XTwitterScraper sig { params(x_event_id: String).void } attr_writer :x_event_id + # Full monitor event including payload data and optional X event ID. sig do params( id: String, @@ -57,6 +59,7 @@ module XTwitterScraper data:, monitor_id:, occurred_at:, + # Type of monitor event fired when account activity occurs. type:, username:, x_event_id: nil @@ -80,6 +83,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module Type extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/event_type.rbi b/rbi/x_twitter_scraper/models/event_type.rbi index fab47c9..1252975 100644 --- a/rbi/x_twitter_scraper/models/event_type.rbi +++ b/rbi/x_twitter_scraper/models/event_type.rbi @@ -2,6 +2,7 @@ module XTwitterScraper module Models + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/extraction_estimate_cost_params.rbi b/rbi/x_twitter_scraper/models/extraction_estimate_cost_params.rbi index d4e7e6f..2ff52c5 100644 --- a/rbi/x_twitter_scraper/models/extraction_estimate_cost_params.rbi +++ b/rbi/x_twitter_scraper/models/extraction_estimate_cost_params.rbi @@ -14,6 +14,7 @@ module XTwitterScraper ) end + # Identifier for the extraction tool used to run a job. sig do returns( XTwitterScraper::ExtractionEstimateCostParams::ToolType::OrSymbol @@ -21,21 +22,21 @@ module XTwitterScraper end attr_accessor :tool_type - # Raw advanced search query appended as-is (tweet_search_extractor) + # Raw advanced query string appended to the estimate (tweet_search_extractor) sig { returns(T.nilable(String)) } attr_reader :advanced_query sig { params(advanced_query: String).void } attr_writer :advanced_query - # Exact phrase to match (tweet_search_extractor) + # Exact phrase filter for search estimation sig { returns(T.nilable(String)) } attr_reader :exact_phrase sig { params(exact_phrase: String).void } attr_writer :exact_phrase - # Words to exclude from results (tweet_search_extractor) + # Words excluded from estimated search results sig { returns(T.nilable(String)) } attr_reader :exclude_words @@ -95,12 +96,13 @@ module XTwitterScraper ).returns(T.attached_class) end def self.new( + # Identifier for the extraction tool used to run a job. tool_type:, - # Raw advanced search query appended as-is (tweet_search_extractor) + # Raw advanced query string appended to the estimate (tweet_search_extractor) advanced_query: nil, - # Exact phrase to match (tweet_search_extractor) + # Exact phrase filter for search estimation exact_phrase: nil, - # Words to exclude from results (tweet_search_extractor) + # Words excluded from estimated search results exclude_words: nil, search_query: nil, target_community_id: nil, @@ -133,6 +135,7 @@ module XTwitterScraper def to_hash end + # Identifier for the extraction tool used to run a job. module ToolType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/extraction_export_results_params.rbi b/rbi/x_twitter_scraper/models/extraction_export_results_params.rbi index e5ebeb6..9ea0141 100644 --- a/rbi/x_twitter_scraper/models/extraction_export_results_params.rbi +++ b/rbi/x_twitter_scraper/models/extraction_export_results_params.rbi @@ -17,6 +17,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id + # Export file format sig do returns( T.nilable( @@ -42,7 +43,12 @@ module XTwitterScraper request_options: XTwitterScraper::RequestOptions::OrHash ).returns(T.attached_class) end - def self.new(id:, format_: nil, request_options: {}) + def self.new( + id:, + # Export file format + format_: nil, + request_options: {} + ) end sig do @@ -58,6 +64,7 @@ module XTwitterScraper def to_hash end + # Export file format module Format extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/extraction_job.rbi b/rbi/x_twitter_scraper/models/extraction_job.rbi index d1887a2..43f4e2d 100644 --- a/rbi/x_twitter_scraper/models/extraction_job.rbi +++ b/rbi/x_twitter_scraper/models/extraction_job.rbi @@ -20,6 +20,7 @@ module XTwitterScraper sig { returns(XTwitterScraper::ExtractionJob::Status::OrSymbol) } attr_accessor :status + # Identifier for the extraction tool used to run a job. sig { returns(XTwitterScraper::ExtractionJob::ToolType::OrSymbol) } attr_accessor :tool_type @@ -32,6 +33,7 @@ module XTwitterScraper sig { params(completed_at: Time).void } attr_writer :completed_at + # Extraction job tracking status, tool type, and result count. sig do params( id: String, @@ -46,6 +48,7 @@ module XTwitterScraper id:, created_at:, status:, + # Identifier for the extraction tool used to run a job. tool_type:, total_results:, completed_at: nil @@ -93,6 +96,7 @@ module XTwitterScraper end end + # Identifier for the extraction tool used to run a job. module ToolType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/extraction_list_params.rbi b/rbi/x_twitter_scraper/models/extraction_list_params.rbi index 71b44a1..86b2e75 100644 --- a/rbi/x_twitter_scraper/models/extraction_list_params.rbi +++ b/rbi/x_twitter_scraper/models/extraction_list_params.rbi @@ -14,19 +14,21 @@ module XTwitterScraper ) end - # Cursor for pagination + # Cursor for keyset pagination sig { returns(T.nilable(String)) } attr_reader :after sig { params(after: String).void } attr_writer :after + # Maximum number of items to return (1-100, default 50) sig { returns(T.nilable(Integer)) } attr_reader :limit sig { params(limit: Integer).void } attr_writer :limit + # Filter by job status sig do returns( T.nilable(XTwitterScraper::ExtractionListParams::Status::OrSymbol) @@ -41,6 +43,7 @@ module XTwitterScraper end attr_writer :status + # Filter by extraction tool type sig do returns( T.nilable(XTwitterScraper::ExtractionListParams::ToolType::OrSymbol) @@ -65,10 +68,13 @@ module XTwitterScraper ).returns(T.attached_class) end def self.new( - # Cursor for pagination + # Cursor for keyset pagination after: nil, + # Maximum number of items to return (1-100, default 50) limit: nil, + # Filter by job status status: nil, + # Filter by extraction tool type tool_type: nil, request_options: {} ) @@ -89,6 +95,7 @@ module XTwitterScraper def to_hash end + # Filter by job status module Status extend XTwitterScraper::Internal::Type::Enum @@ -125,6 +132,7 @@ module XTwitterScraper end end + # Filter by extraction tool type module ToolType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/extraction_list_response.rbi b/rbi/x_twitter_scraper/models/extraction_list_response.rbi index 6861bc1..a656289 100644 --- a/rbi/x_twitter_scraper/models/extraction_list_response.rbi +++ b/rbi/x_twitter_scraper/models/extraction_list_response.rbi @@ -77,6 +77,7 @@ module XTwitterScraper end attr_accessor :status + # Identifier for the extraction tool used to run a job. sig do returns( XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol @@ -93,6 +94,7 @@ module XTwitterScraper sig { params(completed_at: Time).void } attr_writer :completed_at + # Extraction job tracking status, tool type, and result count. sig do params( id: String, @@ -109,6 +111,7 @@ module XTwitterScraper id:, created_at:, status:, + # Identifier for the extraction tool used to run a job. tool_type:, total_results:, completed_at: nil @@ -171,6 +174,7 @@ module XTwitterScraper end end + # Identifier for the extraction tool used to run a job. module ToolType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/extraction_retrieve_params.rbi b/rbi/x_twitter_scraper/models/extraction_retrieve_params.rbi index 202b559..424c84d 100644 --- a/rbi/x_twitter_scraper/models/extraction_retrieve_params.rbi +++ b/rbi/x_twitter_scraper/models/extraction_retrieve_params.rbi @@ -17,13 +17,14 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - # Cursor for pagination + # Cursor for keyset pagination sig { returns(T.nilable(String)) } attr_reader :after sig { params(after: String).void } attr_writer :after + # Maximum number of results to return (1-1000, default 100) sig { returns(T.nilable(Integer)) } attr_reader :limit @@ -40,8 +41,9 @@ module XTwitterScraper end def self.new( id:, - # Cursor for pagination + # Cursor for keyset pagination after: nil, + # Maximum number of results to return (1-1000, default 100) limit: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/models/extraction_run_params.rbi b/rbi/x_twitter_scraper/models/extraction_run_params.rbi index a1efd64..d965b4e 100644 --- a/rbi/x_twitter_scraper/models/extraction_run_params.rbi +++ b/rbi/x_twitter_scraper/models/extraction_run_params.rbi @@ -14,6 +14,7 @@ module XTwitterScraper ) end + # Identifier for the extraction tool used to run a job. sig { returns(XTwitterScraper::ExtractionRunParams::ToolType::OrSymbol) } attr_accessor :tool_type @@ -90,6 +91,7 @@ module XTwitterScraper ).returns(T.attached_class) end def self.new( + # Identifier for the extraction tool used to run a job. tool_type:, # Raw advanced search query appended as-is (tweet_search_extractor) advanced_query: nil, @@ -127,6 +129,7 @@ module XTwitterScraper def to_hash end + # Identifier for the extraction tool used to run a job. module ToolType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/extraction_run_response.rbi b/rbi/x_twitter_scraper/models/extraction_run_response.rbi index f6e1742..f5699aa 100644 --- a/rbi/x_twitter_scraper/models/extraction_run_response.rbi +++ b/rbi/x_twitter_scraper/models/extraction_run_response.rbi @@ -21,6 +21,7 @@ module XTwitterScraper end attr_accessor :status + # Identifier for the extraction tool used to run a job. sig do returns( XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol @@ -37,7 +38,12 @@ module XTwitterScraper XTwitterScraper::Models::ExtractionRunResponse::ToolType::OrSymbol ).returns(T.attached_class) end - def self.new(id:, status:, tool_type:) + def self.new( + id:, + status:, + # Identifier for the extraction tool used to run a job. + tool_type: + ) end sig do @@ -83,6 +89,7 @@ module XTwitterScraper end end + # Identifier for the extraction tool used to run a job. module ToolType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/integration.rbi b/rbi/x_twitter_scraper/models/integration.rbi index e5b80cf..a0c36ed 100644 --- a/rbi/x_twitter_scraper/models/integration.rbi +++ b/rbi/x_twitter_scraper/models/integration.rbi @@ -21,6 +21,7 @@ module XTwitterScraper sig { returns(Time) } attr_accessor :created_at + # Array of event types to subscribe to. sig do returns(T::Array[XTwitterScraper::Integration::EventType::OrSymbol]) end @@ -60,6 +61,7 @@ module XTwitterScraper sig { params(silent_push: T::Boolean).void } attr_writer :silent_push + # Third-party integration (e.g. Telegram) subscribed to monitor events. sig do params( id: String, @@ -81,6 +83,7 @@ module XTwitterScraper # Integration config — shape varies by type (JSON) config:, created_at:, + # Array of event types to subscribe to. event_types:, is_active:, name:, @@ -114,6 +117,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/integration_create_params.rbi b/rbi/x_twitter_scraper/models/integration_create_params.rbi index a4775c3..e8cd966 100644 --- a/rbi/x_twitter_scraper/models/integration_create_params.rbi +++ b/rbi/x_twitter_scraper/models/integration_create_params.rbi @@ -25,6 +25,7 @@ module XTwitterScraper end attr_writer :config + # Array of event types to subscribe to. sig do returns( T::Array[ @@ -55,6 +56,7 @@ module XTwitterScraper def self.new( # Integration config (e.g. Telegram chatId) config:, + # Array of event types to subscribe to. event_types:, name:, type:, @@ -101,6 +103,7 @@ module XTwitterScraper end end + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/integration_create_response.rbi b/rbi/x_twitter_scraper/models/integration_create_response.rbi index 6a04a6e..43e0c62 100644 --- a/rbi/x_twitter_scraper/models/integration_create_response.rbi +++ b/rbi/x_twitter_scraper/models/integration_create_response.rbi @@ -21,6 +21,7 @@ module XTwitterScraper sig { returns(Time) } attr_accessor :created_at + # Array of event types to subscribe to. sig do returns( T::Array[ @@ -68,6 +69,7 @@ module XTwitterScraper sig { params(silent_push: T::Boolean).void } attr_writer :silent_push + # Third-party integration (e.g. Telegram) subscribed to monitor events. sig do params( id: String, @@ -92,6 +94,7 @@ module XTwitterScraper # Integration config — shape varies by type (JSON) config:, created_at:, + # Array of event types to subscribe to. event_types:, is_active:, name:, @@ -128,6 +131,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/integration_delivery.rbi b/rbi/x_twitter_scraper/models/integration_delivery.rbi index c68c96c..da0a75a 100644 --- a/rbi/x_twitter_scraper/models/integration_delivery.rbi +++ b/rbi/x_twitter_scraper/models/integration_delivery.rbi @@ -56,6 +56,7 @@ module XTwitterScraper sig { params(source_type: String).void } attr_writer :source_type + # Integration delivery attempt record with status and retry count. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/integration_list_deliveries_params.rbi b/rbi/x_twitter_scraper/models/integration_list_deliveries_params.rbi index 2b8f138..00dd336 100644 --- a/rbi/x_twitter_scraper/models/integration_list_deliveries_params.rbi +++ b/rbi/x_twitter_scraper/models/integration_list_deliveries_params.rbi @@ -17,6 +17,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id + # Maximum number of items to return (1-100, default 50) sig { returns(T.nilable(Integer)) } attr_reader :limit @@ -30,7 +31,12 @@ module XTwitterScraper request_options: XTwitterScraper::RequestOptions::OrHash ).returns(T.attached_class) end - def self.new(id:, limit: nil, request_options: {}) + def self.new( + id:, + # Maximum number of items to return (1-100, default 50) + limit: nil, + request_options: {} + ) end sig do diff --git a/rbi/x_twitter_scraper/models/integration_list_deliveries_response.rbi b/rbi/x_twitter_scraper/models/integration_list_deliveries_response.rbi index 23a8164..b6d0d9f 100644 --- a/rbi/x_twitter_scraper/models/integration_list_deliveries_response.rbi +++ b/rbi/x_twitter_scraper/models/integration_list_deliveries_response.rbi @@ -98,6 +98,7 @@ module XTwitterScraper sig { params(source_type: String).void } attr_writer :source_type + # Integration delivery attempt record with status and retry count. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/integration_list_response.rbi b/rbi/x_twitter_scraper/models/integration_list_response.rbi index 9ccccf0..a3fc9cb 100644 --- a/rbi/x_twitter_scraper/models/integration_list_response.rbi +++ b/rbi/x_twitter_scraper/models/integration_list_response.rbi @@ -63,6 +63,7 @@ module XTwitterScraper sig { returns(Time) } attr_accessor :created_at + # Array of event types to subscribe to. sig do returns( T::Array[ @@ -110,6 +111,7 @@ module XTwitterScraper sig { params(silent_push: T::Boolean).void } attr_writer :silent_push + # Third-party integration (e.g. Telegram) subscribed to monitor events. sig do params( id: String, @@ -134,6 +136,7 @@ module XTwitterScraper # Integration config — shape varies by type (JSON) config:, created_at:, + # Array of event types to subscribe to. event_types:, is_active:, name:, @@ -170,6 +173,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/integration_retrieve_response.rbi b/rbi/x_twitter_scraper/models/integration_retrieve_response.rbi index 7ea765d..a0e180f 100644 --- a/rbi/x_twitter_scraper/models/integration_retrieve_response.rbi +++ b/rbi/x_twitter_scraper/models/integration_retrieve_response.rbi @@ -21,6 +21,7 @@ module XTwitterScraper sig { returns(Time) } attr_accessor :created_at + # Array of event types to subscribe to. sig do returns( T::Array[ @@ -68,6 +69,7 @@ module XTwitterScraper sig { params(silent_push: T::Boolean).void } attr_writer :silent_push + # Third-party integration (e.g. Telegram) subscribed to monitor events. sig do params( id: String, @@ -92,6 +94,7 @@ module XTwitterScraper # Integration config — shape varies by type (JSON) config:, created_at:, + # Array of event types to subscribe to. event_types:, is_active:, name:, @@ -128,6 +131,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/integration_update_params.rbi b/rbi/x_twitter_scraper/models/integration_update_params.rbi index f90d545..dcb0e86 100644 --- a/rbi/x_twitter_scraper/models/integration_update_params.rbi +++ b/rbi/x_twitter_scraper/models/integration_update_params.rbi @@ -17,6 +17,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id + # Array of event types to subscribe to. sig do returns( T.nilable( @@ -94,6 +95,7 @@ module XTwitterScraper end def self.new( id:, + # Array of event types to subscribe to. event_types: nil, # Event filter rules (JSON) filters: nil, @@ -128,6 +130,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/integration_update_response.rbi b/rbi/x_twitter_scraper/models/integration_update_response.rbi index 7daa736..af2ee42 100644 --- a/rbi/x_twitter_scraper/models/integration_update_response.rbi +++ b/rbi/x_twitter_scraper/models/integration_update_response.rbi @@ -21,6 +21,7 @@ module XTwitterScraper sig { returns(Time) } attr_accessor :created_at + # Array of event types to subscribe to. sig do returns( T::Array[ @@ -68,6 +69,7 @@ module XTwitterScraper sig { params(silent_push: T::Boolean).void } attr_writer :silent_push + # Third-party integration (e.g. Telegram) subscribed to monitor events. sig do params( id: String, @@ -92,6 +94,7 @@ module XTwitterScraper # Integration config — shape varies by type (JSON) config:, created_at:, + # Array of event types to subscribe to. event_types:, is_active:, name:, @@ -128,6 +131,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/monitor.rbi b/rbi/x_twitter_scraper/models/monitor.rbi index 0949cb0..10b9109 100644 --- a/rbi/x_twitter_scraper/models/monitor.rbi +++ b/rbi/x_twitter_scraper/models/monitor.rbi @@ -14,6 +14,7 @@ module XTwitterScraper sig { returns(Time) } attr_accessor :created_at + # Array of event types to subscribe to. sig { returns(T::Array[XTwitterScraper::Monitor::EventType::OrSymbol]) } attr_accessor :event_types @@ -26,6 +27,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :x_user_id + # Account monitor that tracks activity for a given X user. sig do params( id: String, @@ -39,6 +41,7 @@ module XTwitterScraper def self.new( id:, created_at:, + # Array of event types to subscribe to. event_types:, is_active:, username:, @@ -62,6 +65,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/monitor_create_params.rbi b/rbi/x_twitter_scraper/models/monitor_create_params.rbi index 82997ac..a21e203 100644 --- a/rbi/x_twitter_scraper/models/monitor_create_params.rbi +++ b/rbi/x_twitter_scraper/models/monitor_create_params.rbi @@ -14,6 +14,7 @@ module XTwitterScraper ) end + # Array of event types to subscribe to. sig do returns( T::Array[XTwitterScraper::MonitorCreateParams::EventType::OrSymbol] @@ -34,6 +35,7 @@ module XTwitterScraper ).returns(T.attached_class) end def self.new( + # Array of event types to subscribe to. event_types:, # X username (without @) username:, @@ -56,6 +58,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/monitor_create_response.rbi b/rbi/x_twitter_scraper/models/monitor_create_response.rbi index 52ecce9..fe94cb3 100644 --- a/rbi/x_twitter_scraper/models/monitor_create_response.rbi +++ b/rbi/x_twitter_scraper/models/monitor_create_response.rbi @@ -17,6 +17,7 @@ module XTwitterScraper sig { returns(Time) } attr_accessor :created_at + # Array of event types to subscribe to. sig do returns( T::Array[ @@ -44,7 +45,14 @@ module XTwitterScraper x_user_id: String ).returns(T.attached_class) end - def self.new(id:, created_at:, event_types:, username:, x_user_id:) + def self.new( + id:, + created_at:, + # Array of event types to subscribe to. + event_types:, + username:, + x_user_id: + ) end sig do @@ -64,6 +72,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/monitor_list_response.rbi b/rbi/x_twitter_scraper/models/monitor_list_response.rbi index 8629c8e..d2633f8 100644 --- a/rbi/x_twitter_scraper/models/monitor_list_response.rbi +++ b/rbi/x_twitter_scraper/models/monitor_list_response.rbi @@ -58,6 +58,7 @@ module XTwitterScraper sig { returns(Time) } attr_accessor :created_at + # Array of event types to subscribe to. sig do returns( T::Array[ @@ -76,6 +77,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :x_user_id + # Account monitor that tracks activity for a given X user. sig do params( id: String, @@ -92,6 +94,7 @@ module XTwitterScraper def self.new( id:, created_at:, + # Array of event types to subscribe to. event_types:, is_active:, username:, @@ -117,6 +120,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/monitor_retrieve_response.rbi b/rbi/x_twitter_scraper/models/monitor_retrieve_response.rbi index 3ad0230..9475e5f 100644 --- a/rbi/x_twitter_scraper/models/monitor_retrieve_response.rbi +++ b/rbi/x_twitter_scraper/models/monitor_retrieve_response.rbi @@ -17,6 +17,7 @@ module XTwitterScraper sig { returns(Time) } attr_accessor :created_at + # Array of event types to subscribe to. sig do returns( T::Array[ @@ -35,6 +36,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :x_user_id + # Account monitor that tracks activity for a given X user. sig do params( id: String, @@ -51,6 +53,7 @@ module XTwitterScraper def self.new( id:, created_at:, + # Array of event types to subscribe to. event_types:, is_active:, username:, @@ -76,6 +79,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/monitor_update_params.rbi b/rbi/x_twitter_scraper/models/monitor_update_params.rbi index dab7ab9..2e66d4e 100644 --- a/rbi/x_twitter_scraper/models/monitor_update_params.rbi +++ b/rbi/x_twitter_scraper/models/monitor_update_params.rbi @@ -17,6 +17,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id + # Array of event types to subscribe to. sig do returns( T.nilable( @@ -49,7 +50,13 @@ module XTwitterScraper request_options: XTwitterScraper::RequestOptions::OrHash ).returns(T.attached_class) end - def self.new(id:, event_types: nil, is_active: nil, request_options: {}) + def self.new( + id:, + # Array of event types to subscribe to. + event_types: nil, + is_active: nil, + request_options: {} + ) end sig do @@ -68,6 +75,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/monitor_update_response.rbi b/rbi/x_twitter_scraper/models/monitor_update_response.rbi index d692c9a..e72bd82 100644 --- a/rbi/x_twitter_scraper/models/monitor_update_response.rbi +++ b/rbi/x_twitter_scraper/models/monitor_update_response.rbi @@ -17,6 +17,7 @@ module XTwitterScraper sig { returns(Time) } attr_accessor :created_at + # Array of event types to subscribe to. sig do returns( T::Array[ @@ -35,6 +36,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :x_user_id + # Account monitor that tracks activity for a given X user. sig do params( id: String, @@ -51,6 +53,7 @@ module XTwitterScraper def self.new( id:, created_at:, + # Array of event types to subscribe to. event_types:, is_active:, username:, @@ -76,6 +79,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/paginated_tweets.rbi b/rbi/x_twitter_scraper/models/paginated_tweets.rbi index 192a881..737201c 100644 --- a/rbi/x_twitter_scraper/models/paginated_tweets.rbi +++ b/rbi/x_twitter_scraper/models/paginated_tweets.rbi @@ -20,6 +20,7 @@ module XTwitterScraper sig { returns(T::Array[XTwitterScraper::PaginatedTweets::Tweet]) } attr_accessor :tweets + # Paginated list of tweets with cursor-based navigation. sig do params( has_next_page: T::Boolean, @@ -81,7 +82,7 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) sig { returns(T.nilable(T::Boolean)) } attr_reader :is_note_tweet @@ -118,6 +119,7 @@ module XTwitterScraper sig { params(view_count: Integer).void } attr_writer :view_count + # Tweet returned from search results with inline author info. sig do params( id: String, @@ -139,7 +141,7 @@ module XTwitterScraper author: nil, bookmark_count: nil, created_at: nil, - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) is_note_tweet: nil, like_count: nil, quote_count: nil, diff --git a/rbi/x_twitter_scraper/models/paginated_users.rbi b/rbi/x_twitter_scraper/models/paginated_users.rbi index 43eabe3..03d1c52 100644 --- a/rbi/x_twitter_scraper/models/paginated_users.rbi +++ b/rbi/x_twitter_scraper/models/paginated_users.rbi @@ -20,6 +20,7 @@ module XTwitterScraper sig { returns(T::Array[XTwitterScraper::PaginatedUsers::User]) } attr_accessor :users + # Paginated list of user profiles with cursor-based navigation. sig do params( has_next_page: T::Boolean, @@ -108,6 +109,7 @@ module XTwitterScraper sig { params(verified: T::Boolean).void } attr_writer :verified + # X user profile with bio, follower counts, and verification status. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/radar_item.rbi b/rbi/x_twitter_scraper/models/radar_item.rbi index 496ab15..7ef6eea 100644 --- a/rbi/x_twitter_scraper/models/radar_item.rbi +++ b/rbi/x_twitter_scraper/models/radar_item.rbi @@ -44,6 +44,7 @@ module XTwitterScraper sig { params(url: String).void } attr_writer :url + # Trending topic with score, category, source, and region. sig do params( category: String, diff --git a/rbi/x_twitter_scraper/models/radar_retrieve_trending_topics_response.rbi b/rbi/x_twitter_scraper/models/radar_retrieve_trending_topics_response.rbi index 4907d27..ceb762e 100644 --- a/rbi/x_twitter_scraper/models/radar_retrieve_trending_topics_response.rbi +++ b/rbi/x_twitter_scraper/models/radar_retrieve_trending_topics_response.rbi @@ -94,6 +94,7 @@ module XTwitterScraper sig { params(url: String).void } attr_writer :url + # Trending topic with score, category, source, and region. sig do params( category: String, diff --git a/rbi/x_twitter_scraper/models/style_analyze_response.rbi b/rbi/x_twitter_scraper/models/style_analyze_response.rbi index 75bf88c..3badf2f 100644 --- a/rbi/x_twitter_scraper/models/style_analyze_response.rbi +++ b/rbi/x_twitter_scraper/models/style_analyze_response.rbi @@ -28,6 +28,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :x_username + # Full style profile with sampled tweets used for tone analysis. sig do params( fetched_at: Time, diff --git a/rbi/x_twitter_scraper/models/style_compare_response.rbi b/rbi/x_twitter_scraper/models/style_compare_response.rbi index 64a337b..c764a34 100644 --- a/rbi/x_twitter_scraper/models/style_compare_response.rbi +++ b/rbi/x_twitter_scraper/models/style_compare_response.rbi @@ -11,6 +11,7 @@ module XTwitterScraper ) end + # Full style profile with sampled tweets used for tone analysis. sig { returns(XTwitterScraper::Models::StyleCompareResponse::Style1) } attr_reader :style1 @@ -21,6 +22,7 @@ module XTwitterScraper end attr_writer :style1 + # Full style profile with sampled tweets used for tone analysis. sig { returns(XTwitterScraper::Models::StyleCompareResponse::Style2) } attr_reader :style2 @@ -37,7 +39,12 @@ module XTwitterScraper style2: XTwitterScraper::Models::StyleCompareResponse::Style2::OrHash ).returns(T.attached_class) end - def self.new(style1:, style2:) + def self.new( + # Full style profile with sampled tweets used for tone analysis. + style1:, + # Full style profile with sampled tweets used for tone analysis. + style2: + ) end sig do @@ -81,6 +88,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :x_username + # Full style profile with sampled tweets used for tone analysis. sig do params( fetched_at: Time, @@ -202,6 +210,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :x_username + # Full style profile with sampled tweets used for tone analysis. sig do params( fetched_at: Time, diff --git a/rbi/x_twitter_scraper/models/style_list_response.rbi b/rbi/x_twitter_scraper/models/style_list_response.rbi index feff76d..b24bc13 100644 --- a/rbi/x_twitter_scraper/models/style_list_response.rbi +++ b/rbi/x_twitter_scraper/models/style_list_response.rbi @@ -56,6 +56,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :x_username + # Style profile summary with tweet count and ownership flag. sig do params( fetched_at: Time, diff --git a/rbi/x_twitter_scraper/models/style_profile.rbi b/rbi/x_twitter_scraper/models/style_profile.rbi index 82dfa61..9088f19 100644 --- a/rbi/x_twitter_scraper/models/style_profile.rbi +++ b/rbi/x_twitter_scraper/models/style_profile.rbi @@ -26,6 +26,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :x_username + # Full style profile with sampled tweets used for tone analysis. sig do params( fetched_at: Time, diff --git a/rbi/x_twitter_scraper/models/style_profile_summary.rbi b/rbi/x_twitter_scraper/models/style_profile_summary.rbi index e06950c..d36acad 100644 --- a/rbi/x_twitter_scraper/models/style_profile_summary.rbi +++ b/rbi/x_twitter_scraper/models/style_profile_summary.rbi @@ -23,6 +23,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :x_username + # Style profile summary with tweet count and ownership flag. sig do params( fetched_at: Time, diff --git a/rbi/x_twitter_scraper/models/trend_list_params.rbi b/rbi/x_twitter_scraper/models/trend_list_params.rbi index ee2d17f..98b144c 100644 --- a/rbi/x_twitter_scraper/models/trend_list_params.rbi +++ b/rbi/x_twitter_scraper/models/trend_list_params.rbi @@ -14,6 +14,7 @@ module XTwitterScraper ) end + # Number of trending topics to return (1-50, default 30) sig { returns(T.nilable(Integer)) } attr_reader :count @@ -35,6 +36,7 @@ module XTwitterScraper ).returns(T.attached_class) end def self.new( + # Number of trending topics to return (1-50, default 30) count: nil, # Region WOEID (1=Worldwide, 23424977=US, 23424975=UK, 23424969=Turkey) woeid: nil, diff --git a/rbi/x_twitter_scraper/models/webhook.rbi b/rbi/x_twitter_scraper/models/webhook.rbi index dabd02a..d0d2593 100644 --- a/rbi/x_twitter_scraper/models/webhook.rbi +++ b/rbi/x_twitter_scraper/models/webhook.rbi @@ -14,6 +14,7 @@ module XTwitterScraper sig { returns(Time) } attr_accessor :created_at + # Array of event types to subscribe to. sig { returns(T::Array[XTwitterScraper::Webhook::EventType::OrSymbol]) } attr_accessor :event_types @@ -23,6 +24,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :url + # Webhook endpoint registered to receive event deliveries. sig do params( id: String, @@ -32,7 +34,14 @@ module XTwitterScraper url: String ).returns(T.attached_class) end - def self.new(id:, created_at:, event_types:, is_active:, url:) + def self.new( + id:, + created_at:, + # Array of event types to subscribe to. + event_types:, + is_active:, + url: + ) end sig do @@ -50,6 +59,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/webhook_create_params.rbi b/rbi/x_twitter_scraper/models/webhook_create_params.rbi index 0e7f498..f60f1b2 100644 --- a/rbi/x_twitter_scraper/models/webhook_create_params.rbi +++ b/rbi/x_twitter_scraper/models/webhook_create_params.rbi @@ -14,6 +14,7 @@ module XTwitterScraper ) end + # Array of event types to subscribe to. sig do returns( T::Array[XTwitterScraper::WebhookCreateParams::EventType::OrSymbol] @@ -34,6 +35,7 @@ module XTwitterScraper ).returns(T.attached_class) end def self.new( + # Array of event types to subscribe to. event_types:, # HTTPS URL url:, @@ -56,6 +58,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/webhook_create_response.rbi b/rbi/x_twitter_scraper/models/webhook_create_response.rbi index 7891bb4..7b816ee 100644 --- a/rbi/x_twitter_scraper/models/webhook_create_response.rbi +++ b/rbi/x_twitter_scraper/models/webhook_create_response.rbi @@ -17,6 +17,7 @@ module XTwitterScraper sig { returns(Time) } attr_accessor :created_at + # Array of event types to subscribe to. sig do returns( T::Array[ @@ -44,7 +45,14 @@ module XTwitterScraper url: String ).returns(T.attached_class) end - def self.new(id:, created_at:, event_types:, secret:, url:) + def self.new( + id:, + created_at:, + # Array of event types to subscribe to. + event_types:, + secret:, + url: + ) end sig do @@ -64,6 +72,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/webhook_list_deliveries_response.rbi b/rbi/x_twitter_scraper/models/webhook_list_deliveries_response.rbi index d27a030..c3acae3 100644 --- a/rbi/x_twitter_scraper/models/webhook_list_deliveries_response.rbi +++ b/rbi/x_twitter_scraper/models/webhook_list_deliveries_response.rbi @@ -86,6 +86,7 @@ module XTwitterScraper sig { params(last_status_code: Integer).void } attr_writer :last_status_code + # Webhook delivery attempt record with status and retry count. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/webhook_list_response.rbi b/rbi/x_twitter_scraper/models/webhook_list_response.rbi index cdd5972..a01546c 100644 --- a/rbi/x_twitter_scraper/models/webhook_list_response.rbi +++ b/rbi/x_twitter_scraper/models/webhook_list_response.rbi @@ -53,6 +53,7 @@ module XTwitterScraper sig { returns(Time) } attr_accessor :created_at + # Array of event types to subscribe to. sig do returns( T::Array[ @@ -68,6 +69,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :url + # Webhook endpoint registered to receive event deliveries. sig do params( id: String, @@ -80,7 +82,14 @@ module XTwitterScraper url: String ).returns(T.attached_class) end - def self.new(id:, created_at:, event_types:, is_active:, url:) + def self.new( + id:, + created_at:, + # Array of event types to subscribe to. + event_types:, + is_active:, + url: + ) end sig do @@ -100,6 +109,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/webhook_update_params.rbi b/rbi/x_twitter_scraper/models/webhook_update_params.rbi index 365e9b4..09300ee 100644 --- a/rbi/x_twitter_scraper/models/webhook_update_params.rbi +++ b/rbi/x_twitter_scraper/models/webhook_update_params.rbi @@ -17,6 +17,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id + # Array of event types to subscribe to. sig do returns( T.nilable( @@ -58,6 +59,7 @@ module XTwitterScraper end def self.new( id:, + # Array of event types to subscribe to. event_types: nil, is_active: nil, url: nil, @@ -82,6 +84,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/webhook_update_response.rbi b/rbi/x_twitter_scraper/models/webhook_update_response.rbi index 9a9a3b7..0380620 100644 --- a/rbi/x_twitter_scraper/models/webhook_update_response.rbi +++ b/rbi/x_twitter_scraper/models/webhook_update_response.rbi @@ -17,6 +17,7 @@ module XTwitterScraper sig { returns(Time) } attr_accessor :created_at + # Array of event types to subscribe to. sig do returns( T::Array[ @@ -32,6 +33,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :url + # Webhook endpoint registered to receive event deliveries. sig do params( id: String, @@ -44,7 +46,14 @@ module XTwitterScraper url: String ).returns(T.attached_class) end - def self.new(id:, created_at:, event_types:, is_active:, url:) + def self.new( + id:, + created_at:, + # Array of event types to subscribe to. + event_types:, + is_active:, + url: + ) end sig do @@ -64,6 +73,7 @@ module XTwitterScraper def to_hash end + # Type of monitor event fired when account activity occurs. module EventType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/winner.rbi b/rbi/x_twitter_scraper/models/winner.rbi index ca5f2ee..7d9c8a1 100644 --- a/rbi/x_twitter_scraper/models/winner.rbi +++ b/rbi/x_twitter_scraper/models/winner.rbi @@ -20,6 +20,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :tweet_id + # Giveaway draw winner with position and backup flag. sig do params( author_username: String, diff --git a/rbi/x_twitter_scraper/models/x/account_list_response.rbi b/rbi/x_twitter_scraper/models/x/account_list_response.rbi index cab0930..e3e4462 100644 --- a/rbi/x_twitter_scraper/models/x/account_list_response.rbi +++ b/rbi/x_twitter_scraper/models/x/account_list_response.rbi @@ -67,6 +67,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :x_username + # Linked X account summary with username and connection status. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/x/account_reauth_params.rbi b/rbi/x_twitter_scraper/models/x/account_reauth_params.rbi index 0b1204f..c41ea44 100644 --- a/rbi/x_twitter_scraper/models/x/account_reauth_params.rbi +++ b/rbi/x_twitter_scraper/models/x/account_reauth_params.rbi @@ -18,11 +18,11 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - # Account password + # Updated account password sig { returns(String) } attr_accessor :password - # TOTP secret for 2FA + # TOTP secret for 2FA re-authentication sig { returns(T.nilable(String)) } attr_reader :totp_secret @@ -39,9 +39,9 @@ module XTwitterScraper end def self.new( id:, - # Account password + # Updated account password password:, - # TOTP secret for 2FA + # TOTP secret for 2FA re-authentication totp_secret: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/models/x/account_retrieve_response.rbi b/rbi/x_twitter_scraper/models/x/account_retrieve_response.rbi index f716db2..2d0450e 100644 --- a/rbi/x_twitter_scraper/models/x/account_retrieve_response.rbi +++ b/rbi/x_twitter_scraper/models/x/account_retrieve_response.rbi @@ -45,6 +45,7 @@ module XTwitterScraper sig { params(updated_at: Time).void } attr_writer :updated_at + # Full X account details including proxy, cookies, and update timestamp. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/x/bookmark_list_params.rbi b/rbi/x_twitter_scraper/models/x/bookmark_list_params.rbi index d69f314..911e129 100644 --- a/rbi/x_twitter_scraper/models/x/bookmark_list_params.rbi +++ b/rbi/x_twitter_scraper/models/x/bookmark_list_params.rbi @@ -15,7 +15,7 @@ module XTwitterScraper ) end - # Pagination cursor from previous response + # Pagination cursor for bookmarks sig { returns(T.nilable(String)) } attr_reader :cursor @@ -37,7 +37,7 @@ module XTwitterScraper ).returns(T.attached_class) end def self.new( - # Pagination cursor from previous response + # Pagination cursor for bookmarks cursor: nil, # Optional bookmark folder ID folder_id: nil, diff --git a/rbi/x_twitter_scraper/models/x/bookmark_list_response.rbi b/rbi/x_twitter_scraper/models/x/bookmark_list_response.rbi index 5419a61..7fc2cea 100644 --- a/rbi/x_twitter_scraper/models/x/bookmark_list_response.rbi +++ b/rbi/x_twitter_scraper/models/x/bookmark_list_response.rbi @@ -25,6 +25,7 @@ module XTwitterScraper end attr_accessor :tweets + # Paginated list of tweets with cursor-based navigation. sig do params( has_next_page: T::Boolean, @@ -97,7 +98,7 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) sig { returns(T.nilable(T::Boolean)) } attr_reader :is_note_tweet @@ -134,6 +135,7 @@ module XTwitterScraper sig { params(view_count: Integer).void } attr_writer :view_count + # Tweet returned from search results with inline author info. sig do params( id: String, @@ -156,7 +158,7 @@ module XTwitterScraper author: nil, bookmark_count: nil, created_at: nil, - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) is_note_tweet: nil, like_count: nil, quote_count: nil, diff --git a/rbi/x_twitter_scraper/models/x/communities/join_create_params.rbi b/rbi/x_twitter_scraper/models/x/communities/join_create_params.rbi index 6ed94a9..b27db72 100644 --- a/rbi/x_twitter_scraper/models/x/communities/join_create_params.rbi +++ b/rbi/x_twitter_scraper/models/x/communities/join_create_params.rbi @@ -19,7 +19,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - # X account (@username or account ID) + # X account identifier (@username or account ID) sig { returns(String) } attr_accessor :account @@ -32,7 +32,7 @@ module XTwitterScraper end def self.new( id:, - # X account (@username or account ID) + # X account identifier (@username or account ID) account:, request_options: {} ) diff --git a/rbi/x_twitter_scraper/models/x/communities/join_create_response.rbi b/rbi/x_twitter_scraper/models/x/communities/join_create_response.rbi index a743922..636539c 100644 --- a/rbi/x_twitter_scraper/models/x/communities/join_create_response.rbi +++ b/rbi/x_twitter_scraper/models/x/communities/join_create_response.rbi @@ -22,6 +22,7 @@ module XTwitterScraper sig { returns(T::Boolean) } attr_accessor :success + # Result of a community join or leave action. sig do params( community_id: String, diff --git a/rbi/x_twitter_scraper/models/x/communities/join_delete_all_params.rbi b/rbi/x_twitter_scraper/models/x/communities/join_delete_all_params.rbi index e85492d..b43addd 100644 --- a/rbi/x_twitter_scraper/models/x/communities/join_delete_all_params.rbi +++ b/rbi/x_twitter_scraper/models/x/communities/join_delete_all_params.rbi @@ -19,7 +19,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - # X account (@username or account ID) + # X account identifier (@username or account ID) sig { returns(String) } attr_accessor :account @@ -32,7 +32,7 @@ module XTwitterScraper end def self.new( id:, - # X account (@username or account ID) + # X account identifier (@username or account ID) account:, request_options: {} ) diff --git a/rbi/x_twitter_scraper/models/x/communities/join_delete_all_response.rbi b/rbi/x_twitter_scraper/models/x/communities/join_delete_all_response.rbi index 8e8f486..fd775fe 100644 --- a/rbi/x_twitter_scraper/models/x/communities/join_delete_all_response.rbi +++ b/rbi/x_twitter_scraper/models/x/communities/join_delete_all_response.rbi @@ -22,6 +22,7 @@ module XTwitterScraper sig { returns(T::Boolean) } attr_accessor :success + # Result of a community join or leave action. sig do params( community_id: String, diff --git a/rbi/x_twitter_scraper/models/x/communities/tweet_list_params.rbi b/rbi/x_twitter_scraper/models/x/communities/tweet_list_params.rbi index 9ef52d9..7e7f7d2 100644 --- a/rbi/x_twitter_scraper/models/x/communities/tweet_list_params.rbi +++ b/rbi/x_twitter_scraper/models/x/communities/tweet_list_params.rbi @@ -16,18 +16,18 @@ module XTwitterScraper ) end - # Search query + # Search query for cross-community tweets sig { returns(String) } attr_accessor :q - # Pagination cursor + # Pagination cursor for cross-community results sig { returns(T.nilable(String)) } attr_reader :cursor sig { params(cursor: String).void } attr_writer :cursor - # Sort order (Latest or Top) + # Sort order for cross-community results (Latest or Top) sig { returns(T.nilable(String)) } attr_reader :query_type @@ -43,11 +43,11 @@ module XTwitterScraper ).returns(T.attached_class) end def self.new( - # Search query + # Search query for cross-community tweets q:, - # Pagination cursor + # Pagination cursor for cross-community results cursor: nil, - # Sort order (Latest or Top) + # Sort order for cross-community results (Latest or Top) query_type: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/models/x/communities/tweet_list_response.rbi b/rbi/x_twitter_scraper/models/x/communities/tweet_list_response.rbi new file mode 100644 index 0000000..4929b89 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/communities/tweet_list_response.rbi @@ -0,0 +1,248 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + module Communities + class TweetListResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::Communities::TweetListResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(T::Boolean) } + attr_accessor :has_next_page + + sig { returns(String) } + attr_accessor :next_cursor + + sig do + returns( + T::Array[ + XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet + ] + ) + end + attr_accessor :tweets + + # Paginated list of tweets with cursor-based navigation. + sig do + params( + has_next_page: T::Boolean, + next_cursor: String, + tweets: + T::Array[ + XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::OrHash + ] + ).returns(T.attached_class) + end + def self.new(has_next_page:, next_cursor:, tweets:) + end + + sig do + override.returns( + { + has_next_page: T::Boolean, + next_cursor: String, + tweets: + T::Array[ + XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet + ] + } + ) + end + def to_hash + end + + class Tweet < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :text + + sig do + returns( + T.nilable( + XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author + ) + ) + end + attr_reader :author + + sig do + params( + author: + XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author::OrHash + ).void + end + attr_writer :author + + sig { returns(T.nilable(Integer)) } + attr_reader :bookmark_count + + sig { params(bookmark_count: Integer).void } + attr_writer :bookmark_count + + sig { returns(T.nilable(String)) } + attr_reader :created_at + + sig { params(created_at: String).void } + attr_writer :created_at + + # True for Note Tweets (long-form content, up to 25,000 characters) + sig { returns(T.nilable(T::Boolean)) } + attr_reader :is_note_tweet + + sig { params(is_note_tweet: T::Boolean).void } + attr_writer :is_note_tweet + + sig { returns(T.nilable(Integer)) } + attr_reader :like_count + + sig { params(like_count: Integer).void } + attr_writer :like_count + + sig { returns(T.nilable(Integer)) } + attr_reader :quote_count + + sig { params(quote_count: Integer).void } + attr_writer :quote_count + + sig { returns(T.nilable(Integer)) } + attr_reader :reply_count + + sig { params(reply_count: Integer).void } + attr_writer :reply_count + + sig { returns(T.nilable(Integer)) } + attr_reader :retweet_count + + sig { params(retweet_count: Integer).void } + attr_writer :retweet_count + + sig { returns(T.nilable(Integer)) } + attr_reader :view_count + + sig { params(view_count: Integer).void } + attr_writer :view_count + + # Tweet returned from search results with inline author info. + sig do + params( + id: String, + text: String, + author: + XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author::OrHash, + bookmark_count: Integer, + created_at: String, + is_note_tweet: T::Boolean, + like_count: Integer, + quote_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + ).returns(T.attached_class) + end + def self.new( + id:, + text:, + author: nil, + bookmark_count: nil, + created_at: nil, + # True for Note Tweets (long-form content, up to 25,000 characters) + is_note_tweet: nil, + like_count: nil, + quote_count: nil, + reply_count: nil, + retweet_count: nil, + view_count: nil + ) + end + + sig do + override.returns( + { + id: String, + text: String, + author: + XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author, + bookmark_count: Integer, + created_at: String, + is_note_tweet: T::Boolean, + like_count: Integer, + quote_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + } + ) + end + def to_hash + end + + class Author < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :name + + sig { returns(String) } + attr_accessor :username + + sig { returns(T.nilable(T::Boolean)) } + attr_reader :verified + + sig { params(verified: T::Boolean).void } + attr_writer :verified + + sig do + params( + id: String, + name: String, + username: String, + verified: T::Boolean + ).returns(T.attached_class) + end + def self.new(id:, name:, username:, verified: nil) + end + + sig do + override.returns( + { + id: String, + name: String, + username: String, + verified: T::Boolean + } + ) + end + def to_hash + end + end + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/community_action_result.rbi b/rbi/x_twitter_scraper/models/x/community_action_result.rbi index b692c57..c9e818b 100644 --- a/rbi/x_twitter_scraper/models/x/community_action_result.rbi +++ b/rbi/x_twitter_scraper/models/x/community_action_result.rbi @@ -21,6 +21,7 @@ module XTwitterScraper sig { returns(T::Boolean) } attr_accessor :success + # Result of a community join or leave action. sig do params( community_id: String, diff --git a/rbi/x_twitter_scraper/models/x/community_create_params.rbi b/rbi/x_twitter_scraper/models/x/community_create_params.rbi index 19d7ece..9af899d 100644 --- a/rbi/x_twitter_scraper/models/x/community_create_params.rbi +++ b/rbi/x_twitter_scraper/models/x/community_create_params.rbi @@ -15,7 +15,7 @@ module XTwitterScraper ) end - # X account (@username or account ID) + # X account (@username or ID) creating the community sig { returns(String) } attr_accessor :account @@ -39,7 +39,7 @@ module XTwitterScraper ).returns(T.attached_class) end def self.new( - # X account (@username or account ID) + # X account (@username or ID) creating the community account:, # Community name name:, diff --git a/rbi/x_twitter_scraper/models/x/community_delete_params.rbi b/rbi/x_twitter_scraper/models/x/community_delete_params.rbi index baf7909..8138efb 100644 --- a/rbi/x_twitter_scraper/models/x/community_delete_params.rbi +++ b/rbi/x_twitter_scraper/models/x/community_delete_params.rbi @@ -18,7 +18,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - # X account (@username or account ID) + # X account (@username or ID) deleting the community sig { returns(String) } attr_accessor :account @@ -36,7 +36,7 @@ module XTwitterScraper end def self.new( id:, - # X account (@username or account ID) + # X account (@username or ID) deleting the community account:, # Community name for confirmation community_name:, diff --git a/rbi/x_twitter_scraper/models/x/community_retrieve_info_response.rbi b/rbi/x_twitter_scraper/models/x/community_retrieve_info_response.rbi index 7a520e2..d439ba8 100644 --- a/rbi/x_twitter_scraper/models/x/community_retrieve_info_response.rbi +++ b/rbi/x_twitter_scraper/models/x/community_retrieve_info_response.rbi @@ -60,7 +60,7 @@ module XTwitterScraper ) end - # Community ID + # Unique community identifier sig { returns(String) } attr_accessor :id @@ -78,7 +78,7 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at - # Community description + # About text for the community sig { returns(T.nilable(String)) } attr_reader :description @@ -106,7 +106,7 @@ module XTwitterScraper sig { params(moderator_count: Integer).void } attr_writer :moderator_count - # Community name + # Display name of the community sig { returns(T.nilable(String)) } attr_reader :name @@ -173,13 +173,13 @@ module XTwitterScraper ).returns(T.attached_class) end def self.new( - # Community ID + # Unique community identifier id:, # Community banner image URL banner_url: nil, # Community creation timestamp created_at: nil, - # Community description + # About text for the community description: nil, # Join policy (open or restricted) join_policy: nil, @@ -187,7 +187,7 @@ module XTwitterScraper member_count: nil, # Total moderator count moderator_count: nil, - # Community name + # Display name of the community name: nil, # Primary topic primary_topic: nil, diff --git a/rbi/x_twitter_scraper/models/x/community_retrieve_members_response.rbi b/rbi/x_twitter_scraper/models/x/community_retrieve_members_response.rbi new file mode 100644 index 0000000..67626bf --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/community_retrieve_members_response.rbi @@ -0,0 +1,179 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + class CommunityRetrieveMembersResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::CommunityRetrieveMembersResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(T::Boolean) } + attr_accessor :has_next_page + + sig { returns(String) } + attr_accessor :next_cursor + + sig do + returns( + T::Array[ + XTwitterScraper::Models::X::CommunityRetrieveMembersResponse::User + ] + ) + end + attr_accessor :users + + # Paginated list of user profiles with cursor-based navigation. + sig do + params( + has_next_page: T::Boolean, + next_cursor: String, + users: + T::Array[ + XTwitterScraper::Models::X::CommunityRetrieveMembersResponse::User::OrHash + ] + ).returns(T.attached_class) + end + def self.new(has_next_page:, next_cursor:, users:) + end + + sig do + override.returns( + { + has_next_page: T::Boolean, + next_cursor: String, + users: + T::Array[ + XTwitterScraper::Models::X::CommunityRetrieveMembersResponse::User + ] + } + ) + end + def to_hash + end + + class User < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::CommunityRetrieveMembersResponse::User, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :name + + sig { returns(String) } + attr_accessor :username + + sig { returns(T.nilable(String)) } + attr_reader :created_at + + sig { params(created_at: String).void } + attr_writer :created_at + + sig { returns(T.nilable(String)) } + attr_reader :description + + sig { params(description: String).void } + attr_writer :description + + sig { returns(T.nilable(Integer)) } + attr_reader :followers + + sig { params(followers: Integer).void } + attr_writer :followers + + sig { returns(T.nilable(Integer)) } + attr_reader :following + + sig { params(following: Integer).void } + attr_writer :following + + sig { returns(T.nilable(String)) } + attr_reader :location + + sig { params(location: String).void } + attr_writer :location + + sig { returns(T.nilable(String)) } + attr_reader :profile_picture + + sig { params(profile_picture: String).void } + attr_writer :profile_picture + + sig { returns(T.nilable(Integer)) } + attr_reader :statuses_count + + sig { params(statuses_count: Integer).void } + attr_writer :statuses_count + + sig { returns(T.nilable(T::Boolean)) } + attr_reader :verified + + sig { params(verified: T::Boolean).void } + attr_writer :verified + + # X user profile with bio, follower counts, and verification status. + sig do + params( + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: T::Boolean + ).returns(T.attached_class) + end + def self.new( + id:, + name:, + username:, + created_at: nil, + description: nil, + followers: nil, + following: nil, + location: nil, + profile_picture: nil, + statuses_count: nil, + verified: nil + ) + end + + sig do + override.returns( + { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: T::Boolean + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/community_retrieve_moderators_params.rbi b/rbi/x_twitter_scraper/models/x/community_retrieve_moderators_params.rbi index 628b4ae..9e962d8 100644 --- a/rbi/x_twitter_scraper/models/x/community_retrieve_moderators_params.rbi +++ b/rbi/x_twitter_scraper/models/x/community_retrieve_moderators_params.rbi @@ -18,7 +18,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - # Pagination cursor + # Pagination cursor for community moderators sig { returns(T.nilable(String)) } attr_reader :cursor @@ -34,7 +34,7 @@ module XTwitterScraper end def self.new( id:, - # Pagination cursor + # Pagination cursor for community moderators cursor: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/models/x/community_retrieve_moderators_response.rbi b/rbi/x_twitter_scraper/models/x/community_retrieve_moderators_response.rbi new file mode 100644 index 0000000..b6ebd74 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/community_retrieve_moderators_response.rbi @@ -0,0 +1,179 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + class CommunityRetrieveModeratorsResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(T::Boolean) } + attr_accessor :has_next_page + + sig { returns(String) } + attr_accessor :next_cursor + + sig do + returns( + T::Array[ + XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse::User + ] + ) + end + attr_accessor :users + + # Paginated list of user profiles with cursor-based navigation. + sig do + params( + has_next_page: T::Boolean, + next_cursor: String, + users: + T::Array[ + XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse::User::OrHash + ] + ).returns(T.attached_class) + end + def self.new(has_next_page:, next_cursor:, users:) + end + + sig do + override.returns( + { + has_next_page: T::Boolean, + next_cursor: String, + users: + T::Array[ + XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse::User + ] + } + ) + end + def to_hash + end + + class User < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse::User, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :name + + sig { returns(String) } + attr_accessor :username + + sig { returns(T.nilable(String)) } + attr_reader :created_at + + sig { params(created_at: String).void } + attr_writer :created_at + + sig { returns(T.nilable(String)) } + attr_reader :description + + sig { params(description: String).void } + attr_writer :description + + sig { returns(T.nilable(Integer)) } + attr_reader :followers + + sig { params(followers: Integer).void } + attr_writer :followers + + sig { returns(T.nilable(Integer)) } + attr_reader :following + + sig { params(following: Integer).void } + attr_writer :following + + sig { returns(T.nilable(String)) } + attr_reader :location + + sig { params(location: String).void } + attr_writer :location + + sig { returns(T.nilable(String)) } + attr_reader :profile_picture + + sig { params(profile_picture: String).void } + attr_writer :profile_picture + + sig { returns(T.nilable(Integer)) } + attr_reader :statuses_count + + sig { params(statuses_count: Integer).void } + attr_writer :statuses_count + + sig { returns(T.nilable(T::Boolean)) } + attr_reader :verified + + sig { params(verified: T::Boolean).void } + attr_writer :verified + + # X user profile with bio, follower counts, and verification status. + sig do + params( + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: T::Boolean + ).returns(T.attached_class) + end + def self.new( + id:, + name:, + username:, + created_at: nil, + description: nil, + followers: nil, + following: nil, + location: nil, + profile_picture: nil, + statuses_count: nil, + verified: nil + ) + end + + sig do + override.returns( + { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: T::Boolean + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/community_retrieve_search_params.rbi b/rbi/x_twitter_scraper/models/x/community_retrieve_search_params.rbi index f354f92..140bd60 100644 --- a/rbi/x_twitter_scraper/models/x/community_retrieve_search_params.rbi +++ b/rbi/x_twitter_scraper/models/x/community_retrieve_search_params.rbi @@ -19,7 +19,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :q - # Pagination cursor + # Pagination cursor for community search sig { returns(T.nilable(String)) } attr_reader :cursor @@ -44,7 +44,7 @@ module XTwitterScraper def self.new( # Search query q:, - # Pagination cursor + # Pagination cursor for community search cursor: nil, # Sort order (Latest or Top) query_type: nil, diff --git a/rbi/x_twitter_scraper/models/x/community_retrieve_search_response.rbi b/rbi/x_twitter_scraper/models/x/community_retrieve_search_response.rbi new file mode 100644 index 0000000..f45de4a --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/community_retrieve_search_response.rbi @@ -0,0 +1,246 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + class CommunityRetrieveSearchResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::CommunityRetrieveSearchResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(T::Boolean) } + attr_accessor :has_next_page + + sig { returns(String) } + attr_accessor :next_cursor + + sig do + returns( + T::Array[ + XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet + ] + ) + end + attr_accessor :tweets + + # Paginated list of tweets with cursor-based navigation. + sig do + params( + has_next_page: T::Boolean, + next_cursor: String, + tweets: + T::Array[ + XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::OrHash + ] + ).returns(T.attached_class) + end + def self.new(has_next_page:, next_cursor:, tweets:) + end + + sig do + override.returns( + { + has_next_page: T::Boolean, + next_cursor: String, + tweets: + T::Array[ + XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet + ] + } + ) + end + def to_hash + end + + class Tweet < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :text + + sig do + returns( + T.nilable( + XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author + ) + ) + end + attr_reader :author + + sig do + params( + author: + XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author::OrHash + ).void + end + attr_writer :author + + sig { returns(T.nilable(Integer)) } + attr_reader :bookmark_count + + sig { params(bookmark_count: Integer).void } + attr_writer :bookmark_count + + sig { returns(T.nilable(String)) } + attr_reader :created_at + + sig { params(created_at: String).void } + attr_writer :created_at + + # True for Note Tweets (long-form content, up to 25,000 characters) + sig { returns(T.nilable(T::Boolean)) } + attr_reader :is_note_tweet + + sig { params(is_note_tweet: T::Boolean).void } + attr_writer :is_note_tweet + + sig { returns(T.nilable(Integer)) } + attr_reader :like_count + + sig { params(like_count: Integer).void } + attr_writer :like_count + + sig { returns(T.nilable(Integer)) } + attr_reader :quote_count + + sig { params(quote_count: Integer).void } + attr_writer :quote_count + + sig { returns(T.nilable(Integer)) } + attr_reader :reply_count + + sig { params(reply_count: Integer).void } + attr_writer :reply_count + + sig { returns(T.nilable(Integer)) } + attr_reader :retweet_count + + sig { params(retweet_count: Integer).void } + attr_writer :retweet_count + + sig { returns(T.nilable(Integer)) } + attr_reader :view_count + + sig { params(view_count: Integer).void } + attr_writer :view_count + + # Tweet returned from search results with inline author info. + sig do + params( + id: String, + text: String, + author: + XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author::OrHash, + bookmark_count: Integer, + created_at: String, + is_note_tweet: T::Boolean, + like_count: Integer, + quote_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + ).returns(T.attached_class) + end + def self.new( + id:, + text:, + author: nil, + bookmark_count: nil, + created_at: nil, + # True for Note Tweets (long-form content, up to 25,000 characters) + is_note_tweet: nil, + like_count: nil, + quote_count: nil, + reply_count: nil, + retweet_count: nil, + view_count: nil + ) + end + + sig do + override.returns( + { + id: String, + text: String, + author: + XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author, + bookmark_count: Integer, + created_at: String, + is_note_tweet: T::Boolean, + like_count: Integer, + quote_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + } + ) + end + def to_hash + end + + class Author < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :name + + sig { returns(String) } + attr_accessor :username + + sig { returns(T.nilable(T::Boolean)) } + attr_reader :verified + + sig { params(verified: T::Boolean).void } + attr_writer :verified + + sig do + params( + id: String, + name: String, + username: String, + verified: T::Boolean + ).returns(T.attached_class) + end + def self.new(id:, name:, username:, verified: nil) + end + + sig do + override.returns( + { + id: String, + name: String, + username: String, + verified: T::Boolean + } + ) + end + def to_hash + end + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/dm_retrieve_history_params.rbi b/rbi/x_twitter_scraper/models/x/dm_retrieve_history_params.rbi index 1ef8428..2bd7107 100644 --- a/rbi/x_twitter_scraper/models/x/dm_retrieve_history_params.rbi +++ b/rbi/x_twitter_scraper/models/x/dm_retrieve_history_params.rbi @@ -18,7 +18,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :user_id - # Pagination cursor from previous response + # Pagination cursor for DM history sig { returns(T.nilable(String)) } attr_reader :cursor @@ -42,7 +42,7 @@ module XTwitterScraper end def self.new( user_id:, - # Pagination cursor from previous response + # Pagination cursor for DM history cursor: nil, # Legacy pagination cursor (backward compat) max_id: nil, diff --git a/rbi/x_twitter_scraper/models/x/dm_send_params.rbi b/rbi/x_twitter_scraper/models/x/dm_send_params.rbi index fbe5447..3433611 100644 --- a/rbi/x_twitter_scraper/models/x/dm_send_params.rbi +++ b/rbi/x_twitter_scraper/models/x/dm_send_params.rbi @@ -18,7 +18,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :user_id - # X account (@username or account ID) + # X account (@username or ID) sending the DM sig { returns(String) } attr_accessor :account @@ -49,7 +49,7 @@ module XTwitterScraper end def self.new( user_id:, - # X account (@username or account ID) + # X account (@username or ID) sending the DM account:, text:, media_ids: nil, diff --git a/rbi/x_twitter_scraper/models/x/list_retrieve_followers_params.rbi b/rbi/x_twitter_scraper/models/x/list_retrieve_followers_params.rbi index ee8d742..c40f9ea 100644 --- a/rbi/x_twitter_scraper/models/x/list_retrieve_followers_params.rbi +++ b/rbi/x_twitter_scraper/models/x/list_retrieve_followers_params.rbi @@ -18,7 +18,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - # Pagination cursor + # Pagination cursor for list followers sig { returns(T.nilable(String)) } attr_reader :cursor @@ -34,7 +34,7 @@ module XTwitterScraper end def self.new( id:, - # Pagination cursor + # Pagination cursor for list followers cursor: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/models/x/list_retrieve_followers_response.rbi b/rbi/x_twitter_scraper/models/x/list_retrieve_followers_response.rbi new file mode 100644 index 0000000..d6286ad --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/list_retrieve_followers_response.rbi @@ -0,0 +1,179 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + class ListRetrieveFollowersResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::ListRetrieveFollowersResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(T::Boolean) } + attr_accessor :has_next_page + + sig { returns(String) } + attr_accessor :next_cursor + + sig do + returns( + T::Array[ + XTwitterScraper::Models::X::ListRetrieveFollowersResponse::User + ] + ) + end + attr_accessor :users + + # Paginated list of user profiles with cursor-based navigation. + sig do + params( + has_next_page: T::Boolean, + next_cursor: String, + users: + T::Array[ + XTwitterScraper::Models::X::ListRetrieveFollowersResponse::User::OrHash + ] + ).returns(T.attached_class) + end + def self.new(has_next_page:, next_cursor:, users:) + end + + sig do + override.returns( + { + has_next_page: T::Boolean, + next_cursor: String, + users: + T::Array[ + XTwitterScraper::Models::X::ListRetrieveFollowersResponse::User + ] + } + ) + end + def to_hash + end + + class User < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::ListRetrieveFollowersResponse::User, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :name + + sig { returns(String) } + attr_accessor :username + + sig { returns(T.nilable(String)) } + attr_reader :created_at + + sig { params(created_at: String).void } + attr_writer :created_at + + sig { returns(T.nilable(String)) } + attr_reader :description + + sig { params(description: String).void } + attr_writer :description + + sig { returns(T.nilable(Integer)) } + attr_reader :followers + + sig { params(followers: Integer).void } + attr_writer :followers + + sig { returns(T.nilable(Integer)) } + attr_reader :following + + sig { params(following: Integer).void } + attr_writer :following + + sig { returns(T.nilable(String)) } + attr_reader :location + + sig { params(location: String).void } + attr_writer :location + + sig { returns(T.nilable(String)) } + attr_reader :profile_picture + + sig { params(profile_picture: String).void } + attr_writer :profile_picture + + sig { returns(T.nilable(Integer)) } + attr_reader :statuses_count + + sig { params(statuses_count: Integer).void } + attr_writer :statuses_count + + sig { returns(T.nilable(T::Boolean)) } + attr_reader :verified + + sig { params(verified: T::Boolean).void } + attr_writer :verified + + # X user profile with bio, follower counts, and verification status. + sig do + params( + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: T::Boolean + ).returns(T.attached_class) + end + def self.new( + id:, + name:, + username:, + created_at: nil, + description: nil, + followers: nil, + following: nil, + location: nil, + profile_picture: nil, + statuses_count: nil, + verified: nil + ) + end + + sig do + override.returns( + { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: T::Boolean + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/list_retrieve_members_params.rbi b/rbi/x_twitter_scraper/models/x/list_retrieve_members_params.rbi index bf50e12..4f1f01d 100644 --- a/rbi/x_twitter_scraper/models/x/list_retrieve_members_params.rbi +++ b/rbi/x_twitter_scraper/models/x/list_retrieve_members_params.rbi @@ -18,7 +18,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - # Pagination cursor + # Pagination cursor for list members sig { returns(T.nilable(String)) } attr_reader :cursor @@ -34,7 +34,7 @@ module XTwitterScraper end def self.new( id:, - # Pagination cursor + # Pagination cursor for list members cursor: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/models/x/list_retrieve_members_response.rbi b/rbi/x_twitter_scraper/models/x/list_retrieve_members_response.rbi new file mode 100644 index 0000000..d8e5aa5 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/list_retrieve_members_response.rbi @@ -0,0 +1,179 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + class ListRetrieveMembersResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::ListRetrieveMembersResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(T::Boolean) } + attr_accessor :has_next_page + + sig { returns(String) } + attr_accessor :next_cursor + + sig do + returns( + T::Array[ + XTwitterScraper::Models::X::ListRetrieveMembersResponse::User + ] + ) + end + attr_accessor :users + + # Paginated list of user profiles with cursor-based navigation. + sig do + params( + has_next_page: T::Boolean, + next_cursor: String, + users: + T::Array[ + XTwitterScraper::Models::X::ListRetrieveMembersResponse::User::OrHash + ] + ).returns(T.attached_class) + end + def self.new(has_next_page:, next_cursor:, users:) + end + + sig do + override.returns( + { + has_next_page: T::Boolean, + next_cursor: String, + users: + T::Array[ + XTwitterScraper::Models::X::ListRetrieveMembersResponse::User + ] + } + ) + end + def to_hash + end + + class User < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::ListRetrieveMembersResponse::User, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :name + + sig { returns(String) } + attr_accessor :username + + sig { returns(T.nilable(String)) } + attr_reader :created_at + + sig { params(created_at: String).void } + attr_writer :created_at + + sig { returns(T.nilable(String)) } + attr_reader :description + + sig { params(description: String).void } + attr_writer :description + + sig { returns(T.nilable(Integer)) } + attr_reader :followers + + sig { params(followers: Integer).void } + attr_writer :followers + + sig { returns(T.nilable(Integer)) } + attr_reader :following + + sig { params(following: Integer).void } + attr_writer :following + + sig { returns(T.nilable(String)) } + attr_reader :location + + sig { params(location: String).void } + attr_writer :location + + sig { returns(T.nilable(String)) } + attr_reader :profile_picture + + sig { params(profile_picture: String).void } + attr_writer :profile_picture + + sig { returns(T.nilable(Integer)) } + attr_reader :statuses_count + + sig { params(statuses_count: Integer).void } + attr_writer :statuses_count + + sig { returns(T.nilable(T::Boolean)) } + attr_reader :verified + + sig { params(verified: T::Boolean).void } + attr_writer :verified + + # X user profile with bio, follower counts, and verification status. + sig do + params( + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: T::Boolean + ).returns(T.attached_class) + end + def self.new( + id:, + name:, + username:, + created_at: nil, + description: nil, + followers: nil, + following: nil, + location: nil, + profile_picture: nil, + statuses_count: nil, + verified: nil + ) + end + + sig do + override.returns( + { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: T::Boolean + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/list_retrieve_tweets_params.rbi b/rbi/x_twitter_scraper/models/x/list_retrieve_tweets_params.rbi index 28aa975..0c532b7 100644 --- a/rbi/x_twitter_scraper/models/x/list_retrieve_tweets_params.rbi +++ b/rbi/x_twitter_scraper/models/x/list_retrieve_tweets_params.rbi @@ -18,7 +18,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - # Pagination cursor + # Pagination cursor for list tweets sig { returns(T.nilable(String)) } attr_reader :cursor @@ -58,7 +58,7 @@ module XTwitterScraper end def self.new( id:, - # Pagination cursor + # Pagination cursor for list tweets cursor: nil, # Include replies (default false) include_replies: nil, diff --git a/rbi/x_twitter_scraper/models/x/list_retrieve_tweets_response.rbi b/rbi/x_twitter_scraper/models/x/list_retrieve_tweets_response.rbi new file mode 100644 index 0000000..06b8ee1 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/list_retrieve_tweets_response.rbi @@ -0,0 +1,246 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + class ListRetrieveTweetsResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::ListRetrieveTweetsResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(T::Boolean) } + attr_accessor :has_next_page + + sig { returns(String) } + attr_accessor :next_cursor + + sig do + returns( + T::Array[ + XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet + ] + ) + end + attr_accessor :tweets + + # Paginated list of tweets with cursor-based navigation. + sig do + params( + has_next_page: T::Boolean, + next_cursor: String, + tweets: + T::Array[ + XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::OrHash + ] + ).returns(T.attached_class) + end + def self.new(has_next_page:, next_cursor:, tweets:) + end + + sig do + override.returns( + { + has_next_page: T::Boolean, + next_cursor: String, + tweets: + T::Array[ + XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet + ] + } + ) + end + def to_hash + end + + class Tweet < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :text + + sig do + returns( + T.nilable( + XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author + ) + ) + end + attr_reader :author + + sig do + params( + author: + XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author::OrHash + ).void + end + attr_writer :author + + sig { returns(T.nilable(Integer)) } + attr_reader :bookmark_count + + sig { params(bookmark_count: Integer).void } + attr_writer :bookmark_count + + sig { returns(T.nilable(String)) } + attr_reader :created_at + + sig { params(created_at: String).void } + attr_writer :created_at + + # True for Note Tweets (long-form content, up to 25,000 characters) + sig { returns(T.nilable(T::Boolean)) } + attr_reader :is_note_tweet + + sig { params(is_note_tweet: T::Boolean).void } + attr_writer :is_note_tweet + + sig { returns(T.nilable(Integer)) } + attr_reader :like_count + + sig { params(like_count: Integer).void } + attr_writer :like_count + + sig { returns(T.nilable(Integer)) } + attr_reader :quote_count + + sig { params(quote_count: Integer).void } + attr_writer :quote_count + + sig { returns(T.nilable(Integer)) } + attr_reader :reply_count + + sig { params(reply_count: Integer).void } + attr_writer :reply_count + + sig { returns(T.nilable(Integer)) } + attr_reader :retweet_count + + sig { params(retweet_count: Integer).void } + attr_writer :retweet_count + + sig { returns(T.nilable(Integer)) } + attr_reader :view_count + + sig { params(view_count: Integer).void } + attr_writer :view_count + + # Tweet returned from search results with inline author info. + sig do + params( + id: String, + text: String, + author: + XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author::OrHash, + bookmark_count: Integer, + created_at: String, + is_note_tweet: T::Boolean, + like_count: Integer, + quote_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + ).returns(T.attached_class) + end + def self.new( + id:, + text:, + author: nil, + bookmark_count: nil, + created_at: nil, + # True for Note Tweets (long-form content, up to 25,000 characters) + is_note_tweet: nil, + like_count: nil, + quote_count: nil, + reply_count: nil, + retweet_count: nil, + view_count: nil + ) + end + + sig do + override.returns( + { + id: String, + text: String, + author: + XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author, + bookmark_count: Integer, + created_at: String, + is_note_tweet: T::Boolean, + like_count: Integer, + quote_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + } + ) + end + def to_hash + end + + class Author < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :name + + sig { returns(String) } + attr_accessor :username + + sig { returns(T.nilable(T::Boolean)) } + attr_reader :verified + + sig { params(verified: T::Boolean).void } + attr_writer :verified + + sig do + params( + id: String, + name: String, + username: String, + verified: T::Boolean + ).returns(T.attached_class) + end + def self.new(id:, name:, username:, verified: nil) + end + + sig do + override.returns( + { + id: String, + name: String, + username: String, + verified: T::Boolean + } + ) + end + def to_hash + end + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/media_upload_params.rbi b/rbi/x_twitter_scraper/models/x/media_upload_params.rbi index 17c752d..262efb4 100644 --- a/rbi/x_twitter_scraper/models/x/media_upload_params.rbi +++ b/rbi/x_twitter_scraper/models/x/media_upload_params.rbi @@ -15,7 +15,7 @@ module XTwitterScraper ) end - # X account (@username or account ID) + # X account (@username or ID) uploading media sig { returns(String) } attr_accessor :account @@ -38,7 +38,7 @@ module XTwitterScraper ).returns(T.attached_class) end def self.new( - # X account (@username or account ID) + # X account (@username or ID) uploading media account:, # Media file to upload file:, diff --git a/rbi/x_twitter_scraper/models/x/profile_update_avatar_params.rbi b/rbi/x_twitter_scraper/models/x/profile_update_avatar_params.rbi index 173ec4c..f635d4b 100644 --- a/rbi/x_twitter_scraper/models/x/profile_update_avatar_params.rbi +++ b/rbi/x_twitter_scraper/models/x/profile_update_avatar_params.rbi @@ -15,7 +15,7 @@ module XTwitterScraper ) end - # X account (@username or account ID) + # X account (@username or ID) for avatar update sig { returns(String) } attr_accessor :account @@ -31,7 +31,7 @@ module XTwitterScraper ).returns(T.attached_class) end def self.new( - # X account (@username or account ID) + # X account (@username or ID) for avatar update account:, # Avatar image (max 716KB) file:, diff --git a/rbi/x_twitter_scraper/models/x/profile_update_banner_params.rbi b/rbi/x_twitter_scraper/models/x/profile_update_banner_params.rbi index ebb88ae..d9c3ec1 100644 --- a/rbi/x_twitter_scraper/models/x/profile_update_banner_params.rbi +++ b/rbi/x_twitter_scraper/models/x/profile_update_banner_params.rbi @@ -15,7 +15,7 @@ module XTwitterScraper ) end - # X account (@username or account ID) + # X account (@username or ID) for banner update sig { returns(String) } attr_accessor :account @@ -31,7 +31,7 @@ module XTwitterScraper ).returns(T.attached_class) end def self.new( - # X account (@username or account ID) + # X account (@username or ID) for banner update account:, # Banner image (max 2MB) file:, diff --git a/rbi/x_twitter_scraper/models/x/profile_update_params.rbi b/rbi/x_twitter_scraper/models/x/profile_update_params.rbi index 4eb9e3c..9a81885 100644 --- a/rbi/x_twitter_scraper/models/x/profile_update_params.rbi +++ b/rbi/x_twitter_scraper/models/x/profile_update_params.rbi @@ -15,7 +15,7 @@ module XTwitterScraper ) end - # X account (@username or account ID) + # X account (@username or ID) to update profile sig { returns(String) } attr_accessor :account @@ -57,7 +57,7 @@ module XTwitterScraper ).returns(T.attached_class) end def self.new( - # X account (@username or account ID) + # X account (@username or ID) to update profile account:, # Bio description description: nil, diff --git a/rbi/x_twitter_scraper/models/x/search_tweet.rbi b/rbi/x_twitter_scraper/models/x/search_tweet.rbi index 14ec9dd..437adf7 100644 --- a/rbi/x_twitter_scraper/models/x/search_tweet.rbi +++ b/rbi/x_twitter_scraper/models/x/search_tweet.rbi @@ -38,7 +38,7 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) sig { returns(T.nilable(T::Boolean)) } attr_reader :is_note_tweet @@ -75,6 +75,7 @@ module XTwitterScraper sig { params(view_count: Integer).void } attr_writer :view_count + # Tweet returned from search results with inline author info. sig do params( id: String, @@ -96,7 +97,7 @@ module XTwitterScraper author: nil, bookmark_count: nil, created_at: nil, - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) is_note_tweet: nil, like_count: nil, quote_count: nil, diff --git a/rbi/x_twitter_scraper/models/x/tweet_author.rbi b/rbi/x_twitter_scraper/models/x/tweet_author.rbi index 18d0708..0c8c7f1 100644 --- a/rbi/x_twitter_scraper/models/x/tweet_author.rbi +++ b/rbi/x_twitter_scraper/models/x/tweet_author.rbi @@ -30,6 +30,7 @@ module XTwitterScraper sig { params(profile_picture: String).void } attr_writer :profile_picture + # Author of a tweet with follower count and verification status. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/x/tweet_detail.rbi b/rbi/x_twitter_scraper/models/x/tweet_detail.rbi index 69688c0..b785a04 100644 --- a/rbi/x_twitter_scraper/models/x/tweet_detail.rbi +++ b/rbi/x_twitter_scraper/models/x/tweet_detail.rbi @@ -50,10 +50,10 @@ module XTwitterScraper attr_writer :created_at # Parsed entities from the tweet text (URLs, mentions, hashtags, media) - sig { returns(T.nilable(T.anything)) } + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } attr_reader :entities - sig { params(entities: T.anything).void } + sig { params(entities: T::Hash[Symbol, T.anything]).void } attr_writer :entities # Whether this is a Note Tweet (long-form post, up to 25,000 characters) @@ -91,10 +91,10 @@ module XTwitterScraper attr_writer :media # The quoted tweet object, present when isQuoteStatus is true - sig { returns(T.nilable(T.anything)) } + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } attr_reader :quoted_tweet - sig { params(quoted_tweet: T.anything).void } + sig { params(quoted_tweet: T::Hash[Symbol, T.anything]).void } attr_writer :quoted_tweet # Client application used to post this tweet @@ -104,6 +104,7 @@ module XTwitterScraper sig { params(source: String).void } attr_writer :source + # Full tweet with text, engagement metrics, media, and metadata. sig do params( id: String, @@ -116,12 +117,12 @@ module XTwitterScraper view_count: Integer, conversation_id: String, created_at: String, - entities: T.anything, + entities: T::Hash[Symbol, T.anything], is_note_tweet: T::Boolean, is_quote_status: T::Boolean, is_reply: T::Boolean, media: T::Array[XTwitterScraper::X::TweetDetail::Media::OrHash], - quoted_tweet: T.anything, + quoted_tweet: T::Hash[Symbol, T.anything], source: String ).returns(T.attached_class) end @@ -167,12 +168,12 @@ module XTwitterScraper view_count: Integer, conversation_id: String, created_at: String, - entities: T.anything, + entities: T::Hash[Symbol, T.anything], is_note_tweet: T::Boolean, is_quote_status: T::Boolean, is_reply: T::Boolean, media: T::Array[XTwitterScraper::X::TweetDetail::Media], - quoted_tweet: T.anything, + quoted_tweet: T::Hash[Symbol, T.anything], source: String } ) diff --git a/rbi/x_twitter_scraper/models/x/tweet_get_favoriters_params.rbi b/rbi/x_twitter_scraper/models/x/tweet_get_favoriters_params.rbi index 2c7ec89..d558120 100644 --- a/rbi/x_twitter_scraper/models/x/tweet_get_favoriters_params.rbi +++ b/rbi/x_twitter_scraper/models/x/tweet_get_favoriters_params.rbi @@ -18,7 +18,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - # Pagination cursor from previous response + # Pagination cursor for favoriters sig { returns(T.nilable(String)) } attr_reader :cursor @@ -34,7 +34,7 @@ module XTwitterScraper end def self.new( id:, - # Pagination cursor from previous response + # Pagination cursor for favoriters cursor: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/models/x/tweet_get_favoriters_response.rbi b/rbi/x_twitter_scraper/models/x/tweet_get_favoriters_response.rbi index 51c04b7..c7eda49 100644 --- a/rbi/x_twitter_scraper/models/x/tweet_get_favoriters_response.rbi +++ b/rbi/x_twitter_scraper/models/x/tweet_get_favoriters_response.rbi @@ -27,6 +27,7 @@ module XTwitterScraper end attr_accessor :users + # Paginated list of user profiles with cursor-based navigation. sig do params( has_next_page: T::Boolean, @@ -121,6 +122,7 @@ module XTwitterScraper sig { params(verified: T::Boolean).void } attr_writer :verified + # X user profile with bio, follower counts, and verification status. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/x/tweet_get_quotes_params.rbi b/rbi/x_twitter_scraper/models/x/tweet_get_quotes_params.rbi index be9cd13..1cba663 100644 --- a/rbi/x_twitter_scraper/models/x/tweet_get_quotes_params.rbi +++ b/rbi/x_twitter_scraper/models/x/tweet_get_quotes_params.rbi @@ -18,28 +18,28 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - # Pagination cursor + # Pagination cursor for quote tweets sig { returns(T.nilable(String)) } attr_reader :cursor sig { params(cursor: String).void } attr_writer :cursor - # Include replies (default false) + # Include reply quotes (default false) sig { returns(T.nilable(T::Boolean)) } attr_reader :include_replies sig { params(include_replies: T::Boolean).void } attr_writer :include_replies - # Unix timestamp - filter after + # Unix timestamp - return quotes posted after this time sig { returns(T.nilable(String)) } attr_reader :since_time sig { params(since_time: String).void } attr_writer :since_time - # Unix timestamp - filter before + # Unix timestamp - return quotes posted before this time sig { returns(T.nilable(String)) } attr_reader :until_time @@ -58,13 +58,13 @@ module XTwitterScraper end def self.new( id:, - # Pagination cursor + # Pagination cursor for quote tweets cursor: nil, - # Include replies (default false) + # Include reply quotes (default false) include_replies: nil, - # Unix timestamp - filter after + # Unix timestamp - return quotes posted after this time since_time: nil, - # Unix timestamp - filter before + # Unix timestamp - return quotes posted before this time until_time: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/models/x/tweet_get_quotes_response.rbi b/rbi/x_twitter_scraper/models/x/tweet_get_quotes_response.rbi index 8e81482..bcead97 100644 --- a/rbi/x_twitter_scraper/models/x/tweet_get_quotes_response.rbi +++ b/rbi/x_twitter_scraper/models/x/tweet_get_quotes_response.rbi @@ -25,6 +25,7 @@ module XTwitterScraper end attr_accessor :tweets + # Paginated list of tweets with cursor-based navigation. sig do params( has_next_page: T::Boolean, @@ -97,7 +98,7 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) sig { returns(T.nilable(T::Boolean)) } attr_reader :is_note_tweet @@ -134,6 +135,7 @@ module XTwitterScraper sig { params(view_count: Integer).void } attr_writer :view_count + # Tweet returned from search results with inline author info. sig do params( id: String, @@ -156,7 +158,7 @@ module XTwitterScraper author: nil, bookmark_count: nil, created_at: nil, - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) is_note_tweet: nil, like_count: nil, quote_count: nil, diff --git a/rbi/x_twitter_scraper/models/x/tweet_get_replies_params.rbi b/rbi/x_twitter_scraper/models/x/tweet_get_replies_params.rbi index 57b1790..0b843f9 100644 --- a/rbi/x_twitter_scraper/models/x/tweet_get_replies_params.rbi +++ b/rbi/x_twitter_scraper/models/x/tweet_get_replies_params.rbi @@ -18,21 +18,21 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - # Pagination cursor + # Pagination cursor for tweet replies sig { returns(T.nilable(String)) } attr_reader :cursor sig { params(cursor: String).void } attr_writer :cursor - # Unix timestamp - filter after + # Unix timestamp - return replies posted after this time sig { returns(T.nilable(String)) } attr_reader :since_time sig { params(since_time: String).void } attr_writer :since_time - # Unix timestamp - filter before + # Unix timestamp - return replies posted before this time sig { returns(T.nilable(String)) } attr_reader :until_time @@ -50,11 +50,11 @@ module XTwitterScraper end def self.new( id:, - # Pagination cursor + # Pagination cursor for tweet replies cursor: nil, - # Unix timestamp - filter after + # Unix timestamp - return replies posted after this time since_time: nil, - # Unix timestamp - filter before + # Unix timestamp - return replies posted before this time until_time: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/models/x/tweet_get_replies_response.rbi b/rbi/x_twitter_scraper/models/x/tweet_get_replies_response.rbi index 98b704f..f4dc08a 100644 --- a/rbi/x_twitter_scraper/models/x/tweet_get_replies_response.rbi +++ b/rbi/x_twitter_scraper/models/x/tweet_get_replies_response.rbi @@ -25,6 +25,7 @@ module XTwitterScraper end attr_accessor :tweets + # Paginated list of tweets with cursor-based navigation. sig do params( has_next_page: T::Boolean, @@ -97,7 +98,7 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) sig { returns(T.nilable(T::Boolean)) } attr_reader :is_note_tweet @@ -134,6 +135,7 @@ module XTwitterScraper sig { params(view_count: Integer).void } attr_writer :view_count + # Tweet returned from search results with inline author info. sig do params( id: String, @@ -156,7 +158,7 @@ module XTwitterScraper author: nil, bookmark_count: nil, created_at: nil, - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) is_note_tweet: nil, like_count: nil, quote_count: nil, diff --git a/rbi/x_twitter_scraper/models/x/tweet_get_retweeters_params.rbi b/rbi/x_twitter_scraper/models/x/tweet_get_retweeters_params.rbi index 2c9008a..bb917f0 100644 --- a/rbi/x_twitter_scraper/models/x/tweet_get_retweeters_params.rbi +++ b/rbi/x_twitter_scraper/models/x/tweet_get_retweeters_params.rbi @@ -18,7 +18,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - # Pagination cursor + # Pagination cursor for retweeters sig { returns(T.nilable(String)) } attr_reader :cursor @@ -34,7 +34,7 @@ module XTwitterScraper end def self.new( id:, - # Pagination cursor + # Pagination cursor for retweeters cursor: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/models/x/tweet_get_retweeters_response.rbi b/rbi/x_twitter_scraper/models/x/tweet_get_retweeters_response.rbi index 830006b..b1974f9 100644 --- a/rbi/x_twitter_scraper/models/x/tweet_get_retweeters_response.rbi +++ b/rbi/x_twitter_scraper/models/x/tweet_get_retweeters_response.rbi @@ -27,6 +27,7 @@ module XTwitterScraper end attr_accessor :users + # Paginated list of user profiles with cursor-based navigation. sig do params( has_next_page: T::Boolean, @@ -121,6 +122,7 @@ module XTwitterScraper sig { params(verified: T::Boolean).void } attr_writer :verified + # X user profile with bio, follower counts, and verification status. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/x/tweet_get_thread_params.rbi b/rbi/x_twitter_scraper/models/x/tweet_get_thread_params.rbi index 256b8f9..29ed811 100644 --- a/rbi/x_twitter_scraper/models/x/tweet_get_thread_params.rbi +++ b/rbi/x_twitter_scraper/models/x/tweet_get_thread_params.rbi @@ -18,7 +18,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - # Pagination cursor + # Pagination cursor for thread tweets sig { returns(T.nilable(String)) } attr_reader :cursor @@ -34,7 +34,7 @@ module XTwitterScraper end def self.new( id:, - # Pagination cursor + # Pagination cursor for thread tweets cursor: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/models/x/tweet_get_thread_response.rbi b/rbi/x_twitter_scraper/models/x/tweet_get_thread_response.rbi index 473f140..b9eb24c 100644 --- a/rbi/x_twitter_scraper/models/x/tweet_get_thread_response.rbi +++ b/rbi/x_twitter_scraper/models/x/tweet_get_thread_response.rbi @@ -25,6 +25,7 @@ module XTwitterScraper end attr_accessor :tweets + # Paginated list of tweets with cursor-based navigation. sig do params( has_next_page: T::Boolean, @@ -97,7 +98,7 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) sig { returns(T.nilable(T::Boolean)) } attr_reader :is_note_tweet @@ -134,6 +135,7 @@ module XTwitterScraper sig { params(view_count: Integer).void } attr_writer :view_count + # Tweet returned from search results with inline author info. sig do params( id: String, @@ -156,7 +158,7 @@ module XTwitterScraper author: nil, bookmark_count: nil, created_at: nil, - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) is_note_tweet: nil, like_count: nil, quote_count: nil, diff --git a/rbi/x_twitter_scraper/models/x/tweet_list_response.rbi b/rbi/x_twitter_scraper/models/x/tweet_list_response.rbi new file mode 100644 index 0000000..9a22d3b --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/tweet_list_response.rbi @@ -0,0 +1,242 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + class TweetListResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::TweetListResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(T::Boolean) } + attr_accessor :has_next_page + + sig { returns(String) } + attr_accessor :next_cursor + + sig do + returns( + T::Array[XTwitterScraper::Models::X::TweetListResponse::Tweet] + ) + end + attr_accessor :tweets + + # Paginated list of tweets with cursor-based navigation. + sig do + params( + has_next_page: T::Boolean, + next_cursor: String, + tweets: + T::Array[ + XTwitterScraper::Models::X::TweetListResponse::Tweet::OrHash + ] + ).returns(T.attached_class) + end + def self.new(has_next_page:, next_cursor:, tweets:) + end + + sig do + override.returns( + { + has_next_page: T::Boolean, + next_cursor: String, + tweets: + T::Array[XTwitterScraper::Models::X::TweetListResponse::Tweet] + } + ) + end + def to_hash + end + + class Tweet < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::TweetListResponse::Tweet, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :text + + sig do + returns( + T.nilable( + XTwitterScraper::Models::X::TweetListResponse::Tweet::Author + ) + ) + end + attr_reader :author + + sig do + params( + author: + XTwitterScraper::Models::X::TweetListResponse::Tweet::Author::OrHash + ).void + end + attr_writer :author + + sig { returns(T.nilable(Integer)) } + attr_reader :bookmark_count + + sig { params(bookmark_count: Integer).void } + attr_writer :bookmark_count + + sig { returns(T.nilable(String)) } + attr_reader :created_at + + sig { params(created_at: String).void } + attr_writer :created_at + + # True for Note Tweets (long-form content, up to 25,000 characters) + sig { returns(T.nilable(T::Boolean)) } + attr_reader :is_note_tweet + + sig { params(is_note_tweet: T::Boolean).void } + attr_writer :is_note_tweet + + sig { returns(T.nilable(Integer)) } + attr_reader :like_count + + sig { params(like_count: Integer).void } + attr_writer :like_count + + sig { returns(T.nilable(Integer)) } + attr_reader :quote_count + + sig { params(quote_count: Integer).void } + attr_writer :quote_count + + sig { returns(T.nilable(Integer)) } + attr_reader :reply_count + + sig { params(reply_count: Integer).void } + attr_writer :reply_count + + sig { returns(T.nilable(Integer)) } + attr_reader :retweet_count + + sig { params(retweet_count: Integer).void } + attr_writer :retweet_count + + sig { returns(T.nilable(Integer)) } + attr_reader :view_count + + sig { params(view_count: Integer).void } + attr_writer :view_count + + # Tweet returned from search results with inline author info. + sig do + params( + id: String, + text: String, + author: + XTwitterScraper::Models::X::TweetListResponse::Tweet::Author::OrHash, + bookmark_count: Integer, + created_at: String, + is_note_tweet: T::Boolean, + like_count: Integer, + quote_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + ).returns(T.attached_class) + end + def self.new( + id:, + text:, + author: nil, + bookmark_count: nil, + created_at: nil, + # True for Note Tweets (long-form content, up to 25,000 characters) + is_note_tweet: nil, + like_count: nil, + quote_count: nil, + reply_count: nil, + retweet_count: nil, + view_count: nil + ) + end + + sig do + override.returns( + { + id: String, + text: String, + author: + XTwitterScraper::Models::X::TweetListResponse::Tweet::Author, + bookmark_count: Integer, + created_at: String, + is_note_tweet: T::Boolean, + like_count: Integer, + quote_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + } + ) + end + def to_hash + end + + class Author < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::TweetListResponse::Tweet::Author, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :name + + sig { returns(String) } + attr_accessor :username + + sig { returns(T.nilable(T::Boolean)) } + attr_reader :verified + + sig { params(verified: T::Boolean).void } + attr_writer :verified + + sig do + params( + id: String, + name: String, + username: String, + verified: T::Boolean + ).returns(T.attached_class) + end + def self.new(id:, name:, username:, verified: nil) + end + + sig do + override.returns( + { + id: String, + name: String, + username: String, + verified: T::Boolean + } + ) + end + def to_hash + end + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/tweet_search_response.rbi b/rbi/x_twitter_scraper/models/x/tweet_search_response.rbi index a5a84b2..79575fd 100644 --- a/rbi/x_twitter_scraper/models/x/tweet_search_response.rbi +++ b/rbi/x_twitter_scraper/models/x/tweet_search_response.rbi @@ -25,6 +25,7 @@ module XTwitterScraper end attr_accessor :tweets + # Paginated list of tweets with cursor-based navigation. sig do params( has_next_page: T::Boolean, @@ -95,7 +96,7 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) sig { returns(T.nilable(T::Boolean)) } attr_reader :is_note_tweet @@ -132,6 +133,7 @@ module XTwitterScraper sig { params(view_count: Integer).void } attr_writer :view_count + # Tweet returned from search results with inline author info. sig do params( id: String, @@ -154,7 +156,7 @@ module XTwitterScraper author: nil, bookmark_count: nil, created_at: nil, - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) is_note_tweet: nil, like_count: nil, quote_count: nil, diff --git a/rbi/x_twitter_scraper/models/x/user_profile.rbi b/rbi/x_twitter_scraper/models/x/user_profile.rbi index 25745c8..555d9d3 100644 --- a/rbi/x_twitter_scraper/models/x/user_profile.rbi +++ b/rbi/x_twitter_scraper/models/x/user_profile.rbi @@ -69,6 +69,7 @@ module XTwitterScraper sig { params(verified: T::Boolean).void } attr_writer :verified + # X user profile with bio, follower counts, and verification status. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_batch_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_batch_response.rbi new file mode 100644 index 0000000..0bd921c --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_batch_response.rbi @@ -0,0 +1,179 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + class UserRetrieveBatchResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::UserRetrieveBatchResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(T::Boolean) } + attr_accessor :has_next_page + + sig { returns(String) } + attr_accessor :next_cursor + + sig do + returns( + T::Array[ + XTwitterScraper::Models::X::UserRetrieveBatchResponse::User + ] + ) + end + attr_accessor :users + + # Paginated list of user profiles with cursor-based navigation. + sig do + params( + has_next_page: T::Boolean, + next_cursor: String, + users: + T::Array[ + XTwitterScraper::Models::X::UserRetrieveBatchResponse::User::OrHash + ] + ).returns(T.attached_class) + end + def self.new(has_next_page:, next_cursor:, users:) + end + + sig do + override.returns( + { + has_next_page: T::Boolean, + next_cursor: String, + users: + T::Array[ + XTwitterScraper::Models::X::UserRetrieveBatchResponse::User + ] + } + ) + end + def to_hash + end + + class User < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::UserRetrieveBatchResponse::User, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :name + + sig { returns(String) } + attr_accessor :username + + sig { returns(T.nilable(String)) } + attr_reader :created_at + + sig { params(created_at: String).void } + attr_writer :created_at + + sig { returns(T.nilable(String)) } + attr_reader :description + + sig { params(description: String).void } + attr_writer :description + + sig { returns(T.nilable(Integer)) } + attr_reader :followers + + sig { params(followers: Integer).void } + attr_writer :followers + + sig { returns(T.nilable(Integer)) } + attr_reader :following + + sig { params(following: Integer).void } + attr_writer :following + + sig { returns(T.nilable(String)) } + attr_reader :location + + sig { params(location: String).void } + attr_writer :location + + sig { returns(T.nilable(String)) } + attr_reader :profile_picture + + sig { params(profile_picture: String).void } + attr_writer :profile_picture + + sig { returns(T.nilable(Integer)) } + attr_reader :statuses_count + + sig { params(statuses_count: Integer).void } + attr_writer :statuses_count + + sig { returns(T.nilable(T::Boolean)) } + attr_reader :verified + + sig { params(verified: T::Boolean).void } + attr_writer :verified + + # X user profile with bio, follower counts, and verification status. + sig do + params( + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: T::Boolean + ).returns(T.attached_class) + end + def self.new( + id:, + name:, + username:, + created_at: nil, + description: nil, + followers: nil, + following: nil, + location: nil, + profile_picture: nil, + statuses_count: nil, + verified: nil + ) + end + + sig do + override.returns( + { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: T::Boolean + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_followers_params.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_followers_params.rbi index 47de00f..565020c 100644 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_followers_params.rbi +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_followers_params.rbi @@ -18,7 +18,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - # Pagination cursor + # Pagination cursor for followers list sig { returns(T.nilable(String)) } attr_reader :cursor @@ -42,7 +42,7 @@ module XTwitterScraper end def self.new( id:, - # Pagination cursor + # Pagination cursor for followers list cursor: nil, # Items per page (20-200, default 200) page_size: nil, diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_followers_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_followers_response.rbi new file mode 100644 index 0000000..8299cc8 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_followers_response.rbi @@ -0,0 +1,179 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + class UserRetrieveFollowersResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::UserRetrieveFollowersResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(T::Boolean) } + attr_accessor :has_next_page + + sig { returns(String) } + attr_accessor :next_cursor + + sig do + returns( + T::Array[ + XTwitterScraper::Models::X::UserRetrieveFollowersResponse::User + ] + ) + end + attr_accessor :users + + # Paginated list of user profiles with cursor-based navigation. + sig do + params( + has_next_page: T::Boolean, + next_cursor: String, + users: + T::Array[ + XTwitterScraper::Models::X::UserRetrieveFollowersResponse::User::OrHash + ] + ).returns(T.attached_class) + end + def self.new(has_next_page:, next_cursor:, users:) + end + + sig do + override.returns( + { + has_next_page: T::Boolean, + next_cursor: String, + users: + T::Array[ + XTwitterScraper::Models::X::UserRetrieveFollowersResponse::User + ] + } + ) + end + def to_hash + end + + class User < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::UserRetrieveFollowersResponse::User, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :name + + sig { returns(String) } + attr_accessor :username + + sig { returns(T.nilable(String)) } + attr_reader :created_at + + sig { params(created_at: String).void } + attr_writer :created_at + + sig { returns(T.nilable(String)) } + attr_reader :description + + sig { params(description: String).void } + attr_writer :description + + sig { returns(T.nilable(Integer)) } + attr_reader :followers + + sig { params(followers: Integer).void } + attr_writer :followers + + sig { returns(T.nilable(Integer)) } + attr_reader :following + + sig { params(following: Integer).void } + attr_writer :following + + sig { returns(T.nilable(String)) } + attr_reader :location + + sig { params(location: String).void } + attr_writer :location + + sig { returns(T.nilable(String)) } + attr_reader :profile_picture + + sig { params(profile_picture: String).void } + attr_writer :profile_picture + + sig { returns(T.nilable(Integer)) } + attr_reader :statuses_count + + sig { params(statuses_count: Integer).void } + attr_writer :statuses_count + + sig { returns(T.nilable(T::Boolean)) } + attr_reader :verified + + sig { params(verified: T::Boolean).void } + attr_writer :verified + + # X user profile with bio, follower counts, and verification status. + sig do + params( + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: T::Boolean + ).returns(T.attached_class) + end + def self.new( + id:, + name:, + username:, + created_at: nil, + description: nil, + followers: nil, + following: nil, + location: nil, + profile_picture: nil, + statuses_count: nil, + verified: nil + ) + end + + sig do + override.returns( + { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: T::Boolean + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_followers_you_know_params.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_followers_you_know_params.rbi index 310fd84..28b1f85 100644 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_followers_you_know_params.rbi +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_followers_you_know_params.rbi @@ -18,7 +18,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - # Pagination cursor from previous response + # Pagination cursor for followers-you-know sig { returns(T.nilable(String)) } attr_reader :cursor @@ -34,7 +34,7 @@ module XTwitterScraper end def self.new( id:, - # Pagination cursor from previous response + # Pagination cursor for followers-you-know cursor: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_followers_you_know_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_followers_you_know_response.rbi index ca6d879..fb31c46 100644 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_followers_you_know_response.rbi +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_followers_you_know_response.rbi @@ -27,6 +27,7 @@ module XTwitterScraper end attr_accessor :users + # Paginated list of user profiles with cursor-based navigation. sig do params( has_next_page: T::Boolean, @@ -121,6 +122,7 @@ module XTwitterScraper sig { params(verified: T::Boolean).void } attr_writer :verified + # X user profile with bio, follower counts, and verification status. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_following_params.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_following_params.rbi index 6c6e713..5d5ccfc 100644 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_following_params.rbi +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_following_params.rbi @@ -18,14 +18,14 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - # Pagination cursor + # Pagination cursor for following list sig { returns(T.nilable(String)) } attr_reader :cursor sig { params(cursor: String).void } attr_writer :cursor - # Items per page (20-200, default 200) + # Results per page (20-200, default 200) sig { returns(T.nilable(Integer)) } attr_reader :page_size @@ -42,9 +42,9 @@ module XTwitterScraper end def self.new( id:, - # Pagination cursor + # Pagination cursor for following list cursor: nil, - # Items per page (20-200, default 200) + # Results per page (20-200, default 200) page_size: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_following_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_following_response.rbi new file mode 100644 index 0000000..6098294 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_following_response.rbi @@ -0,0 +1,179 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + class UserRetrieveFollowingResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::UserRetrieveFollowingResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(T::Boolean) } + attr_accessor :has_next_page + + sig { returns(String) } + attr_accessor :next_cursor + + sig do + returns( + T::Array[ + XTwitterScraper::Models::X::UserRetrieveFollowingResponse::User + ] + ) + end + attr_accessor :users + + # Paginated list of user profiles with cursor-based navigation. + sig do + params( + has_next_page: T::Boolean, + next_cursor: String, + users: + T::Array[ + XTwitterScraper::Models::X::UserRetrieveFollowingResponse::User::OrHash + ] + ).returns(T.attached_class) + end + def self.new(has_next_page:, next_cursor:, users:) + end + + sig do + override.returns( + { + has_next_page: T::Boolean, + next_cursor: String, + users: + T::Array[ + XTwitterScraper::Models::X::UserRetrieveFollowingResponse::User + ] + } + ) + end + def to_hash + end + + class User < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::UserRetrieveFollowingResponse::User, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :name + + sig { returns(String) } + attr_accessor :username + + sig { returns(T.nilable(String)) } + attr_reader :created_at + + sig { params(created_at: String).void } + attr_writer :created_at + + sig { returns(T.nilable(String)) } + attr_reader :description + + sig { params(description: String).void } + attr_writer :description + + sig { returns(T.nilable(Integer)) } + attr_reader :followers + + sig { params(followers: Integer).void } + attr_writer :followers + + sig { returns(T.nilable(Integer)) } + attr_reader :following + + sig { params(following: Integer).void } + attr_writer :following + + sig { returns(T.nilable(String)) } + attr_reader :location + + sig { params(location: String).void } + attr_writer :location + + sig { returns(T.nilable(String)) } + attr_reader :profile_picture + + sig { params(profile_picture: String).void } + attr_writer :profile_picture + + sig { returns(T.nilable(Integer)) } + attr_reader :statuses_count + + sig { params(statuses_count: Integer).void } + attr_writer :statuses_count + + sig { returns(T.nilable(T::Boolean)) } + attr_reader :verified + + sig { params(verified: T::Boolean).void } + attr_writer :verified + + # X user profile with bio, follower counts, and verification status. + sig do + params( + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: T::Boolean + ).returns(T.attached_class) + end + def self.new( + id:, + name:, + username:, + created_at: nil, + description: nil, + followers: nil, + following: nil, + location: nil, + profile_picture: nil, + statuses_count: nil, + verified: nil + ) + end + + sig do + override.returns( + { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: T::Boolean + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_likes_params.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_likes_params.rbi index 82dbbf3..264ebca 100644 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_likes_params.rbi +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_likes_params.rbi @@ -18,7 +18,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - # Pagination cursor from previous response + # Pagination cursor for liked tweets sig { returns(T.nilable(String)) } attr_reader :cursor @@ -34,7 +34,7 @@ module XTwitterScraper end def self.new( id:, - # Pagination cursor from previous response + # Pagination cursor for liked tweets cursor: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_likes_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_likes_response.rbi index 86a32fd..8735a2f 100644 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_likes_response.rbi +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_likes_response.rbi @@ -27,6 +27,7 @@ module XTwitterScraper end attr_accessor :tweets + # Paginated list of tweets with cursor-based navigation. sig do params( has_next_page: T::Boolean, @@ -99,7 +100,7 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) sig { returns(T.nilable(T::Boolean)) } attr_reader :is_note_tweet @@ -136,6 +137,7 @@ module XTwitterScraper sig { params(view_count: Integer).void } attr_writer :view_count + # Tweet returned from search results with inline author info. sig do params( id: String, @@ -158,7 +160,7 @@ module XTwitterScraper author: nil, bookmark_count: nil, created_at: nil, - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) is_note_tweet: nil, like_count: nil, quote_count: nil, diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_media_params.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_media_params.rbi index d88e428..ea7d8f7 100644 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_media_params.rbi +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_media_params.rbi @@ -18,7 +18,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - # Pagination cursor from previous response + # Pagination cursor for media tweets sig { returns(T.nilable(String)) } attr_reader :cursor @@ -34,7 +34,7 @@ module XTwitterScraper end def self.new( id:, - # Pagination cursor from previous response + # Pagination cursor for media tweets cursor: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_media_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_media_response.rbi index 03dfcfc..716efb9 100644 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_media_response.rbi +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_media_response.rbi @@ -27,6 +27,7 @@ module XTwitterScraper end attr_accessor :tweets + # Paginated list of tweets with cursor-based navigation. sig do params( has_next_page: T::Boolean, @@ -99,7 +100,7 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) sig { returns(T.nilable(T::Boolean)) } attr_reader :is_note_tweet @@ -136,6 +137,7 @@ module XTwitterScraper sig { params(view_count: Integer).void } attr_writer :view_count + # Tweet returned from search results with inline author info. sig do params( id: String, @@ -158,7 +160,7 @@ module XTwitterScraper author: nil, bookmark_count: nil, created_at: nil, - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) is_note_tweet: nil, like_count: nil, quote_count: nil, diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_mentions_params.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_mentions_params.rbi index 2d046e7..adbb1a3 100644 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_mentions_params.rbi +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_mentions_params.rbi @@ -18,21 +18,21 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - # Pagination cursor + # Pagination cursor for mentions sig { returns(T.nilable(String)) } attr_reader :cursor sig { params(cursor: String).void } attr_writer :cursor - # Unix timestamp - filter after + # Unix timestamp - return mentions after this time sig { returns(T.nilable(String)) } attr_reader :since_time sig { params(since_time: String).void } attr_writer :since_time - # Unix timestamp - filter before + # Unix timestamp - return mentions before this time sig { returns(T.nilable(String)) } attr_reader :until_time @@ -50,11 +50,11 @@ module XTwitterScraper end def self.new( id:, - # Pagination cursor + # Pagination cursor for mentions cursor: nil, - # Unix timestamp - filter after + # Unix timestamp - return mentions after this time since_time: nil, - # Unix timestamp - filter before + # Unix timestamp - return mentions before this time until_time: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_mentions_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_mentions_response.rbi new file mode 100644 index 0000000..5dcfe20 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_mentions_response.rbi @@ -0,0 +1,246 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + class UserRetrieveMentionsResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::UserRetrieveMentionsResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(T::Boolean) } + attr_accessor :has_next_page + + sig { returns(String) } + attr_accessor :next_cursor + + sig do + returns( + T::Array[ + XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet + ] + ) + end + attr_accessor :tweets + + # Paginated list of tweets with cursor-based navigation. + sig do + params( + has_next_page: T::Boolean, + next_cursor: String, + tweets: + T::Array[ + XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::OrHash + ] + ).returns(T.attached_class) + end + def self.new(has_next_page:, next_cursor:, tweets:) + end + + sig do + override.returns( + { + has_next_page: T::Boolean, + next_cursor: String, + tweets: + T::Array[ + XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet + ] + } + ) + end + def to_hash + end + + class Tweet < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :text + + sig do + returns( + T.nilable( + XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author + ) + ) + end + attr_reader :author + + sig do + params( + author: + XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author::OrHash + ).void + end + attr_writer :author + + sig { returns(T.nilable(Integer)) } + attr_reader :bookmark_count + + sig { params(bookmark_count: Integer).void } + attr_writer :bookmark_count + + sig { returns(T.nilable(String)) } + attr_reader :created_at + + sig { params(created_at: String).void } + attr_writer :created_at + + # True for Note Tweets (long-form content, up to 25,000 characters) + sig { returns(T.nilable(T::Boolean)) } + attr_reader :is_note_tweet + + sig { params(is_note_tweet: T::Boolean).void } + attr_writer :is_note_tweet + + sig { returns(T.nilable(Integer)) } + attr_reader :like_count + + sig { params(like_count: Integer).void } + attr_writer :like_count + + sig { returns(T.nilable(Integer)) } + attr_reader :quote_count + + sig { params(quote_count: Integer).void } + attr_writer :quote_count + + sig { returns(T.nilable(Integer)) } + attr_reader :reply_count + + sig { params(reply_count: Integer).void } + attr_writer :reply_count + + sig { returns(T.nilable(Integer)) } + attr_reader :retweet_count + + sig { params(retweet_count: Integer).void } + attr_writer :retweet_count + + sig { returns(T.nilable(Integer)) } + attr_reader :view_count + + sig { params(view_count: Integer).void } + attr_writer :view_count + + # Tweet returned from search results with inline author info. + sig do + params( + id: String, + text: String, + author: + XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author::OrHash, + bookmark_count: Integer, + created_at: String, + is_note_tweet: T::Boolean, + like_count: Integer, + quote_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + ).returns(T.attached_class) + end + def self.new( + id:, + text:, + author: nil, + bookmark_count: nil, + created_at: nil, + # True for Note Tweets (long-form content, up to 25,000 characters) + is_note_tweet: nil, + like_count: nil, + quote_count: nil, + reply_count: nil, + retweet_count: nil, + view_count: nil + ) + end + + sig do + override.returns( + { + id: String, + text: String, + author: + XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author, + bookmark_count: Integer, + created_at: String, + is_note_tweet: T::Boolean, + like_count: Integer, + quote_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + } + ) + end + def to_hash + end + + class Author < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :name + + sig { returns(String) } + attr_accessor :username + + sig { returns(T.nilable(T::Boolean)) } + attr_reader :verified + + sig { params(verified: T::Boolean).void } + attr_writer :verified + + sig do + params( + id: String, + name: String, + username: String, + verified: T::Boolean + ).returns(T.attached_class) + end + def self.new(id:, name:, username:, verified: nil) + end + + sig do + override.returns( + { + id: String, + name: String, + username: String, + verified: T::Boolean + } + ) + end + def to_hash + end + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_search_params.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_search_params.rbi index 9654a1e..65c94c4 100644 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_search_params.rbi +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_search_params.rbi @@ -15,11 +15,11 @@ module XTwitterScraper ) end - # Search query + # User search query sig { returns(String) } attr_accessor :q - # Pagination cursor + # Pagination cursor for user search sig { returns(T.nilable(String)) } attr_reader :cursor @@ -34,9 +34,9 @@ module XTwitterScraper ).returns(T.attached_class) end def self.new( - # Search query + # User search query q:, - # Pagination cursor + # Pagination cursor for user search cursor: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_search_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_search_response.rbi new file mode 100644 index 0000000..2ac0978 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_search_response.rbi @@ -0,0 +1,179 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + class UserRetrieveSearchResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::UserRetrieveSearchResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(T::Boolean) } + attr_accessor :has_next_page + + sig { returns(String) } + attr_accessor :next_cursor + + sig do + returns( + T::Array[ + XTwitterScraper::Models::X::UserRetrieveSearchResponse::User + ] + ) + end + attr_accessor :users + + # Paginated list of user profiles with cursor-based navigation. + sig do + params( + has_next_page: T::Boolean, + next_cursor: String, + users: + T::Array[ + XTwitterScraper::Models::X::UserRetrieveSearchResponse::User::OrHash + ] + ).returns(T.attached_class) + end + def self.new(has_next_page:, next_cursor:, users:) + end + + sig do + override.returns( + { + has_next_page: T::Boolean, + next_cursor: String, + users: + T::Array[ + XTwitterScraper::Models::X::UserRetrieveSearchResponse::User + ] + } + ) + end + def to_hash + end + + class User < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::UserRetrieveSearchResponse::User, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :name + + sig { returns(String) } + attr_accessor :username + + sig { returns(T.nilable(String)) } + attr_reader :created_at + + sig { params(created_at: String).void } + attr_writer :created_at + + sig { returns(T.nilable(String)) } + attr_reader :description + + sig { params(description: String).void } + attr_writer :description + + sig { returns(T.nilable(Integer)) } + attr_reader :followers + + sig { params(followers: Integer).void } + attr_writer :followers + + sig { returns(T.nilable(Integer)) } + attr_reader :following + + sig { params(following: Integer).void } + attr_writer :following + + sig { returns(T.nilable(String)) } + attr_reader :location + + sig { params(location: String).void } + attr_writer :location + + sig { returns(T.nilable(String)) } + attr_reader :profile_picture + + sig { params(profile_picture: String).void } + attr_writer :profile_picture + + sig { returns(T.nilable(Integer)) } + attr_reader :statuses_count + + sig { params(statuses_count: Integer).void } + attr_writer :statuses_count + + sig { returns(T.nilable(T::Boolean)) } + attr_reader :verified + + sig { params(verified: T::Boolean).void } + attr_writer :verified + + # X user profile with bio, follower counts, and verification status. + sig do + params( + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: T::Boolean + ).returns(T.attached_class) + end + def self.new( + id:, + name:, + username:, + created_at: nil, + description: nil, + followers: nil, + following: nil, + location: nil, + profile_picture: nil, + statuses_count: nil, + verified: nil + ) + end + + sig do + override.returns( + { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: T::Boolean + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_params.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_params.rbi index 3901a9c..f24685f 100644 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_params.rbi +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_params.rbi @@ -18,7 +18,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - # Pagination cursor from previous response + # Pagination cursor for user tweets sig { returns(T.nilable(String)) } attr_reader :cursor @@ -50,7 +50,7 @@ module XTwitterScraper end def self.new( id:, - # Pagination cursor from previous response + # Pagination cursor for user tweets cursor: nil, # Include parent tweet for replies include_parent_tweet: nil, diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_response.rbi index e778ae9..829758b 100644 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_response.rbi +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_response.rbi @@ -27,6 +27,7 @@ module XTwitterScraper end attr_accessor :tweets + # Paginated list of tweets with cursor-based navigation. sig do params( has_next_page: T::Boolean, @@ -99,7 +100,7 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) sig { returns(T.nilable(T::Boolean)) } attr_reader :is_note_tweet @@ -136,6 +137,7 @@ module XTwitterScraper sig { params(view_count: Integer).void } attr_writer :view_count + # Tweet returned from search results with inline author info. sig do params( id: String, @@ -158,7 +160,7 @@ module XTwitterScraper author: nil, bookmark_count: nil, created_at: nil, - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) is_note_tweet: nil, like_count: nil, quote_count: nil, diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_verified_followers_params.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_verified_followers_params.rbi index bd450f1..fd8c245 100644 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_verified_followers_params.rbi +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_verified_followers_params.rbi @@ -18,7 +18,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - # Pagination cursor + # Pagination cursor for verified followers sig { returns(T.nilable(String)) } attr_reader :cursor @@ -34,7 +34,7 @@ module XTwitterScraper end def self.new( id:, - # Pagination cursor + # Pagination cursor for verified followers cursor: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rbi new file mode 100644 index 0000000..b693f88 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rbi @@ -0,0 +1,179 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + class UserRetrieveVerifiedFollowersResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(T::Boolean) } + attr_accessor :has_next_page + + sig { returns(String) } + attr_accessor :next_cursor + + sig do + returns( + T::Array[ + XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse::User + ] + ) + end + attr_accessor :users + + # Paginated list of user profiles with cursor-based navigation. + sig do + params( + has_next_page: T::Boolean, + next_cursor: String, + users: + T::Array[ + XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse::User::OrHash + ] + ).returns(T.attached_class) + end + def self.new(has_next_page:, next_cursor:, users:) + end + + sig do + override.returns( + { + has_next_page: T::Boolean, + next_cursor: String, + users: + T::Array[ + XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse::User + ] + } + ) + end + def to_hash + end + + class User < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse::User, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :name + + sig { returns(String) } + attr_accessor :username + + sig { returns(T.nilable(String)) } + attr_reader :created_at + + sig { params(created_at: String).void } + attr_writer :created_at + + sig { returns(T.nilable(String)) } + attr_reader :description + + sig { params(description: String).void } + attr_writer :description + + sig { returns(T.nilable(Integer)) } + attr_reader :followers + + sig { params(followers: Integer).void } + attr_writer :followers + + sig { returns(T.nilable(Integer)) } + attr_reader :following + + sig { params(following: Integer).void } + attr_writer :following + + sig { returns(T.nilable(String)) } + attr_reader :location + + sig { params(location: String).void } + attr_writer :location + + sig { returns(T.nilable(String)) } + attr_reader :profile_picture + + sig { params(profile_picture: String).void } + attr_writer :profile_picture + + sig { returns(T.nilable(Integer)) } + attr_reader :statuses_count + + sig { params(statuses_count: Integer).void } + attr_writer :statuses_count + + sig { returns(T.nilable(T::Boolean)) } + attr_reader :verified + + sig { params(verified: T::Boolean).void } + attr_writer :verified + + # X user profile with bio, follower counts, and verification status. + sig do + params( + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: T::Boolean + ).returns(T.attached_class) + end + def self.new( + id:, + name:, + username:, + created_at: nil, + description: nil, + followers: nil, + following: nil, + location: nil, + profile_picture: nil, + statuses_count: nil, + verified: nil + ) + end + + sig do + override.returns( + { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: T::Boolean + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/x_account.rbi b/rbi/x_twitter_scraper/models/x/x_account.rbi index 35e847b..2559fa2 100644 --- a/rbi/x_twitter_scraper/models/x/x_account.rbi +++ b/rbi/x_twitter_scraper/models/x/x_account.rbi @@ -29,6 +29,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :x_username + # Linked X account summary with username and connection status. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/x/x_account_detail.rbi b/rbi/x_twitter_scraper/models/x/x_account_detail.rbi index 4087eed..fc1500c 100644 --- a/rbi/x_twitter_scraper/models/x/x_account_detail.rbi +++ b/rbi/x_twitter_scraper/models/x/x_account_detail.rbi @@ -47,6 +47,7 @@ module XTwitterScraper sig { params(updated_at: Time).void } attr_writer :updated_at + # Full X account details including proxy, cookies, and update timestamp. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/x_get_article_response.rbi b/rbi/x_twitter_scraper/models/x_get_article_response.rbi index eda4d02..626c9a6 100644 --- a/rbi/x_twitter_scraper/models/x_get_article_response.rbi +++ b/rbi/x_twitter_scraper/models/x_get_article_response.rbi @@ -21,6 +21,7 @@ module XTwitterScraper end attr_writer :article + # Author of a tweet with follower count and verification status. sig do returns(T.nilable(XTwitterScraper::Models::XGetArticleResponse::Author)) end @@ -40,7 +41,11 @@ module XTwitterScraper author: XTwitterScraper::Models::XGetArticleResponse::Author::OrHash ).returns(T.attached_class) end - def self.new(article:, author: nil) + def self.new( + article:, + # Author of a tweet with follower count and verification status. + author: nil + ) end sig do @@ -288,6 +293,7 @@ module XTwitterScraper sig { params(profile_picture: String).void } attr_writer :profile_picture + # Author of a tweet with follower count and verification status. sig do params( id: String, diff --git a/rbi/x_twitter_scraper/models/x_get_home_timeline_params.rbi b/rbi/x_twitter_scraper/models/x_get_home_timeline_params.rbi index 6bb3665..fedf3af 100644 --- a/rbi/x_twitter_scraper/models/x_get_home_timeline_params.rbi +++ b/rbi/x_twitter_scraper/models/x_get_home_timeline_params.rbi @@ -14,7 +14,7 @@ module XTwitterScraper ) end - # Pagination cursor from previous response + # Pagination cursor for timeline sig { returns(T.nilable(String)) } attr_reader :cursor @@ -36,7 +36,7 @@ module XTwitterScraper ).returns(T.attached_class) end def self.new( - # Pagination cursor from previous response + # Pagination cursor for timeline cursor: nil, # Comma-separated tweet IDs to exclude from results seen_tweet_ids: nil, diff --git a/rbi/x_twitter_scraper/models/x_get_home_timeline_response.rbi b/rbi/x_twitter_scraper/models/x_get_home_timeline_response.rbi index d10d4e4..35a1b84 100644 --- a/rbi/x_twitter_scraper/models/x_get_home_timeline_response.rbi +++ b/rbi/x_twitter_scraper/models/x_get_home_timeline_response.rbi @@ -24,6 +24,7 @@ module XTwitterScraper end attr_accessor :tweets + # Paginated list of tweets with cursor-based navigation. sig do params( has_next_page: T::Boolean, @@ -94,7 +95,7 @@ module XTwitterScraper sig { params(created_at: String).void } attr_writer :created_at - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) sig { returns(T.nilable(T::Boolean)) } attr_reader :is_note_tweet @@ -131,6 +132,7 @@ module XTwitterScraper sig { params(view_count: Integer).void } attr_writer :view_count + # Tweet returned from search results with inline author info. sig do params( id: String, @@ -153,7 +155,7 @@ module XTwitterScraper author: nil, bookmark_count: nil, created_at: nil, - # Whether this is a Note Tweet (long-form post, up to 25,000 characters) + # True for Note Tweets (long-form content, up to 25,000 characters) is_note_tweet: nil, like_count: nil, quote_count: nil, diff --git a/rbi/x_twitter_scraper/models/x_get_notifications_params.rbi b/rbi/x_twitter_scraper/models/x_get_notifications_params.rbi index 1fed8f5..bf41d84 100644 --- a/rbi/x_twitter_scraper/models/x_get_notifications_params.rbi +++ b/rbi/x_twitter_scraper/models/x_get_notifications_params.rbi @@ -14,7 +14,7 @@ module XTwitterScraper ) end - # Pagination cursor from previous response + # Pagination cursor for notifications sig { returns(T.nilable(String)) } attr_reader :cursor @@ -44,7 +44,7 @@ module XTwitterScraper ).returns(T.attached_class) end def self.new( - # Pagination cursor from previous response + # Pagination cursor for notifications cursor: nil, # Notification type filter type: nil, diff --git a/rbi/x_twitter_scraper/models/x_get_trends_response.rbi b/rbi/x_twitter_scraper/models/x_get_trends_response.rbi new file mode 100644 index 0000000..a989b69 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x_get_trends_response.rbi @@ -0,0 +1,102 @@ +# typed: strong + +module XTwitterScraper + module Models + class XGetTrendsResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::XGetTrendsResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(Integer) } + attr_accessor :count + + sig do + returns(T::Array[XTwitterScraper::Models::XGetTrendsResponse::Trend]) + end + attr_accessor :trends + + sig { returns(Integer) } + attr_accessor :woeid + + sig do + params( + count: Integer, + trends: + T::Array[ + XTwitterScraper::Models::XGetTrendsResponse::Trend::OrHash + ], + woeid: Integer + ).returns(T.attached_class) + end + def self.new(count:, trends:, woeid:) + end + + sig do + override.returns( + { + count: Integer, + trends: + T::Array[XTwitterScraper::Models::XGetTrendsResponse::Trend], + woeid: Integer + } + ) + end + def to_hash + end + + class Trend < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::XGetTrendsResponse::Trend, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :name + + sig { returns(T.nilable(String)) } + attr_reader :description + + sig { params(description: String).void } + attr_writer :description + + sig { returns(T.nilable(String)) } + attr_reader :query + + sig { params(query: String).void } + attr_writer :query + + sig { returns(T.nilable(Integer)) } + attr_reader :rank + + sig { params(rank: Integer).void } + attr_writer :rank + + sig do + params( + name: String, + description: String, + query: String, + rank: Integer + ).returns(T.attached_class) + end + def self.new(name:, description: nil, query: nil, rank: nil) + end + + sig do + override.returns( + { name: String, description: String, query: String, rank: Integer } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/resources/drafts.rbi b/rbi/x_twitter_scraper/resources/drafts.rbi index 5a7d922..71647b1 100644 --- a/rbi/x_twitter_scraper/resources/drafts.rbi +++ b/rbi/x_twitter_scraper/resources/drafts.rbi @@ -41,6 +41,7 @@ module XTwitterScraper def list( # Cursor for pagination after_cursor: nil, + # Maximum number of items to return (1-100, default 50) limit: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/resources/draws.rbi b/rbi/x_twitter_scraper/resources/draws.rbi index 1a9e4f0..419c84a 100644 --- a/rbi/x_twitter_scraper/resources/draws.rbi +++ b/rbi/x_twitter_scraper/resources/draws.rbi @@ -27,8 +27,9 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::DrawListResponse) end def list( - # Cursor for pagination + # Cursor for keyset pagination after: nil, + # Maximum number of items to return (1-100, default 50) limit: nil, request_options: {} ) @@ -46,6 +47,7 @@ module XTwitterScraper def export( # Resource ID (stringified bigint) id, + # Export output format format_: nil, # Export winners or all entries type: nil, diff --git a/rbi/x_twitter_scraper/resources/events.rbi b/rbi/x_twitter_scraper/resources/events.rbi index b4f3258..42ceeec 100644 --- a/rbi/x_twitter_scraper/resources/events.rbi +++ b/rbi/x_twitter_scraper/resources/events.rbi @@ -29,10 +29,13 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::EventListResponse) end def list( - # Cursor for pagination + # Cursor for keyset pagination after: nil, + # Filter events by type event_type: nil, + # Maximum number of items to return (1-100, default 50) limit: nil, + # Filter events by monitor ID monitor_id: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/resources/extractions.rbi b/rbi/x_twitter_scraper/resources/extractions.rbi index 8d6b85c..0ce3584 100644 --- a/rbi/x_twitter_scraper/resources/extractions.rbi +++ b/rbi/x_twitter_scraper/resources/extractions.rbi @@ -16,8 +16,9 @@ module XTwitterScraper def retrieve( # Extraction public ID (UUID) id, - # Cursor for pagination + # Cursor for keyset pagination after: nil, + # Maximum number of results to return (1-1000, default 100) limit: nil, request_options: {} ) @@ -34,10 +35,13 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::ExtractionListResponse) end def list( - # Cursor for pagination + # Cursor for keyset pagination after: nil, + # Maximum number of items to return (1-100, default 50) limit: nil, + # Filter by job status status: nil, + # Filter by extraction tool type tool_type: nil, request_options: {} ) @@ -61,12 +65,13 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::ExtractionEstimateCostResponse) end def estimate_cost( + # Identifier for the extraction tool used to run a job. tool_type:, - # Raw advanced search query appended as-is (tweet_search_extractor) + # Raw advanced query string appended to the estimate (tweet_search_extractor) advanced_query: nil, - # Exact phrase to match (tweet_search_extractor) + # Exact phrase filter for search estimation exact_phrase: nil, - # Words to exclude from results (tweet_search_extractor) + # Words excluded from estimated search results exclude_words: nil, search_query: nil, target_community_id: nil, @@ -90,6 +95,7 @@ module XTwitterScraper def export_results( # Extraction public ID id, + # Export file format format_: nil, request_options: {} ) @@ -112,6 +118,7 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::ExtractionRunResponse) end def run( + # Identifier for the extraction tool used to run a job. tool_type:, # Raw advanced search query appended as-is (tweet_search_extractor) advanced_query: nil, diff --git a/rbi/x_twitter_scraper/resources/integrations.rbi b/rbi/x_twitter_scraper/resources/integrations.rbi index d655b4c..41fa205 100644 --- a/rbi/x_twitter_scraper/resources/integrations.rbi +++ b/rbi/x_twitter_scraper/resources/integrations.rbi @@ -20,6 +20,7 @@ module XTwitterScraper def create( # Integration config (e.g. Telegram chatId) config:, + # Array of event types to subscribe to. event_types:, name:, type:, @@ -61,6 +62,7 @@ module XTwitterScraper def update( # Resource ID (stringified bigint) id, + # Array of event types to subscribe to. event_types: nil, # Event filter rules (JSON) filters: nil, @@ -108,6 +110,7 @@ module XTwitterScraper def list_deliveries( # Resource ID (stringified bigint) id, + # Maximum number of items to return (1-100, default 50) limit: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/resources/monitors.rbi b/rbi/x_twitter_scraper/resources/monitors.rbi index c83ac7b..5105648 100644 --- a/rbi/x_twitter_scraper/resources/monitors.rbi +++ b/rbi/x_twitter_scraper/resources/monitors.rbi @@ -14,6 +14,7 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::MonitorCreateResponse) end def create( + # Array of event types to subscribe to. event_types:, # X username (without @) username:, @@ -48,6 +49,7 @@ module XTwitterScraper def update( # Resource ID (stringified bigint) id, + # Array of event types to subscribe to. event_types: nil, is_active: nil, request_options: {} diff --git a/rbi/x_twitter_scraper/resources/support/tickets.rbi b/rbi/x_twitter_scraper/resources/support/tickets.rbi index 267f936..619afea 100644 --- a/rbi/x_twitter_scraper/resources/support/tickets.rbi +++ b/rbi/x_twitter_scraper/resources/support/tickets.rbi @@ -23,7 +23,11 @@ module XTwitterScraper request_options: XTwitterScraper::RequestOptions::OrHash ).returns(XTwitterScraper::Models::Support::TicketRetrieveResponse) end - def retrieve(id, request_options: {}) + def retrieve( + # Support ticket ID + id, + request_options: {} + ) end # Update ticket status @@ -35,7 +39,12 @@ module XTwitterScraper request_options: XTwitterScraper::RequestOptions::OrHash ).returns(XTwitterScraper::Models::Support::TicketUpdateResponse) end - def update(id, status:, request_options: {}) + def update( + # Support ticket ID to update + id, + status:, + request_options: {} + ) end # List user's support tickets @@ -55,7 +64,12 @@ module XTwitterScraper request_options: XTwitterScraper::RequestOptions::OrHash ).returns(XTwitterScraper::Models::Support::TicketReplyResponse) end - def reply(id, body:, request_options: {}) + def reply( + # Support ticket ID for the reply + id, + body:, + request_options: {} + ) end # @api private diff --git a/rbi/x_twitter_scraper/resources/trends.rbi b/rbi/x_twitter_scraper/resources/trends.rbi index 9e73673..2c5f1b2 100644 --- a/rbi/x_twitter_scraper/resources/trends.rbi +++ b/rbi/x_twitter_scraper/resources/trends.rbi @@ -4,7 +4,7 @@ module XTwitterScraper module Resources # Trending topics by region class Trends - # Get trending topics + # Get regional trending topics sig do params( count: Integer, @@ -13,6 +13,7 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::TrendListResponse) end def list( + # Number of trending topics to return (1-50, default 30) count: nil, # Region WOEID (1=Worldwide, 23424977=US, 23424975=UK, 23424969=Turkey) woeid: nil, diff --git a/rbi/x_twitter_scraper/resources/webhooks.rbi b/rbi/x_twitter_scraper/resources/webhooks.rbi index 24ccb7a..c3117d6 100644 --- a/rbi/x_twitter_scraper/resources/webhooks.rbi +++ b/rbi/x_twitter_scraper/resources/webhooks.rbi @@ -14,6 +14,7 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::WebhookCreateResponse) end def create( + # Array of event types to subscribe to. event_types:, # HTTPS URL url:, @@ -35,6 +36,7 @@ module XTwitterScraper def update( # Resource ID (stringified bigint) id, + # Array of event types to subscribe to. event_types: nil, is_active: nil, url: nil, diff --git a/rbi/x_twitter_scraper/resources/x.rbi b/rbi/x_twitter_scraper/resources/x.rbi index 175dbbd..6390d23 100644 --- a/rbi/x_twitter_scraper/resources/x.rbi +++ b/rbi/x_twitter_scraper/resources/x.rbi @@ -48,7 +48,11 @@ module XTwitterScraper request_options: XTwitterScraper::RequestOptions::OrHash ).returns(XTwitterScraper::Models::XGetArticleResponse) end - def get_article(tweet_id, request_options: {}) + def get_article( + # Tweet ID of the article + tweet_id, + request_options: {} + ) end # Get home timeline @@ -60,7 +64,7 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::XGetHomeTimelineResponse) end def get_home_timeline( - # Pagination cursor from previous response + # Pagination cursor for timeline cursor: nil, # Comma-separated tweet IDs to exclude from results seen_tweet_ids: nil, @@ -77,7 +81,7 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::XGetNotificationsResponse) end def get_notifications( - # Pagination cursor from previous response + # Pagination cursor for notifications cursor: nil, # Notification type filter type: nil, @@ -87,7 +91,9 @@ module XTwitterScraper # Get trending topics sig do - params(request_options: XTwitterScraper::RequestOptions::OrHash).void + params( + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(XTwitterScraper::Models::XGetTrendsResponse) end def get_trends(request_options: {}) end diff --git a/rbi/x_twitter_scraper/resources/x/accounts.rbi b/rbi/x_twitter_scraper/resources/x/accounts.rbi index a03c415..20895d5 100644 --- a/rbi/x_twitter_scraper/resources/x/accounts.rbi +++ b/rbi/x_twitter_scraper/resources/x/accounts.rbi @@ -80,9 +80,9 @@ module XTwitterScraper def reauth( # Resource ID (stringified bigint) id, - # Account password + # Updated account password password:, - # TOTP secret for 2FA + # TOTP secret for 2FA re-authentication totp_secret: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/resources/x/bookmarks.rbi b/rbi/x_twitter_scraper/resources/x/bookmarks.rbi index 24393bf..50ee90b 100644 --- a/rbi/x_twitter_scraper/resources/x/bookmarks.rbi +++ b/rbi/x_twitter_scraper/resources/x/bookmarks.rbi @@ -14,7 +14,7 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::X::BookmarkListResponse) end def list( - # Pagination cursor from previous response + # Pagination cursor for bookmarks cursor: nil, # Optional bookmark folder ID folder_id: nil, diff --git a/rbi/x_twitter_scraper/resources/x/communities.rbi b/rbi/x_twitter_scraper/resources/x/communities.rbi index 3e178c6..6377ad9 100644 --- a/rbi/x_twitter_scraper/resources/x/communities.rbi +++ b/rbi/x_twitter_scraper/resources/x/communities.rbi @@ -22,7 +22,7 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::X::CommunityCreateResponse) end def create( - # X account (@username or account ID) + # X account (@username or ID) creating the community account:, # Community name name:, @@ -44,7 +44,7 @@ module XTwitterScraper def delete( # Resource ID (stringified bigint) id, - # X account (@username or account ID) + # X account (@username or ID) deleting the community account:, # Community name for confirmation community_name:, @@ -72,10 +72,12 @@ module XTwitterScraper id: String, cursor: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).void + ).returns( + XTwitterScraper::Models::X::CommunityRetrieveMembersResponse + ) end def retrieve_members( - # Community ID + # Community ID for member lookup id, # Pagination cursor cursor: nil, @@ -89,12 +91,14 @@ module XTwitterScraper id: String, cursor: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).void + ).returns( + XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse + ) end def retrieve_moderators( - # Community ID + # Community ID for moderator lookup id, - # Pagination cursor + # Pagination cursor for community moderators cursor: nil, request_options: {} ) @@ -107,12 +111,12 @@ module XTwitterScraper cursor: String, query_type: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).void + ).returns(XTwitterScraper::Models::X::CommunityRetrieveSearchResponse) end def retrieve_search( # Search query q:, - # Pagination cursor + # Pagination cursor for community search cursor: nil, # Sort order (Latest or Top) query_type: nil, diff --git a/rbi/x_twitter_scraper/resources/x/communities/join.rbi b/rbi/x_twitter_scraper/resources/x/communities/join.rbi index 10a28cf..0b48e52 100644 --- a/rbi/x_twitter_scraper/resources/x/communities/join.rbi +++ b/rbi/x_twitter_scraper/resources/x/communities/join.rbi @@ -19,7 +19,7 @@ module XTwitterScraper def create( # Resource ID (stringified bigint) id, - # X account (@username or account ID) + # X account identifier (@username or account ID) account:, request_options: {} ) @@ -38,7 +38,7 @@ module XTwitterScraper def delete_all( # Resource ID (stringified bigint) id, - # X account (@username or account ID) + # X account identifier (@username or account ID) account:, request_options: {} ) diff --git a/rbi/x_twitter_scraper/resources/x/communities/tweets.rbi b/rbi/x_twitter_scraper/resources/x/communities/tweets.rbi index 394b9d7..349d004 100644 --- a/rbi/x_twitter_scraper/resources/x/communities/tweets.rbi +++ b/rbi/x_twitter_scraper/resources/x/communities/tweets.rbi @@ -13,14 +13,16 @@ module XTwitterScraper cursor: String, query_type: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).void + ).returns( + XTwitterScraper::Models::X::Communities::TweetListResponse + ) end def list( - # Search query + # Search query for cross-community tweets q:, - # Pagination cursor + # Pagination cursor for cross-community results cursor: nil, - # Sort order (Latest or Top) + # Sort order for cross-community results (Latest or Top) query_type: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/resources/x/dm.rbi b/rbi/x_twitter_scraper/resources/x/dm.rbi index b716d8d..7a5b6b7 100644 --- a/rbi/x_twitter_scraper/resources/x/dm.rbi +++ b/rbi/x_twitter_scraper/resources/x/dm.rbi @@ -16,7 +16,7 @@ module XTwitterScraper def retrieve_history( # Target user ID user_id, - # Pagination cursor from previous response + # Pagination cursor for DM history cursor: nil, # Legacy pagination cursor (backward compat) max_id: nil, @@ -38,7 +38,7 @@ module XTwitterScraper def send_( # Recipient user ID user_id, - # X account (@username or account ID) + # X account (@username or ID) sending the DM account:, text:, media_ids: nil, diff --git a/rbi/x_twitter_scraper/resources/x/lists.rbi b/rbi/x_twitter_scraper/resources/x/lists.rbi index 80852b3..98c7e38 100644 --- a/rbi/x_twitter_scraper/resources/x/lists.rbi +++ b/rbi/x_twitter_scraper/resources/x/lists.rbi @@ -11,12 +11,12 @@ module XTwitterScraper id: String, cursor: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).void + ).returns(XTwitterScraper::Models::X::ListRetrieveFollowersResponse) end def retrieve_followers( # List ID id, - # Pagination cursor + # Pagination cursor for list followers cursor: nil, request_options: {} ) @@ -28,12 +28,12 @@ module XTwitterScraper id: String, cursor: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).void + ).returns(XTwitterScraper::Models::X::ListRetrieveMembersResponse) end def retrieve_members( - # List ID + # List ID for member lookup id, - # Pagination cursor + # Pagination cursor for list members cursor: nil, request_options: {} ) @@ -48,12 +48,12 @@ module XTwitterScraper since_time: String, until_time: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).void + ).returns(XTwitterScraper::Models::X::ListRetrieveTweetsResponse) end def retrieve_tweets( - # List ID + # List ID for tweet lookup id, - # Pagination cursor + # Pagination cursor for list tweets cursor: nil, # Include replies (default false) include_replies: nil, diff --git a/rbi/x_twitter_scraper/resources/x/media.rbi b/rbi/x_twitter_scraper/resources/x/media.rbi index 3df10f1..1b9faeb 100644 --- a/rbi/x_twitter_scraper/resources/x/media.rbi +++ b/rbi/x_twitter_scraper/resources/x/media.rbi @@ -32,7 +32,7 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::X::MediaUploadResponse) end def upload( - # X account (@username or account ID) + # X account (@username or ID) uploading media account:, # Media file to upload file:, diff --git a/rbi/x_twitter_scraper/resources/x/profile.rbi b/rbi/x_twitter_scraper/resources/x/profile.rbi index a69eec6..35c688f 100644 --- a/rbi/x_twitter_scraper/resources/x/profile.rbi +++ b/rbi/x_twitter_scraper/resources/x/profile.rbi @@ -17,7 +17,7 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::X::ProfileUpdateResponse) end def update( - # X account (@username or account ID) + # X account (@username or ID) to update profile account:, # Bio description description: nil, @@ -39,7 +39,7 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::X::ProfileUpdateAvatarResponse) end def update_avatar( - # X account (@username or account ID) + # X account (@username or ID) for avatar update account:, # Avatar image (max 716KB) file:, @@ -56,7 +56,7 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::X::ProfileUpdateBannerResponse) end def update_banner( - # X account (@username or account ID) + # X account (@username or ID) for banner update account:, # Banner image (max 2MB) file:, diff --git a/rbi/x_twitter_scraper/resources/x/tweets.rbi b/rbi/x_twitter_scraper/resources/x/tweets.rbi index fcd3aba..4f83e5d 100644 --- a/rbi/x_twitter_scraper/resources/x/tweets.rbi +++ b/rbi/x_twitter_scraper/resources/x/tweets.rbi @@ -41,7 +41,7 @@ module XTwitterScraper params( ids: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).void + ).returns(XTwitterScraper::Models::X::TweetListResponse) end def list( # Comma-separated tweet IDs (max 100) @@ -59,9 +59,9 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::X::TweetGetFavoritersResponse) end def get_favoriters( - # Tweet ID + # Tweet ID to get favoriters id, - # Pagination cursor from previous response + # Pagination cursor for favoriters cursor: nil, request_options: {} ) @@ -79,15 +79,15 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::X::TweetGetQuotesResponse) end def get_quotes( - # Tweet ID + # Tweet ID to get quotes id, - # Pagination cursor + # Pagination cursor for quote tweets cursor: nil, - # Include replies (default false) + # Include reply quotes (default false) include_replies: nil, - # Unix timestamp - filter after + # Unix timestamp - return quotes posted after this time since_time: nil, - # Unix timestamp - filter before + # Unix timestamp - return quotes posted before this time until_time: nil, request_options: {} ) @@ -104,13 +104,13 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::X::TweetGetRepliesResponse) end def get_replies( - # Tweet ID + # Tweet ID to get replies id, - # Pagination cursor + # Pagination cursor for tweet replies cursor: nil, - # Unix timestamp - filter after + # Unix timestamp - return replies posted after this time since_time: nil, - # Unix timestamp - filter before + # Unix timestamp - return replies posted before this time until_time: nil, request_options: {} ) @@ -125,9 +125,9 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::X::TweetGetRetweetersResponse) end def get_retweeters( - # Tweet ID + # Tweet ID to get retweeters id, - # Pagination cursor + # Pagination cursor for retweeters cursor: nil, request_options: {} ) @@ -142,9 +142,9 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::X::TweetGetThreadResponse) end def get_thread( - # Tweet ID + # Tweet ID to get thread context id, - # Pagination cursor + # Pagination cursor for thread tweets cursor: nil, request_options: {} ) diff --git a/rbi/x_twitter_scraper/resources/x/users.rbi b/rbi/x_twitter_scraper/resources/x/users.rbi index d6f6a48..c23ffec 100644 --- a/rbi/x_twitter_scraper/resources/x/users.rbi +++ b/rbi/x_twitter_scraper/resources/x/users.rbi @@ -13,7 +13,7 @@ module XTwitterScraper params( ids: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).void + ).returns(XTwitterScraper::Models::X::UserRetrieveBatchResponse) end def retrieve_batch( # Comma-separated user IDs (max 100) @@ -29,12 +29,12 @@ module XTwitterScraper cursor: String, page_size: Integer, request_options: XTwitterScraper::RequestOptions::OrHash - ).void + ).returns(XTwitterScraper::Models::X::UserRetrieveFollowersResponse) end def retrieve_followers( # User ID or username id, - # Pagination cursor + # Pagination cursor for followers list cursor: nil, # Items per page (20-200, default 200) page_size: nil, @@ -53,9 +53,9 @@ module XTwitterScraper ) end def retrieve_followers_you_know( - # User ID + # User ID for followers-you-know lookup id, - # Pagination cursor from previous response + # Pagination cursor for followers-you-know cursor: nil, request_options: {} ) @@ -68,14 +68,14 @@ module XTwitterScraper cursor: String, page_size: Integer, request_options: XTwitterScraper::RequestOptions::OrHash - ).void + ).returns(XTwitterScraper::Models::X::UserRetrieveFollowingResponse) end def retrieve_following( - # User ID or username + # User ID or username for following lookup id, - # Pagination cursor + # Pagination cursor for following list cursor: nil, - # Items per page (20-200, default 200) + # Results per page (20-200, default 200) page_size: nil, request_options: {} ) @@ -92,7 +92,7 @@ module XTwitterScraper def retrieve_likes( # User ID id, - # Pagination cursor from previous response + # Pagination cursor for liked tweets cursor: nil, request_options: {} ) @@ -107,9 +107,9 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::X::UserRetrieveMediaResponse) end def retrieve_media( - # User ID + # User ID for media lookup id, - # Pagination cursor from previous response + # Pagination cursor for media tweets cursor: nil, request_options: {} ) @@ -123,16 +123,16 @@ module XTwitterScraper since_time: String, until_time: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).void + ).returns(XTwitterScraper::Models::X::UserRetrieveMentionsResponse) end def retrieve_mentions( - # User ID or username + # User ID or username for mentions lookup id, - # Pagination cursor + # Pagination cursor for mentions cursor: nil, - # Unix timestamp - filter after + # Unix timestamp - return mentions after this time since_time: nil, - # Unix timestamp - filter before + # Unix timestamp - return mentions before this time until_time: nil, request_options: {} ) @@ -144,12 +144,12 @@ module XTwitterScraper q: String, cursor: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).void + ).returns(XTwitterScraper::Models::X::UserRetrieveSearchResponse) end def retrieve_search( - # Search query + # User search query q:, - # Pagination cursor + # Pagination cursor for user search cursor: nil, request_options: {} ) @@ -166,8 +166,9 @@ module XTwitterScraper ).returns(XTwitterScraper::Models::X::UserRetrieveTweetsResponse) end def retrieve_tweets( + # X user ID or username id, - # Pagination cursor from previous response + # Pagination cursor for user tweets cursor: nil, # Include parent tweet for replies include_parent_tweet: nil, @@ -183,12 +184,14 @@ module XTwitterScraper id: String, cursor: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).void + ).returns( + XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse + ) end def retrieve_verified_followers( - # User ID or username + # User ID or username for verified followers id, - # Pagination cursor + # Pagination cursor for verified followers cursor: nil, request_options: {} ) diff --git a/sig/x_twitter_scraper/models/x/communities/tweet_list_response.rbs b/sig/x_twitter_scraper/models/x/communities/tweet_list_response.rbs new file mode 100644 index 0000000..845f5d9 --- /dev/null +++ b/sig/x_twitter_scraper/models/x/communities/tweet_list_response.rbs @@ -0,0 +1,150 @@ +module XTwitterScraper + module Models + module X + module Communities + type tweet_list_response = + { + has_next_page: bool, + next_cursor: String, + tweets: ::Array[XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet] + } + + class TweetListResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor has_next_page: bool + + attr_accessor next_cursor: String + + attr_accessor tweets: ::Array[XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet] + + def initialize: ( + has_next_page: bool, + next_cursor: String, + tweets: ::Array[XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet] + ) -> void + + def to_hash: -> { + has_next_page: bool, + next_cursor: String, + tweets: ::Array[XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet] + } + + type tweet = + { + id: String, + text: String, + author: XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author, + bookmark_count: Integer, + created_at: String, + is_note_tweet: bool, + like_count: Integer, + quote_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + } + + class Tweet < XTwitterScraper::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor text: String + + attr_reader author: XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author? + + def author=: ( + XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author + ) -> XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author + + attr_reader bookmark_count: Integer? + + def bookmark_count=: (Integer) -> Integer + + attr_reader created_at: String? + + def created_at=: (String) -> String + + attr_reader is_note_tweet: bool? + + def is_note_tweet=: (bool) -> bool + + attr_reader like_count: Integer? + + def like_count=: (Integer) -> Integer + + attr_reader quote_count: Integer? + + def quote_count=: (Integer) -> Integer + + attr_reader reply_count: Integer? + + def reply_count=: (Integer) -> Integer + + attr_reader retweet_count: Integer? + + def retweet_count=: (Integer) -> Integer + + attr_reader view_count: Integer? + + def view_count=: (Integer) -> Integer + + def initialize: ( + id: String, + text: String, + ?author: XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author, + ?bookmark_count: Integer, + ?created_at: String, + ?is_note_tweet: bool, + ?like_count: Integer, + ?quote_count: Integer, + ?reply_count: Integer, + ?retweet_count: Integer, + ?view_count: Integer + ) -> void + + def to_hash: -> { + id: String, + text: String, + author: XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author, + bookmark_count: Integer, + created_at: String, + is_note_tweet: bool, + like_count: Integer, + quote_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + } + + type author = + { id: String, name: String, username: String, verified: bool } + + class Author < XTwitterScraper::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String + + attr_accessor username: String + + attr_reader verified: bool? + + def verified=: (bool) -> bool + + def initialize: ( + id: String, + name: String, + username: String, + ?verified: bool + ) -> void + + def to_hash: -> { + id: String, + name: String, + username: String, + verified: bool + } + end + end + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/community_retrieve_members_response.rbs b/sig/x_twitter_scraper/models/x/community_retrieve_members_response.rbs new file mode 100644 index 0000000..21dbac6 --- /dev/null +++ b/sig/x_twitter_scraper/models/x/community_retrieve_members_response.rbs @@ -0,0 +1,115 @@ +module XTwitterScraper + module Models + module X + type community_retrieve_members_response = + { + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::CommunityRetrieveMembersResponse::User] + } + + class CommunityRetrieveMembersResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor has_next_page: bool + + attr_accessor next_cursor: String + + attr_accessor users: ::Array[XTwitterScraper::Models::X::CommunityRetrieveMembersResponse::User] + + def initialize: ( + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::CommunityRetrieveMembersResponse::User] + ) -> void + + def to_hash: -> { + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::CommunityRetrieveMembersResponse::User] + } + + type user = + { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: bool + } + + class User < XTwitterScraper::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String + + attr_accessor username: String + + attr_reader created_at: String? + + def created_at=: (String) -> String + + attr_reader description: String? + + def description=: (String) -> String + + attr_reader followers: Integer? + + def followers=: (Integer) -> Integer + + attr_reader following: Integer? + + def following=: (Integer) -> Integer + + attr_reader location: String? + + def location=: (String) -> String + + attr_reader profile_picture: String? + + def profile_picture=: (String) -> String + + attr_reader statuses_count: Integer? + + def statuses_count=: (Integer) -> Integer + + attr_reader verified: bool? + + def verified=: (bool) -> bool + + def initialize: ( + id: String, + name: String, + username: String, + ?created_at: String, + ?description: String, + ?followers: Integer, + ?following: Integer, + ?location: String, + ?profile_picture: String, + ?statuses_count: Integer, + ?verified: bool + ) -> void + + def to_hash: -> { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: bool + } + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/community_retrieve_moderators_response.rbs b/sig/x_twitter_scraper/models/x/community_retrieve_moderators_response.rbs new file mode 100644 index 0000000..fe0468e --- /dev/null +++ b/sig/x_twitter_scraper/models/x/community_retrieve_moderators_response.rbs @@ -0,0 +1,115 @@ +module XTwitterScraper + module Models + module X + type community_retrieve_moderators_response = + { + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse::User] + } + + class CommunityRetrieveModeratorsResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor has_next_page: bool + + attr_accessor next_cursor: String + + attr_accessor users: ::Array[XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse::User] + + def initialize: ( + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse::User] + ) -> void + + def to_hash: -> { + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse::User] + } + + type user = + { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: bool + } + + class User < XTwitterScraper::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String + + attr_accessor username: String + + attr_reader created_at: String? + + def created_at=: (String) -> String + + attr_reader description: String? + + def description=: (String) -> String + + attr_reader followers: Integer? + + def followers=: (Integer) -> Integer + + attr_reader following: Integer? + + def following=: (Integer) -> Integer + + attr_reader location: String? + + def location=: (String) -> String + + attr_reader profile_picture: String? + + def profile_picture=: (String) -> String + + attr_reader statuses_count: Integer? + + def statuses_count=: (Integer) -> Integer + + attr_reader verified: bool? + + def verified=: (bool) -> bool + + def initialize: ( + id: String, + name: String, + username: String, + ?created_at: String, + ?description: String, + ?followers: Integer, + ?following: Integer, + ?location: String, + ?profile_picture: String, + ?statuses_count: Integer, + ?verified: bool + ) -> void + + def to_hash: -> { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: bool + } + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/community_retrieve_search_response.rbs b/sig/x_twitter_scraper/models/x/community_retrieve_search_response.rbs new file mode 100644 index 0000000..2e77ec4 --- /dev/null +++ b/sig/x_twitter_scraper/models/x/community_retrieve_search_response.rbs @@ -0,0 +1,148 @@ +module XTwitterScraper + module Models + module X + type community_retrieve_search_response = + { + has_next_page: bool, + next_cursor: String, + tweets: ::Array[XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet] + } + + class CommunityRetrieveSearchResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor has_next_page: bool + + attr_accessor next_cursor: String + + attr_accessor tweets: ::Array[XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet] + + def initialize: ( + has_next_page: bool, + next_cursor: String, + tweets: ::Array[XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet] + ) -> void + + def to_hash: -> { + has_next_page: bool, + next_cursor: String, + tweets: ::Array[XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet] + } + + type tweet = + { + id: String, + text: String, + author: XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author, + bookmark_count: Integer, + created_at: String, + is_note_tweet: bool, + like_count: Integer, + quote_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + } + + class Tweet < XTwitterScraper::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor text: String + + attr_reader author: XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author? + + def author=: ( + XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author + ) -> XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author + + attr_reader bookmark_count: Integer? + + def bookmark_count=: (Integer) -> Integer + + attr_reader created_at: String? + + def created_at=: (String) -> String + + attr_reader is_note_tweet: bool? + + def is_note_tweet=: (bool) -> bool + + attr_reader like_count: Integer? + + def like_count=: (Integer) -> Integer + + attr_reader quote_count: Integer? + + def quote_count=: (Integer) -> Integer + + attr_reader reply_count: Integer? + + def reply_count=: (Integer) -> Integer + + attr_reader retweet_count: Integer? + + def retweet_count=: (Integer) -> Integer + + attr_reader view_count: Integer? + + def view_count=: (Integer) -> Integer + + def initialize: ( + id: String, + text: String, + ?author: XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author, + ?bookmark_count: Integer, + ?created_at: String, + ?is_note_tweet: bool, + ?like_count: Integer, + ?quote_count: Integer, + ?reply_count: Integer, + ?retweet_count: Integer, + ?view_count: Integer + ) -> void + + def to_hash: -> { + id: String, + text: String, + author: XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author, + bookmark_count: Integer, + created_at: String, + is_note_tweet: bool, + like_count: Integer, + quote_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + } + + type author = + { id: String, name: String, username: String, verified: bool } + + class Author < XTwitterScraper::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String + + attr_accessor username: String + + attr_reader verified: bool? + + def verified=: (bool) -> bool + + def initialize: ( + id: String, + name: String, + username: String, + ?verified: bool + ) -> void + + def to_hash: -> { + id: String, + name: String, + username: String, + verified: bool + } + end + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/list_retrieve_followers_response.rbs b/sig/x_twitter_scraper/models/x/list_retrieve_followers_response.rbs new file mode 100644 index 0000000..3f6dd28 --- /dev/null +++ b/sig/x_twitter_scraper/models/x/list_retrieve_followers_response.rbs @@ -0,0 +1,115 @@ +module XTwitterScraper + module Models + module X + type list_retrieve_followers_response = + { + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::ListRetrieveFollowersResponse::User] + } + + class ListRetrieveFollowersResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor has_next_page: bool + + attr_accessor next_cursor: String + + attr_accessor users: ::Array[XTwitterScraper::Models::X::ListRetrieveFollowersResponse::User] + + def initialize: ( + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::ListRetrieveFollowersResponse::User] + ) -> void + + def to_hash: -> { + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::ListRetrieveFollowersResponse::User] + } + + type user = + { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: bool + } + + class User < XTwitterScraper::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String + + attr_accessor username: String + + attr_reader created_at: String? + + def created_at=: (String) -> String + + attr_reader description: String? + + def description=: (String) -> String + + attr_reader followers: Integer? + + def followers=: (Integer) -> Integer + + attr_reader following: Integer? + + def following=: (Integer) -> Integer + + attr_reader location: String? + + def location=: (String) -> String + + attr_reader profile_picture: String? + + def profile_picture=: (String) -> String + + attr_reader statuses_count: Integer? + + def statuses_count=: (Integer) -> Integer + + attr_reader verified: bool? + + def verified=: (bool) -> bool + + def initialize: ( + id: String, + name: String, + username: String, + ?created_at: String, + ?description: String, + ?followers: Integer, + ?following: Integer, + ?location: String, + ?profile_picture: String, + ?statuses_count: Integer, + ?verified: bool + ) -> void + + def to_hash: -> { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: bool + } + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/list_retrieve_members_response.rbs b/sig/x_twitter_scraper/models/x/list_retrieve_members_response.rbs new file mode 100644 index 0000000..bf339a0 --- /dev/null +++ b/sig/x_twitter_scraper/models/x/list_retrieve_members_response.rbs @@ -0,0 +1,115 @@ +module XTwitterScraper + module Models + module X + type list_retrieve_members_response = + { + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::ListRetrieveMembersResponse::User] + } + + class ListRetrieveMembersResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor has_next_page: bool + + attr_accessor next_cursor: String + + attr_accessor users: ::Array[XTwitterScraper::Models::X::ListRetrieveMembersResponse::User] + + def initialize: ( + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::ListRetrieveMembersResponse::User] + ) -> void + + def to_hash: -> { + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::ListRetrieveMembersResponse::User] + } + + type user = + { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: bool + } + + class User < XTwitterScraper::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String + + attr_accessor username: String + + attr_reader created_at: String? + + def created_at=: (String) -> String + + attr_reader description: String? + + def description=: (String) -> String + + attr_reader followers: Integer? + + def followers=: (Integer) -> Integer + + attr_reader following: Integer? + + def following=: (Integer) -> Integer + + attr_reader location: String? + + def location=: (String) -> String + + attr_reader profile_picture: String? + + def profile_picture=: (String) -> String + + attr_reader statuses_count: Integer? + + def statuses_count=: (Integer) -> Integer + + attr_reader verified: bool? + + def verified=: (bool) -> bool + + def initialize: ( + id: String, + name: String, + username: String, + ?created_at: String, + ?description: String, + ?followers: Integer, + ?following: Integer, + ?location: String, + ?profile_picture: String, + ?statuses_count: Integer, + ?verified: bool + ) -> void + + def to_hash: -> { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: bool + } + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/list_retrieve_tweets_response.rbs b/sig/x_twitter_scraper/models/x/list_retrieve_tweets_response.rbs new file mode 100644 index 0000000..d7eec1a --- /dev/null +++ b/sig/x_twitter_scraper/models/x/list_retrieve_tweets_response.rbs @@ -0,0 +1,148 @@ +module XTwitterScraper + module Models + module X + type list_retrieve_tweets_response = + { + has_next_page: bool, + next_cursor: String, + tweets: ::Array[XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet] + } + + class ListRetrieveTweetsResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor has_next_page: bool + + attr_accessor next_cursor: String + + attr_accessor tweets: ::Array[XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet] + + def initialize: ( + has_next_page: bool, + next_cursor: String, + tweets: ::Array[XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet] + ) -> void + + def to_hash: -> { + has_next_page: bool, + next_cursor: String, + tweets: ::Array[XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet] + } + + type tweet = + { + id: String, + text: String, + author: XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author, + bookmark_count: Integer, + created_at: String, + is_note_tweet: bool, + like_count: Integer, + quote_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + } + + class Tweet < XTwitterScraper::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor text: String + + attr_reader author: XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author? + + def author=: ( + XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author + ) -> XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author + + attr_reader bookmark_count: Integer? + + def bookmark_count=: (Integer) -> Integer + + attr_reader created_at: String? + + def created_at=: (String) -> String + + attr_reader is_note_tweet: bool? + + def is_note_tweet=: (bool) -> bool + + attr_reader like_count: Integer? + + def like_count=: (Integer) -> Integer + + attr_reader quote_count: Integer? + + def quote_count=: (Integer) -> Integer + + attr_reader reply_count: Integer? + + def reply_count=: (Integer) -> Integer + + attr_reader retweet_count: Integer? + + def retweet_count=: (Integer) -> Integer + + attr_reader view_count: Integer? + + def view_count=: (Integer) -> Integer + + def initialize: ( + id: String, + text: String, + ?author: XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author, + ?bookmark_count: Integer, + ?created_at: String, + ?is_note_tweet: bool, + ?like_count: Integer, + ?quote_count: Integer, + ?reply_count: Integer, + ?retweet_count: Integer, + ?view_count: Integer + ) -> void + + def to_hash: -> { + id: String, + text: String, + author: XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author, + bookmark_count: Integer, + created_at: String, + is_note_tweet: bool, + like_count: Integer, + quote_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + } + + type author = + { id: String, name: String, username: String, verified: bool } + + class Author < XTwitterScraper::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String + + attr_accessor username: String + + attr_reader verified: bool? + + def verified=: (bool) -> bool + + def initialize: ( + id: String, + name: String, + username: String, + ?verified: bool + ) -> void + + def to_hash: -> { + id: String, + name: String, + username: String, + verified: bool + } + end + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/tweet_detail.rbs b/sig/x_twitter_scraper/models/x/tweet_detail.rbs index 3f6d7e9..88ce009 100644 --- a/sig/x_twitter_scraper/models/x/tweet_detail.rbs +++ b/sig/x_twitter_scraper/models/x/tweet_detail.rbs @@ -13,12 +13,12 @@ module XTwitterScraper view_count: Integer, conversation_id: String, created_at: String, - entities: top, + entities: ::Hash[Symbol, top], is_note_tweet: bool, is_quote_status: bool, is_reply: bool, media: ::Array[XTwitterScraper::X::TweetDetail::Media], - quoted_tweet: top, + quoted_tweet: ::Hash[Symbol, top], source: String } @@ -47,9 +47,9 @@ module XTwitterScraper def created_at=: (String) -> String - attr_reader entities: top? + attr_reader entities: ::Hash[Symbol, top]? - def entities=: (top) -> top + def entities=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top] attr_reader is_note_tweet: bool? @@ -69,9 +69,9 @@ module XTwitterScraper ::Array[XTwitterScraper::X::TweetDetail::Media] ) -> ::Array[XTwitterScraper::X::TweetDetail::Media] - attr_reader quoted_tweet: top? + attr_reader quoted_tweet: ::Hash[Symbol, top]? - def quoted_tweet=: (top) -> top + def quoted_tweet=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top] attr_reader source: String? @@ -88,12 +88,12 @@ module XTwitterScraper view_count: Integer, ?conversation_id: String, ?created_at: String, - ?entities: top, + ?entities: ::Hash[Symbol, top], ?is_note_tweet: bool, ?is_quote_status: bool, ?is_reply: bool, ?media: ::Array[XTwitterScraper::X::TweetDetail::Media], - ?quoted_tweet: top, + ?quoted_tweet: ::Hash[Symbol, top], ?source: String ) -> void @@ -108,12 +108,12 @@ module XTwitterScraper view_count: Integer, conversation_id: String, created_at: String, - entities: top, + entities: ::Hash[Symbol, top], is_note_tweet: bool, is_quote_status: bool, is_reply: bool, media: ::Array[XTwitterScraper::X::TweetDetail::Media], - quoted_tweet: top, + quoted_tweet: ::Hash[Symbol, top], source: String } diff --git a/sig/x_twitter_scraper/models/x/tweet_list_response.rbs b/sig/x_twitter_scraper/models/x/tweet_list_response.rbs new file mode 100644 index 0000000..1b0c49f --- /dev/null +++ b/sig/x_twitter_scraper/models/x/tweet_list_response.rbs @@ -0,0 +1,148 @@ +module XTwitterScraper + module Models + module X + type tweet_list_response = + { + has_next_page: bool, + next_cursor: String, + tweets: ::Array[XTwitterScraper::Models::X::TweetListResponse::Tweet] + } + + class TweetListResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor has_next_page: bool + + attr_accessor next_cursor: String + + attr_accessor tweets: ::Array[XTwitterScraper::Models::X::TweetListResponse::Tweet] + + def initialize: ( + has_next_page: bool, + next_cursor: String, + tweets: ::Array[XTwitterScraper::Models::X::TweetListResponse::Tweet] + ) -> void + + def to_hash: -> { + has_next_page: bool, + next_cursor: String, + tweets: ::Array[XTwitterScraper::Models::X::TweetListResponse::Tweet] + } + + type tweet = + { + id: String, + text: String, + author: XTwitterScraper::Models::X::TweetListResponse::Tweet::Author, + bookmark_count: Integer, + created_at: String, + is_note_tweet: bool, + like_count: Integer, + quote_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + } + + class Tweet < XTwitterScraper::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor text: String + + attr_reader author: XTwitterScraper::Models::X::TweetListResponse::Tweet::Author? + + def author=: ( + XTwitterScraper::Models::X::TweetListResponse::Tweet::Author + ) -> XTwitterScraper::Models::X::TweetListResponse::Tweet::Author + + attr_reader bookmark_count: Integer? + + def bookmark_count=: (Integer) -> Integer + + attr_reader created_at: String? + + def created_at=: (String) -> String + + attr_reader is_note_tweet: bool? + + def is_note_tweet=: (bool) -> bool + + attr_reader like_count: Integer? + + def like_count=: (Integer) -> Integer + + attr_reader quote_count: Integer? + + def quote_count=: (Integer) -> Integer + + attr_reader reply_count: Integer? + + def reply_count=: (Integer) -> Integer + + attr_reader retweet_count: Integer? + + def retweet_count=: (Integer) -> Integer + + attr_reader view_count: Integer? + + def view_count=: (Integer) -> Integer + + def initialize: ( + id: String, + text: String, + ?author: XTwitterScraper::Models::X::TweetListResponse::Tweet::Author, + ?bookmark_count: Integer, + ?created_at: String, + ?is_note_tweet: bool, + ?like_count: Integer, + ?quote_count: Integer, + ?reply_count: Integer, + ?retweet_count: Integer, + ?view_count: Integer + ) -> void + + def to_hash: -> { + id: String, + text: String, + author: XTwitterScraper::Models::X::TweetListResponse::Tweet::Author, + bookmark_count: Integer, + created_at: String, + is_note_tweet: bool, + like_count: Integer, + quote_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + } + + type author = + { id: String, name: String, username: String, verified: bool } + + class Author < XTwitterScraper::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String + + attr_accessor username: String + + attr_reader verified: bool? + + def verified=: (bool) -> bool + + def initialize: ( + id: String, + name: String, + username: String, + ?verified: bool + ) -> void + + def to_hash: -> { + id: String, + name: String, + username: String, + verified: bool + } + end + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/user_retrieve_batch_response.rbs b/sig/x_twitter_scraper/models/x/user_retrieve_batch_response.rbs new file mode 100644 index 0000000..fde5aa7 --- /dev/null +++ b/sig/x_twitter_scraper/models/x/user_retrieve_batch_response.rbs @@ -0,0 +1,115 @@ +module XTwitterScraper + module Models + module X + type user_retrieve_batch_response = + { + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::UserRetrieveBatchResponse::User] + } + + class UserRetrieveBatchResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor has_next_page: bool + + attr_accessor next_cursor: String + + attr_accessor users: ::Array[XTwitterScraper::Models::X::UserRetrieveBatchResponse::User] + + def initialize: ( + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::UserRetrieveBatchResponse::User] + ) -> void + + def to_hash: -> { + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::UserRetrieveBatchResponse::User] + } + + type user = + { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: bool + } + + class User < XTwitterScraper::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String + + attr_accessor username: String + + attr_reader created_at: String? + + def created_at=: (String) -> String + + attr_reader description: String? + + def description=: (String) -> String + + attr_reader followers: Integer? + + def followers=: (Integer) -> Integer + + attr_reader following: Integer? + + def following=: (Integer) -> Integer + + attr_reader location: String? + + def location=: (String) -> String + + attr_reader profile_picture: String? + + def profile_picture=: (String) -> String + + attr_reader statuses_count: Integer? + + def statuses_count=: (Integer) -> Integer + + attr_reader verified: bool? + + def verified=: (bool) -> bool + + def initialize: ( + id: String, + name: String, + username: String, + ?created_at: String, + ?description: String, + ?followers: Integer, + ?following: Integer, + ?location: String, + ?profile_picture: String, + ?statuses_count: Integer, + ?verified: bool + ) -> void + + def to_hash: -> { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: bool + } + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/user_retrieve_followers_response.rbs b/sig/x_twitter_scraper/models/x/user_retrieve_followers_response.rbs new file mode 100644 index 0000000..e4dc0c2 --- /dev/null +++ b/sig/x_twitter_scraper/models/x/user_retrieve_followers_response.rbs @@ -0,0 +1,115 @@ +module XTwitterScraper + module Models + module X + type user_retrieve_followers_response = + { + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::UserRetrieveFollowersResponse::User] + } + + class UserRetrieveFollowersResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor has_next_page: bool + + attr_accessor next_cursor: String + + attr_accessor users: ::Array[XTwitterScraper::Models::X::UserRetrieveFollowersResponse::User] + + def initialize: ( + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::UserRetrieveFollowersResponse::User] + ) -> void + + def to_hash: -> { + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::UserRetrieveFollowersResponse::User] + } + + type user = + { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: bool + } + + class User < XTwitterScraper::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String + + attr_accessor username: String + + attr_reader created_at: String? + + def created_at=: (String) -> String + + attr_reader description: String? + + def description=: (String) -> String + + attr_reader followers: Integer? + + def followers=: (Integer) -> Integer + + attr_reader following: Integer? + + def following=: (Integer) -> Integer + + attr_reader location: String? + + def location=: (String) -> String + + attr_reader profile_picture: String? + + def profile_picture=: (String) -> String + + attr_reader statuses_count: Integer? + + def statuses_count=: (Integer) -> Integer + + attr_reader verified: bool? + + def verified=: (bool) -> bool + + def initialize: ( + id: String, + name: String, + username: String, + ?created_at: String, + ?description: String, + ?followers: Integer, + ?following: Integer, + ?location: String, + ?profile_picture: String, + ?statuses_count: Integer, + ?verified: bool + ) -> void + + def to_hash: -> { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: bool + } + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/user_retrieve_following_response.rbs b/sig/x_twitter_scraper/models/x/user_retrieve_following_response.rbs new file mode 100644 index 0000000..1d0ea0e --- /dev/null +++ b/sig/x_twitter_scraper/models/x/user_retrieve_following_response.rbs @@ -0,0 +1,115 @@ +module XTwitterScraper + module Models + module X + type user_retrieve_following_response = + { + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::UserRetrieveFollowingResponse::User] + } + + class UserRetrieveFollowingResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor has_next_page: bool + + attr_accessor next_cursor: String + + attr_accessor users: ::Array[XTwitterScraper::Models::X::UserRetrieveFollowingResponse::User] + + def initialize: ( + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::UserRetrieveFollowingResponse::User] + ) -> void + + def to_hash: -> { + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::UserRetrieveFollowingResponse::User] + } + + type user = + { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: bool + } + + class User < XTwitterScraper::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String + + attr_accessor username: String + + attr_reader created_at: String? + + def created_at=: (String) -> String + + attr_reader description: String? + + def description=: (String) -> String + + attr_reader followers: Integer? + + def followers=: (Integer) -> Integer + + attr_reader following: Integer? + + def following=: (Integer) -> Integer + + attr_reader location: String? + + def location=: (String) -> String + + attr_reader profile_picture: String? + + def profile_picture=: (String) -> String + + attr_reader statuses_count: Integer? + + def statuses_count=: (Integer) -> Integer + + attr_reader verified: bool? + + def verified=: (bool) -> bool + + def initialize: ( + id: String, + name: String, + username: String, + ?created_at: String, + ?description: String, + ?followers: Integer, + ?following: Integer, + ?location: String, + ?profile_picture: String, + ?statuses_count: Integer, + ?verified: bool + ) -> void + + def to_hash: -> { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: bool + } + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/user_retrieve_mentions_response.rbs b/sig/x_twitter_scraper/models/x/user_retrieve_mentions_response.rbs new file mode 100644 index 0000000..35b90bb --- /dev/null +++ b/sig/x_twitter_scraper/models/x/user_retrieve_mentions_response.rbs @@ -0,0 +1,148 @@ +module XTwitterScraper + module Models + module X + type user_retrieve_mentions_response = + { + has_next_page: bool, + next_cursor: String, + tweets: ::Array[XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet] + } + + class UserRetrieveMentionsResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor has_next_page: bool + + attr_accessor next_cursor: String + + attr_accessor tweets: ::Array[XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet] + + def initialize: ( + has_next_page: bool, + next_cursor: String, + tweets: ::Array[XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet] + ) -> void + + def to_hash: -> { + has_next_page: bool, + next_cursor: String, + tweets: ::Array[XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet] + } + + type tweet = + { + id: String, + text: String, + author: XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author, + bookmark_count: Integer, + created_at: String, + is_note_tweet: bool, + like_count: Integer, + quote_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + } + + class Tweet < XTwitterScraper::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor text: String + + attr_reader author: XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author? + + def author=: ( + XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author + ) -> XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author + + attr_reader bookmark_count: Integer? + + def bookmark_count=: (Integer) -> Integer + + attr_reader created_at: String? + + def created_at=: (String) -> String + + attr_reader is_note_tweet: bool? + + def is_note_tweet=: (bool) -> bool + + attr_reader like_count: Integer? + + def like_count=: (Integer) -> Integer + + attr_reader quote_count: Integer? + + def quote_count=: (Integer) -> Integer + + attr_reader reply_count: Integer? + + def reply_count=: (Integer) -> Integer + + attr_reader retweet_count: Integer? + + def retweet_count=: (Integer) -> Integer + + attr_reader view_count: Integer? + + def view_count=: (Integer) -> Integer + + def initialize: ( + id: String, + text: String, + ?author: XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author, + ?bookmark_count: Integer, + ?created_at: String, + ?is_note_tweet: bool, + ?like_count: Integer, + ?quote_count: Integer, + ?reply_count: Integer, + ?retweet_count: Integer, + ?view_count: Integer + ) -> void + + def to_hash: -> { + id: String, + text: String, + author: XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author, + bookmark_count: Integer, + created_at: String, + is_note_tweet: bool, + like_count: Integer, + quote_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + } + + type author = + { id: String, name: String, username: String, verified: bool } + + class Author < XTwitterScraper::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String + + attr_accessor username: String + + attr_reader verified: bool? + + def verified=: (bool) -> bool + + def initialize: ( + id: String, + name: String, + username: String, + ?verified: bool + ) -> void + + def to_hash: -> { + id: String, + name: String, + username: String, + verified: bool + } + end + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/user_retrieve_search_response.rbs b/sig/x_twitter_scraper/models/x/user_retrieve_search_response.rbs new file mode 100644 index 0000000..ca01e88 --- /dev/null +++ b/sig/x_twitter_scraper/models/x/user_retrieve_search_response.rbs @@ -0,0 +1,115 @@ +module XTwitterScraper + module Models + module X + type user_retrieve_search_response = + { + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::UserRetrieveSearchResponse::User] + } + + class UserRetrieveSearchResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor has_next_page: bool + + attr_accessor next_cursor: String + + attr_accessor users: ::Array[XTwitterScraper::Models::X::UserRetrieveSearchResponse::User] + + def initialize: ( + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::UserRetrieveSearchResponse::User] + ) -> void + + def to_hash: -> { + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::UserRetrieveSearchResponse::User] + } + + type user = + { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: bool + } + + class User < XTwitterScraper::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String + + attr_accessor username: String + + attr_reader created_at: String? + + def created_at=: (String) -> String + + attr_reader description: String? + + def description=: (String) -> String + + attr_reader followers: Integer? + + def followers=: (Integer) -> Integer + + attr_reader following: Integer? + + def following=: (Integer) -> Integer + + attr_reader location: String? + + def location=: (String) -> String + + attr_reader profile_picture: String? + + def profile_picture=: (String) -> String + + attr_reader statuses_count: Integer? + + def statuses_count=: (Integer) -> Integer + + attr_reader verified: bool? + + def verified=: (bool) -> bool + + def initialize: ( + id: String, + name: String, + username: String, + ?created_at: String, + ?description: String, + ?followers: Integer, + ?following: Integer, + ?location: String, + ?profile_picture: String, + ?statuses_count: Integer, + ?verified: bool + ) -> void + + def to_hash: -> { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: bool + } + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rbs b/sig/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rbs new file mode 100644 index 0000000..f6d6854 --- /dev/null +++ b/sig/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rbs @@ -0,0 +1,115 @@ +module XTwitterScraper + module Models + module X + type user_retrieve_verified_followers_response = + { + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse::User] + } + + class UserRetrieveVerifiedFollowersResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor has_next_page: bool + + attr_accessor next_cursor: String + + attr_accessor users: ::Array[XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse::User] + + def initialize: ( + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse::User] + ) -> void + + def to_hash: -> { + has_next_page: bool, + next_cursor: String, + users: ::Array[XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse::User] + } + + type user = + { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: bool + } + + class User < XTwitterScraper::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String + + attr_accessor username: String + + attr_reader created_at: String? + + def created_at=: (String) -> String + + attr_reader description: String? + + def description=: (String) -> String + + attr_reader followers: Integer? + + def followers=: (Integer) -> Integer + + attr_reader following: Integer? + + def following=: (Integer) -> Integer + + attr_reader location: String? + + def location=: (String) -> String + + attr_reader profile_picture: String? + + def profile_picture=: (String) -> String + + attr_reader statuses_count: Integer? + + def statuses_count=: (Integer) -> Integer + + attr_reader verified: bool? + + def verified=: (bool) -> bool + + def initialize: ( + id: String, + name: String, + username: String, + ?created_at: String, + ?description: String, + ?followers: Integer, + ?following: Integer, + ?location: String, + ?profile_picture: String, + ?statuses_count: Integer, + ?verified: bool + ) -> void + + def to_hash: -> { + id: String, + name: String, + username: String, + created_at: String, + description: String, + followers: Integer, + following: Integer, + location: String, + profile_picture: String, + statuses_count: Integer, + verified: bool + } + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x_get_trends_response.rbs b/sig/x_twitter_scraper/models/x_get_trends_response.rbs new file mode 100644 index 0000000..81c4e3e --- /dev/null +++ b/sig/x_twitter_scraper/models/x_get_trends_response.rbs @@ -0,0 +1,63 @@ +module XTwitterScraper + module Models + type x_get_trends_response = + { + count: Integer, + trends: ::Array[XTwitterScraper::Models::XGetTrendsResponse::Trend], + woeid: Integer + } + + class XGetTrendsResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor count: Integer + + attr_accessor trends: ::Array[XTwitterScraper::Models::XGetTrendsResponse::Trend] + + attr_accessor woeid: Integer + + def initialize: ( + count: Integer, + trends: ::Array[XTwitterScraper::Models::XGetTrendsResponse::Trend], + woeid: Integer + ) -> void + + def to_hash: -> { + count: Integer, + trends: ::Array[XTwitterScraper::Models::XGetTrendsResponse::Trend], + woeid: Integer + } + + type trend = + { name: String, description: String, query: String, rank: Integer } + + class Trend < XTwitterScraper::Internal::Type::BaseModel + attr_accessor name: String + + attr_reader description: String? + + def description=: (String) -> String + + attr_reader query: String? + + def query=: (String) -> String + + attr_reader rank: Integer? + + def rank=: (Integer) -> Integer + + def initialize: ( + name: String, + ?description: String, + ?query: String, + ?rank: Integer + ) -> void + + def to_hash: -> { + name: String, + description: String, + query: String, + rank: Integer + } + end + end + end +end diff --git a/sig/x_twitter_scraper/resources/x.rbs b/sig/x_twitter_scraper/resources/x.rbs index 36f93bc..8cc31ed 100644 --- a/sig/x_twitter_scraper/resources/x.rbs +++ b/sig/x_twitter_scraper/resources/x.rbs @@ -38,7 +38,9 @@ module XTwitterScraper ?request_options: XTwitterScraper::request_opts ) -> XTwitterScraper::Models::XGetNotificationsResponse - def get_trends: (?request_options: XTwitterScraper::request_opts) -> nil + def get_trends: ( + ?request_options: XTwitterScraper::request_opts + ) -> XTwitterScraper::Models::XGetTrendsResponse def initialize: (client: XTwitterScraper::Client) -> void end diff --git a/sig/x_twitter_scraper/resources/x/communities.rbs b/sig/x_twitter_scraper/resources/x/communities.rbs index f7026af..dcb90e8 100644 --- a/sig/x_twitter_scraper/resources/x/communities.rbs +++ b/sig/x_twitter_scraper/resources/x/communities.rbs @@ -29,20 +29,20 @@ module XTwitterScraper String id, ?cursor: String, ?request_options: XTwitterScraper::request_opts - ) -> nil + ) -> XTwitterScraper::Models::X::CommunityRetrieveMembersResponse def retrieve_moderators: ( String id, ?cursor: String, ?request_options: XTwitterScraper::request_opts - ) -> nil + ) -> XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse def retrieve_search: ( q: String, ?cursor: String, ?query_type: String, ?request_options: XTwitterScraper::request_opts - ) -> nil + ) -> XTwitterScraper::Models::X::CommunityRetrieveSearchResponse def initialize: (client: XTwitterScraper::Client) -> void end diff --git a/sig/x_twitter_scraper/resources/x/communities/tweets.rbs b/sig/x_twitter_scraper/resources/x/communities/tweets.rbs index 1375db9..5a68ef3 100644 --- a/sig/x_twitter_scraper/resources/x/communities/tweets.rbs +++ b/sig/x_twitter_scraper/resources/x/communities/tweets.rbs @@ -8,7 +8,7 @@ module XTwitterScraper ?cursor: String, ?query_type: String, ?request_options: XTwitterScraper::request_opts - ) -> nil + ) -> XTwitterScraper::Models::X::Communities::TweetListResponse def initialize: (client: XTwitterScraper::Client) -> void end diff --git a/sig/x_twitter_scraper/resources/x/lists.rbs b/sig/x_twitter_scraper/resources/x/lists.rbs index e69e37a..045212c 100644 --- a/sig/x_twitter_scraper/resources/x/lists.rbs +++ b/sig/x_twitter_scraper/resources/x/lists.rbs @@ -6,13 +6,13 @@ module XTwitterScraper String id, ?cursor: String, ?request_options: XTwitterScraper::request_opts - ) -> nil + ) -> XTwitterScraper::Models::X::ListRetrieveFollowersResponse def retrieve_members: ( String id, ?cursor: String, ?request_options: XTwitterScraper::request_opts - ) -> nil + ) -> XTwitterScraper::Models::X::ListRetrieveMembersResponse def retrieve_tweets: ( String id, @@ -21,7 +21,7 @@ module XTwitterScraper ?since_time: String, ?until_time: String, ?request_options: XTwitterScraper::request_opts - ) -> nil + ) -> XTwitterScraper::Models::X::ListRetrieveTweetsResponse def initialize: (client: XTwitterScraper::Client) -> void end diff --git a/sig/x_twitter_scraper/resources/x/tweets.rbs b/sig/x_twitter_scraper/resources/x/tweets.rbs index a1dab3c..9667b9a 100644 --- a/sig/x_twitter_scraper/resources/x/tweets.rbs +++ b/sig/x_twitter_scraper/resources/x/tweets.rbs @@ -20,7 +20,7 @@ module XTwitterScraper def list: ( ids: String, ?request_options: XTwitterScraper::request_opts - ) -> nil + ) -> XTwitterScraper::Models::X::TweetListResponse def get_favoriters: ( String id, diff --git a/sig/x_twitter_scraper/resources/x/users.rbs b/sig/x_twitter_scraper/resources/x/users.rbs index 489a079..65b8f2c 100644 --- a/sig/x_twitter_scraper/resources/x/users.rbs +++ b/sig/x_twitter_scraper/resources/x/users.rbs @@ -7,14 +7,14 @@ module XTwitterScraper def retrieve_batch: ( ids: String, ?request_options: XTwitterScraper::request_opts - ) -> nil + ) -> XTwitterScraper::Models::X::UserRetrieveBatchResponse def retrieve_followers: ( String id, ?cursor: String, ?page_size: Integer, ?request_options: XTwitterScraper::request_opts - ) -> nil + ) -> XTwitterScraper::Models::X::UserRetrieveFollowersResponse def retrieve_followers_you_know: ( String id, @@ -27,7 +27,7 @@ module XTwitterScraper ?cursor: String, ?page_size: Integer, ?request_options: XTwitterScraper::request_opts - ) -> nil + ) -> XTwitterScraper::Models::X::UserRetrieveFollowingResponse def retrieve_likes: ( String id, @@ -47,13 +47,13 @@ module XTwitterScraper ?since_time: String, ?until_time: String, ?request_options: XTwitterScraper::request_opts - ) -> nil + ) -> XTwitterScraper::Models::X::UserRetrieveMentionsResponse def retrieve_search: ( q: String, ?cursor: String, ?request_options: XTwitterScraper::request_opts - ) -> nil + ) -> XTwitterScraper::Models::X::UserRetrieveSearchResponse def retrieve_tweets: ( String id, @@ -67,7 +67,7 @@ module XTwitterScraper String id, ?cursor: String, ?request_options: XTwitterScraper::request_opts - ) -> nil + ) -> XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse def initialize: (client: XTwitterScraper::Client) -> void end diff --git a/test/x_twitter_scraper/resources/account_test.rb b/test/x_twitter_scraper/resources/account_test.rb index fdf8404..b0fda96 100644 --- a/test/x_twitter_scraper/resources/account_test.rb +++ b/test/x_twitter_scraper/resources/account_test.rb @@ -25,7 +25,7 @@ def test_retrieve def test_set_x_username_required_params skip("Mock server tests are disabled") - response = @x_twitter_scraper.account.set_x_username(username: "username") + response = @x_twitter_scraper.account.set_x_username(username: "elonmusk") assert_pattern do response => XTwitterScraper::Models::AccountSetXUsernameResponse diff --git a/test/x_twitter_scraper/resources/credits_test.rb b/test/x_twitter_scraper/resources/credits_test.rb index 14a755c..fc09e8f 100644 --- a/test/x_twitter_scraper/resources/credits_test.rb +++ b/test/x_twitter_scraper/resources/credits_test.rb @@ -25,7 +25,7 @@ def test_retrieve_balance def test_topup_balance_required_params skip("Mock server tests are disabled") - response = @x_twitter_scraper.credits.topup_balance(amount: 0) + response = @x_twitter_scraper.credits.topup_balance(amount: 10_000) assert_pattern do response => XTwitterScraper::Models::CreditTopupBalanceResponse diff --git a/test/x_twitter_scraper/resources/drafts_test.rb b/test/x_twitter_scraper/resources/drafts_test.rb index 461dfd9..73821b5 100644 --- a/test/x_twitter_scraper/resources/drafts_test.rb +++ b/test/x_twitter_scraper/resources/drafts_test.rb @@ -6,7 +6,7 @@ class XTwitterScraper::Test::Resources::DraftsTest < XTwitterScraper::Test::Reso def test_create_required_params skip("Mock server tests are disabled") - response = @x_twitter_scraper.drafts.create(text: "text") + response = @x_twitter_scraper.drafts.create(text: "AI is the future of productivity") assert_pattern do response => XTwitterScraper::Models::DraftCreateResponse diff --git a/test/x_twitter_scraper/resources/draws_test.rb b/test/x_twitter_scraper/resources/draws_test.rb index 4822508..a5c81fa 100644 --- a/test/x_twitter_scraper/resources/draws_test.rb +++ b/test/x_twitter_scraper/resources/draws_test.rb @@ -51,7 +51,7 @@ def test_export def test_run_required_params skip("Mock server tests are disabled") - response = @x_twitter_scraper.draws.run(tweet_url: "https://example.com") + response = @x_twitter_scraper.draws.run(tweet_url: "https://x.com/elonmusk/status/1234567890") assert_pattern do response => XTwitterScraper::Models::DrawRunResponse diff --git a/test/x_twitter_scraper/resources/extractions_test.rb b/test/x_twitter_scraper/resources/extractions_test.rb index 896568f..32ba91b 100644 --- a/test/x_twitter_scraper/resources/extractions_test.rb +++ b/test/x_twitter_scraper/resources/extractions_test.rb @@ -43,7 +43,7 @@ def test_list def test_estimate_cost_required_params skip("Mock server tests are disabled") - response = @x_twitter_scraper.extractions.estimate_cost(tool_type: :article_extractor) + response = @x_twitter_scraper.extractions.estimate_cost(tool_type: :follower_explorer) assert_pattern do response => XTwitterScraper::Models::ExtractionEstimateCostResponse @@ -73,7 +73,7 @@ def test_export_results def test_run_required_params skip("Mock server tests are disabled") - response = @x_twitter_scraper.extractions.run(tool_type: :article_extractor) + response = @x_twitter_scraper.extractions.run(tool_type: :follower_explorer) assert_pattern do response => XTwitterScraper::Models::ExtractionRunResponse diff --git a/test/x_twitter_scraper/resources/integrations_test.rb b/test/x_twitter_scraper/resources/integrations_test.rb index 500b4b6..a2383a0 100644 --- a/test/x_twitter_scraper/resources/integrations_test.rb +++ b/test/x_twitter_scraper/resources/integrations_test.rb @@ -8,9 +8,9 @@ def test_create_required_params response = @x_twitter_scraper.integrations.create( - config: {chatId: "chatId"}, - event_types: [:"tweet.new"], - name: "name", + config: {chatId: "-1001234567890"}, + event_types: [:"tweet.new", :"follower.gained"], + name: "My Telegram Bot", type: :telegram ) diff --git a/test/x_twitter_scraper/resources/monitors_test.rb b/test/x_twitter_scraper/resources/monitors_test.rb index 5f7ebde..102d35f 100644 --- a/test/x_twitter_scraper/resources/monitors_test.rb +++ b/test/x_twitter_scraper/resources/monitors_test.rb @@ -6,7 +6,11 @@ class XTwitterScraper::Test::Resources::MonitorsTest < XTwitterScraper::Test::Re def test_create_required_params skip("Mock server tests are disabled") - response = @x_twitter_scraper.monitors.create(event_types: [:"tweet.new"], username: "username") + response = + @x_twitter_scraper.monitors.create( + event_types: [:"tweet.new", :"follower.gained"], + username: "elonmusk" + ) assert_pattern do response => XTwitterScraper::Models::MonitorCreateResponse diff --git a/test/x_twitter_scraper/resources/styles_test.rb b/test/x_twitter_scraper/resources/styles_test.rb index 8576de6..cceb208 100644 --- a/test/x_twitter_scraper/resources/styles_test.rb +++ b/test/x_twitter_scraper/resources/styles_test.rb @@ -22,7 +22,7 @@ def test_list def test_analyze_required_params skip("Mock server tests are disabled") - response = @x_twitter_scraper.styles.analyze(username: "username") + response = @x_twitter_scraper.styles.analyze(username: "elonmusk") assert_pattern do response => XTwitterScraper::Models::StyleAnalyzeResponse diff --git a/test/x_twitter_scraper/resources/support/tickets_test.rb b/test/x_twitter_scraper/resources/support/tickets_test.rb index 9eb4710..9b0eb70 100644 --- a/test/x_twitter_scraper/resources/support/tickets_test.rb +++ b/test/x_twitter_scraper/resources/support/tickets_test.rb @@ -6,7 +6,11 @@ class XTwitterScraper::Test::Resources::Support::TicketsTest < XTwitterScraper:: def test_create_required_params skip("Mock server tests are disabled") - response = @x_twitter_scraper.support.tickets.create(body: "body", subject: "subject") + response = + @x_twitter_scraper.support.tickets.create( + body: "I am unable to connect my X account. Please help.", + subject: "Cannot connect X account" + ) assert_pattern do response => XTwitterScraper::Models::Support::TicketCreateResponse @@ -22,7 +26,7 @@ def test_create_required_params def test_retrieve skip("Mock server tests are disabled") - response = @x_twitter_scraper.support.tickets.retrieve("id") + response = @x_twitter_scraper.support.tickets.retrieve("messages_value") assert_pattern do response => XTwitterScraper::Models::Support::TicketRetrieveResponse @@ -43,7 +47,7 @@ def test_retrieve def test_update_required_params skip("Mock server tests are disabled") - response = @x_twitter_scraper.support.tickets.update("id", status: :open) + response = @x_twitter_scraper.support.tickets.update("id", status: :resolved) assert_pattern do response => XTwitterScraper::Models::Support::TicketUpdateResponse @@ -76,7 +80,7 @@ def test_list def test_reply_required_params skip("Mock server tests are disabled") - response = @x_twitter_scraper.support.tickets.reply("id", body: "body") + response = @x_twitter_scraper.support.tickets.reply("id", body: "Thank you for the update.") assert_pattern do response => XTwitterScraper::Models::Support::TicketReplyResponse diff --git a/test/x_twitter_scraper/resources/webhooks_test.rb b/test/x_twitter_scraper/resources/webhooks_test.rb index 60cff4b..a7c787f 100644 --- a/test/x_twitter_scraper/resources/webhooks_test.rb +++ b/test/x_twitter_scraper/resources/webhooks_test.rb @@ -6,7 +6,11 @@ class XTwitterScraper::Test::Resources::WebhooksTest < XTwitterScraper::Test::Re def test_create_required_params skip("Mock server tests are disabled") - response = @x_twitter_scraper.webhooks.create(event_types: [:"tweet.new"], url: "https://example.com") + response = + @x_twitter_scraper.webhooks.create( + event_types: [:"tweet.new", :"follower.gained"], + url: "https://example.com/webhook" + ) assert_pattern do response => XTwitterScraper::Models::WebhookCreateResponse diff --git a/test/x_twitter_scraper/resources/x/accounts_test.rb b/test/x_twitter_scraper/resources/x/accounts_test.rb index d23c75f..bfe788d 100644 --- a/test/x_twitter_scraper/resources/x/accounts_test.rb +++ b/test/x_twitter_scraper/resources/x/accounts_test.rb @@ -7,7 +7,11 @@ def test_create_required_params skip("Mock server tests are disabled") response = - @x_twitter_scraper.x.accounts.create(email: "email", password: "password", username: "username") + @x_twitter_scraper.x.accounts.create( + email: "user@example.com", + password: "s3cur3Pa$$w0rd", + username: "elonmusk" + ) assert_pattern do response => XTwitterScraper::Models::X::AccountCreateResponse @@ -81,7 +85,7 @@ def test_delete def test_reauth_required_params skip("Mock server tests are disabled") - response = @x_twitter_scraper.x.accounts.reauth("id", password: "password") + response = @x_twitter_scraper.x.accounts.reauth("id", password: "password_value") assert_pattern do response => XTwitterScraper::Models::X::AccountReauthResponse diff --git a/test/x_twitter_scraper/resources/x/communities/join_test.rb b/test/x_twitter_scraper/resources/x/communities/join_test.rb index d7a9701..437db2b 100644 --- a/test/x_twitter_scraper/resources/x/communities/join_test.rb +++ b/test/x_twitter_scraper/resources/x/communities/join_test.rb @@ -6,7 +6,7 @@ class XTwitterScraper::Test::Resources::X::Communities::JoinTest < XTwitterScrap def test_create_required_params skip("Mock server tests are disabled") - response = @x_twitter_scraper.x.communities.join.create("id", account: "account") + response = @x_twitter_scraper.x.communities.join.create("id", account: "@elonmusk") assert_pattern do response => XTwitterScraper::Models::X::Communities::JoinCreateResponse @@ -24,7 +24,7 @@ def test_create_required_params def test_delete_all_required_params skip("Mock server tests are disabled") - response = @x_twitter_scraper.x.communities.join.delete_all("id", account: "account") + response = @x_twitter_scraper.x.communities.join.delete_all("id", account: "@elonmusk") assert_pattern do response => XTwitterScraper::Models::X::Communities::JoinDeleteAllResponse diff --git a/test/x_twitter_scraper/resources/x/communities/tweets_test.rb b/test/x_twitter_scraper/resources/x/communities/tweets_test.rb index 3e7d399..cbd2a16 100644 --- a/test/x_twitter_scraper/resources/x/communities/tweets_test.rb +++ b/test/x_twitter_scraper/resources/x/communities/tweets_test.rb @@ -9,7 +9,15 @@ def test_list_required_params response = @x_twitter_scraper.x.communities.tweets.list(q: "q") assert_pattern do - response => nil + response => XTwitterScraper::Models::X::Communities::TweetListResponse + end + + assert_pattern do + response => { + has_next_page: XTwitterScraper::Internal::Type::Boolean, + next_cursor: String, + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet]) + } end end end diff --git a/test/x_twitter_scraper/resources/x/communities_test.rb b/test/x_twitter_scraper/resources/x/communities_test.rb index db23902..2dcecbb 100644 --- a/test/x_twitter_scraper/resources/x/communities_test.rb +++ b/test/x_twitter_scraper/resources/x/communities_test.rb @@ -6,7 +6,7 @@ class XTwitterScraper::Test::Resources::X::CommunitiesTest < XTwitterScraper::Te def test_create_required_params skip("Mock server tests are disabled") - response = @x_twitter_scraper.x.communities.create(account: "account", name: "name") + response = @x_twitter_scraper.x.communities.create(account: "@elonmusk", name: "Example Name") assert_pattern do response => XTwitterScraper::Models::X::CommunityCreateResponse @@ -25,7 +25,7 @@ def test_delete_required_params skip("Mock server tests are disabled") response = - @x_twitter_scraper.x.communities.delete("id", account: "account", community_name: "community_name") + @x_twitter_scraper.x.communities.delete("id", account: "@elonmusk", community_name: "Tesla Fans") assert_pattern do response => XTwitterScraper::Models::X::CommunityDeleteResponse @@ -60,7 +60,15 @@ def test_retrieve_members response = @x_twitter_scraper.x.communities.retrieve_members("id") assert_pattern do - response => nil + response => XTwitterScraper::Models::X::CommunityRetrieveMembersResponse + end + + assert_pattern do + response => { + has_next_page: XTwitterScraper::Internal::Type::Boolean, + next_cursor: String, + users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::CommunityRetrieveMembersResponse::User]) + } end end @@ -70,7 +78,15 @@ def test_retrieve_moderators response = @x_twitter_scraper.x.communities.retrieve_moderators("id") assert_pattern do - response => nil + response => XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse + end + + assert_pattern do + response => { + has_next_page: XTwitterScraper::Internal::Type::Boolean, + next_cursor: String, + users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse::User]) + } end end @@ -80,7 +96,15 @@ def test_retrieve_search_required_params response = @x_twitter_scraper.x.communities.retrieve_search(q: "q") assert_pattern do - response => nil + response => XTwitterScraper::Models::X::CommunityRetrieveSearchResponse + end + + assert_pattern do + response => { + has_next_page: XTwitterScraper::Internal::Type::Boolean, + next_cursor: String, + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet]) + } end end end diff --git a/test/x_twitter_scraper/resources/x/dm_test.rb b/test/x_twitter_scraper/resources/x/dm_test.rb index f6c5abd..c96e80f 100644 --- a/test/x_twitter_scraper/resources/x/dm_test.rb +++ b/test/x_twitter_scraper/resources/x/dm_test.rb @@ -24,7 +24,7 @@ def test_retrieve_history def test_send__required_params skip("Mock server tests are disabled") - response = @x_twitter_scraper.x.dm.send_("userId", account: "account", text: "text") + response = @x_twitter_scraper.x.dm.send_("userId", account: "@elonmusk", text: "Example text content") assert_pattern do response => XTwitterScraper::Models::X::DmSendResponse diff --git a/test/x_twitter_scraper/resources/x/lists_test.rb b/test/x_twitter_scraper/resources/x/lists_test.rb index 242a9ce..3c934d5 100644 --- a/test/x_twitter_scraper/resources/x/lists_test.rb +++ b/test/x_twitter_scraper/resources/x/lists_test.rb @@ -9,7 +9,15 @@ def test_retrieve_followers response = @x_twitter_scraper.x.lists.retrieve_followers("id") assert_pattern do - response => nil + response => XTwitterScraper::Models::X::ListRetrieveFollowersResponse + end + + assert_pattern do + response => { + has_next_page: XTwitterScraper::Internal::Type::Boolean, + next_cursor: String, + users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::ListRetrieveFollowersResponse::User]) + } end end @@ -19,7 +27,15 @@ def test_retrieve_members response = @x_twitter_scraper.x.lists.retrieve_members("id") assert_pattern do - response => nil + response => XTwitterScraper::Models::X::ListRetrieveMembersResponse + end + + assert_pattern do + response => { + has_next_page: XTwitterScraper::Internal::Type::Boolean, + next_cursor: String, + users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::ListRetrieveMembersResponse::User]) + } end end @@ -29,7 +45,15 @@ def test_retrieve_tweets response = @x_twitter_scraper.x.lists.retrieve_tweets("id") assert_pattern do - response => nil + response => XTwitterScraper::Models::X::ListRetrieveTweetsResponse + end + + assert_pattern do + response => { + has_next_page: XTwitterScraper::Internal::Type::Boolean, + next_cursor: String, + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet]) + } end end end diff --git a/test/x_twitter_scraper/resources/x/media_test.rb b/test/x_twitter_scraper/resources/x/media_test.rb index 18a2b4e..3b869e0 100644 --- a/test/x_twitter_scraper/resources/x/media_test.rb +++ b/test/x_twitter_scraper/resources/x/media_test.rb @@ -26,7 +26,7 @@ def test_download def test_upload_required_params skip("Mock server tests are disabled") - response = @x_twitter_scraper.x.media.upload(account: "account", file: StringIO.new("Example data")) + response = @x_twitter_scraper.x.media.upload(account: "@elonmusk", file: StringIO.new("Example data")) assert_pattern do response => XTwitterScraper::Models::X::MediaUploadResponse diff --git a/test/x_twitter_scraper/resources/x/profile_test.rb b/test/x_twitter_scraper/resources/x/profile_test.rb index b3d3189..8937827 100644 --- a/test/x_twitter_scraper/resources/x/profile_test.rb +++ b/test/x_twitter_scraper/resources/x/profile_test.rb @@ -6,7 +6,7 @@ class XTwitterScraper::Test::Resources::X::ProfileTest < XTwitterScraper::Test:: def test_update_required_params skip("Mock server tests are disabled") - response = @x_twitter_scraper.x.profile.update(account: "account") + response = @x_twitter_scraper.x.profile.update(account: "@elonmusk") assert_pattern do response => XTwitterScraper::Models::X::ProfileUpdateResponse @@ -23,7 +23,7 @@ def test_update_avatar_required_params skip("Mock server tests are disabled") response = - @x_twitter_scraper.x.profile.update_avatar(account: "account", file: StringIO.new("Example data")) + @x_twitter_scraper.x.profile.update_avatar(account: "@elonmusk", file: StringIO.new("Example data")) assert_pattern do response => XTwitterScraper::Models::X::ProfileUpdateAvatarResponse @@ -40,7 +40,7 @@ def test_update_banner_required_params skip("Mock server tests are disabled") response = - @x_twitter_scraper.x.profile.update_banner(account: "account", file: StringIO.new("Example data")) + @x_twitter_scraper.x.profile.update_banner(account: "@elonmusk", file: StringIO.new("Example data")) assert_pattern do response => XTwitterScraper::Models::X::ProfileUpdateBannerResponse diff --git a/test/x_twitter_scraper/resources/x/tweets_test.rb b/test/x_twitter_scraper/resources/x/tweets_test.rb index 34b6017..0370b64 100644 --- a/test/x_twitter_scraper/resources/x/tweets_test.rb +++ b/test/x_twitter_scraper/resources/x/tweets_test.rb @@ -6,7 +6,8 @@ class XTwitterScraper::Test::Resources::X::TweetsTest < XTwitterScraper::Test::R def test_create_required_params skip("Mock server tests are disabled") - response = @x_twitter_scraper.x.tweets.create(account: "account", text: "text") + response = + @x_twitter_scraper.x.tweets.create(account: "@elonmusk", text: "Just launched our new feature!") assert_pattern do response => XTwitterScraper::Models::X::TweetCreateResponse @@ -26,7 +27,15 @@ def test_list_required_params response = @x_twitter_scraper.x.tweets.list(ids: "ids") assert_pattern do - response => nil + response => XTwitterScraper::Models::X::TweetListResponse + end + + assert_pattern do + response => { + has_next_page: XTwitterScraper::Internal::Type::Boolean, + next_cursor: String, + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetListResponse::Tweet]) + } end end diff --git a/test/x_twitter_scraper/resources/x/users_test.rb b/test/x_twitter_scraper/resources/x/users_test.rb index 4d8aa4c..2e6e327 100644 --- a/test/x_twitter_scraper/resources/x/users_test.rb +++ b/test/x_twitter_scraper/resources/x/users_test.rb @@ -9,7 +9,15 @@ def test_retrieve_batch_required_params response = @x_twitter_scraper.x.users.retrieve_batch(ids: "ids") assert_pattern do - response => nil + response => XTwitterScraper::Models::X::UserRetrieveBatchResponse + end + + assert_pattern do + response => { + has_next_page: XTwitterScraper::Internal::Type::Boolean, + next_cursor: String, + users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveBatchResponse::User]) + } end end @@ -19,7 +27,15 @@ def test_retrieve_followers response = @x_twitter_scraper.x.users.retrieve_followers("id") assert_pattern do - response => nil + response => XTwitterScraper::Models::X::UserRetrieveFollowersResponse + end + + assert_pattern do + response => { + has_next_page: XTwitterScraper::Internal::Type::Boolean, + next_cursor: String, + users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveFollowersResponse::User]) + } end end @@ -47,7 +63,15 @@ def test_retrieve_following response = @x_twitter_scraper.x.users.retrieve_following("id") assert_pattern do - response => nil + response => XTwitterScraper::Models::X::UserRetrieveFollowingResponse + end + + assert_pattern do + response => { + has_next_page: XTwitterScraper::Internal::Type::Boolean, + next_cursor: String, + users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveFollowingResponse::User]) + } end end @@ -93,7 +117,15 @@ def test_retrieve_mentions response = @x_twitter_scraper.x.users.retrieve_mentions("id") assert_pattern do - response => nil + response => XTwitterScraper::Models::X::UserRetrieveMentionsResponse + end + + assert_pattern do + response => { + has_next_page: XTwitterScraper::Internal::Type::Boolean, + next_cursor: String, + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet]) + } end end @@ -103,7 +135,15 @@ def test_retrieve_search_required_params response = @x_twitter_scraper.x.users.retrieve_search(q: "q") assert_pattern do - response => nil + response => XTwitterScraper::Models::X::UserRetrieveSearchResponse + end + + assert_pattern do + response => { + has_next_page: XTwitterScraper::Internal::Type::Boolean, + next_cursor: String, + users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveSearchResponse::User]) + } end end @@ -131,7 +171,15 @@ def test_retrieve_verified_followers response = @x_twitter_scraper.x.users.retrieve_verified_followers("id") assert_pattern do - response => nil + response => XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse + end + + assert_pattern do + response => { + has_next_page: XTwitterScraper::Internal::Type::Boolean, + next_cursor: String, + users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse::User]) + } end end end diff --git a/test/x_twitter_scraper/resources/x_test.rb b/test/x_twitter_scraper/resources/x_test.rb index 071c6e8..574dc1e 100644 --- a/test/x_twitter_scraper/resources/x_test.rb +++ b/test/x_twitter_scraper/resources/x_test.rb @@ -62,7 +62,15 @@ def test_get_trends response = @x_twitter_scraper.x.get_trends assert_pattern do - response => nil + response => XTwitterScraper::Models::XGetTrendsResponse + end + + assert_pattern do + response => { + count: Integer, + trends: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::XGetTrendsResponse::Trend]), + woeid: Integer + } end end end From c053ff2fdc9a671ff1a6d6596a97d1ebb8a33eb2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 21:03:36 +0000 Subject: [PATCH 07/27] feat(api): api update --- .github/workflows/release-doctor.yml | 22 -- .stats.yml | 8 +- CONTRIBUTING.md | 4 +- README.md | 44 ++- bin/check-release-environment | 21 -- lib/x_twitter_scraper.rb | 65 ++--- lib/x_twitter_scraper/internal/cursor_page.rb | 84 ++++++ lib/x_twitter_scraper/models.rb | 8 + .../models/api_key_list_response.rb | 49 +--- .../models/draft_create_response.rb | 48 ---- lib/x_twitter_scraper/models/draft_detail.rb | 1 + .../models/draft_list_response.rb | 43 +-- .../models/draft_retrieve_response.rb | 48 ---- .../models/draw_list_response.rb | 55 +--- .../models/draw_retrieve_response.rb | 134 +-------- .../models/draw_run_response.rb | 37 +-- lib/x_twitter_scraper/models/event.rb | 23 +- lib/x_twitter_scraper/models/event_detail.rb | 24 +- .../models/event_list_params.rb | 21 +- .../models/event_list_response.rb | 72 +---- .../models/event_retrieve_response.rb | 79 ------ .../models/extraction_list_response.rb | 100 +------ lib/x_twitter_scraper/models/integration.rb | 22 +- .../models/integration_create_params.rb | 23 +- .../models/integration_create_response.rb | 118 -------- .../integration_list_deliveries_response.rb | 72 +---- .../models/integration_list_response.rb | 119 +------- .../models/integration_retrieve_response.rb | 118 -------- .../models/integration_update_params.rb | 23 +- .../models/integration_update_response.rb | 118 -------- lib/x_twitter_scraper/models/monitor.rb | 22 +- .../models/monitor_create_params.rb | 23 +- .../models/monitor_create_response.rb | 21 +- .../models/monitor_list_response.rb | 72 +---- .../models/monitor_retrieve_response.rb | 71 ----- .../models/monitor_update_params.rb | 23 +- .../models/monitor_update_response.rb | 71 ----- .../models/paginated_tweets.rb | 118 +------- .../models/paginated_users.rb | 78 +---- ...radar_retrieve_trending_topics_response.rb | 67 +---- .../models/style_analyze_response.rb | 71 ----- .../models/style_compare_response.rb | 144 +--------- .../models/style_delete_params.rb | 20 ++ .../models/style_get_performance_params.rb | 20 ++ .../models/style_get_performance_response.rb | 75 +++++ .../models/style_list_response.rb | 37 +-- lib/x_twitter_scraper/models/style_profile.rb | 1 + .../models/style_retrieve_params.rb | 20 ++ .../models/style_update_params.rb | 48 ++++ lib/x_twitter_scraper/models/webhook.rb | 22 +- .../models/webhook_create_params.rb | 23 +- .../models/webhook_create_response.rb | 21 +- .../webhook_list_deliveries_response.rb | 61 +--- .../models/webhook_list_response.rb | 65 +---- .../models/webhook_update_params.rb | 23 +- .../models/webhook_update_response.rb | 64 ----- .../models/x/account_bulk_retry_params.rb | 16 ++ .../models/x/account_bulk_retry_response.rb | 19 ++ .../models/x/account_list_response.rb | 43 +-- .../models/x/account_retrieve_response.rb | 62 ---- .../models/x/bookmark_list_response.rb | 145 ---------- .../x/communities/join_create_response.rb | 34 --- .../x/communities/join_delete_all_response.rb | 34 --- .../tweet_list_by_community_params.rb | 33 +++ .../x/communities/tweet_list_response.rb | 147 ---------- .../x/community_retrieve_members_response.rb | 105 ------- .../community_retrieve_moderators_response.rb | 105 ------- .../x/community_retrieve_search_response.rb | 145 ---------- .../x/list_retrieve_followers_response.rb | 105 ------- .../x/list_retrieve_members_response.rb | 105 ------- .../models/x/list_retrieve_tweets_response.rb | 145 ---------- .../models/x/tweet_delete_params.rb | 31 ++ .../models/x/tweet_delete_response.rb | 18 ++ .../models/x/tweet_get_favoriters_response.rb | 105 ------- .../models/x/tweet_get_quotes_response.rb | 145 ---------- .../models/x/tweet_get_replies_response.rb | 145 ---------- .../models/x/tweet_get_retweeters_response.rb | 105 ------- .../models/x/tweet_get_thread_response.rb | 145 ---------- .../models/x/tweet_list_response.rb | 145 ---------- .../models/x/tweet_retrieve_params.rb | 22 ++ .../models/x/tweet_retrieve_response.rb | 27 ++ .../models/x/tweet_search_response.rb | 145 ---------- .../models/x/tweets/like_create_params.rb | 33 +++ .../models/x/tweets/like_create_response.rb | 20 ++ .../models/x/tweets/like_delete_params.rb | 33 +++ .../models/x/tweets/like_delete_response.rb | 20 ++ .../models/x/tweets/retweet_create_params.rb | 33 +++ .../x/tweets/retweet_create_response.rb | 20 ++ .../models/x/tweets/retweet_delete_params.rb | 33 +++ .../x/tweets/retweet_delete_response.rb | 20 ++ .../models/x/user_profile.rb | 1 + .../models/x/user_retrieve_batch_response.rb | 105 ------- .../x/user_retrieve_followers_response.rb | 105 ------- ...er_retrieve_followers_you_know_response.rb | 105 ------- .../x/user_retrieve_following_response.rb | 105 ------- .../models/x/user_retrieve_likes_response.rb | 145 ---------- .../models/x/user_retrieve_media_response.rb | 145 ---------- .../x/user_retrieve_mentions_response.rb | 145 ---------- .../models/x/user_retrieve_params.rb | 22 ++ .../models/x/user_retrieve_search_response.rb | 105 ------- .../models/x/user_retrieve_tweets_response.rb | 145 ---------- ...er_retrieve_verified_followers_response.rb | 105 ------- .../models/x/users/follow_create_params.rb | 33 +++ .../models/x/users/follow_create_response.rb | 20 ++ .../x/users/follow_delete_all_params.rb | 33 +++ .../x/users/follow_delete_all_response.rb | 20 ++ .../models/x/x_account_detail.rb | 1 + .../models/x_get_article_response.rb | 43 +-- .../models/x_get_home_timeline_response.rb | 143 ---------- lib/x_twitter_scraper/resources/drafts.rb | 8 +- lib/x_twitter_scraper/resources/events.rb | 6 +- .../resources/integrations.rb | 16 +- lib/x_twitter_scraper/resources/monitors.rb | 12 +- lib/x_twitter_scraper/resources/styles.rb | 90 +++++- lib/x_twitter_scraper/resources/webhooks.rb | 8 +- lib/x_twitter_scraper/resources/x.rb | 4 +- lib/x_twitter_scraper/resources/x/accounts.rb | 24 +- .../resources/x/bookmarks.rb | 5 +- .../resources/x/communities.rb | 12 +- .../resources/x/communities/join.rb | 8 +- .../resources/x/communities/tweets.rb | 31 +- lib/x_twitter_scraper/resources/x/lists.rb | 12 +- lib/x_twitter_scraper/resources/x/tweets.rb | 74 ++++- .../resources/x/tweets/like.rb | 49 ++++ .../resources/x/tweets/retweet.rb | 49 ++++ lib/x_twitter_scraper/resources/x/users.rb | 61 ++-- .../resources/x/users/follow.rb | 49 ++++ .../internal/cursor_page.rbi | 22 ++ rbi/x_twitter_scraper/models.rbi | 8 + .../models/api_key_list_response.rbi | 84 +----- .../models/draft_create_response.rbi | 68 ----- .../models/draft_list_response.rbi | 67 +---- .../models/draft_retrieve_response.rbi | 68 ----- .../models/draw_list_response.rbi | 80 +----- .../models/draw_retrieve_response.rbi | 186 +----------- .../models/draw_run_response.rbi | 56 +--- rbi/x_twitter_scraper/models/event.rbi | 34 +-- rbi/x_twitter_scraper/models/event_detail.rbi | 51 +--- .../models/event_list_params.rbi | 66 +---- .../models/event_list_response.rbi | 136 +-------- .../models/event_retrieve_response.rbi | 139 --------- .../models/extraction_job.rbi | 8 +- .../models/extraction_list_response.rbi | 261 +---------------- rbi/x_twitter_scraper/models/integration.rbi | 64 +---- .../models/integration_create_params.rbi | 70 +---- .../models/integration_create_response.rbi | 219 -------------- .../integration_list_deliveries_response.rbi | 123 +------- .../models/integration_list_response.rbi | 234 +-------------- .../models/integration_retrieve_response.rbi | 219 -------------- .../models/integration_update_params.rbi | 79 +----- .../models/integration_update_response.rbi | 219 -------------- rbi/x_twitter_scraper/models/monitor.rbi | 52 +--- .../models/monitor_create_params.rbi | 66 +---- .../models/monitor_create_response.rbi | 73 +---- .../models/monitor_list_response.rbi | 148 +--------- .../models/monitor_retrieve_response.rbi | 138 --------- .../models/monitor_update_params.rbi | 73 +---- .../models/monitor_update_response.rbi | 138 --------- .../models/paginated_tweets.rbi | 184 +----------- .../models/paginated_users.rbi | 124 +------- ...adar_retrieve_trending_topics_response.rbi | 112 +------- .../models/style_analyze_response.rbi | 121 -------- .../models/style_compare_response.rbi | 268 +----------------- .../models/style_delete_params.rbi | 38 +++ .../models/style_get_performance_params.rbi | 38 +++ .../models/style_get_performance_response.rbi | 140 +++++++++ .../models/style_list_response.rbi | 58 +--- .../models/style_retrieve_params.rbi | 38 +++ .../models/style_update_params.rbi | 81 ++++++ rbi/x_twitter_scraper/models/webhook.rbi | 52 +--- .../models/webhook_create_params.rbi | 66 +---- .../models/webhook_create_response.rbi | 73 +---- .../webhook_list_deliveries_response.rbi | 111 +------- .../models/webhook_list_response.rbi | 149 +--------- .../models/webhook_update_params.rbi | 73 +---- .../models/webhook_update_response.rbi | 132 --------- .../models/x/account_bulk_retry_params.rbi | 34 +++ .../models/x/account_bulk_retry_response.rbi | 32 +++ .../models/x/account_list_response.rbi | 72 +---- .../models/x/account_retrieve_response.rbi | 92 ------ .../models/x/bookmark_list_response.rbi | 244 ---------------- .../x/communities/join_create_response.rbi | 51 ---- .../communities/join_delete_all_response.rbi | 51 ---- .../tweet_list_by_community_params.rbi | 59 ++++ .../x/communities/tweet_list_response.rbi | 248 ---------------- .../x/community_retrieve_members_response.rbi | 179 ------------ ...community_retrieve_moderators_response.rbi | 179 ------------ .../x/community_retrieve_search_response.rbi | 246 ---------------- .../x/list_retrieve_followers_response.rbi | 179 ------------ .../x/list_retrieve_members_response.rbi | 179 ------------ .../x/list_retrieve_tweets_response.rbi | 246 ---------------- .../models/x/tweet_delete_params.rbi | 54 ++++ .../models/x/tweet_delete_response.rbi | 28 ++ .../models/x/tweet_detail.rbi | 7 +- .../x/tweet_get_favoriters_response.rbi | 179 ------------ .../models/x/tweet_get_quotes_response.rbi | 244 ---------------- .../models/x/tweet_get_replies_response.rbi | 244 ---------------- .../x/tweet_get_retweeters_response.rbi | 179 ------------ .../models/x/tweet_get_thread_response.rbi | 244 ---------------- .../models/x/tweet_list_response.rbi | 242 ---------------- .../models/x/tweet_retrieve_params.rbi | 40 +++ .../models/x/tweet_retrieve_response.rbi | 56 ++++ .../models/x/tweet_search_response.rbi | 242 ---------------- .../models/x/tweets/like_create_params.rbi | 56 ++++ .../models/x/tweets/like_create_response.rbi | 30 ++ .../models/x/tweets/like_delete_params.rbi | 56 ++++ .../models/x/tweets/like_delete_response.rbi | 30 ++ .../models/x/tweets/retweet_create_params.rbi | 56 ++++ .../x/tweets/retweet_create_response.rbi | 30 ++ .../models/x/tweets/retweet_delete_params.rbi | 56 ++++ .../x/tweets/retweet_delete_response.rbi | 30 ++ .../models/x/user_retrieve_batch_response.rbi | 179 ------------ .../x/user_retrieve_followers_response.rbi | 179 ------------ ...r_retrieve_followers_you_know_response.rbi | 179 ------------ .../x/user_retrieve_following_response.rbi | 179 ------------ .../models/x/user_retrieve_likes_response.rbi | 246 ---------------- .../models/x/user_retrieve_media_response.rbi | 246 ---------------- .../x/user_retrieve_mentions_response.rbi | 246 ---------------- .../models/x/user_retrieve_params.rbi | 40 +++ .../x/user_retrieve_search_response.rbi | 179 ------------ .../x/user_retrieve_tweets_response.rbi | 246 ---------------- ...r_retrieve_verified_followers_response.rbi | 179 ------------ .../models/x/users/follow_create_params.rbi | 56 ++++ .../models/x/users/follow_create_response.rbi | 30 ++ .../x/users/follow_delete_all_params.rbi | 56 ++++ .../x/users/follow_delete_all_response.rbi | 30 ++ .../models/x_get_article_response.rbi | 75 +---- .../models/x_get_home_timeline_response.rbi | 240 ---------------- rbi/x_twitter_scraper/resources/drafts.rbi | 4 +- rbi/x_twitter_scraper/resources/events.rbi | 4 +- .../resources/integrations.rbi | 16 +- rbi/x_twitter_scraper/resources/monitors.rbi | 10 +- rbi/x_twitter_scraper/resources/styles.rbi | 64 ++++- rbi/x_twitter_scraper/resources/webhooks.rbi | 8 +- rbi/x_twitter_scraper/resources/x.rbi | 2 +- .../resources/x/accounts.rbi | 12 +- .../resources/x/bookmarks.rbi | 6 +- .../resources/x/communities.rbi | 10 +- .../resources/x/communities/join.rbi | 8 +- .../resources/x/communities/tweets.rbi | 25 +- rbi/x_twitter_scraper/resources/x/lists.rbi | 6 +- rbi/x_twitter_scraper/resources/x/tweets.rbi | 47 ++- .../resources/x/tweets/like.rbi | 35 +++ .../resources/x/tweets/retweet.rbi | 35 +++ rbi/x_twitter_scraper/resources/x/users.rbi | 39 ++- .../resources/x/users/follow.rbi | 37 +++ release-please-config.json | 70 ----- .../internal/cursor_page.rbs | 13 + sig/x_twitter_scraper/models.rbs | 8 + .../models/api_key_list_response.rbs | 57 +--- .../models/draft_create_response.rbs | 49 ---- .../models/draft_list_response.rbs | 49 +--- .../models/draft_retrieve_response.rbs | 49 ---- .../models/draw_list_response.rbs | 57 +--- .../models/draw_retrieve_response.rbs | 132 +-------- .../models/draw_run_response.rbs | 40 +-- sig/x_twitter_scraper/models/event.rbs | 29 +- sig/x_twitter_scraper/models/event_detail.rbs | 29 +- .../models/event_list_params.rbs | 33 +-- .../models/event_list_response.rbs | 71 +---- .../models/event_retrieve_response.rbs | 73 ----- .../models/extraction_list_response.rbs | 113 +------- sig/x_twitter_scraper/models/integration.rbs | 29 +- .../models/integration_create_params.rbs | 29 +- .../models/integration_create_response.rbs | 109 ------- .../integration_list_deliveries_response.rbs | 82 +----- .../models/integration_list_response.rbs | 118 +------- .../models/integration_retrieve_response.rbs | 109 ------- .../models/integration_update_params.rbs | 33 +-- .../models/integration_update_response.rbs | 109 ------- sig/x_twitter_scraper/models/monitor.rbs | 29 +- .../models/monitor_create_params.rbs | 29 +- .../models/monitor_create_response.rbs | 29 +- .../models/monitor_list_response.rbs | 74 +---- .../models/monitor_retrieve_response.rbs | 66 ----- .../models/monitor_update_params.rbs | 33 +-- .../models/monitor_update_response.rbs | 66 ----- .../models/paginated_tweets.rbs | 124 +------- .../models/paginated_users.rbs | 91 +----- ...adar_retrieve_trending_topics_response.rbs | 74 +---- .../models/style_analyze_response.rbs | 76 ----- .../models/style_compare_response.rbs | 162 +---------- .../models/style_delete_params.rbs | 23 ++ .../models/style_get_performance_params.rbs | 23 ++ .../models/style_get_performance_response.rbs | 87 ++++++ .../models/style_list_response.rbs | 42 +-- .../models/style_retrieve_params.rbs | 23 ++ .../models/style_update_params.rbs | 46 +++ sig/x_twitter_scraper/models/webhook.rbs | 29 +- .../models/webhook_create_params.rbs | 32 +-- .../models/webhook_create_response.rbs | 29 +- .../webhook_list_deliveries_response.rbs | 72 +---- .../models/webhook_list_response.rbs | 73 +---- .../models/webhook_update_params.rbs | 33 +-- .../models/webhook_update_response.rbs | 61 ---- .../models/x/account_bulk_retry_params.rbs | 19 ++ .../models/x/account_bulk_retry_response.rbs | 15 + .../models/x/account_list_response.rbs | 49 +--- .../models/x/account_retrieve_response.rbs | 63 ---- .../models/x/bookmark_list_response.rbs | 148 ---------- .../x/communities/join_create_response.rbs | 30 -- .../communities/join_delete_all_response.rbs | 30 -- .../tweet_list_by_community_params.rbs | 34 +++ .../x/communities/tweet_list_response.rbs | 150 ---------- .../x/community_retrieve_members_response.rbs | 115 -------- ...community_retrieve_moderators_response.rbs | 115 -------- .../x/community_retrieve_search_response.rbs | 148 ---------- .../x/list_retrieve_followers_response.rbs | 115 -------- .../x/list_retrieve_members_response.rbs | 115 -------- .../x/list_retrieve_tweets_response.rbs | 148 ---------- .../models/x/tweet_delete_params.rbs | 30 ++ .../models/x/tweet_delete_response.rbs | 15 + .../x/tweet_get_favoriters_response.rbs | 115 -------- .../models/x/tweet_get_quotes_response.rbs | 148 ---------- .../models/x/tweet_get_replies_response.rbs | 148 ---------- .../x/tweet_get_retweeters_response.rbs | 115 -------- .../models/x/tweet_get_thread_response.rbs | 148 ---------- .../models/x/tweet_list_response.rbs | 148 ---------- .../models/x/tweet_retrieve_params.rbs | 25 ++ .../models/x/tweet_retrieve_response.rbs | 31 ++ .../models/x/tweet_search_response.rbs | 148 ---------- .../models/x/tweets/like_create_params.rbs | 32 +++ .../models/x/tweets/like_create_response.rbs | 17 ++ .../models/x/tweets/like_delete_params.rbs | 32 +++ .../models/x/tweets/like_delete_response.rbs | 17 ++ .../models/x/tweets/retweet_create_params.rbs | 32 +++ .../x/tweets/retweet_create_response.rbs | 17 ++ .../models/x/tweets/retweet_delete_params.rbs | 32 +++ .../x/tweets/retweet_delete_response.rbs | 17 ++ .../models/x/user_retrieve_batch_response.rbs | 115 -------- .../x/user_retrieve_followers_response.rbs | 115 -------- ...r_retrieve_followers_you_know_response.rbs | 115 -------- .../x/user_retrieve_following_response.rbs | 115 -------- .../models/x/user_retrieve_likes_response.rbs | 148 ---------- .../models/x/user_retrieve_media_response.rbs | 148 ---------- .../x/user_retrieve_mentions_response.rbs | 148 ---------- .../models/x/user_retrieve_params.rbs | 25 ++ .../x/user_retrieve_search_response.rbs | 115 -------- .../x/user_retrieve_tweets_response.rbs | 148 ---------- ...r_retrieve_verified_followers_response.rbs | 115 -------- .../models/x/users/follow_create_params.rbs | 32 +++ .../models/x/users/follow_create_response.rbs | 17 ++ .../x/users/follow_delete_all_params.rbs | 32 +++ .../x/users/follow_delete_all_response.rbs | 17 ++ .../models/x_get_article_response.rbs | 51 +--- .../models/x_get_home_timeline_response.rbs | 146 ---------- sig/x_twitter_scraper/resources/drafts.rbs | 4 +- sig/x_twitter_scraper/resources/events.rbs | 4 +- .../resources/integrations.rbs | 10 +- sig/x_twitter_scraper/resources/monitors.rbs | 8 +- sig/x_twitter_scraper/resources/styles.rbs | 24 +- sig/x_twitter_scraper/resources/webhooks.rbs | 6 +- sig/x_twitter_scraper/resources/x.rbs | 2 +- .../resources/x/accounts.rbs | 6 +- .../resources/x/bookmarks.rbs | 2 +- .../resources/x/communities.rbs | 6 +- .../resources/x/communities/join.rbs | 4 +- .../resources/x/communities/tweets.rbs | 8 +- sig/x_twitter_scraper/resources/x/lists.rbs | 6 +- sig/x_twitter_scraper/resources/x/tweets.rbs | 25 +- .../resources/x/tweets/like.rbs | 12 + .../resources/x/tweets/retweet.rbs | 12 + sig/x_twitter_scraper/resources/x/users.rbs | 25 +- .../resources/x/users/follow.rbs | 12 + .../resources/api_keys_test.rb | 2 +- .../resources/drafts_test.rb | 6 +- .../x_twitter_scraper/resources/draws_test.rb | 8 +- .../resources/events_test.rb | 6 +- .../resources/extractions_test.rb | 2 +- .../resources/integrations_test.rb | 22 +- .../resources/monitors_test.rb | 12 +- .../x_twitter_scraper/resources/radar_test.rb | 2 +- .../resources/styles_test.rb | 83 +++++- .../resources/webhooks_test.rb | 10 +- .../resources/x/accounts_test.rb | 20 +- .../resources/x/bookmarks_test.rb | 13 +- .../resources/x/communities/join_test.rb | 4 +- .../resources/x/communities/tweets_test.rb | 38 ++- .../resources/x/communities_test.rb | 12 +- .../resources/x/lists_test.rb | 12 +- .../resources/x/tweets/like_test.rb | 31 ++ .../resources/x/tweets/retweet_test.rb | 31 ++ .../resources/x/tweets_test.rb | 61 +++- .../resources/x/users/follow_test.rb | 31 ++ .../resources/x/users_test.rb | 66 +++-- test/x_twitter_scraper/resources/x_test.rb | 6 +- 386 files changed, 4417 insertions(+), 22986 deletions(-) delete mode 100644 .github/workflows/release-doctor.yml delete mode 100644 bin/check-release-environment create mode 100644 lib/x_twitter_scraper/internal/cursor_page.rb delete mode 100644 lib/x_twitter_scraper/models/draft_create_response.rb delete mode 100644 lib/x_twitter_scraper/models/draft_retrieve_response.rb delete mode 100644 lib/x_twitter_scraper/models/event_retrieve_response.rb delete mode 100644 lib/x_twitter_scraper/models/integration_create_response.rb delete mode 100644 lib/x_twitter_scraper/models/integration_retrieve_response.rb delete mode 100644 lib/x_twitter_scraper/models/integration_update_response.rb delete mode 100644 lib/x_twitter_scraper/models/monitor_retrieve_response.rb delete mode 100644 lib/x_twitter_scraper/models/monitor_update_response.rb delete mode 100644 lib/x_twitter_scraper/models/style_analyze_response.rb create mode 100644 lib/x_twitter_scraper/models/style_delete_params.rb create mode 100644 lib/x_twitter_scraper/models/style_get_performance_params.rb create mode 100644 lib/x_twitter_scraper/models/style_get_performance_response.rb create mode 100644 lib/x_twitter_scraper/models/style_retrieve_params.rb create mode 100644 lib/x_twitter_scraper/models/style_update_params.rb delete mode 100644 lib/x_twitter_scraper/models/webhook_update_response.rb create mode 100644 lib/x_twitter_scraper/models/x/account_bulk_retry_params.rb create mode 100644 lib/x_twitter_scraper/models/x/account_bulk_retry_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/account_retrieve_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/bookmark_list_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/communities/join_create_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/communities/join_delete_all_response.rb create mode 100644 lib/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rb delete mode 100644 lib/x_twitter_scraper/models/x/communities/tweet_list_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/community_retrieve_members_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/community_retrieve_moderators_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/community_retrieve_search_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/list_retrieve_followers_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/list_retrieve_members_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/list_retrieve_tweets_response.rb create mode 100644 lib/x_twitter_scraper/models/x/tweet_delete_params.rb create mode 100644 lib/x_twitter_scraper/models/x/tweet_delete_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/tweet_get_favoriters_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/tweet_get_quotes_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/tweet_get_replies_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/tweet_get_retweeters_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/tweet_get_thread_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/tweet_list_response.rb create mode 100644 lib/x_twitter_scraper/models/x/tweet_retrieve_params.rb create mode 100644 lib/x_twitter_scraper/models/x/tweet_retrieve_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/tweet_search_response.rb create mode 100644 lib/x_twitter_scraper/models/x/tweets/like_create_params.rb create mode 100644 lib/x_twitter_scraper/models/x/tweets/like_create_response.rb create mode 100644 lib/x_twitter_scraper/models/x/tweets/like_delete_params.rb create mode 100644 lib/x_twitter_scraper/models/x/tweets/like_delete_response.rb create mode 100644 lib/x_twitter_scraper/models/x/tweets/retweet_create_params.rb create mode 100644 lib/x_twitter_scraper/models/x/tweets/retweet_create_response.rb create mode 100644 lib/x_twitter_scraper/models/x/tweets/retweet_delete_params.rb create mode 100644 lib/x_twitter_scraper/models/x/tweets/retweet_delete_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/user_retrieve_batch_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/user_retrieve_followers_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/user_retrieve_followers_you_know_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/user_retrieve_following_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/user_retrieve_likes_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/user_retrieve_media_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/user_retrieve_mentions_response.rb create mode 100644 lib/x_twitter_scraper/models/x/user_retrieve_params.rb delete mode 100644 lib/x_twitter_scraper/models/x/user_retrieve_search_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/user_retrieve_tweets_response.rb delete mode 100644 lib/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rb create mode 100644 lib/x_twitter_scraper/models/x/users/follow_create_params.rb create mode 100644 lib/x_twitter_scraper/models/x/users/follow_create_response.rb create mode 100644 lib/x_twitter_scraper/models/x/users/follow_delete_all_params.rb create mode 100644 lib/x_twitter_scraper/models/x/users/follow_delete_all_response.rb delete mode 100644 lib/x_twitter_scraper/models/x_get_home_timeline_response.rb create mode 100644 rbi/x_twitter_scraper/internal/cursor_page.rbi delete mode 100644 rbi/x_twitter_scraper/models/draft_create_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/draft_retrieve_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/event_retrieve_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/integration_create_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/integration_retrieve_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/integration_update_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/monitor_retrieve_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/monitor_update_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/style_analyze_response.rbi create mode 100644 rbi/x_twitter_scraper/models/style_delete_params.rbi create mode 100644 rbi/x_twitter_scraper/models/style_get_performance_params.rbi create mode 100644 rbi/x_twitter_scraper/models/style_get_performance_response.rbi create mode 100644 rbi/x_twitter_scraper/models/style_retrieve_params.rbi create mode 100644 rbi/x_twitter_scraper/models/style_update_params.rbi delete mode 100644 rbi/x_twitter_scraper/models/webhook_update_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/account_bulk_retry_params.rbi create mode 100644 rbi/x_twitter_scraper/models/x/account_bulk_retry_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/account_retrieve_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/bookmark_list_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/communities/join_create_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/communities/join_delete_all_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/communities/tweet_list_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/community_retrieve_members_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/community_retrieve_moderators_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/community_retrieve_search_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/list_retrieve_followers_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/list_retrieve_members_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/list_retrieve_tweets_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/tweet_delete_params.rbi create mode 100644 rbi/x_twitter_scraper/models/x/tweet_delete_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/tweet_get_favoriters_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/tweet_get_quotes_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/tweet_get_replies_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/tweet_get_retweeters_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/tweet_get_thread_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/tweet_list_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/tweet_retrieve_params.rbi create mode 100644 rbi/x_twitter_scraper/models/x/tweet_retrieve_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/tweet_search_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/tweets/like_create_params.rbi create mode 100644 rbi/x_twitter_scraper/models/x/tweets/like_create_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/tweets/like_delete_params.rbi create mode 100644 rbi/x_twitter_scraper/models/x/tweets/like_delete_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/tweets/retweet_create_params.rbi create mode 100644 rbi/x_twitter_scraper/models/x/tweets/retweet_create_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbi create mode 100644 rbi/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/user_retrieve_batch_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/user_retrieve_followers_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/user_retrieve_followers_you_know_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/user_retrieve_following_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/user_retrieve_likes_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/user_retrieve_media_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/user_retrieve_mentions_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/user_retrieve_params.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/user_retrieve_search_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/user_retrieve_tweets_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/users/follow_create_params.rbi create mode 100644 rbi/x_twitter_scraper/models/x/users/follow_create_response.rbi create mode 100644 rbi/x_twitter_scraper/models/x/users/follow_delete_all_params.rbi create mode 100644 rbi/x_twitter_scraper/models/x/users/follow_delete_all_response.rbi delete mode 100644 rbi/x_twitter_scraper/models/x_get_home_timeline_response.rbi delete mode 100644 release-please-config.json create mode 100644 sig/x_twitter_scraper/internal/cursor_page.rbs delete mode 100644 sig/x_twitter_scraper/models/draft_create_response.rbs delete mode 100644 sig/x_twitter_scraper/models/draft_retrieve_response.rbs delete mode 100644 sig/x_twitter_scraper/models/event_retrieve_response.rbs delete mode 100644 sig/x_twitter_scraper/models/integration_create_response.rbs delete mode 100644 sig/x_twitter_scraper/models/integration_retrieve_response.rbs delete mode 100644 sig/x_twitter_scraper/models/integration_update_response.rbs delete mode 100644 sig/x_twitter_scraper/models/monitor_retrieve_response.rbs delete mode 100644 sig/x_twitter_scraper/models/monitor_update_response.rbs delete mode 100644 sig/x_twitter_scraper/models/style_analyze_response.rbs create mode 100644 sig/x_twitter_scraper/models/style_delete_params.rbs create mode 100644 sig/x_twitter_scraper/models/style_get_performance_params.rbs create mode 100644 sig/x_twitter_scraper/models/style_get_performance_response.rbs create mode 100644 sig/x_twitter_scraper/models/style_retrieve_params.rbs create mode 100644 sig/x_twitter_scraper/models/style_update_params.rbs delete mode 100644 sig/x_twitter_scraper/models/webhook_update_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/account_bulk_retry_params.rbs create mode 100644 sig/x_twitter_scraper/models/x/account_bulk_retry_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/account_retrieve_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/bookmark_list_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/communities/join_create_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/communities/join_delete_all_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rbs delete mode 100644 sig/x_twitter_scraper/models/x/communities/tweet_list_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/community_retrieve_members_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/community_retrieve_moderators_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/community_retrieve_search_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/list_retrieve_followers_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/list_retrieve_members_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/list_retrieve_tweets_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/tweet_delete_params.rbs create mode 100644 sig/x_twitter_scraper/models/x/tweet_delete_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/tweet_get_favoriters_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/tweet_get_quotes_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/tweet_get_replies_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/tweet_get_retweeters_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/tweet_get_thread_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/tweet_list_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/tweet_retrieve_params.rbs create mode 100644 sig/x_twitter_scraper/models/x/tweet_retrieve_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/tweet_search_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/tweets/like_create_params.rbs create mode 100644 sig/x_twitter_scraper/models/x/tweets/like_create_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/tweets/like_delete_params.rbs create mode 100644 sig/x_twitter_scraper/models/x/tweets/like_delete_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/tweets/retweet_create_params.rbs create mode 100644 sig/x_twitter_scraper/models/x/tweets/retweet_create_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbs create mode 100644 sig/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/user_retrieve_batch_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/user_retrieve_followers_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/user_retrieve_followers_you_know_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/user_retrieve_following_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/user_retrieve_likes_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/user_retrieve_media_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/user_retrieve_mentions_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/user_retrieve_params.rbs delete mode 100644 sig/x_twitter_scraper/models/x/user_retrieve_search_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/user_retrieve_tweets_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/users/follow_create_params.rbs create mode 100644 sig/x_twitter_scraper/models/x/users/follow_create_response.rbs create mode 100644 sig/x_twitter_scraper/models/x/users/follow_delete_all_params.rbs create mode 100644 sig/x_twitter_scraper/models/x/users/follow_delete_all_response.rbs delete mode 100644 sig/x_twitter_scraper/models/x_get_home_timeline_response.rbs diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml deleted file mode 100644 index 75e533e..0000000 --- a/.github/workflows/release-doctor.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Release Doctor -on: - pull_request: - branches: - - main - workflow_dispatch: - -jobs: - release_doctor: - name: release doctor - runs-on: ubuntu-latest - if: github.repository == 'Xquik-dev/x-twitter-scraper-ruby' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') - - steps: - - uses: actions/checkout@v6 - - - name: Check release environment - run: | - bash ./bin/check-release-environment - env: - RUBYGEMS_HOST: ${{ secrets.X_TWITTER_SCRAPER_RUBYGEMS_HOST || secrets.RUBYGEMS_HOST }} - GEM_HOST_API_KEY: ${{ secrets.X_TWITTER_SCRAPER_GEM_HOST_API_KEY || secrets.GEM_HOST_API_KEY }} diff --git a/.stats.yml b/.stats.yml index d99ab81..eec6e85 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 102 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-ec9b23603f987503f8837da5992b5db4c59a2bc627b090557539791a2b2b64a5.yml -openapi_spec_hash: faf6a6deaadba884a07e970fd05ac570 -config_hash: 8894c96caeb6df84c9394518810221bd +configured_endpoints: 117 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-3a272e3207cc0ecbfc3850635c5608190a5f4fab77368b72074d99617376b5a8.yml +openapi_spec_hash: c5aae119b546e3d97bb2be0cc7688a43 +config_hash: 68f04119c2d782a0125b03e31c3d8369 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 39a1b67..11a69b8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,13 +43,13 @@ If you’d like to use the repository from source, you can either install from g To install via git in your `Gemfile`: ```ruby -gem "x-twitter-scraper", git: "https://github.com/Xquik-dev/x-twitter-scraper-ruby" +gem "x-twitter-scraper", git: "https://github.com/stainless-sdks/x-twitter-scraper-ruby" ``` Alternatively, reference local copy of the repo: ```bash -$ git clone -- 'https://github.com/Xquik-dev/x-twitter-scraper-ruby' '' +$ git clone -- 'https://github.com/stainless-sdks/x-twitter-scraper-ruby' '' ``` ```ruby diff --git a/README.md b/README.md index ae2dd85..cd55ac6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # X Twitter Scraper Ruby API library -The X Twitter Scraper Ruby library provides convenient access to the X Twitter Scraper REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/Xquik-dev/x-twitter-scraper-ruby#Sorbet) for usage with Sorbet. The standard library's `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem. +The X Twitter Scraper Ruby library provides convenient access to the X Twitter Scraper REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/stainless-sdks/x-twitter-scraper-ruby#Sorbet) for usage with Sorbet. The standard library's `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem. It is generated with [Stainless](https://www.stainless.com/). @@ -14,14 +14,10 @@ The REST API documentation can be found on [xquik.com](https://xquik.com). To use this gem, install via Bundler by adding the following to your application's `Gemfile`: - - ```ruby gem "x-twitter-scraper", "~> 0.3.0" ``` - - ## Usage ```ruby @@ -32,9 +28,37 @@ x_twitter_scraper = XTwitterScraper::Client.new( api_key: ENV["X_TWITTER_SCRAPER_API_KEY"] # This is the default and can be omitted ) -response = x_twitter_scraper.x.tweets.search(q: "from:elonmusk", limit: 10) +paginated_tweets = x_twitter_scraper.x.tweets.search(q: "from:elonmusk", limit: 10) + +puts(paginated_tweets.has_next_page) +``` + +### Pagination + +List methods in the X Twitter Scraper API are paginated. + +This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually: + +```ruby +page = x_twitter_scraper.x.communities.tweets.list + +# Fetch single item from page. +tweet = page[0] +puts(tweet.has_next_page) + +# Automatically fetches more pages as needed. +page.auto_paging_each do |tweet| + puts(tweet.has_next_page) +end +``` + +Alternatively, you can use the `#next_page?` and `#next_page` methods for more granular control working with pages. -puts(response.has_next_page) +```ruby +if page.next_page? + new_page = page.next_page + puts(new_page[0].has_next_page) +end ``` ### File uploads @@ -153,7 +177,7 @@ You can send undocumented parameters to any endpoint, and read undocumented resp Note: the `extra_` parameters of the same name overrides the documented parameters. ```ruby -response = +paginated_tweets = x_twitter_scraper.x.tweets.search( q: "from:elonmusk", limit: 10, @@ -164,7 +188,7 @@ response = } ) -puts(response[:my_undocumented_property]) +puts(paginated_tweets[:my_undocumented_property]) ``` #### Undocumented request params @@ -256,4 +280,4 @@ Ruby 3.2.0 or higher. ## Contributing -See [the contributing documentation](https://github.com/Xquik-dev/x-twitter-scraper-ruby/tree/main/CONTRIBUTING.md). +See [the contributing documentation](https://github.com/stainless-sdks/x-twitter-scraper-ruby/tree/main/CONTRIBUTING.md). diff --git a/bin/check-release-environment b/bin/check-release-environment deleted file mode 100644 index c05436e..0000000 --- a/bin/check-release-environment +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -errors=() - -if [ -z "${GEM_HOST_API_KEY}" ]; then - errors+=("The GEM_HOST_API_KEY secret has not been set. Please set it in either this repository's secrets or your organization secrets") -fi - -lenErrors=${#errors[@]} - -if [[ lenErrors -gt 0 ]]; then - echo -e "Found the following errors in the release environment:\n" - - for error in "${errors[@]}"; do - echo -e "- $error\n" - done - - exit 1 -fi - -echo "The environment is ready to push releases!" diff --git a/lib/x_twitter_scraper.rb b/lib/x_twitter_scraper.rb index dd663eb..767c1d5 100644 --- a/lib/x_twitter_scraper.rb +++ b/lib/x_twitter_scraper.rb @@ -52,6 +52,7 @@ require_relative "x_twitter_scraper/internal/transport/base_client" require_relative "x_twitter_scraper/internal/transport/pooled_net_requester" require_relative "x_twitter_scraper/client" +require_relative "x_twitter_scraper/internal/cursor_page" require_relative "x_twitter_scraper/models/account_retrieve_params" require_relative "x_twitter_scraper/models/account_retrieve_response" require_relative "x_twitter_scraper/models/account_set_x_username_params" @@ -74,13 +75,11 @@ require_relative "x_twitter_scraper/models/delivery" require_relative "x_twitter_scraper/models/draft" require_relative "x_twitter_scraper/models/draft_create_params" -require_relative "x_twitter_scraper/models/draft_create_response" require_relative "x_twitter_scraper/models/draft_delete_params" require_relative "x_twitter_scraper/models/draft_detail" require_relative "x_twitter_scraper/models/draft_list_params" require_relative "x_twitter_scraper/models/draft_list_response" require_relative "x_twitter_scraper/models/draft_retrieve_params" -require_relative "x_twitter_scraper/models/draft_retrieve_response" require_relative "x_twitter_scraper/models/draw_detail" require_relative "x_twitter_scraper/models/draw_export_params" require_relative "x_twitter_scraper/models/draw_list_item" @@ -96,7 +95,6 @@ require_relative "x_twitter_scraper/models/event_list_params" require_relative "x_twitter_scraper/models/event_list_response" require_relative "x_twitter_scraper/models/event_retrieve_params" -require_relative "x_twitter_scraper/models/event_retrieve_response" require_relative "x_twitter_scraper/models/event_type" require_relative "x_twitter_scraper/models/extraction_estimate_cost_params" require_relative "x_twitter_scraper/models/extraction_estimate_cost_response" @@ -110,7 +108,6 @@ require_relative "x_twitter_scraper/models/extraction_run_response" require_relative "x_twitter_scraper/models/integration" require_relative "x_twitter_scraper/models/integration_create_params" -require_relative "x_twitter_scraper/models/integration_create_response" require_relative "x_twitter_scraper/models/integration_delete_params" require_relative "x_twitter_scraper/models/integration_delete_response" require_relative "x_twitter_scraper/models/integration_delivery" @@ -119,11 +116,9 @@ require_relative "x_twitter_scraper/models/integration_list_params" require_relative "x_twitter_scraper/models/integration_list_response" require_relative "x_twitter_scraper/models/integration_retrieve_params" -require_relative "x_twitter_scraper/models/integration_retrieve_response" require_relative "x_twitter_scraper/models/integration_send_test_params" require_relative "x_twitter_scraper/models/integration_send_test_response" require_relative "x_twitter_scraper/models/integration_update_params" -require_relative "x_twitter_scraper/models/integration_update_response" require_relative "x_twitter_scraper/models/monitor" require_relative "x_twitter_scraper/models/monitor_create_params" require_relative "x_twitter_scraper/models/monitor_create_response" @@ -132,22 +127,24 @@ require_relative "x_twitter_scraper/models/monitor_list_params" require_relative "x_twitter_scraper/models/monitor_list_response" require_relative "x_twitter_scraper/models/monitor_retrieve_params" -require_relative "x_twitter_scraper/models/monitor_retrieve_response" require_relative "x_twitter_scraper/models/monitor_update_params" -require_relative "x_twitter_scraper/models/monitor_update_response" require_relative "x_twitter_scraper/models/paginated_tweets" require_relative "x_twitter_scraper/models/paginated_users" require_relative "x_twitter_scraper/models/radar_item" require_relative "x_twitter_scraper/models/radar_retrieve_trending_topics_params" require_relative "x_twitter_scraper/models/radar_retrieve_trending_topics_response" require_relative "x_twitter_scraper/models/style_analyze_params" -require_relative "x_twitter_scraper/models/style_analyze_response" require_relative "x_twitter_scraper/models/style_compare_params" require_relative "x_twitter_scraper/models/style_compare_response" +require_relative "x_twitter_scraper/models/style_delete_params" +require_relative "x_twitter_scraper/models/style_get_performance_params" +require_relative "x_twitter_scraper/models/style_get_performance_response" require_relative "x_twitter_scraper/models/style_list_params" require_relative "x_twitter_scraper/models/style_list_response" require_relative "x_twitter_scraper/models/style_profile" require_relative "x_twitter_scraper/models/style_profile_summary" +require_relative "x_twitter_scraper/models/style_retrieve_params" +require_relative "x_twitter_scraper/models/style_update_params" require_relative "x_twitter_scraper/models/subscribe_create_params" require_relative "x_twitter_scraper/models/subscribe_create_response" require_relative "x_twitter_scraper/models/support/ticket_create_params" @@ -174,8 +171,9 @@ require_relative "x_twitter_scraper/models/webhook_test_params" require_relative "x_twitter_scraper/models/webhook_test_response" require_relative "x_twitter_scraper/models/webhook_update_params" -require_relative "x_twitter_scraper/models/webhook_update_response" require_relative "x_twitter_scraper/models/winner" +require_relative "x_twitter_scraper/models/x/account_bulk_retry_params" +require_relative "x_twitter_scraper/models/x/account_bulk_retry_response" require_relative "x_twitter_scraper/models/x/account_create_params" require_relative "x_twitter_scraper/models/x/account_create_response" require_relative "x_twitter_scraper/models/x/account_delete_params" @@ -185,17 +183,13 @@ require_relative "x_twitter_scraper/models/x/account_reauth_params" require_relative "x_twitter_scraper/models/x/account_reauth_response" require_relative "x_twitter_scraper/models/x/account_retrieve_params" -require_relative "x_twitter_scraper/models/x/account_retrieve_response" require_relative "x_twitter_scraper/models/x/bookmark_list_params" -require_relative "x_twitter_scraper/models/x/bookmark_list_response" require_relative "x_twitter_scraper/models/x/bookmark_retrieve_folders_params" require_relative "x_twitter_scraper/models/x/bookmark_retrieve_folders_response" require_relative "x_twitter_scraper/models/x/communities/join_create_params" -require_relative "x_twitter_scraper/models/x/communities/join_create_response" require_relative "x_twitter_scraper/models/x/communities/join_delete_all_params" -require_relative "x_twitter_scraper/models/x/communities/join_delete_all_response" +require_relative "x_twitter_scraper/models/x/communities/tweet_list_by_community_params" require_relative "x_twitter_scraper/models/x/communities/tweet_list_params" -require_relative "x_twitter_scraper/models/x/communities/tweet_list_response" require_relative "x_twitter_scraper/models/x/community_action_result" require_relative "x_twitter_scraper/models/x/community_create_params" require_relative "x_twitter_scraper/models/x/community_create_response" @@ -204,11 +198,8 @@ require_relative "x_twitter_scraper/models/x/community_retrieve_info_params" require_relative "x_twitter_scraper/models/x/community_retrieve_info_response" require_relative "x_twitter_scraper/models/x/community_retrieve_members_params" -require_relative "x_twitter_scraper/models/x/community_retrieve_members_response" require_relative "x_twitter_scraper/models/x/community_retrieve_moderators_params" -require_relative "x_twitter_scraper/models/x/community_retrieve_moderators_response" require_relative "x_twitter_scraper/models/x/community_retrieve_search_params" -require_relative "x_twitter_scraper/models/x/community_retrieve_search_response" require_relative "x_twitter_scraper/models/x/dm_retrieve_history_params" require_relative "x_twitter_scraper/models/x/dm_retrieve_history_response" require_relative "x_twitter_scraper/models/x/dm_send_params" @@ -216,11 +207,8 @@ require_relative "x_twitter_scraper/models/x/follower_check_params" require_relative "x_twitter_scraper/models/x/follower_check_response" require_relative "x_twitter_scraper/models/x/list_retrieve_followers_params" -require_relative "x_twitter_scraper/models/x/list_retrieve_followers_response" require_relative "x_twitter_scraper/models/x/list_retrieve_members_params" -require_relative "x_twitter_scraper/models/x/list_retrieve_members_response" require_relative "x_twitter_scraper/models/x/list_retrieve_tweets_params" -require_relative "x_twitter_scraper/models/x/list_retrieve_tweets_response" require_relative "x_twitter_scraper/models/x/media_download_params" require_relative "x_twitter_scraper/models/x/media_download_response" require_relative "x_twitter_scraper/models/x/media_upload_params" @@ -235,48 +223,47 @@ require_relative "x_twitter_scraper/models/x/tweet_author" require_relative "x_twitter_scraper/models/x/tweet_create_params" require_relative "x_twitter_scraper/models/x/tweet_create_response" +require_relative "x_twitter_scraper/models/x/tweet_delete_params" +require_relative "x_twitter_scraper/models/x/tweet_delete_response" require_relative "x_twitter_scraper/models/x/tweet_detail" require_relative "x_twitter_scraper/models/x/tweet_get_favoriters_params" -require_relative "x_twitter_scraper/models/x/tweet_get_favoriters_response" require_relative "x_twitter_scraper/models/x/tweet_get_quotes_params" -require_relative "x_twitter_scraper/models/x/tweet_get_quotes_response" require_relative "x_twitter_scraper/models/x/tweet_get_replies_params" -require_relative "x_twitter_scraper/models/x/tweet_get_replies_response" require_relative "x_twitter_scraper/models/x/tweet_get_retweeters_params" -require_relative "x_twitter_scraper/models/x/tweet_get_retweeters_response" require_relative "x_twitter_scraper/models/x/tweet_get_thread_params" -require_relative "x_twitter_scraper/models/x/tweet_get_thread_response" require_relative "x_twitter_scraper/models/x/tweet_list_params" -require_relative "x_twitter_scraper/models/x/tweet_list_response" +require_relative "x_twitter_scraper/models/x/tweet_retrieve_params" +require_relative "x_twitter_scraper/models/x/tweet_retrieve_response" +require_relative "x_twitter_scraper/models/x/tweets/like_create_params" +require_relative "x_twitter_scraper/models/x/tweets/like_create_response" +require_relative "x_twitter_scraper/models/x/tweets/like_delete_params" +require_relative "x_twitter_scraper/models/x/tweets/like_delete_response" +require_relative "x_twitter_scraper/models/x/tweets/retweet_create_params" +require_relative "x_twitter_scraper/models/x/tweets/retweet_create_response" +require_relative "x_twitter_scraper/models/x/tweets/retweet_delete_params" +require_relative "x_twitter_scraper/models/x/tweets/retweet_delete_response" require_relative "x_twitter_scraper/models/x/tweet_search_params" -require_relative "x_twitter_scraper/models/x/tweet_search_response" require_relative "x_twitter_scraper/models/x/user_profile" require_relative "x_twitter_scraper/models/x/user_retrieve_batch_params" -require_relative "x_twitter_scraper/models/x/user_retrieve_batch_response" require_relative "x_twitter_scraper/models/x/user_retrieve_followers_params" -require_relative "x_twitter_scraper/models/x/user_retrieve_followers_response" require_relative "x_twitter_scraper/models/x/user_retrieve_followers_you_know_params" -require_relative "x_twitter_scraper/models/x/user_retrieve_followers_you_know_response" require_relative "x_twitter_scraper/models/x/user_retrieve_following_params" -require_relative "x_twitter_scraper/models/x/user_retrieve_following_response" require_relative "x_twitter_scraper/models/x/user_retrieve_likes_params" -require_relative "x_twitter_scraper/models/x/user_retrieve_likes_response" require_relative "x_twitter_scraper/models/x/user_retrieve_media_params" -require_relative "x_twitter_scraper/models/x/user_retrieve_media_response" require_relative "x_twitter_scraper/models/x/user_retrieve_mentions_params" -require_relative "x_twitter_scraper/models/x/user_retrieve_mentions_response" +require_relative "x_twitter_scraper/models/x/user_retrieve_params" require_relative "x_twitter_scraper/models/x/user_retrieve_search_params" -require_relative "x_twitter_scraper/models/x/user_retrieve_search_response" require_relative "x_twitter_scraper/models/x/user_retrieve_tweets_params" -require_relative "x_twitter_scraper/models/x/user_retrieve_tweets_response" require_relative "x_twitter_scraper/models/x/user_retrieve_verified_followers_params" -require_relative "x_twitter_scraper/models/x/user_retrieve_verified_followers_response" +require_relative "x_twitter_scraper/models/x/users/follow_create_params" +require_relative "x_twitter_scraper/models/x/users/follow_create_response" +require_relative "x_twitter_scraper/models/x/users/follow_delete_all_params" +require_relative "x_twitter_scraper/models/x/users/follow_delete_all_response" require_relative "x_twitter_scraper/models/x/x_account" require_relative "x_twitter_scraper/models/x/x_account_detail" require_relative "x_twitter_scraper/models/x_get_article_params" require_relative "x_twitter_scraper/models/x_get_article_response" require_relative "x_twitter_scraper/models/x_get_home_timeline_params" -require_relative "x_twitter_scraper/models/x_get_home_timeline_response" require_relative "x_twitter_scraper/models/x_get_notifications_params" require_relative "x_twitter_scraper/models/x_get_notifications_response" require_relative "x_twitter_scraper/models/x_get_trends_params" diff --git a/lib/x_twitter_scraper/internal/cursor_page.rb b/lib/x_twitter_scraper/internal/cursor_page.rb new file mode 100644 index 0000000..14e0159 --- /dev/null +++ b/lib/x_twitter_scraper/internal/cursor_page.rb @@ -0,0 +1,84 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Internal + # @generic Elem + # + # @example + # if cursor_page.has_next? + # cursor_page = cursor_page.next_page + # end + # + # @example + # cursor_page.auto_paging_each do |tweet| + # puts(tweet) + # end + class CursorPage + include XTwitterScraper::Internal::Type::BasePage + + # @return [String, nil] + attr_accessor :next_cursor + + # @return [Boolean] + attr_accessor :has_next_page + + # @return [Boolean] + def next_page? + !empty? && !next_cursor.to_s.empty? + end + + # @raise [XTwitterScraper::HTTP::Error] + # @return [self] + def next_page + unless next_page? + message = "No more pages available. Please check #next_page? before calling ##{__method__}" + raise RuntimeError.new(message) + end + + req = XTwitterScraper::Internal::Util.deep_merge(@req, {query: {cursor: next_cursor}}) + @client.request(req) + end + + # @param blk [Proc] + # + # @yieldparam [generic] + def auto_paging_each(&blk) + unless block_given? + raise ArgumentError.new("A block must be given to ##{__method__}") + end + + page = self + loop do + page.each(&blk) + + break unless page.next_page? + page = page.next_page + end + end + + # @api private + # + # @param client [XTwitterScraper::Internal::Transport::BaseClient] + # @param req [Hash{Symbol=>Object}] + # @param headers [Hash{String=>String}] + # @param page_data [Hash{Symbol=>Object}] + def initialize(client:, req:, headers:, page_data:) + super + + @next_cursor = page_data[:next_cursor] + @has_next_page = page_data[:has_next_page] + end + + # @api private + # + # @return [String] + def inspect + # rubocop:disable Layout/LineLength + model = XTwitterScraper::Internal::Type::Converter.inspect(@model, depth: 1) + + "#<#{self.class}[#{model}]:0x#{object_id.to_s(16)} next_cursor=#{next_cursor.inspect} has_next_page=#{has_next_page.inspect}>" + # rubocop:enable Layout/LineLength + end + end + end +end diff --git a/lib/x_twitter_scraper/models.rb b/lib/x_twitter_scraper/models.rb index e6c6008..41b8099 100644 --- a/lib/x_twitter_scraper/models.rb +++ b/lib/x_twitter_scraper/models.rb @@ -154,12 +154,20 @@ module XTwitterScraper StyleCompareParams = XTwitterScraper::Models::StyleCompareParams + StyleDeleteParams = XTwitterScraper::Models::StyleDeleteParams + + StyleGetPerformanceParams = XTwitterScraper::Models::StyleGetPerformanceParams + StyleListParams = XTwitterScraper::Models::StyleListParams StyleProfile = XTwitterScraper::Models::StyleProfile StyleProfileSummary = XTwitterScraper::Models::StyleProfileSummary + StyleRetrieveParams = XTwitterScraper::Models::StyleRetrieveParams + + StyleUpdateParams = XTwitterScraper::Models::StyleUpdateParams + SubscribeCreateParams = XTwitterScraper::Models::SubscribeCreateParams Support = XTwitterScraper::Models::Support diff --git a/lib/x_twitter_scraper/models/api_key_list_response.rb b/lib/x_twitter_scraper/models/api_key_list_response.rb index 3c95233..9c3a710 100644 --- a/lib/x_twitter_scraper/models/api_key_list_response.rb +++ b/lib/x_twitter_scraper/models/api_key_list_response.rb @@ -6,54 +6,11 @@ module Models class APIKeyListResponse < XTwitterScraper::Internal::Type::BaseModel # @!attribute keys # - # @return [Array] - required :keys, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::APIKeyListResponse::Key] } + # @return [Array] + required :keys, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::APIKey] } # @!method initialize(keys:) - # @param keys [Array] - - class Key < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time, api_name: :createdAt - - # @!attribute is_active - # - # @return [Boolean] - required :is_active, XTwitterScraper::Internal::Type::Boolean, api_name: :isActive - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute prefix - # - # @return [String] - required :prefix, String - - # @!attribute last_used_at - # - # @return [Time, nil] - optional :last_used_at, Time, api_name: :lastUsedAt - - # @!method initialize(id:, created_at:, is_active:, name:, prefix:, last_used_at: nil) - # API key metadata returned when listing keys. - # - # @param id [String] - # @param created_at [Time] - # @param is_active [Boolean] - # @param name [String] - # @param prefix [String] - # @param last_used_at [Time] - end + # @param keys [Array] end end end diff --git a/lib/x_twitter_scraper/models/draft_create_response.rb b/lib/x_twitter_scraper/models/draft_create_response.rb deleted file mode 100644 index 2b837c6..0000000 --- a/lib/x_twitter_scraper/models/draft_create_response.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - # @see XTwitterScraper::Resources::Drafts#create - class DraftCreateResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time, api_name: :createdAt - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute updated_at - # - # @return [Time] - required :updated_at, Time, api_name: :updatedAt - - # @!attribute goal - # - # @return [String, nil] - optional :goal, String - - # @!attribute topic - # - # @return [String, nil] - optional :topic, String - - # @!method initialize(id:, created_at:, text:, updated_at:, goal: nil, topic: nil) - # Full tweet draft including update timestamp. - # - # @param id [String] - # @param created_at [Time] - # @param text [String] - # @param updated_at [Time] - # @param goal [String] - # @param topic [String] - end - end -end diff --git a/lib/x_twitter_scraper/models/draft_detail.rb b/lib/x_twitter_scraper/models/draft_detail.rb index d9ff415..2d3edc1 100644 --- a/lib/x_twitter_scraper/models/draft_detail.rb +++ b/lib/x_twitter_scraper/models/draft_detail.rb @@ -2,6 +2,7 @@ module XTwitterScraper module Models + # @see XTwitterScraper::Resources::Drafts#create class DraftDetail < XTwitterScraper::Internal::Type::BaseModel # @!attribute id # diff --git a/lib/x_twitter_scraper/models/draft_list_response.rb b/lib/x_twitter_scraper/models/draft_list_response.rb index 4880809..c3f7bc1 100644 --- a/lib/x_twitter_scraper/models/draft_list_response.rb +++ b/lib/x_twitter_scraper/models/draft_list_response.rb @@ -6,9 +6,8 @@ module Models class DraftListResponse < XTwitterScraper::Internal::Type::BaseModel # @!attribute drafts # - # @return [Array] - required :drafts, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::DraftListResponse::Draft] } + # @return [Array] + required :drafts, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Draft] } # @!attribute has_more # @@ -21,45 +20,9 @@ class DraftListResponse < XTwitterScraper::Internal::Type::BaseModel optional :next_cursor, String, api_name: :nextCursor # @!method initialize(drafts:, has_more:, next_cursor: nil) - # @param drafts [Array] + # @param drafts [Array] # @param has_more [Boolean] # @param next_cursor [String] - - class Draft < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time, api_name: :createdAt - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute goal - # - # @return [String, nil] - optional :goal, String - - # @!attribute topic - # - # @return [String, nil] - optional :topic, String - - # @!method initialize(id:, created_at:, text:, goal: nil, topic: nil) - # Saved tweet draft with optional topic and goal. - # - # @param id [String] - # @param created_at [Time] - # @param text [String] - # @param goal [String] - # @param topic [String] - end end end end diff --git a/lib/x_twitter_scraper/models/draft_retrieve_response.rb b/lib/x_twitter_scraper/models/draft_retrieve_response.rb deleted file mode 100644 index 2f0e9ad..0000000 --- a/lib/x_twitter_scraper/models/draft_retrieve_response.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - # @see XTwitterScraper::Resources::Drafts#retrieve - class DraftRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time, api_name: :createdAt - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute updated_at - # - # @return [Time] - required :updated_at, Time, api_name: :updatedAt - - # @!attribute goal - # - # @return [String, nil] - optional :goal, String - - # @!attribute topic - # - # @return [String, nil] - optional :topic, String - - # @!method initialize(id:, created_at:, text:, updated_at:, goal: nil, topic: nil) - # Full tweet draft including update timestamp. - # - # @param id [String] - # @param created_at [Time] - # @param text [String] - # @param updated_at [Time] - # @param goal [String] - # @param topic [String] - end - end -end diff --git a/lib/x_twitter_scraper/models/draw_list_response.rb b/lib/x_twitter_scraper/models/draw_list_response.rb index 62d5424..bf801a4 100644 --- a/lib/x_twitter_scraper/models/draw_list_response.rb +++ b/lib/x_twitter_scraper/models/draw_list_response.rb @@ -6,9 +6,8 @@ module Models class DrawListResponse < XTwitterScraper::Internal::Type::BaseModel # @!attribute draws # - # @return [Array] - required :draws, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::DrawListResponse::Draw] } + # @return [Array] + required :draws, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::DrawListItem] } # @!attribute has_more # @@ -21,57 +20,9 @@ class DrawListResponse < XTwitterScraper::Internal::Type::BaseModel optional :next_cursor, String, api_name: :nextCursor # @!method initialize(draws:, has_more:, next_cursor: nil) - # @param draws [Array] + # @param draws [Array] # @param has_more [Boolean] # @param next_cursor [String] - - class Draw < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time, api_name: :createdAt - - # @!attribute status - # - # @return [String] - required :status, String - - # @!attribute total_entries - # - # @return [Integer] - required :total_entries, Integer, api_name: :totalEntries - - # @!attribute tweet_url - # - # @return [String] - required :tweet_url, String, api_name: :tweetUrl - - # @!attribute valid_entries - # - # @return [Integer] - required :valid_entries, Integer, api_name: :validEntries - - # @!attribute drawn_at - # - # @return [Time, nil] - optional :drawn_at, Time, api_name: :drawnAt - - # @!method initialize(id:, created_at:, status:, total_entries:, tweet_url:, valid_entries:, drawn_at: nil) - # Giveaway draw summary with entry counts and status. - # - # @param id [String] - # @param created_at [Time] - # @param status [String] - # @param total_entries [Integer] - # @param tweet_url [String] - # @param valid_entries [Integer] - # @param drawn_at [Time] - end end end end diff --git a/lib/x_twitter_scraper/models/draw_retrieve_response.rb b/lib/x_twitter_scraper/models/draw_retrieve_response.rb index f682bb0..4059e2a 100644 --- a/lib/x_twitter_scraper/models/draw_retrieve_response.rb +++ b/lib/x_twitter_scraper/models/draw_retrieve_response.rb @@ -7,140 +7,18 @@ class DrawRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel # @!attribute draw # Full giveaway draw with tweet metrics, entries, and timing. # - # @return [XTwitterScraper::Models::DrawRetrieveResponse::Draw] - required :draw, -> { XTwitterScraper::Models::DrawRetrieveResponse::Draw } + # @return [XTwitterScraper::Models::DrawDetail] + required :draw, -> { XTwitterScraper::DrawDetail } # @!attribute winners # - # @return [Array] - required :winners, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::DrawRetrieveResponse::Winner] } + # @return [Array] + required :winners, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Winner] } # @!method initialize(draw:, winners:) - # @param draw [XTwitterScraper::Models::DrawRetrieveResponse::Draw] Full giveaway draw with tweet metrics, entries, and timing. + # @param draw [XTwitterScraper::Models::DrawDetail] Full giveaway draw with tweet metrics, entries, and timing. # - # @param winners [Array] - - # @see XTwitterScraper::Models::DrawRetrieveResponse#draw - class Draw < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time, api_name: :createdAt - - # @!attribute status - # - # @return [String] - required :status, String - - # @!attribute total_entries - # - # @return [Integer] - required :total_entries, Integer, api_name: :totalEntries - - # @!attribute tweet_author_username - # - # @return [String] - required :tweet_author_username, String, api_name: :tweetAuthorUsername - - # @!attribute tweet_id - # - # @return [String] - required :tweet_id, String, api_name: :tweetId - - # @!attribute tweet_like_count - # - # @return [Integer] - required :tweet_like_count, Integer, api_name: :tweetLikeCount - - # @!attribute tweet_quote_count - # - # @return [Integer] - required :tweet_quote_count, Integer, api_name: :tweetQuoteCount - - # @!attribute tweet_reply_count - # - # @return [Integer] - required :tweet_reply_count, Integer, api_name: :tweetReplyCount - - # @!attribute tweet_retweet_count - # - # @return [Integer] - required :tweet_retweet_count, Integer, api_name: :tweetRetweetCount - - # @!attribute tweet_text - # - # @return [String] - required :tweet_text, String, api_name: :tweetText - - # @!attribute tweet_url - # - # @return [String] - required :tweet_url, String, api_name: :tweetUrl - - # @!attribute valid_entries - # - # @return [Integer] - required :valid_entries, Integer, api_name: :validEntries - - # @!attribute drawn_at - # - # @return [Time, nil] - optional :drawn_at, Time, api_name: :drawnAt - - # @!method initialize(id:, created_at:, status:, total_entries:, tweet_author_username:, tweet_id:, tweet_like_count:, tweet_quote_count:, tweet_reply_count:, tweet_retweet_count:, tweet_text:, tweet_url:, valid_entries:, drawn_at: nil) - # Full giveaway draw with tweet metrics, entries, and timing. - # - # @param id [String] - # @param created_at [Time] - # @param status [String] - # @param total_entries [Integer] - # @param tweet_author_username [String] - # @param tweet_id [String] - # @param tweet_like_count [Integer] - # @param tweet_quote_count [Integer] - # @param tweet_reply_count [Integer] - # @param tweet_retweet_count [Integer] - # @param tweet_text [String] - # @param tweet_url [String] - # @param valid_entries [Integer] - # @param drawn_at [Time] - end - - class Winner < XTwitterScraper::Internal::Type::BaseModel - # @!attribute author_username - # - # @return [String] - required :author_username, String, api_name: :authorUsername - - # @!attribute is_backup - # - # @return [Boolean] - required :is_backup, XTwitterScraper::Internal::Type::Boolean, api_name: :isBackup - - # @!attribute position - # - # @return [Integer] - required :position, Integer - - # @!attribute tweet_id - # - # @return [String] - required :tweet_id, String, api_name: :tweetId - - # @!method initialize(author_username:, is_backup:, position:, tweet_id:) - # Giveaway draw winner with position and backup flag. - # - # @param author_username [String] - # @param is_backup [Boolean] - # @param position [Integer] - # @param tweet_id [String] - end + # @param winners [Array] end end end diff --git a/lib/x_twitter_scraper/models/draw_run_response.rb b/lib/x_twitter_scraper/models/draw_run_response.rb index 53ce0c9..5935b2e 100644 --- a/lib/x_twitter_scraper/models/draw_run_response.rb +++ b/lib/x_twitter_scraper/models/draw_run_response.rb @@ -26,46 +26,15 @@ class DrawRunResponse < XTwitterScraper::Internal::Type::BaseModel # @!attribute winners # - # @return [Array] - required :winners, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::DrawRunResponse::Winner] } + # @return [Array] + required :winners, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Winner] } # @!method initialize(id:, total_entries:, tweet_id:, valid_entries:, winners:) # @param id [String] # @param total_entries [Integer] # @param tweet_id [String] # @param valid_entries [Integer] - # @param winners [Array] - - class Winner < XTwitterScraper::Internal::Type::BaseModel - # @!attribute author_username - # - # @return [String] - required :author_username, String, api_name: :authorUsername - - # @!attribute is_backup - # - # @return [Boolean] - required :is_backup, XTwitterScraper::Internal::Type::Boolean, api_name: :isBackup - - # @!attribute position - # - # @return [Integer] - required :position, Integer - - # @!attribute tweet_id - # - # @return [String] - required :tweet_id, String, api_name: :tweetId - - # @!method initialize(author_username:, is_backup:, position:, tweet_id:) - # Giveaway draw winner with position and backup flag. - # - # @param author_username [String] - # @param is_backup [Boolean] - # @param position [Integer] - # @param tweet_id [String] - end + # @param winners [Array] end end end diff --git a/lib/x_twitter_scraper/models/event.rb b/lib/x_twitter_scraper/models/event.rb index e503351..99818db 100644 --- a/lib/x_twitter_scraper/models/event.rb +++ b/lib/x_twitter_scraper/models/event.rb @@ -26,8 +26,8 @@ class Event < XTwitterScraper::Internal::Type::BaseModel # @!attribute type # Type of monitor event fired when account activity occurs. # - # @return [Symbol, XTwitterScraper::Models::Event::Type] - required :type, enum: -> { XTwitterScraper::Event::Type } + # @return [Symbol, XTwitterScraper::Models::EventType] + required :type, enum: -> { XTwitterScraper::EventType } # @!attribute username # @@ -45,26 +45,9 @@ class Event < XTwitterScraper::Internal::Type::BaseModel # # @param occurred_at [Time] # - # @param type [Symbol, XTwitterScraper::Models::Event::Type] Type of monitor event fired when account activity occurs. + # @param type [Symbol, XTwitterScraper::Models::EventType] Type of monitor event fired when account activity occurs. # # @param username [String] - - # Type of monitor event fired when account activity occurs. - # - # @see XTwitterScraper::Models::Event#type - module Type - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end end end end diff --git a/lib/x_twitter_scraper/models/event_detail.rb b/lib/x_twitter_scraper/models/event_detail.rb index e101b66..3e87746 100644 --- a/lib/x_twitter_scraper/models/event_detail.rb +++ b/lib/x_twitter_scraper/models/event_detail.rb @@ -2,6 +2,7 @@ module XTwitterScraper module Models + # @see XTwitterScraper::Resources::Events#retrieve class EventDetail < XTwitterScraper::Internal::Type::BaseModel # @!attribute id # @@ -27,8 +28,8 @@ class EventDetail < XTwitterScraper::Internal::Type::BaseModel # @!attribute type # Type of monitor event fired when account activity occurs. # - # @return [Symbol, XTwitterScraper::Models::EventDetail::Type] - required :type, enum: -> { XTwitterScraper::EventDetail::Type } + # @return [Symbol, XTwitterScraper::Models::EventType] + required :type, enum: -> { XTwitterScraper::EventType } # @!attribute username # @@ -51,28 +52,11 @@ class EventDetail < XTwitterScraper::Internal::Type::BaseModel # # @param occurred_at [Time] # - # @param type [Symbol, XTwitterScraper::Models::EventDetail::Type] Type of monitor event fired when account activity occurs. + # @param type [Symbol, XTwitterScraper::Models::EventType] Type of monitor event fired when account activity occurs. # # @param username [String] # # @param x_event_id [String] - - # Type of monitor event fired when account activity occurs. - # - # @see XTwitterScraper::Models::EventDetail#type - module Type - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end end end end diff --git a/lib/x_twitter_scraper/models/event_list_params.rb b/lib/x_twitter_scraper/models/event_list_params.rb index acca003..13d18f0 100644 --- a/lib/x_twitter_scraper/models/event_list_params.rb +++ b/lib/x_twitter_scraper/models/event_list_params.rb @@ -16,8 +16,8 @@ class EventListParams < XTwitterScraper::Internal::Type::BaseModel # @!attribute event_type # Filter events by type # - # @return [Symbol, XTwitterScraper::Models::EventListParams::EventType, nil] - optional :event_type, enum: -> { XTwitterScraper::EventListParams::EventType } + # @return [Symbol, XTwitterScraper::Models::EventType, nil] + optional :event_type, enum: -> { XTwitterScraper::EventType } # @!attribute limit # Maximum number of items to return (1-100, default 50) @@ -34,28 +34,13 @@ class EventListParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(after: nil, event_type: nil, limit: nil, monitor_id: nil, request_options: {}) # @param after [String] Cursor for keyset pagination # - # @param event_type [Symbol, XTwitterScraper::Models::EventListParams::EventType] Filter events by type + # @param event_type [Symbol, XTwitterScraper::Models::EventType] Filter events by type # # @param limit [Integer] Maximum number of items to return (1-100, default 50) # # @param monitor_id [String] Filter events by monitor ID # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] - - # Filter events by type - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end end end end diff --git a/lib/x_twitter_scraper/models/event_list_response.rb b/lib/x_twitter_scraper/models/event_list_response.rb index 113e505..9f970c9 100644 --- a/lib/x_twitter_scraper/models/event_list_response.rb +++ b/lib/x_twitter_scraper/models/event_list_response.rb @@ -6,9 +6,8 @@ module Models class EventListResponse < XTwitterScraper::Internal::Type::BaseModel # @!attribute events # - # @return [Array] - required :events, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::EventListResponse::Event] } + # @return [Array] + required :events, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Event] } # @!attribute has_more # @@ -21,74 +20,9 @@ class EventListResponse < XTwitterScraper::Internal::Type::BaseModel optional :next_cursor, String, api_name: :nextCursor # @!method initialize(events:, has_more:, next_cursor: nil) - # @param events [Array] + # @param events [Array] # @param has_more [Boolean] # @param next_cursor [String] - - class Event < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute data - # - # @return [Hash{Symbol=>Object}] - required :data, XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown] - - # @!attribute monitor_id - # - # @return [String] - required :monitor_id, String, api_name: :monitorId - - # @!attribute occurred_at - # - # @return [Time] - required :occurred_at, Time, api_name: :occurredAt - - # @!attribute type - # Type of monitor event fired when account activity occurs. - # - # @return [Symbol, XTwitterScraper::Models::EventListResponse::Event::Type] - required :type, enum: -> { XTwitterScraper::Models::EventListResponse::Event::Type } - - # @!attribute username - # - # @return [String] - required :username, String - - # @!method initialize(id:, data:, monitor_id:, occurred_at:, type:, username:) - # Monitor event summary with type, username, and occurrence time. - # - # @param id [String] - # - # @param data [Hash{Symbol=>Object}] - # - # @param monitor_id [String] - # - # @param occurred_at [Time] - # - # @param type [Symbol, XTwitterScraper::Models::EventListResponse::Event::Type] Type of monitor event fired when account activity occurs. - # - # @param username [String] - - # Type of monitor event fired when account activity occurs. - # - # @see XTwitterScraper::Models::EventListResponse::Event#type - module Type - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end - end end end end diff --git a/lib/x_twitter_scraper/models/event_retrieve_response.rb b/lib/x_twitter_scraper/models/event_retrieve_response.rb deleted file mode 100644 index ef5539c..0000000 --- a/lib/x_twitter_scraper/models/event_retrieve_response.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - # @see XTwitterScraper::Resources::Events#retrieve - class EventRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute data - # Event payload — shape varies by event type (JSON) - # - # @return [Hash{Symbol=>Object}] - required :data, XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown] - - # @!attribute monitor_id - # - # @return [String] - required :monitor_id, String, api_name: :monitorId - - # @!attribute occurred_at - # - # @return [Time] - required :occurred_at, Time, api_name: :occurredAt - - # @!attribute type - # Type of monitor event fired when account activity occurs. - # - # @return [Symbol, XTwitterScraper::Models::EventRetrieveResponse::Type] - required :type, enum: -> { XTwitterScraper::Models::EventRetrieveResponse::Type } - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute x_event_id - # - # @return [String, nil] - optional :x_event_id, String, api_name: :xEventId - - # @!method initialize(id:, data:, monitor_id:, occurred_at:, type:, username:, x_event_id: nil) - # Full monitor event including payload data and optional X event ID. - # - # @param id [String] - # - # @param data [Hash{Symbol=>Object}] Event payload — shape varies by event type (JSON) - # - # @param monitor_id [String] - # - # @param occurred_at [Time] - # - # @param type [Symbol, XTwitterScraper::Models::EventRetrieveResponse::Type] Type of monitor event fired when account activity occurs. - # - # @param username [String] - # - # @param x_event_id [String] - - # Type of monitor event fired when account activity occurs. - # - # @see XTwitterScraper::Models::EventRetrieveResponse#type - module Type - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end - end - end -end diff --git a/lib/x_twitter_scraper/models/extraction_list_response.rb b/lib/x_twitter_scraper/models/extraction_list_response.rb index 20efe36..456eb3a 100644 --- a/lib/x_twitter_scraper/models/extraction_list_response.rb +++ b/lib/x_twitter_scraper/models/extraction_list_response.rb @@ -6,9 +6,8 @@ module Models class ExtractionListResponse < XTwitterScraper::Internal::Type::BaseModel # @!attribute extractions # - # @return [Array] - required :extractions, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::ExtractionListResponse::Extraction] } + # @return [Array] + required :extractions, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::ExtractionJob] } # @!attribute has_more # @@ -21,102 +20,9 @@ class ExtractionListResponse < XTwitterScraper::Internal::Type::BaseModel optional :next_cursor, String, api_name: :nextCursor # @!method initialize(extractions:, has_more:, next_cursor: nil) - # @param extractions [Array] + # @param extractions [Array] # @param has_more [Boolean] # @param next_cursor [String] - - class Extraction < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time, api_name: :createdAt - - # @!attribute status - # - # @return [Symbol, XTwitterScraper::Models::ExtractionListResponse::Extraction::Status] - required :status, enum: -> { XTwitterScraper::Models::ExtractionListResponse::Extraction::Status } - - # @!attribute tool_type - # Identifier for the extraction tool used to run a job. - # - # @return [Symbol, XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType] - required :tool_type, - enum: -> { XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType }, - api_name: :toolType - - # @!attribute total_results - # - # @return [Integer] - required :total_results, Integer, api_name: :totalResults - - # @!attribute completed_at - # - # @return [Time, nil] - optional :completed_at, Time, api_name: :completedAt - - # @!method initialize(id:, created_at:, status:, tool_type:, total_results:, completed_at: nil) - # Extraction job tracking status, tool type, and result count. - # - # @param id [String] - # - # @param created_at [Time] - # - # @param status [Symbol, XTwitterScraper::Models::ExtractionListResponse::Extraction::Status] - # - # @param tool_type [Symbol, XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType] Identifier for the extraction tool used to run a job. - # - # @param total_results [Integer] - # - # @param completed_at [Time] - - # @see XTwitterScraper::Models::ExtractionListResponse::Extraction#status - module Status - extend XTwitterScraper::Internal::Type::Enum - - RUNNING = :running - COMPLETED = :completed - FAILED = :failed - - # @!method self.values - # @return [Array] - end - - # Identifier for the extraction tool used to run a job. - # - # @see XTwitterScraper::Models::ExtractionListResponse::Extraction#tool_type - module ToolType - extend XTwitterScraper::Internal::Type::Enum - - ARTICLE_EXTRACTOR = :article_extractor - COMMUNITY_EXTRACTOR = :community_extractor - COMMUNITY_MODERATOR_EXPLORER = :community_moderator_explorer - COMMUNITY_POST_EXTRACTOR = :community_post_extractor - COMMUNITY_SEARCH = :community_search - FOLLOWER_EXPLORER = :follower_explorer - FOLLOWING_EXPLORER = :following_explorer - LIST_FOLLOWER_EXPLORER = :list_follower_explorer - LIST_MEMBER_EXTRACTOR = :list_member_extractor - LIST_POST_EXTRACTOR = :list_post_extractor - MENTION_EXTRACTOR = :mention_extractor - PEOPLE_SEARCH = :people_search - POST_EXTRACTOR = :post_extractor - QUOTE_EXTRACTOR = :quote_extractor - REPLY_EXTRACTOR = :reply_extractor - REPOST_EXTRACTOR = :repost_extractor - SPACE_EXPLORER = :space_explorer - THREAD_EXTRACTOR = :thread_extractor - TWEET_SEARCH_EXTRACTOR = :tweet_search_extractor - VERIFIED_FOLLOWER_EXPLORER = :verified_follower_explorer - - # @!method self.values - # @return [Array] - end - end end end end diff --git a/lib/x_twitter_scraper/models/integration.rb b/lib/x_twitter_scraper/models/integration.rb index 2450b69..21dcf10 100644 --- a/lib/x_twitter_scraper/models/integration.rb +++ b/lib/x_twitter_scraper/models/integration.rb @@ -2,6 +2,7 @@ module XTwitterScraper module Models + # @see XTwitterScraper::Resources::Integrations#create class Integration < XTwitterScraper::Internal::Type::BaseModel # @!attribute id # @@ -22,9 +23,9 @@ class Integration < XTwitterScraper::Internal::Type::BaseModel # @!attribute event_types # Array of event types to subscribe to. # - # @return [Array] + # @return [Array] required :event_types, - -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::Integration::EventType] }, + -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType] }, api_name: :eventTypes # @!attribute is_active @@ -72,7 +73,7 @@ class Integration < XTwitterScraper::Internal::Type::BaseModel # # @param created_at [Time] # - # @param event_types [Array] Array of event types to subscribe to. + # @param event_types [Array] Array of event types to subscribe to. # # @param is_active [Boolean] # @@ -88,21 +89,6 @@ class Integration < XTwitterScraper::Internal::Type::BaseModel # # @param silent_push [Boolean] - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end - # @see XTwitterScraper::Models::Integration#type module Type extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/integration_create_params.rb b/lib/x_twitter_scraper/models/integration_create_params.rb index c0fd4c6..e71f002 100644 --- a/lib/x_twitter_scraper/models/integration_create_params.rb +++ b/lib/x_twitter_scraper/models/integration_create_params.rb @@ -16,11 +16,9 @@ class IntegrationCreateParams < XTwitterScraper::Internal::Type::BaseModel # @!attribute event_types # Array of event types to subscribe to. # - # @return [Array] + # @return [Array] required :event_types, - -> { - XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::IntegrationCreateParams::EventType] - }, + -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType] }, api_name: :eventTypes # @!attribute name @@ -36,7 +34,7 @@ class IntegrationCreateParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(config:, event_types:, name:, type:, request_options: {}) # @param config [XTwitterScraper::Models::IntegrationCreateParams::Config] Integration config (e.g. Telegram chatId) # - # @param event_types [Array] Array of event types to subscribe to. + # @param event_types [Array] Array of event types to subscribe to. # # @param name [String] # @@ -56,21 +54,6 @@ class Config < XTwitterScraper::Internal::Type::BaseModel # @param chat_id [String] end - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end - module Type extend XTwitterScraper::Internal::Type::Enum diff --git a/lib/x_twitter_scraper/models/integration_create_response.rb b/lib/x_twitter_scraper/models/integration_create_response.rb deleted file mode 100644 index 1d63e97..0000000 --- a/lib/x_twitter_scraper/models/integration_create_response.rb +++ /dev/null @@ -1,118 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - # @see XTwitterScraper::Resources::Integrations#create - class IntegrationCreateResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute config - # Integration config — shape varies by type (JSON) - # - # @return [Hash{Symbol=>Object}] - required :config, XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown] - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time, api_name: :createdAt - - # @!attribute event_types - # Array of event types to subscribe to. - # - # @return [Array] - required :event_types, - -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::Models::IntegrationCreateResponse::EventType] }, - api_name: :eventTypes - - # @!attribute is_active - # - # @return [Boolean] - required :is_active, XTwitterScraper::Internal::Type::Boolean, api_name: :isActive - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute type - # - # @return [Symbol, XTwitterScraper::Models::IntegrationCreateResponse::Type] - required :type, enum: -> { XTwitterScraper::Models::IntegrationCreateResponse::Type } - - # @!attribute filters - # Event filter rules (JSON) - # - # @return [Hash{Symbol=>Object}, nil] - optional :filters, XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown] - - # @!attribute message_template - # - # @return [String, nil] - optional :message_template, String, api_name: :messageTemplate - - # @!attribute scope_all_monitors - # - # @return [Boolean, nil] - optional :scope_all_monitors, XTwitterScraper::Internal::Type::Boolean, api_name: :scopeAllMonitors - - # @!attribute silent_push - # - # @return [Boolean, nil] - optional :silent_push, XTwitterScraper::Internal::Type::Boolean, api_name: :silentPush - - # @!method initialize(id:, config:, created_at:, event_types:, is_active:, name:, type:, filters: nil, message_template: nil, scope_all_monitors: nil, silent_push: nil) - # Third-party integration (e.g. Telegram) subscribed to monitor events. - # - # @param id [String] - # - # @param config [Hash{Symbol=>Object}] Integration config — shape varies by type (JSON) - # - # @param created_at [Time] - # - # @param event_types [Array] Array of event types to subscribe to. - # - # @param is_active [Boolean] - # - # @param name [String] - # - # @param type [Symbol, XTwitterScraper::Models::IntegrationCreateResponse::Type] - # - # @param filters [Hash{Symbol=>Object}] Event filter rules (JSON) - # - # @param message_template [String] - # - # @param scope_all_monitors [Boolean] - # - # @param silent_push [Boolean] - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end - - # @see XTwitterScraper::Models::IntegrationCreateResponse#type - module Type - extend XTwitterScraper::Internal::Type::Enum - - TELEGRAM = :telegram - - # @!method self.values - # @return [Array] - end - end - end -end diff --git a/lib/x_twitter_scraper/models/integration_list_deliveries_response.rb b/lib/x_twitter_scraper/models/integration_list_deliveries_response.rb index e687e49..529e3ec 100644 --- a/lib/x_twitter_scraper/models/integration_list_deliveries_response.rb +++ b/lib/x_twitter_scraper/models/integration_list_deliveries_response.rb @@ -6,78 +6,12 @@ module Models class IntegrationListDeliveriesResponse < XTwitterScraper::Internal::Type::BaseModel # @!attribute deliveries # - # @return [Array] + # @return [Array] required :deliveries, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::IntegrationListDeliveriesResponse::Delivery] } + -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::IntegrationDelivery] } # @!method initialize(deliveries:) - # @param deliveries [Array] - - class Delivery < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute attempts - # - # @return [Integer] - required :attempts, Integer - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time, api_name: :createdAt - - # @!attribute event_type - # - # @return [String] - required :event_type, String, api_name: :eventType - - # @!attribute status - # - # @return [String] - required :status, String - - # @!attribute delivered_at - # - # @return [Time, nil] - optional :delivered_at, Time, api_name: :deliveredAt - - # @!attribute last_error - # - # @return [String, nil] - optional :last_error, String, api_name: :lastError - - # @!attribute last_status_code - # - # @return [Integer, nil] - optional :last_status_code, Integer, api_name: :lastStatusCode - - # @!attribute source_id - # - # @return [String, nil] - optional :source_id, String, api_name: :sourceId - - # @!attribute source_type - # - # @return [String, nil] - optional :source_type, String, api_name: :sourceType - - # @!method initialize(id:, attempts:, created_at:, event_type:, status:, delivered_at: nil, last_error: nil, last_status_code: nil, source_id: nil, source_type: nil) - # Integration delivery attempt record with status and retry count. - # - # @param id [String] - # @param attempts [Integer] - # @param created_at [Time] - # @param event_type [String] - # @param status [String] - # @param delivered_at [Time] - # @param last_error [String] - # @param last_status_code [Integer] - # @param source_id [String] - # @param source_type [String] - end + # @param deliveries [Array] end end end diff --git a/lib/x_twitter_scraper/models/integration_list_response.rb b/lib/x_twitter_scraper/models/integration_list_response.rb index 39aab47..13f3155 100644 --- a/lib/x_twitter_scraper/models/integration_list_response.rb +++ b/lib/x_twitter_scraper/models/integration_list_response.rb @@ -6,124 +6,11 @@ module Models class IntegrationListResponse < XTwitterScraper::Internal::Type::BaseModel # @!attribute integrations # - # @return [Array] - required :integrations, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::IntegrationListResponse::Integration] } + # @return [Array] + required :integrations, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Integration] } # @!method initialize(integrations:) - # @param integrations [Array] - - class Integration < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute config - # Integration config — shape varies by type (JSON) - # - # @return [Hash{Symbol=>Object}] - required :config, XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown] - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time, api_name: :createdAt - - # @!attribute event_types - # Array of event types to subscribe to. - # - # @return [Array] - required :event_types, - -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::Models::IntegrationListResponse::Integration::EventType] }, - api_name: :eventTypes - - # @!attribute is_active - # - # @return [Boolean] - required :is_active, XTwitterScraper::Internal::Type::Boolean, api_name: :isActive - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute type - # - # @return [Symbol, XTwitterScraper::Models::IntegrationListResponse::Integration::Type] - required :type, enum: -> { XTwitterScraper::Models::IntegrationListResponse::Integration::Type } - - # @!attribute filters - # Event filter rules (JSON) - # - # @return [Hash{Symbol=>Object}, nil] - optional :filters, XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown] - - # @!attribute message_template - # - # @return [String, nil] - optional :message_template, String, api_name: :messageTemplate - - # @!attribute scope_all_monitors - # - # @return [Boolean, nil] - optional :scope_all_monitors, XTwitterScraper::Internal::Type::Boolean, api_name: :scopeAllMonitors - - # @!attribute silent_push - # - # @return [Boolean, nil] - optional :silent_push, XTwitterScraper::Internal::Type::Boolean, api_name: :silentPush - - # @!method initialize(id:, config:, created_at:, event_types:, is_active:, name:, type:, filters: nil, message_template: nil, scope_all_monitors: nil, silent_push: nil) - # Third-party integration (e.g. Telegram) subscribed to monitor events. - # - # @param id [String] - # - # @param config [Hash{Symbol=>Object}] Integration config — shape varies by type (JSON) - # - # @param created_at [Time] - # - # @param event_types [Array] Array of event types to subscribe to. - # - # @param is_active [Boolean] - # - # @param name [String] - # - # @param type [Symbol, XTwitterScraper::Models::IntegrationListResponse::Integration::Type] - # - # @param filters [Hash{Symbol=>Object}] Event filter rules (JSON) - # - # @param message_template [String] - # - # @param scope_all_monitors [Boolean] - # - # @param silent_push [Boolean] - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end - - # @see XTwitterScraper::Models::IntegrationListResponse::Integration#type - module Type - extend XTwitterScraper::Internal::Type::Enum - - TELEGRAM = :telegram - - # @!method self.values - # @return [Array] - end - end + # @param integrations [Array] end end end diff --git a/lib/x_twitter_scraper/models/integration_retrieve_response.rb b/lib/x_twitter_scraper/models/integration_retrieve_response.rb deleted file mode 100644 index f46126d..0000000 --- a/lib/x_twitter_scraper/models/integration_retrieve_response.rb +++ /dev/null @@ -1,118 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - # @see XTwitterScraper::Resources::Integrations#retrieve - class IntegrationRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute config - # Integration config — shape varies by type (JSON) - # - # @return [Hash{Symbol=>Object}] - required :config, XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown] - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time, api_name: :createdAt - - # @!attribute event_types - # Array of event types to subscribe to. - # - # @return [Array] - required :event_types, - -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::Models::IntegrationRetrieveResponse::EventType] }, - api_name: :eventTypes - - # @!attribute is_active - # - # @return [Boolean] - required :is_active, XTwitterScraper::Internal::Type::Boolean, api_name: :isActive - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute type - # - # @return [Symbol, XTwitterScraper::Models::IntegrationRetrieveResponse::Type] - required :type, enum: -> { XTwitterScraper::Models::IntegrationRetrieveResponse::Type } - - # @!attribute filters - # Event filter rules (JSON) - # - # @return [Hash{Symbol=>Object}, nil] - optional :filters, XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown] - - # @!attribute message_template - # - # @return [String, nil] - optional :message_template, String, api_name: :messageTemplate - - # @!attribute scope_all_monitors - # - # @return [Boolean, nil] - optional :scope_all_monitors, XTwitterScraper::Internal::Type::Boolean, api_name: :scopeAllMonitors - - # @!attribute silent_push - # - # @return [Boolean, nil] - optional :silent_push, XTwitterScraper::Internal::Type::Boolean, api_name: :silentPush - - # @!method initialize(id:, config:, created_at:, event_types:, is_active:, name:, type:, filters: nil, message_template: nil, scope_all_monitors: nil, silent_push: nil) - # Third-party integration (e.g. Telegram) subscribed to monitor events. - # - # @param id [String] - # - # @param config [Hash{Symbol=>Object}] Integration config — shape varies by type (JSON) - # - # @param created_at [Time] - # - # @param event_types [Array] Array of event types to subscribe to. - # - # @param is_active [Boolean] - # - # @param name [String] - # - # @param type [Symbol, XTwitterScraper::Models::IntegrationRetrieveResponse::Type] - # - # @param filters [Hash{Symbol=>Object}] Event filter rules (JSON) - # - # @param message_template [String] - # - # @param scope_all_monitors [Boolean] - # - # @param silent_push [Boolean] - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end - - # @see XTwitterScraper::Models::IntegrationRetrieveResponse#type - module Type - extend XTwitterScraper::Internal::Type::Enum - - TELEGRAM = :telegram - - # @!method self.values - # @return [Array] - end - end - end -end diff --git a/lib/x_twitter_scraper/models/integration_update_params.rb b/lib/x_twitter_scraper/models/integration_update_params.rb index 935dd3b..1f41337 100644 --- a/lib/x_twitter_scraper/models/integration_update_params.rb +++ b/lib/x_twitter_scraper/models/integration_update_params.rb @@ -15,11 +15,9 @@ class IntegrationUpdateParams < XTwitterScraper::Internal::Type::BaseModel # @!attribute event_types # Array of event types to subscribe to. # - # @return [Array, nil] + # @return [Array, nil] optional :event_types, - -> { - XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::IntegrationUpdateParams::EventType] - }, + -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType] }, api_name: :eventTypes # @!attribute filters @@ -59,7 +57,7 @@ class IntegrationUpdateParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, event_types: nil, filters: nil, is_active: nil, message_template: nil, name: nil, scope_all_monitors: nil, silent_push: nil, request_options: {}) # @param id [String] # - # @param event_types [Array] Array of event types to subscribe to. + # @param event_types [Array] Array of event types to subscribe to. # # @param filters [Hash{Symbol=>Object}] Event filter rules (JSON) # @@ -74,21 +72,6 @@ class IntegrationUpdateParams < XTwitterScraper::Internal::Type::BaseModel # @param silent_push [Boolean] # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end end end end diff --git a/lib/x_twitter_scraper/models/integration_update_response.rb b/lib/x_twitter_scraper/models/integration_update_response.rb deleted file mode 100644 index 1b4c030..0000000 --- a/lib/x_twitter_scraper/models/integration_update_response.rb +++ /dev/null @@ -1,118 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - # @see XTwitterScraper::Resources::Integrations#update - class IntegrationUpdateResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute config - # Integration config — shape varies by type (JSON) - # - # @return [Hash{Symbol=>Object}] - required :config, XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown] - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time, api_name: :createdAt - - # @!attribute event_types - # Array of event types to subscribe to. - # - # @return [Array] - required :event_types, - -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::Models::IntegrationUpdateResponse::EventType] }, - api_name: :eventTypes - - # @!attribute is_active - # - # @return [Boolean] - required :is_active, XTwitterScraper::Internal::Type::Boolean, api_name: :isActive - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute type - # - # @return [Symbol, XTwitterScraper::Models::IntegrationUpdateResponse::Type] - required :type, enum: -> { XTwitterScraper::Models::IntegrationUpdateResponse::Type } - - # @!attribute filters - # Event filter rules (JSON) - # - # @return [Hash{Symbol=>Object}, nil] - optional :filters, XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown] - - # @!attribute message_template - # - # @return [String, nil] - optional :message_template, String, api_name: :messageTemplate - - # @!attribute scope_all_monitors - # - # @return [Boolean, nil] - optional :scope_all_monitors, XTwitterScraper::Internal::Type::Boolean, api_name: :scopeAllMonitors - - # @!attribute silent_push - # - # @return [Boolean, nil] - optional :silent_push, XTwitterScraper::Internal::Type::Boolean, api_name: :silentPush - - # @!method initialize(id:, config:, created_at:, event_types:, is_active:, name:, type:, filters: nil, message_template: nil, scope_all_monitors: nil, silent_push: nil) - # Third-party integration (e.g. Telegram) subscribed to monitor events. - # - # @param id [String] - # - # @param config [Hash{Symbol=>Object}] Integration config — shape varies by type (JSON) - # - # @param created_at [Time] - # - # @param event_types [Array] Array of event types to subscribe to. - # - # @param is_active [Boolean] - # - # @param name [String] - # - # @param type [Symbol, XTwitterScraper::Models::IntegrationUpdateResponse::Type] - # - # @param filters [Hash{Symbol=>Object}] Event filter rules (JSON) - # - # @param message_template [String] - # - # @param scope_all_monitors [Boolean] - # - # @param silent_push [Boolean] - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end - - # @see XTwitterScraper::Models::IntegrationUpdateResponse#type - module Type - extend XTwitterScraper::Internal::Type::Enum - - TELEGRAM = :telegram - - # @!method self.values - # @return [Array] - end - end - end -end diff --git a/lib/x_twitter_scraper/models/monitor.rb b/lib/x_twitter_scraper/models/monitor.rb index d54f409..6bb73e8 100644 --- a/lib/x_twitter_scraper/models/monitor.rb +++ b/lib/x_twitter_scraper/models/monitor.rb @@ -2,6 +2,7 @@ module XTwitterScraper module Models + # @see XTwitterScraper::Resources::Monitors#retrieve class Monitor < XTwitterScraper::Internal::Type::BaseModel # @!attribute id # @@ -16,9 +17,9 @@ class Monitor < XTwitterScraper::Internal::Type::BaseModel # @!attribute event_types # Array of event types to subscribe to. # - # @return [Array] + # @return [Array] required :event_types, - -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::Monitor::EventType] }, + -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType] }, api_name: :eventTypes # @!attribute is_active @@ -43,28 +44,13 @@ class Monitor < XTwitterScraper::Internal::Type::BaseModel # # @param created_at [Time] # - # @param event_types [Array] Array of event types to subscribe to. + # @param event_types [Array] Array of event types to subscribe to. # # @param is_active [Boolean] # # @param username [String] # # @param x_user_id [String] - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end end end end diff --git a/lib/x_twitter_scraper/models/monitor_create_params.rb b/lib/x_twitter_scraper/models/monitor_create_params.rb index 10abddd..45a6cfa 100644 --- a/lib/x_twitter_scraper/models/monitor_create_params.rb +++ b/lib/x_twitter_scraper/models/monitor_create_params.rb @@ -10,11 +10,9 @@ class MonitorCreateParams < XTwitterScraper::Internal::Type::BaseModel # @!attribute event_types # Array of event types to subscribe to. # - # @return [Array] + # @return [Array] required :event_types, - -> { - XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::MonitorCreateParams::EventType] - }, + -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType] }, api_name: :eventTypes # @!attribute username @@ -24,26 +22,11 @@ class MonitorCreateParams < XTwitterScraper::Internal::Type::BaseModel required :username, String # @!method initialize(event_types:, username:, request_options: {}) - # @param event_types [Array] Array of event types to subscribe to. + # @param event_types [Array] Array of event types to subscribe to. # # @param username [String] X username (without @) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end end end end diff --git a/lib/x_twitter_scraper/models/monitor_create_response.rb b/lib/x_twitter_scraper/models/monitor_create_response.rb index 59a0b4a..0545213 100644 --- a/lib/x_twitter_scraper/models/monitor_create_response.rb +++ b/lib/x_twitter_scraper/models/monitor_create_response.rb @@ -17,9 +17,9 @@ class MonitorCreateResponse < XTwitterScraper::Internal::Type::BaseModel # @!attribute event_types # Array of event types to subscribe to. # - # @return [Array] + # @return [Array] required :event_types, - -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::Models::MonitorCreateResponse::EventType] }, + -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType] }, api_name: :eventTypes # @!attribute username @@ -37,26 +37,11 @@ class MonitorCreateResponse < XTwitterScraper::Internal::Type::BaseModel # # @param created_at [Time] # - # @param event_types [Array] Array of event types to subscribe to. + # @param event_types [Array] Array of event types to subscribe to. # # @param username [String] # # @param x_user_id [String] - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end end end end diff --git a/lib/x_twitter_scraper/models/monitor_list_response.rb b/lib/x_twitter_scraper/models/monitor_list_response.rb index a0b3aeb..ed8c8d9 100644 --- a/lib/x_twitter_scraper/models/monitor_list_response.rb +++ b/lib/x_twitter_scraper/models/monitor_list_response.rb @@ -6,9 +6,8 @@ module Models class MonitorListResponse < XTwitterScraper::Internal::Type::BaseModel # @!attribute monitors # - # @return [Array] - required :monitors, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::MonitorListResponse::Monitor] } + # @return [Array] + required :monitors, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Monitor] } # @!attribute total # @@ -16,73 +15,8 @@ class MonitorListResponse < XTwitterScraper::Internal::Type::BaseModel required :total, Integer # @!method initialize(monitors:, total:) - # @param monitors [Array] + # @param monitors [Array] # @param total [Integer] - - class Monitor < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time, api_name: :createdAt - - # @!attribute event_types - # Array of event types to subscribe to. - # - # @return [Array] - required :event_types, - -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::Models::MonitorListResponse::Monitor::EventType] }, - api_name: :eventTypes - - # @!attribute is_active - # - # @return [Boolean] - required :is_active, XTwitterScraper::Internal::Type::Boolean, api_name: :isActive - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute x_user_id - # - # @return [String] - required :x_user_id, String, api_name: :xUserId - - # @!method initialize(id:, created_at:, event_types:, is_active:, username:, x_user_id:) - # Account monitor that tracks activity for a given X user. - # - # @param id [String] - # - # @param created_at [Time] - # - # @param event_types [Array] Array of event types to subscribe to. - # - # @param is_active [Boolean] - # - # @param username [String] - # - # @param x_user_id [String] - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end - end end end end diff --git a/lib/x_twitter_scraper/models/monitor_retrieve_response.rb b/lib/x_twitter_scraper/models/monitor_retrieve_response.rb deleted file mode 100644 index 37a3cae..0000000 --- a/lib/x_twitter_scraper/models/monitor_retrieve_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - # @see XTwitterScraper::Resources::Monitors#retrieve - class MonitorRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time, api_name: :createdAt - - # @!attribute event_types - # Array of event types to subscribe to. - # - # @return [Array] - required :event_types, - -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::Models::MonitorRetrieveResponse::EventType] }, - api_name: :eventTypes - - # @!attribute is_active - # - # @return [Boolean] - required :is_active, XTwitterScraper::Internal::Type::Boolean, api_name: :isActive - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute x_user_id - # - # @return [String] - required :x_user_id, String, api_name: :xUserId - - # @!method initialize(id:, created_at:, event_types:, is_active:, username:, x_user_id:) - # Account monitor that tracks activity for a given X user. - # - # @param id [String] - # - # @param created_at [Time] - # - # @param event_types [Array] Array of event types to subscribe to. - # - # @param is_active [Boolean] - # - # @param username [String] - # - # @param x_user_id [String] - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end - end - end -end diff --git a/lib/x_twitter_scraper/models/monitor_update_params.rb b/lib/x_twitter_scraper/models/monitor_update_params.rb index 2a5e252..1ddf286 100644 --- a/lib/x_twitter_scraper/models/monitor_update_params.rb +++ b/lib/x_twitter_scraper/models/monitor_update_params.rb @@ -15,11 +15,9 @@ class MonitorUpdateParams < XTwitterScraper::Internal::Type::BaseModel # @!attribute event_types # Array of event types to subscribe to. # - # @return [Array, nil] + # @return [Array, nil] optional :event_types, - -> { - XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::MonitorUpdateParams::EventType] - }, + -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType] }, api_name: :eventTypes # @!attribute is_active @@ -30,26 +28,11 @@ class MonitorUpdateParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, event_types: nil, is_active: nil, request_options: {}) # @param id [String] # - # @param event_types [Array] Array of event types to subscribe to. + # @param event_types [Array] Array of event types to subscribe to. # # @param is_active [Boolean] # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end end end end diff --git a/lib/x_twitter_scraper/models/monitor_update_response.rb b/lib/x_twitter_scraper/models/monitor_update_response.rb deleted file mode 100644 index e230dcf..0000000 --- a/lib/x_twitter_scraper/models/monitor_update_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - # @see XTwitterScraper::Resources::Monitors#update - class MonitorUpdateResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time, api_name: :createdAt - - # @!attribute event_types - # Array of event types to subscribe to. - # - # @return [Array] - required :event_types, - -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::Models::MonitorUpdateResponse::EventType] }, - api_name: :eventTypes - - # @!attribute is_active - # - # @return [Boolean] - required :is_active, XTwitterScraper::Internal::Type::Boolean, api_name: :isActive - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute x_user_id - # - # @return [String] - required :x_user_id, String, api_name: :xUserId - - # @!method initialize(id:, created_at:, event_types:, is_active:, username:, x_user_id:) - # Account monitor that tracks activity for a given X user. - # - # @param id [String] - # - # @param created_at [Time] - # - # @param event_types [Array] Array of event types to subscribe to. - # - # @param is_active [Boolean] - # - # @param username [String] - # - # @param x_user_id [String] - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end - end - end -end diff --git a/lib/x_twitter_scraper/models/paginated_tweets.rb b/lib/x_twitter_scraper/models/paginated_tweets.rb index 75f0d41..2cff003 100644 --- a/lib/x_twitter_scraper/models/paginated_tweets.rb +++ b/lib/x_twitter_scraper/models/paginated_tweets.rb @@ -15,127 +15,15 @@ class PaginatedTweets < XTwitterScraper::Internal::Type::BaseModel # @!attribute tweets # - # @return [Array] - required :tweets, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::PaginatedTweets::Tweet] } + # @return [Array] + required :tweets, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::SearchTweet] } # @!method initialize(has_next_page:, next_cursor:, tweets:) # Paginated list of tweets with cursor-based navigation. # # @param has_next_page [Boolean] # @param next_cursor [String] - # @param tweets [Array] - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute author - # - # @return [XTwitterScraper::Models::PaginatedTweets::Tweet::Author, nil] - optional :author, -> { XTwitterScraper::PaginatedTweets::Tweet::Author } - - # @!attribute bookmark_count - # - # @return [Integer, nil] - optional :bookmark_count, Integer, api_name: :bookmarkCount - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute is_note_tweet - # True for Note Tweets (long-form content, up to 25,000 characters) - # - # @return [Boolean, nil] - optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet - - # @!attribute like_count - # - # @return [Integer, nil] - optional :like_count, Integer, api_name: :likeCount - - # @!attribute quote_count - # - # @return [Integer, nil] - optional :quote_count, Integer, api_name: :quoteCount - - # @!attribute reply_count - # - # @return [Integer, nil] - optional :reply_count, Integer, api_name: :replyCount - - # @!attribute retweet_count - # - # @return [Integer, nil] - optional :retweet_count, Integer, api_name: :retweetCount - - # @!attribute view_count - # - # @return [Integer, nil] - optional :view_count, Integer, api_name: :viewCount - - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) - # Tweet returned from search results with inline author info. - # - # @param id [String] - # - # @param text [String] - # - # @param author [XTwitterScraper::Models::PaginatedTweets::Tweet::Author] - # - # @param bookmark_count [Integer] - # - # @param created_at [String] - # - # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) - # - # @param like_count [Integer] - # - # @param quote_count [Integer] - # - # @param reply_count [Integer] - # - # @param retweet_count [Integer] - # - # @param view_count [Integer] - - # @see XTwitterScraper::Models::PaginatedTweets::Tweet#author - class Author < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, verified: nil) - # @param id [String] - # @param name [String] - # @param username [String] - # @param verified [Boolean] - end - end + # @param tweets [Array] end end end diff --git a/lib/x_twitter_scraper/models/paginated_users.rb b/lib/x_twitter_scraper/models/paginated_users.rb index 1507445..4efadd6 100644 --- a/lib/x_twitter_scraper/models/paginated_users.rb +++ b/lib/x_twitter_scraper/models/paginated_users.rb @@ -15,87 +15,15 @@ class PaginatedUsers < XTwitterScraper::Internal::Type::BaseModel # @!attribute users # - # @return [Array] - required :users, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::PaginatedUsers::User] } + # @return [Array] + required :users, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::UserProfile] } # @!method initialize(has_next_page:, next_cursor:, users:) # Paginated list of user profiles with cursor-based navigation. # # @param has_next_page [Boolean] # @param next_cursor [String] - # @param users [Array] - - class User < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute description - # - # @return [String, nil] - optional :description, String - - # @!attribute followers - # - # @return [Integer, nil] - optional :followers, Integer - - # @!attribute following - # - # @return [Integer, nil] - optional :following, Integer - - # @!attribute location - # - # @return [String, nil] - optional :location, String - - # @!attribute profile_picture - # - # @return [String, nil] - optional :profile_picture, String, api_name: :profilePicture - - # @!attribute statuses_count - # - # @return [Integer, nil] - optional :statuses_count, Integer, api_name: :statusesCount - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) - # X user profile with bio, follower counts, and verification status. - # - # @param id [String] - # @param name [String] - # @param username [String] - # @param created_at [String] - # @param description [String] - # @param followers [Integer] - # @param following [Integer] - # @param location [String] - # @param profile_picture [String] - # @param statuses_count [Integer] - # @param verified [Boolean] - end + # @param users [Array] end end end diff --git a/lib/x_twitter_scraper/models/radar_retrieve_trending_topics_response.rb b/lib/x_twitter_scraper/models/radar_retrieve_trending_topics_response.rb index fbcfee7..d37de6e 100644 --- a/lib/x_twitter_scraper/models/radar_retrieve_trending_topics_response.rb +++ b/lib/x_twitter_scraper/models/radar_retrieve_trending_topics_response.rb @@ -6,9 +6,8 @@ module Models class RadarRetrieveTrendingTopicsResponse < XTwitterScraper::Internal::Type::BaseModel # @!attribute items # - # @return [Array] - required :items, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::RadarRetrieveTrendingTopicsResponse::Item] } + # @return [Array] + required :items, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::RadarItem] } # @!attribute total # @@ -16,68 +15,8 @@ class RadarRetrieveTrendingTopicsResponse < XTwitterScraper::Internal::Type::Bas required :total, Integer # @!method initialize(items:, total:) - # @param items [Array] + # @param items [Array] # @param total [Integer] - - class Item < XTwitterScraper::Internal::Type::BaseModel - # @!attribute category - # - # @return [String] - required :category, String - - # @!attribute published_at - # - # @return [Time] - required :published_at, Time, api_name: :publishedAt - - # @!attribute region - # - # @return [String] - required :region, String - - # @!attribute score - # - # @return [Float] - required :score, Float - - # @!attribute source - # - # @return [String] - required :source, String - - # @!attribute title - # - # @return [String] - required :title, String - - # @!attribute description - # - # @return [String, nil] - optional :description, String - - # @!attribute image_url - # - # @return [String, nil] - optional :image_url, String, api_name: :imageUrl - - # @!attribute url - # - # @return [String, nil] - optional :url, String - - # @!method initialize(category:, published_at:, region:, score:, source:, title:, description: nil, image_url: nil, url: nil) - # Trending topic with score, category, source, and region. - # - # @param category [String] - # @param published_at [Time] - # @param region [String] - # @param score [Float] - # @param source [String] - # @param title [String] - # @param description [String] - # @param image_url [String] - # @param url [String] - end end end end diff --git a/lib/x_twitter_scraper/models/style_analyze_response.rb b/lib/x_twitter_scraper/models/style_analyze_response.rb deleted file mode 100644 index f8e8a95..0000000 --- a/lib/x_twitter_scraper/models/style_analyze_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - # @see XTwitterScraper::Resources::Styles#analyze - class StyleAnalyzeResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute fetched_at - # - # @return [Time] - required :fetched_at, Time, api_name: :fetchedAt - - # @!attribute is_own_account - # - # @return [Boolean] - required :is_own_account, XTwitterScraper::Internal::Type::Boolean, api_name: :isOwnAccount - - # @!attribute tweet_count - # - # @return [Integer] - required :tweet_count, Integer, api_name: :tweetCount - - # @!attribute tweets - # - # @return [Array] - required :tweets, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::StyleAnalyzeResponse::Tweet] } - - # @!attribute x_username - # - # @return [String] - required :x_username, String, api_name: :xUsername - - # @!method initialize(fetched_at:, is_own_account:, tweet_count:, tweets:, x_username:) - # Full style profile with sampled tweets used for tone analysis. - # - # @param fetched_at [Time] - # @param is_own_account [Boolean] - # @param tweet_count [Integer] - # @param tweets [Array] - # @param x_username [String] - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute author_username - # - # @return [String, nil] - optional :author_username, String, api_name: :authorUsername - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!method initialize(id:, text:, author_username: nil, created_at: nil) - # @param id [String] - # @param text [String] - # @param author_username [String] - # @param created_at [String] - end - end - end -end diff --git a/lib/x_twitter_scraper/models/style_compare_response.rb b/lib/x_twitter_scraper/models/style_compare_response.rb index 65ca692..c2b7b4d 100644 --- a/lib/x_twitter_scraper/models/style_compare_response.rb +++ b/lib/x_twitter_scraper/models/style_compare_response.rb @@ -7,151 +7,19 @@ class StyleCompareResponse < XTwitterScraper::Internal::Type::BaseModel # @!attribute style1 # Full style profile with sampled tweets used for tone analysis. # - # @return [XTwitterScraper::Models::StyleCompareResponse::Style1] - required :style1, -> { XTwitterScraper::Models::StyleCompareResponse::Style1 } + # @return [XTwitterScraper::Models::StyleProfile] + required :style1, -> { XTwitterScraper::StyleProfile } # @!attribute style2 # Full style profile with sampled tweets used for tone analysis. # - # @return [XTwitterScraper::Models::StyleCompareResponse::Style2] - required :style2, -> { XTwitterScraper::Models::StyleCompareResponse::Style2 } + # @return [XTwitterScraper::Models::StyleProfile] + required :style2, -> { XTwitterScraper::StyleProfile } # @!method initialize(style1:, style2:) - # @param style1 [XTwitterScraper::Models::StyleCompareResponse::Style1] Full style profile with sampled tweets used for tone analysis. + # @param style1 [XTwitterScraper::Models::StyleProfile] Full style profile with sampled tweets used for tone analysis. # - # @param style2 [XTwitterScraper::Models::StyleCompareResponse::Style2] Full style profile with sampled tweets used for tone analysis. - - # @see XTwitterScraper::Models::StyleCompareResponse#style1 - class Style1 < XTwitterScraper::Internal::Type::BaseModel - # @!attribute fetched_at - # - # @return [Time] - required :fetched_at, Time, api_name: :fetchedAt - - # @!attribute is_own_account - # - # @return [Boolean] - required :is_own_account, XTwitterScraper::Internal::Type::Boolean, api_name: :isOwnAccount - - # @!attribute tweet_count - # - # @return [Integer] - required :tweet_count, Integer, api_name: :tweetCount - - # @!attribute tweets - # - # @return [Array] - required :tweets, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::StyleCompareResponse::Style1::Tweet] } - - # @!attribute x_username - # - # @return [String] - required :x_username, String, api_name: :xUsername - - # @!method initialize(fetched_at:, is_own_account:, tweet_count:, tweets:, x_username:) - # Full style profile with sampled tweets used for tone analysis. - # - # @param fetched_at [Time] - # @param is_own_account [Boolean] - # @param tweet_count [Integer] - # @param tweets [Array] - # @param x_username [String] - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute author_username - # - # @return [String, nil] - optional :author_username, String, api_name: :authorUsername - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!method initialize(id:, text:, author_username: nil, created_at: nil) - # @param id [String] - # @param text [String] - # @param author_username [String] - # @param created_at [String] - end - end - - # @see XTwitterScraper::Models::StyleCompareResponse#style2 - class Style2 < XTwitterScraper::Internal::Type::BaseModel - # @!attribute fetched_at - # - # @return [Time] - required :fetched_at, Time, api_name: :fetchedAt - - # @!attribute is_own_account - # - # @return [Boolean] - required :is_own_account, XTwitterScraper::Internal::Type::Boolean, api_name: :isOwnAccount - - # @!attribute tweet_count - # - # @return [Integer] - required :tweet_count, Integer, api_name: :tweetCount - - # @!attribute tweets - # - # @return [Array] - required :tweets, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::StyleCompareResponse::Style2::Tweet] } - - # @!attribute x_username - # - # @return [String] - required :x_username, String, api_name: :xUsername - - # @!method initialize(fetched_at:, is_own_account:, tweet_count:, tweets:, x_username:) - # Full style profile with sampled tweets used for tone analysis. - # - # @param fetched_at [Time] - # @param is_own_account [Boolean] - # @param tweet_count [Integer] - # @param tweets [Array] - # @param x_username [String] - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute author_username - # - # @return [String, nil] - optional :author_username, String, api_name: :authorUsername - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!method initialize(id:, text:, author_username: nil, created_at: nil) - # @param id [String] - # @param text [String] - # @param author_username [String] - # @param created_at [String] - end - end + # @param style2 [XTwitterScraper::Models::StyleProfile] Full style profile with sampled tweets used for tone analysis. end end end diff --git a/lib/x_twitter_scraper/models/style_delete_params.rb b/lib/x_twitter_scraper/models/style_delete_params.rb new file mode 100644 index 0000000..3fd6408 --- /dev/null +++ b/lib/x_twitter_scraper/models/style_delete_params.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + # @see XTwitterScraper::Resources::Styles#delete + class StyleDeleteParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!method initialize(id:, request_options: {}) + # @param id [String] + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/x_twitter_scraper/models/style_get_performance_params.rb b/lib/x_twitter_scraper/models/style_get_performance_params.rb new file mode 100644 index 0000000..f792f50 --- /dev/null +++ b/lib/x_twitter_scraper/models/style_get_performance_params.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + # @see XTwitterScraper::Resources::Styles#get_performance + class StyleGetPerformanceParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!method initialize(id:, request_options: {}) + # @param id [String] + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/x_twitter_scraper/models/style_get_performance_response.rb b/lib/x_twitter_scraper/models/style_get_performance_response.rb new file mode 100644 index 0000000..847850b --- /dev/null +++ b/lib/x_twitter_scraper/models/style_get_performance_response.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + # @see XTwitterScraper::Resources::Styles#get_performance + class StyleGetPerformanceResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute tweet_count + # + # @return [Integer] + required :tweet_count, Integer, api_name: :tweetCount + + # @!attribute tweets + # + # @return [Array] + required :tweets, + -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::StyleGetPerformanceResponse::Tweet] } + + # @!attribute x_username + # + # @return [String] + required :x_username, String, api_name: :xUsername + + # @!method initialize(tweet_count:, tweets:, x_username:) + # @param tweet_count [Integer] + # @param tweets [Array] + # @param x_username [String] + + class Tweet < XTwitterScraper::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute text + # + # @return [String] + required :text, String + + # @!attribute created_at + # + # @return [String, nil] + optional :created_at, String, api_name: :createdAt + + # @!attribute like_count + # + # @return [Integer, nil] + optional :like_count, Integer, api_name: :likeCount + + # @!attribute reply_count + # + # @return [Integer, nil] + optional :reply_count, Integer, api_name: :replyCount + + # @!attribute retweet_count + # + # @return [Integer, nil] + optional :retweet_count, Integer, api_name: :retweetCount + + # @!attribute view_count + # + # @return [Integer, nil] + optional :view_count, Integer, api_name: :viewCount + + # @!method initialize(id:, text:, created_at: nil, like_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) + # @param id [String] + # @param text [String] + # @param created_at [String] + # @param like_count [Integer] + # @param reply_count [Integer] + # @param retweet_count [Integer] + # @param view_count [Integer] + end + end + end +end diff --git a/lib/x_twitter_scraper/models/style_list_response.rb b/lib/x_twitter_scraper/models/style_list_response.rb index 6657c92..738931b 100644 --- a/lib/x_twitter_scraper/models/style_list_response.rb +++ b/lib/x_twitter_scraper/models/style_list_response.rb @@ -6,42 +6,11 @@ module Models class StyleListResponse < XTwitterScraper::Internal::Type::BaseModel # @!attribute styles # - # @return [Array] - required :styles, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::StyleListResponse::Style] } + # @return [Array] + required :styles, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::StyleProfileSummary] } # @!method initialize(styles:) - # @param styles [Array] - - class Style < XTwitterScraper::Internal::Type::BaseModel - # @!attribute fetched_at - # - # @return [Time] - required :fetched_at, Time, api_name: :fetchedAt - - # @!attribute is_own_account - # - # @return [Boolean] - required :is_own_account, XTwitterScraper::Internal::Type::Boolean, api_name: :isOwnAccount - - # @!attribute tweet_count - # - # @return [Integer] - required :tweet_count, Integer, api_name: :tweetCount - - # @!attribute x_username - # - # @return [String] - required :x_username, String, api_name: :xUsername - - # @!method initialize(fetched_at:, is_own_account:, tweet_count:, x_username:) - # Style profile summary with tweet count and ownership flag. - # - # @param fetched_at [Time] - # @param is_own_account [Boolean] - # @param tweet_count [Integer] - # @param x_username [String] - end + # @param styles [Array] end end end diff --git a/lib/x_twitter_scraper/models/style_profile.rb b/lib/x_twitter_scraper/models/style_profile.rb index ae1dd82..6c58bac 100644 --- a/lib/x_twitter_scraper/models/style_profile.rb +++ b/lib/x_twitter_scraper/models/style_profile.rb @@ -2,6 +2,7 @@ module XTwitterScraper module Models + # @see XTwitterScraper::Resources::Styles#retrieve class StyleProfile < XTwitterScraper::Internal::Type::BaseModel # @!attribute fetched_at # diff --git a/lib/x_twitter_scraper/models/style_retrieve_params.rb b/lib/x_twitter_scraper/models/style_retrieve_params.rb new file mode 100644 index 0000000..d91eaf7 --- /dev/null +++ b/lib/x_twitter_scraper/models/style_retrieve_params.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + # @see XTwitterScraper::Resources::Styles#retrieve + class StyleRetrieveParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!method initialize(id:, request_options: {}) + # @param id [String] + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/x_twitter_scraper/models/style_update_params.rb b/lib/x_twitter_scraper/models/style_update_params.rb new file mode 100644 index 0000000..89424ac --- /dev/null +++ b/lib/x_twitter_scraper/models/style_update_params.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + # @see XTwitterScraper::Resources::Styles#update + class StyleUpdateParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute label + # Display label for the style + # + # @return [String] + required :label, String + + # @!attribute tweets + # Array of tweet objects + # + # @return [Array] + required :tweets, + -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::StyleUpdateParams::Tweet] } + + # @!method initialize(id:, label:, tweets:, request_options: {}) + # @param id [String] + # + # @param label [String] Display label for the style + # + # @param tweets [Array] Array of tweet objects + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + + class Tweet < XTwitterScraper::Internal::Type::BaseModel + # @!attribute text + # + # @return [String] + required :text, String + + # @!method initialize(text:) + # @param text [String] + end + end + end +end diff --git a/lib/x_twitter_scraper/models/webhook.rb b/lib/x_twitter_scraper/models/webhook.rb index e44a8b4..b56312a 100644 --- a/lib/x_twitter_scraper/models/webhook.rb +++ b/lib/x_twitter_scraper/models/webhook.rb @@ -2,6 +2,7 @@ module XTwitterScraper module Models + # @see XTwitterScraper::Resources::Webhooks#update class Webhook < XTwitterScraper::Internal::Type::BaseModel # @!attribute id # @@ -16,9 +17,9 @@ class Webhook < XTwitterScraper::Internal::Type::BaseModel # @!attribute event_types # Array of event types to subscribe to. # - # @return [Array] + # @return [Array] required :event_types, - -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::Webhook::EventType] }, + -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType] }, api_name: :eventTypes # @!attribute is_active @@ -38,26 +39,11 @@ class Webhook < XTwitterScraper::Internal::Type::BaseModel # # @param created_at [Time] # - # @param event_types [Array] Array of event types to subscribe to. + # @param event_types [Array] Array of event types to subscribe to. # # @param is_active [Boolean] # # @param url [String] - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end end end end diff --git a/lib/x_twitter_scraper/models/webhook_create_params.rb b/lib/x_twitter_scraper/models/webhook_create_params.rb index bf89269..cec3bb7 100644 --- a/lib/x_twitter_scraper/models/webhook_create_params.rb +++ b/lib/x_twitter_scraper/models/webhook_create_params.rb @@ -10,11 +10,9 @@ class WebhookCreateParams < XTwitterScraper::Internal::Type::BaseModel # @!attribute event_types # Array of event types to subscribe to. # - # @return [Array] + # @return [Array] required :event_types, - -> { - XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::WebhookCreateParams::EventType] - }, + -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType] }, api_name: :eventTypes # @!attribute url @@ -24,26 +22,11 @@ class WebhookCreateParams < XTwitterScraper::Internal::Type::BaseModel required :url, String # @!method initialize(event_types:, url:, request_options: {}) - # @param event_types [Array] Array of event types to subscribe to. + # @param event_types [Array] Array of event types to subscribe to. # # @param url [String] HTTPS URL # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end end end end diff --git a/lib/x_twitter_scraper/models/webhook_create_response.rb b/lib/x_twitter_scraper/models/webhook_create_response.rb index f2b4ccd..b867425 100644 --- a/lib/x_twitter_scraper/models/webhook_create_response.rb +++ b/lib/x_twitter_scraper/models/webhook_create_response.rb @@ -17,9 +17,9 @@ class WebhookCreateResponse < XTwitterScraper::Internal::Type::BaseModel # @!attribute event_types # Array of event types to subscribe to. # - # @return [Array] + # @return [Array] required :event_types, - -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::Models::WebhookCreateResponse::EventType] }, + -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType] }, api_name: :eventTypes # @!attribute secret @@ -37,26 +37,11 @@ class WebhookCreateResponse < XTwitterScraper::Internal::Type::BaseModel # # @param created_at [Time] # - # @param event_types [Array] Array of event types to subscribe to. + # @param event_types [Array] Array of event types to subscribe to. # # @param secret [String] # # @param url [String] - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end end end end diff --git a/lib/x_twitter_scraper/models/webhook_list_deliveries_response.rb b/lib/x_twitter_scraper/models/webhook_list_deliveries_response.rb index 9b2ac0a..f27ff97 100644 --- a/lib/x_twitter_scraper/models/webhook_list_deliveries_response.rb +++ b/lib/x_twitter_scraper/models/webhook_list_deliveries_response.rb @@ -6,66 +6,11 @@ module Models class WebhookListDeliveriesResponse < XTwitterScraper::Internal::Type::BaseModel # @!attribute deliveries # - # @return [Array] - required :deliveries, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::WebhookListDeliveriesResponse::Delivery] } + # @return [Array] + required :deliveries, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Delivery] } # @!method initialize(deliveries:) - # @param deliveries [Array] - - class Delivery < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute attempts - # - # @return [Integer] - required :attempts, Integer - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time, api_name: :createdAt - - # @!attribute status - # - # @return [String] - required :status, String - - # @!attribute stream_event_id - # - # @return [String] - required :stream_event_id, String, api_name: :streamEventId - - # @!attribute delivered_at - # - # @return [Time, nil] - optional :delivered_at, Time, api_name: :deliveredAt - - # @!attribute last_error - # - # @return [String, nil] - optional :last_error, String, api_name: :lastError - - # @!attribute last_status_code - # - # @return [Integer, nil] - optional :last_status_code, Integer, api_name: :lastStatusCode - - # @!method initialize(id:, attempts:, created_at:, status:, stream_event_id:, delivered_at: nil, last_error: nil, last_status_code: nil) - # Webhook delivery attempt record with status and retry count. - # - # @param id [String] - # @param attempts [Integer] - # @param created_at [Time] - # @param status [String] - # @param stream_event_id [String] - # @param delivered_at [Time] - # @param last_error [String] - # @param last_status_code [Integer] - end + # @param deliveries [Array] end end end diff --git a/lib/x_twitter_scraper/models/webhook_list_response.rb b/lib/x_twitter_scraper/models/webhook_list_response.rb index 31c0f51..34cb122 100644 --- a/lib/x_twitter_scraper/models/webhook_list_response.rb +++ b/lib/x_twitter_scraper/models/webhook_list_response.rb @@ -6,70 +6,11 @@ module Models class WebhookListResponse < XTwitterScraper::Internal::Type::BaseModel # @!attribute webhooks # - # @return [Array] - required :webhooks, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::WebhookListResponse::Webhook] } + # @return [Array] + required :webhooks, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Webhook] } # @!method initialize(webhooks:) - # @param webhooks [Array] - - class Webhook < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time, api_name: :createdAt - - # @!attribute event_types - # Array of event types to subscribe to. - # - # @return [Array] - required :event_types, - -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::Models::WebhookListResponse::Webhook::EventType] }, - api_name: :eventTypes - - # @!attribute is_active - # - # @return [Boolean] - required :is_active, XTwitterScraper::Internal::Type::Boolean, api_name: :isActive - - # @!attribute url - # - # @return [String] - required :url, String - - # @!method initialize(id:, created_at:, event_types:, is_active:, url:) - # Webhook endpoint registered to receive event deliveries. - # - # @param id [String] - # - # @param created_at [Time] - # - # @param event_types [Array] Array of event types to subscribe to. - # - # @param is_active [Boolean] - # - # @param url [String] - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end - end + # @param webhooks [Array] end end end diff --git a/lib/x_twitter_scraper/models/webhook_update_params.rb b/lib/x_twitter_scraper/models/webhook_update_params.rb index 4e25831..4d718d3 100644 --- a/lib/x_twitter_scraper/models/webhook_update_params.rb +++ b/lib/x_twitter_scraper/models/webhook_update_params.rb @@ -15,11 +15,9 @@ class WebhookUpdateParams < XTwitterScraper::Internal::Type::BaseModel # @!attribute event_types # Array of event types to subscribe to. # - # @return [Array, nil] + # @return [Array, nil] optional :event_types, - -> { - XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::WebhookUpdateParams::EventType] - }, + -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType] }, api_name: :eventTypes # @!attribute is_active @@ -35,28 +33,13 @@ class WebhookUpdateParams < XTwitterScraper::Internal::Type::BaseModel # @!method initialize(id:, event_types: nil, is_active: nil, url: nil, request_options: {}) # @param id [String] # - # @param event_types [Array] Array of event types to subscribe to. + # @param event_types [Array] Array of event types to subscribe to. # # @param is_active [Boolean] # # @param url [String] # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end end end end diff --git a/lib/x_twitter_scraper/models/webhook_update_response.rb b/lib/x_twitter_scraper/models/webhook_update_response.rb deleted file mode 100644 index 9539d95..0000000 --- a/lib/x_twitter_scraper/models/webhook_update_response.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - # @see XTwitterScraper::Resources::Webhooks#update - class WebhookUpdateResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time, api_name: :createdAt - - # @!attribute event_types - # Array of event types to subscribe to. - # - # @return [Array] - required :event_types, - -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::Models::WebhookUpdateResponse::EventType] }, - api_name: :eventTypes - - # @!attribute is_active - # - # @return [Boolean] - required :is_active, XTwitterScraper::Internal::Type::Boolean, api_name: :isActive - - # @!attribute url - # - # @return [String] - required :url, String - - # @!method initialize(id:, created_at:, event_types:, is_active:, url:) - # Webhook endpoint registered to receive event deliveries. - # - # @param id [String] - # - # @param created_at [Time] - # - # @param event_types [Array] Array of event types to subscribe to. - # - # @param is_active [Boolean] - # - # @param url [String] - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW = :"tweet.new" - TWEET_REPLY = :"tweet.reply" - TWEET_RETWEET = :"tweet.retweet" - TWEET_QUOTE = :"tweet.quote" - FOLLOWER_GAINED = :"follower.gained" - FOLLOWER_LOST = :"follower.lost" - - # @!method self.values - # @return [Array] - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/account_bulk_retry_params.rb b/lib/x_twitter_scraper/models/x/account_bulk_retry_params.rb new file mode 100644 index 0000000..75e0d25 --- /dev/null +++ b/lib/x_twitter_scraper/models/x/account_bulk_retry_params.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + # @see XTwitterScraper::Resources::X::Accounts#bulk_retry + class AccountBulkRetryParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + # @!method initialize(request_options: {}) + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/account_bulk_retry_response.rb b/lib/x_twitter_scraper/models/x/account_bulk_retry_response.rb new file mode 100644 index 0000000..4861d82 --- /dev/null +++ b/lib/x_twitter_scraper/models/x/account_bulk_retry_response.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + # @see XTwitterScraper::Resources::X::Accounts#bulk_retry + class AccountBulkRetryResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute cleared + # Number of accounts cleared + # + # @return [Integer] + required :cleared, Integer + + # @!method initialize(cleared:) + # @param cleared [Integer] Number of accounts cleared + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/account_list_response.rb b/lib/x_twitter_scraper/models/x/account_list_response.rb index 0968837..eb7921d 100644 --- a/lib/x_twitter_scraper/models/x/account_list_response.rb +++ b/lib/x_twitter_scraper/models/x/account_list_response.rb @@ -7,48 +7,11 @@ module X class AccountListResponse < XTwitterScraper::Internal::Type::BaseModel # @!attribute accounts # - # @return [Array] - required :accounts, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::AccountListResponse::Account] } + # @return [Array] + required :accounts, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::XAccount] } # @!method initialize(accounts:) - # @param accounts [Array] - - class Account < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time, api_name: :createdAt - - # @!attribute status - # - # @return [String] - required :status, String - - # @!attribute x_user_id - # - # @return [String] - required :x_user_id, String, api_name: :xUserId - - # @!attribute x_username - # - # @return [String] - required :x_username, String, api_name: :xUsername - - # @!method initialize(id:, created_at:, status:, x_user_id:, x_username:) - # Linked X account summary with username and connection status. - # - # @param id [String] - # @param created_at [Time] - # @param status [String] - # @param x_user_id [String] - # @param x_username [String] - end + # @param accounts [Array] end end end diff --git a/lib/x_twitter_scraper/models/x/account_retrieve_response.rb b/lib/x_twitter_scraper/models/x/account_retrieve_response.rb deleted file mode 100644 index 722fbef..0000000 --- a/lib/x_twitter_scraper/models/x/account_retrieve_response.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Accounts#retrieve - class AccountRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time, api_name: :createdAt - - # @!attribute status - # - # @return [String] - required :status, String - - # @!attribute x_user_id - # - # @return [String] - required :x_user_id, String, api_name: :xUserId - - # @!attribute x_username - # - # @return [String] - required :x_username, String, api_name: :xUsername - - # @!attribute cookies_obtained_at - # - # @return [Time, nil] - optional :cookies_obtained_at, Time, api_name: :cookiesObtainedAt - - # @!attribute proxy_country - # - # @return [String, nil] - optional :proxy_country, String, api_name: :proxyCountry - - # @!attribute updated_at - # - # @return [Time, nil] - optional :updated_at, Time, api_name: :updatedAt - - # @!method initialize(id:, created_at:, status:, x_user_id:, x_username:, cookies_obtained_at: nil, proxy_country: nil, updated_at: nil) - # Full X account details including proxy, cookies, and update timestamp. - # - # @param id [String] - # @param created_at [Time] - # @param status [String] - # @param x_user_id [String] - # @param x_username [String] - # @param cookies_obtained_at [Time] - # @param proxy_country [String] - # @param updated_at [Time] - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/bookmark_list_response.rb b/lib/x_twitter_scraper/models/x/bookmark_list_response.rb deleted file mode 100644 index 7480d7c..0000000 --- a/lib/x_twitter_scraper/models/x/bookmark_list_response.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Bookmarks#list - class BookmarkListResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute tweets - # - # @return [Array] - required :tweets, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::BookmarkListResponse::Tweet] } - - # @!method initialize(has_next_page:, next_cursor:, tweets:) - # Paginated list of tweets with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param tweets [Array] - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute author - # - # @return [XTwitterScraper::Models::X::BookmarkListResponse::Tweet::Author, nil] - optional :author, -> { XTwitterScraper::Models::X::BookmarkListResponse::Tweet::Author } - - # @!attribute bookmark_count - # - # @return [Integer, nil] - optional :bookmark_count, Integer, api_name: :bookmarkCount - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute is_note_tweet - # True for Note Tweets (long-form content, up to 25,000 characters) - # - # @return [Boolean, nil] - optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet - - # @!attribute like_count - # - # @return [Integer, nil] - optional :like_count, Integer, api_name: :likeCount - - # @!attribute quote_count - # - # @return [Integer, nil] - optional :quote_count, Integer, api_name: :quoteCount - - # @!attribute reply_count - # - # @return [Integer, nil] - optional :reply_count, Integer, api_name: :replyCount - - # @!attribute retweet_count - # - # @return [Integer, nil] - optional :retweet_count, Integer, api_name: :retweetCount - - # @!attribute view_count - # - # @return [Integer, nil] - optional :view_count, Integer, api_name: :viewCount - - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) - # Tweet returned from search results with inline author info. - # - # @param id [String] - # - # @param text [String] - # - # @param author [XTwitterScraper::Models::X::BookmarkListResponse::Tweet::Author] - # - # @param bookmark_count [Integer] - # - # @param created_at [String] - # - # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) - # - # @param like_count [Integer] - # - # @param quote_count [Integer] - # - # @param reply_count [Integer] - # - # @param retweet_count [Integer] - # - # @param view_count [Integer] - - # @see XTwitterScraper::Models::X::BookmarkListResponse::Tweet#author - class Author < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, verified: nil) - # @param id [String] - # @param name [String] - # @param username [String] - # @param verified [Boolean] - end - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/communities/join_create_response.rb b/lib/x_twitter_scraper/models/x/communities/join_create_response.rb deleted file mode 100644 index 1fea207..0000000 --- a/lib/x_twitter_scraper/models/x/communities/join_create_response.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - module Communities - # @see XTwitterScraper::Resources::X::Communities::Join#create - class JoinCreateResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute community_id - # - # @return [String] - required :community_id, String, api_name: :communityId - - # @!attribute community_name - # - # @return [String] - required :community_name, String, api_name: :communityName - - # @!attribute success - # - # @return [Boolean, true] - required :success, const: true - - # @!method initialize(community_id:, community_name:, success: true) - # Result of a community join or leave action. - # - # @param community_id [String] - # @param community_name [String] - # @param success [Boolean, true] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/communities/join_delete_all_response.rb b/lib/x_twitter_scraper/models/x/communities/join_delete_all_response.rb deleted file mode 100644 index 76b168d..0000000 --- a/lib/x_twitter_scraper/models/x/communities/join_delete_all_response.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - module Communities - # @see XTwitterScraper::Resources::X::Communities::Join#delete_all - class JoinDeleteAllResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute community_id - # - # @return [String] - required :community_id, String, api_name: :communityId - - # @!attribute community_name - # - # @return [String] - required :community_name, String, api_name: :communityName - - # @!attribute success - # - # @return [Boolean, true] - required :success, const: true - - # @!method initialize(community_id:, community_name:, success: true) - # Result of a community join or leave action. - # - # @param community_id [String] - # @param community_name [String] - # @param success [Boolean, true] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rb b/lib/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rb new file mode 100644 index 0000000..909902e --- /dev/null +++ b/lib/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + module Communities + # @see XTwitterScraper::Resources::X::Communities::Tweets#list_by_community + class TweetListByCommunityParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute cursor + # Pagination cursor for community tweets + # + # @return [String, nil] + optional :cursor, String + + # @!method initialize(id:, cursor: nil, request_options: {}) + # @param id [String] + # + # @param cursor [String] Pagination cursor for community tweets + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/communities/tweet_list_response.rb b/lib/x_twitter_scraper/models/x/communities/tweet_list_response.rb deleted file mode 100644 index 4d589e2..0000000 --- a/lib/x_twitter_scraper/models/x/communities/tweet_list_response.rb +++ /dev/null @@ -1,147 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - module Communities - # @see XTwitterScraper::Resources::X::Communities::Tweets#list - class TweetListResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute tweets - # - # @return [Array] - required :tweets, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet] } - - # @!method initialize(has_next_page:, next_cursor:, tweets:) - # Paginated list of tweets with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param tweets [Array] - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute author - # - # @return [XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author, nil] - optional :author, -> { XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author } - - # @!attribute bookmark_count - # - # @return [Integer, nil] - optional :bookmark_count, Integer, api_name: :bookmarkCount - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute is_note_tweet - # True for Note Tweets (long-form content, up to 25,000 characters) - # - # @return [Boolean, nil] - optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet - - # @!attribute like_count - # - # @return [Integer, nil] - optional :like_count, Integer, api_name: :likeCount - - # @!attribute quote_count - # - # @return [Integer, nil] - optional :quote_count, Integer, api_name: :quoteCount - - # @!attribute reply_count - # - # @return [Integer, nil] - optional :reply_count, Integer, api_name: :replyCount - - # @!attribute retweet_count - # - # @return [Integer, nil] - optional :retweet_count, Integer, api_name: :retweetCount - - # @!attribute view_count - # - # @return [Integer, nil] - optional :view_count, Integer, api_name: :viewCount - - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) - # Tweet returned from search results with inline author info. - # - # @param id [String] - # - # @param text [String] - # - # @param author [XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author] - # - # @param bookmark_count [Integer] - # - # @param created_at [String] - # - # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) - # - # @param like_count [Integer] - # - # @param quote_count [Integer] - # - # @param reply_count [Integer] - # - # @param retweet_count [Integer] - # - # @param view_count [Integer] - - # @see XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet#author - class Author < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, verified: nil) - # @param id [String] - # @param name [String] - # @param username [String] - # @param verified [Boolean] - end - end - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/community_retrieve_members_response.rb b/lib/x_twitter_scraper/models/x/community_retrieve_members_response.rb deleted file mode 100644 index 036bf82..0000000 --- a/lib/x_twitter_scraper/models/x/community_retrieve_members_response.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Communities#retrieve_members - class CommunityRetrieveMembersResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute users - # - # @return [Array] - required :users, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::CommunityRetrieveMembersResponse::User] } - - # @!method initialize(has_next_page:, next_cursor:, users:) - # Paginated list of user profiles with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param users [Array] - - class User < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute description - # - # @return [String, nil] - optional :description, String - - # @!attribute followers - # - # @return [Integer, nil] - optional :followers, Integer - - # @!attribute following - # - # @return [Integer, nil] - optional :following, Integer - - # @!attribute location - # - # @return [String, nil] - optional :location, String - - # @!attribute profile_picture - # - # @return [String, nil] - optional :profile_picture, String, api_name: :profilePicture - - # @!attribute statuses_count - # - # @return [Integer, nil] - optional :statuses_count, Integer, api_name: :statusesCount - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) - # X user profile with bio, follower counts, and verification status. - # - # @param id [String] - # @param name [String] - # @param username [String] - # @param created_at [String] - # @param description [String] - # @param followers [Integer] - # @param following [Integer] - # @param location [String] - # @param profile_picture [String] - # @param statuses_count [Integer] - # @param verified [Boolean] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/community_retrieve_moderators_response.rb b/lib/x_twitter_scraper/models/x/community_retrieve_moderators_response.rb deleted file mode 100644 index 7feb6fa..0000000 --- a/lib/x_twitter_scraper/models/x/community_retrieve_moderators_response.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Communities#retrieve_moderators - class CommunityRetrieveModeratorsResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute users - # - # @return [Array] - required :users, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse::User] } - - # @!method initialize(has_next_page:, next_cursor:, users:) - # Paginated list of user profiles with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param users [Array] - - class User < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute description - # - # @return [String, nil] - optional :description, String - - # @!attribute followers - # - # @return [Integer, nil] - optional :followers, Integer - - # @!attribute following - # - # @return [Integer, nil] - optional :following, Integer - - # @!attribute location - # - # @return [String, nil] - optional :location, String - - # @!attribute profile_picture - # - # @return [String, nil] - optional :profile_picture, String, api_name: :profilePicture - - # @!attribute statuses_count - # - # @return [Integer, nil] - optional :statuses_count, Integer, api_name: :statusesCount - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) - # X user profile with bio, follower counts, and verification status. - # - # @param id [String] - # @param name [String] - # @param username [String] - # @param created_at [String] - # @param description [String] - # @param followers [Integer] - # @param following [Integer] - # @param location [String] - # @param profile_picture [String] - # @param statuses_count [Integer] - # @param verified [Boolean] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/community_retrieve_search_response.rb b/lib/x_twitter_scraper/models/x/community_retrieve_search_response.rb deleted file mode 100644 index 18c709b..0000000 --- a/lib/x_twitter_scraper/models/x/community_retrieve_search_response.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Communities#retrieve_search - class CommunityRetrieveSearchResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute tweets - # - # @return [Array] - required :tweets, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet] } - - # @!method initialize(has_next_page:, next_cursor:, tweets:) - # Paginated list of tweets with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param tweets [Array] - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute author - # - # @return [XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author, nil] - optional :author, -> { XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author } - - # @!attribute bookmark_count - # - # @return [Integer, nil] - optional :bookmark_count, Integer, api_name: :bookmarkCount - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute is_note_tweet - # True for Note Tweets (long-form content, up to 25,000 characters) - # - # @return [Boolean, nil] - optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet - - # @!attribute like_count - # - # @return [Integer, nil] - optional :like_count, Integer, api_name: :likeCount - - # @!attribute quote_count - # - # @return [Integer, nil] - optional :quote_count, Integer, api_name: :quoteCount - - # @!attribute reply_count - # - # @return [Integer, nil] - optional :reply_count, Integer, api_name: :replyCount - - # @!attribute retweet_count - # - # @return [Integer, nil] - optional :retweet_count, Integer, api_name: :retweetCount - - # @!attribute view_count - # - # @return [Integer, nil] - optional :view_count, Integer, api_name: :viewCount - - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) - # Tweet returned from search results with inline author info. - # - # @param id [String] - # - # @param text [String] - # - # @param author [XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author] - # - # @param bookmark_count [Integer] - # - # @param created_at [String] - # - # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) - # - # @param like_count [Integer] - # - # @param quote_count [Integer] - # - # @param reply_count [Integer] - # - # @param retweet_count [Integer] - # - # @param view_count [Integer] - - # @see XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet#author - class Author < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, verified: nil) - # @param id [String] - # @param name [String] - # @param username [String] - # @param verified [Boolean] - end - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/list_retrieve_followers_response.rb b/lib/x_twitter_scraper/models/x/list_retrieve_followers_response.rb deleted file mode 100644 index 2257458..0000000 --- a/lib/x_twitter_scraper/models/x/list_retrieve_followers_response.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Lists#retrieve_followers - class ListRetrieveFollowersResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute users - # - # @return [Array] - required :users, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::ListRetrieveFollowersResponse::User] } - - # @!method initialize(has_next_page:, next_cursor:, users:) - # Paginated list of user profiles with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param users [Array] - - class User < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute description - # - # @return [String, nil] - optional :description, String - - # @!attribute followers - # - # @return [Integer, nil] - optional :followers, Integer - - # @!attribute following - # - # @return [Integer, nil] - optional :following, Integer - - # @!attribute location - # - # @return [String, nil] - optional :location, String - - # @!attribute profile_picture - # - # @return [String, nil] - optional :profile_picture, String, api_name: :profilePicture - - # @!attribute statuses_count - # - # @return [Integer, nil] - optional :statuses_count, Integer, api_name: :statusesCount - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) - # X user profile with bio, follower counts, and verification status. - # - # @param id [String] - # @param name [String] - # @param username [String] - # @param created_at [String] - # @param description [String] - # @param followers [Integer] - # @param following [Integer] - # @param location [String] - # @param profile_picture [String] - # @param statuses_count [Integer] - # @param verified [Boolean] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/list_retrieve_members_response.rb b/lib/x_twitter_scraper/models/x/list_retrieve_members_response.rb deleted file mode 100644 index 0867380..0000000 --- a/lib/x_twitter_scraper/models/x/list_retrieve_members_response.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Lists#retrieve_members - class ListRetrieveMembersResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute users - # - # @return [Array] - required :users, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::ListRetrieveMembersResponse::User] } - - # @!method initialize(has_next_page:, next_cursor:, users:) - # Paginated list of user profiles with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param users [Array] - - class User < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute description - # - # @return [String, nil] - optional :description, String - - # @!attribute followers - # - # @return [Integer, nil] - optional :followers, Integer - - # @!attribute following - # - # @return [Integer, nil] - optional :following, Integer - - # @!attribute location - # - # @return [String, nil] - optional :location, String - - # @!attribute profile_picture - # - # @return [String, nil] - optional :profile_picture, String, api_name: :profilePicture - - # @!attribute statuses_count - # - # @return [Integer, nil] - optional :statuses_count, Integer, api_name: :statusesCount - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) - # X user profile with bio, follower counts, and verification status. - # - # @param id [String] - # @param name [String] - # @param username [String] - # @param created_at [String] - # @param description [String] - # @param followers [Integer] - # @param following [Integer] - # @param location [String] - # @param profile_picture [String] - # @param statuses_count [Integer] - # @param verified [Boolean] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/list_retrieve_tweets_response.rb b/lib/x_twitter_scraper/models/x/list_retrieve_tweets_response.rb deleted file mode 100644 index 70358b4..0000000 --- a/lib/x_twitter_scraper/models/x/list_retrieve_tweets_response.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Lists#retrieve_tweets - class ListRetrieveTweetsResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute tweets - # - # @return [Array] - required :tweets, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet] } - - # @!method initialize(has_next_page:, next_cursor:, tweets:) - # Paginated list of tweets with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param tweets [Array] - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute author - # - # @return [XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author, nil] - optional :author, -> { XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author } - - # @!attribute bookmark_count - # - # @return [Integer, nil] - optional :bookmark_count, Integer, api_name: :bookmarkCount - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute is_note_tweet - # True for Note Tweets (long-form content, up to 25,000 characters) - # - # @return [Boolean, nil] - optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet - - # @!attribute like_count - # - # @return [Integer, nil] - optional :like_count, Integer, api_name: :likeCount - - # @!attribute quote_count - # - # @return [Integer, nil] - optional :quote_count, Integer, api_name: :quoteCount - - # @!attribute reply_count - # - # @return [Integer, nil] - optional :reply_count, Integer, api_name: :replyCount - - # @!attribute retweet_count - # - # @return [Integer, nil] - optional :retweet_count, Integer, api_name: :retweetCount - - # @!attribute view_count - # - # @return [Integer, nil] - optional :view_count, Integer, api_name: :viewCount - - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) - # Tweet returned from search results with inline author info. - # - # @param id [String] - # - # @param text [String] - # - # @param author [XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author] - # - # @param bookmark_count [Integer] - # - # @param created_at [String] - # - # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) - # - # @param like_count [Integer] - # - # @param quote_count [Integer] - # - # @param reply_count [Integer] - # - # @param retweet_count [Integer] - # - # @param view_count [Integer] - - # @see XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet#author - class Author < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, verified: nil) - # @param id [String] - # @param name [String] - # @param username [String] - # @param verified [Boolean] - end - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/tweet_delete_params.rb b/lib/x_twitter_scraper/models/x/tweet_delete_params.rb new file mode 100644 index 0000000..cc4c0d2 --- /dev/null +++ b/lib/x_twitter_scraper/models/x/tweet_delete_params.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + # @see XTwitterScraper::Resources::X::Tweets#delete + class TweetDeleteParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute account + # X account identifier (@username or account ID) + # + # @return [String] + required :account, String + + # @!method initialize(id:, account:, request_options: {}) + # @param id [String] + # + # @param account [String] X account identifier (@username or account ID) + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/tweet_delete_response.rb b/lib/x_twitter_scraper/models/x/tweet_delete_response.rb new file mode 100644 index 0000000..8316b1c --- /dev/null +++ b/lib/x_twitter_scraper/models/x/tweet_delete_response.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + # @see XTwitterScraper::Resources::X::Tweets#delete + class TweetDeleteResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute success + # + # @return [Boolean, true] + required :success, const: true + + # @!method initialize(success: true) + # @param success [Boolean, true] + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/tweet_get_favoriters_response.rb b/lib/x_twitter_scraper/models/x/tweet_get_favoriters_response.rb deleted file mode 100644 index 42b5f19..0000000 --- a/lib/x_twitter_scraper/models/x/tweet_get_favoriters_response.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Tweets#get_favoriters - class TweetGetFavoritersResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute users - # - # @return [Array] - required :users, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetGetFavoritersResponse::User] } - - # @!method initialize(has_next_page:, next_cursor:, users:) - # Paginated list of user profiles with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param users [Array] - - class User < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute description - # - # @return [String, nil] - optional :description, String - - # @!attribute followers - # - # @return [Integer, nil] - optional :followers, Integer - - # @!attribute following - # - # @return [Integer, nil] - optional :following, Integer - - # @!attribute location - # - # @return [String, nil] - optional :location, String - - # @!attribute profile_picture - # - # @return [String, nil] - optional :profile_picture, String, api_name: :profilePicture - - # @!attribute statuses_count - # - # @return [Integer, nil] - optional :statuses_count, Integer, api_name: :statusesCount - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) - # X user profile with bio, follower counts, and verification status. - # - # @param id [String] - # @param name [String] - # @param username [String] - # @param created_at [String] - # @param description [String] - # @param followers [Integer] - # @param following [Integer] - # @param location [String] - # @param profile_picture [String] - # @param statuses_count [Integer] - # @param verified [Boolean] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/tweet_get_quotes_response.rb b/lib/x_twitter_scraper/models/x/tweet_get_quotes_response.rb deleted file mode 100644 index a6cb11b..0000000 --- a/lib/x_twitter_scraper/models/x/tweet_get_quotes_response.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Tweets#get_quotes - class TweetGetQuotesResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute tweets - # - # @return [Array] - required :tweets, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet] } - - # @!method initialize(has_next_page:, next_cursor:, tweets:) - # Paginated list of tweets with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param tweets [Array] - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute author - # - # @return [XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet::Author, nil] - optional :author, -> { XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet::Author } - - # @!attribute bookmark_count - # - # @return [Integer, nil] - optional :bookmark_count, Integer, api_name: :bookmarkCount - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute is_note_tweet - # True for Note Tweets (long-form content, up to 25,000 characters) - # - # @return [Boolean, nil] - optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet - - # @!attribute like_count - # - # @return [Integer, nil] - optional :like_count, Integer, api_name: :likeCount - - # @!attribute quote_count - # - # @return [Integer, nil] - optional :quote_count, Integer, api_name: :quoteCount - - # @!attribute reply_count - # - # @return [Integer, nil] - optional :reply_count, Integer, api_name: :replyCount - - # @!attribute retweet_count - # - # @return [Integer, nil] - optional :retweet_count, Integer, api_name: :retweetCount - - # @!attribute view_count - # - # @return [Integer, nil] - optional :view_count, Integer, api_name: :viewCount - - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) - # Tweet returned from search results with inline author info. - # - # @param id [String] - # - # @param text [String] - # - # @param author [XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet::Author] - # - # @param bookmark_count [Integer] - # - # @param created_at [String] - # - # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) - # - # @param like_count [Integer] - # - # @param quote_count [Integer] - # - # @param reply_count [Integer] - # - # @param retweet_count [Integer] - # - # @param view_count [Integer] - - # @see XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet#author - class Author < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, verified: nil) - # @param id [String] - # @param name [String] - # @param username [String] - # @param verified [Boolean] - end - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/tweet_get_replies_response.rb b/lib/x_twitter_scraper/models/x/tweet_get_replies_response.rb deleted file mode 100644 index 3c4d9a2..0000000 --- a/lib/x_twitter_scraper/models/x/tweet_get_replies_response.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Tweets#get_replies - class TweetGetRepliesResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute tweets - # - # @return [Array] - required :tweets, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet] } - - # @!method initialize(has_next_page:, next_cursor:, tweets:) - # Paginated list of tweets with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param tweets [Array] - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute author - # - # @return [XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet::Author, nil] - optional :author, -> { XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet::Author } - - # @!attribute bookmark_count - # - # @return [Integer, nil] - optional :bookmark_count, Integer, api_name: :bookmarkCount - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute is_note_tweet - # True for Note Tweets (long-form content, up to 25,000 characters) - # - # @return [Boolean, nil] - optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet - - # @!attribute like_count - # - # @return [Integer, nil] - optional :like_count, Integer, api_name: :likeCount - - # @!attribute quote_count - # - # @return [Integer, nil] - optional :quote_count, Integer, api_name: :quoteCount - - # @!attribute reply_count - # - # @return [Integer, nil] - optional :reply_count, Integer, api_name: :replyCount - - # @!attribute retweet_count - # - # @return [Integer, nil] - optional :retweet_count, Integer, api_name: :retweetCount - - # @!attribute view_count - # - # @return [Integer, nil] - optional :view_count, Integer, api_name: :viewCount - - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) - # Tweet returned from search results with inline author info. - # - # @param id [String] - # - # @param text [String] - # - # @param author [XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet::Author] - # - # @param bookmark_count [Integer] - # - # @param created_at [String] - # - # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) - # - # @param like_count [Integer] - # - # @param quote_count [Integer] - # - # @param reply_count [Integer] - # - # @param retweet_count [Integer] - # - # @param view_count [Integer] - - # @see XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet#author - class Author < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, verified: nil) - # @param id [String] - # @param name [String] - # @param username [String] - # @param verified [Boolean] - end - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/tweet_get_retweeters_response.rb b/lib/x_twitter_scraper/models/x/tweet_get_retweeters_response.rb deleted file mode 100644 index 8db37bb..0000000 --- a/lib/x_twitter_scraper/models/x/tweet_get_retweeters_response.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Tweets#get_retweeters - class TweetGetRetweetersResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute users - # - # @return [Array] - required :users, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetGetRetweetersResponse::User] } - - # @!method initialize(has_next_page:, next_cursor:, users:) - # Paginated list of user profiles with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param users [Array] - - class User < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute description - # - # @return [String, nil] - optional :description, String - - # @!attribute followers - # - # @return [Integer, nil] - optional :followers, Integer - - # @!attribute following - # - # @return [Integer, nil] - optional :following, Integer - - # @!attribute location - # - # @return [String, nil] - optional :location, String - - # @!attribute profile_picture - # - # @return [String, nil] - optional :profile_picture, String, api_name: :profilePicture - - # @!attribute statuses_count - # - # @return [Integer, nil] - optional :statuses_count, Integer, api_name: :statusesCount - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) - # X user profile with bio, follower counts, and verification status. - # - # @param id [String] - # @param name [String] - # @param username [String] - # @param created_at [String] - # @param description [String] - # @param followers [Integer] - # @param following [Integer] - # @param location [String] - # @param profile_picture [String] - # @param statuses_count [Integer] - # @param verified [Boolean] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/tweet_get_thread_response.rb b/lib/x_twitter_scraper/models/x/tweet_get_thread_response.rb deleted file mode 100644 index a168ec5..0000000 --- a/lib/x_twitter_scraper/models/x/tweet_get_thread_response.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Tweets#get_thread - class TweetGetThreadResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute tweets - # - # @return [Array] - required :tweets, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet] } - - # @!method initialize(has_next_page:, next_cursor:, tweets:) - # Paginated list of tweets with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param tweets [Array] - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute author - # - # @return [XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet::Author, nil] - optional :author, -> { XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet::Author } - - # @!attribute bookmark_count - # - # @return [Integer, nil] - optional :bookmark_count, Integer, api_name: :bookmarkCount - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute is_note_tweet - # True for Note Tweets (long-form content, up to 25,000 characters) - # - # @return [Boolean, nil] - optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet - - # @!attribute like_count - # - # @return [Integer, nil] - optional :like_count, Integer, api_name: :likeCount - - # @!attribute quote_count - # - # @return [Integer, nil] - optional :quote_count, Integer, api_name: :quoteCount - - # @!attribute reply_count - # - # @return [Integer, nil] - optional :reply_count, Integer, api_name: :replyCount - - # @!attribute retweet_count - # - # @return [Integer, nil] - optional :retweet_count, Integer, api_name: :retweetCount - - # @!attribute view_count - # - # @return [Integer, nil] - optional :view_count, Integer, api_name: :viewCount - - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) - # Tweet returned from search results with inline author info. - # - # @param id [String] - # - # @param text [String] - # - # @param author [XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet::Author] - # - # @param bookmark_count [Integer] - # - # @param created_at [String] - # - # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) - # - # @param like_count [Integer] - # - # @param quote_count [Integer] - # - # @param reply_count [Integer] - # - # @param retweet_count [Integer] - # - # @param view_count [Integer] - - # @see XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet#author - class Author < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, verified: nil) - # @param id [String] - # @param name [String] - # @param username [String] - # @param verified [Boolean] - end - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/tweet_list_response.rb b/lib/x_twitter_scraper/models/x/tweet_list_response.rb deleted file mode 100644 index 9aa1e1e..0000000 --- a/lib/x_twitter_scraper/models/x/tweet_list_response.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Tweets#list - class TweetListResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute tweets - # - # @return [Array] - required :tweets, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetListResponse::Tweet] } - - # @!method initialize(has_next_page:, next_cursor:, tweets:) - # Paginated list of tweets with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param tweets [Array] - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute author - # - # @return [XTwitterScraper::Models::X::TweetListResponse::Tweet::Author, nil] - optional :author, -> { XTwitterScraper::Models::X::TweetListResponse::Tweet::Author } - - # @!attribute bookmark_count - # - # @return [Integer, nil] - optional :bookmark_count, Integer, api_name: :bookmarkCount - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute is_note_tweet - # True for Note Tweets (long-form content, up to 25,000 characters) - # - # @return [Boolean, nil] - optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet - - # @!attribute like_count - # - # @return [Integer, nil] - optional :like_count, Integer, api_name: :likeCount - - # @!attribute quote_count - # - # @return [Integer, nil] - optional :quote_count, Integer, api_name: :quoteCount - - # @!attribute reply_count - # - # @return [Integer, nil] - optional :reply_count, Integer, api_name: :replyCount - - # @!attribute retweet_count - # - # @return [Integer, nil] - optional :retweet_count, Integer, api_name: :retweetCount - - # @!attribute view_count - # - # @return [Integer, nil] - optional :view_count, Integer, api_name: :viewCount - - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) - # Tweet returned from search results with inline author info. - # - # @param id [String] - # - # @param text [String] - # - # @param author [XTwitterScraper::Models::X::TweetListResponse::Tweet::Author] - # - # @param bookmark_count [Integer] - # - # @param created_at [String] - # - # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) - # - # @param like_count [Integer] - # - # @param quote_count [Integer] - # - # @param reply_count [Integer] - # - # @param retweet_count [Integer] - # - # @param view_count [Integer] - - # @see XTwitterScraper::Models::X::TweetListResponse::Tweet#author - class Author < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, verified: nil) - # @param id [String] - # @param name [String] - # @param username [String] - # @param verified [Boolean] - end - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/tweet_retrieve_params.rb b/lib/x_twitter_scraper/models/x/tweet_retrieve_params.rb new file mode 100644 index 0000000..6eaf416 --- /dev/null +++ b/lib/x_twitter_scraper/models/x/tweet_retrieve_params.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + # @see XTwitterScraper::Resources::X::Tweets#retrieve + class TweetRetrieveParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!method initialize(id:, request_options: {}) + # @param id [String] + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/tweet_retrieve_response.rb b/lib/x_twitter_scraper/models/x/tweet_retrieve_response.rb new file mode 100644 index 0000000..276e9e3 --- /dev/null +++ b/lib/x_twitter_scraper/models/x/tweet_retrieve_response.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + # @see XTwitterScraper::Resources::X::Tweets#retrieve + class TweetRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute tweet + # Full tweet with text, engagement metrics, media, and metadata. + # + # @return [XTwitterScraper::Models::X::TweetDetail] + required :tweet, -> { XTwitterScraper::X::TweetDetail } + + # @!attribute author + # Author of a tweet with follower count and verification status. + # + # @return [XTwitterScraper::Models::X::TweetAuthor, nil] + optional :author, -> { XTwitterScraper::X::TweetAuthor } + + # @!method initialize(tweet:, author: nil) + # @param tweet [XTwitterScraper::Models::X::TweetDetail] Full tweet with text, engagement metrics, media, and metadata. + # + # @param author [XTwitterScraper::Models::X::TweetAuthor] Author of a tweet with follower count and verification status. + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/tweet_search_response.rb b/lib/x_twitter_scraper/models/x/tweet_search_response.rb deleted file mode 100644 index 85003c3..0000000 --- a/lib/x_twitter_scraper/models/x/tweet_search_response.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Tweets#search - class TweetSearchResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute tweets - # - # @return [Array] - required :tweets, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetSearchResponse::Tweet] } - - # @!method initialize(has_next_page:, next_cursor:, tweets:) - # Paginated list of tweets with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param tweets [Array] - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute author - # - # @return [XTwitterScraper::Models::X::TweetSearchResponse::Tweet::Author, nil] - optional :author, -> { XTwitterScraper::Models::X::TweetSearchResponse::Tweet::Author } - - # @!attribute bookmark_count - # - # @return [Integer, nil] - optional :bookmark_count, Integer, api_name: :bookmarkCount - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute is_note_tweet - # True for Note Tweets (long-form content, up to 25,000 characters) - # - # @return [Boolean, nil] - optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet - - # @!attribute like_count - # - # @return [Integer, nil] - optional :like_count, Integer, api_name: :likeCount - - # @!attribute quote_count - # - # @return [Integer, nil] - optional :quote_count, Integer, api_name: :quoteCount - - # @!attribute reply_count - # - # @return [Integer, nil] - optional :reply_count, Integer, api_name: :replyCount - - # @!attribute retweet_count - # - # @return [Integer, nil] - optional :retweet_count, Integer, api_name: :retweetCount - - # @!attribute view_count - # - # @return [Integer, nil] - optional :view_count, Integer, api_name: :viewCount - - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) - # Tweet returned from search results with inline author info. - # - # @param id [String] - # - # @param text [String] - # - # @param author [XTwitterScraper::Models::X::TweetSearchResponse::Tweet::Author] - # - # @param bookmark_count [Integer] - # - # @param created_at [String] - # - # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) - # - # @param like_count [Integer] - # - # @param quote_count [Integer] - # - # @param reply_count [Integer] - # - # @param retweet_count [Integer] - # - # @param view_count [Integer] - - # @see XTwitterScraper::Models::X::TweetSearchResponse::Tweet#author - class Author < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, verified: nil) - # @param id [String] - # @param name [String] - # @param username [String] - # @param verified [Boolean] - end - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/tweets/like_create_params.rb b/lib/x_twitter_scraper/models/x/tweets/like_create_params.rb new file mode 100644 index 0000000..81be06b --- /dev/null +++ b/lib/x_twitter_scraper/models/x/tweets/like_create_params.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + module Tweets + # @see XTwitterScraper::Resources::X::Tweets::Like#create + class LikeCreateParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute account + # X account identifier (@username or account ID) + # + # @return [String] + required :account, String + + # @!method initialize(id:, account:, request_options: {}) + # @param id [String] + # + # @param account [String] X account identifier (@username or account ID) + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/tweets/like_create_response.rb b/lib/x_twitter_scraper/models/x/tweets/like_create_response.rb new file mode 100644 index 0000000..57247ba --- /dev/null +++ b/lib/x_twitter_scraper/models/x/tweets/like_create_response.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + module Tweets + # @see XTwitterScraper::Resources::X::Tweets::Like#create + class LikeCreateResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute success + # + # @return [Boolean, true] + required :success, const: true + + # @!method initialize(success: true) + # @param success [Boolean, true] + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/tweets/like_delete_params.rb b/lib/x_twitter_scraper/models/x/tweets/like_delete_params.rb new file mode 100644 index 0000000..5957625 --- /dev/null +++ b/lib/x_twitter_scraper/models/x/tweets/like_delete_params.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + module Tweets + # @see XTwitterScraper::Resources::X::Tweets::Like#delete + class LikeDeleteParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute account + # X account identifier (@username or account ID) + # + # @return [String] + required :account, String + + # @!method initialize(id:, account:, request_options: {}) + # @param id [String] + # + # @param account [String] X account identifier (@username or account ID) + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/tweets/like_delete_response.rb b/lib/x_twitter_scraper/models/x/tweets/like_delete_response.rb new file mode 100644 index 0000000..c65f121 --- /dev/null +++ b/lib/x_twitter_scraper/models/x/tweets/like_delete_response.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + module Tweets + # @see XTwitterScraper::Resources::X::Tweets::Like#delete + class LikeDeleteResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute success + # + # @return [Boolean, true] + required :success, const: true + + # @!method initialize(success: true) + # @param success [Boolean, true] + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/tweets/retweet_create_params.rb b/lib/x_twitter_scraper/models/x/tweets/retweet_create_params.rb new file mode 100644 index 0000000..f1626c2 --- /dev/null +++ b/lib/x_twitter_scraper/models/x/tweets/retweet_create_params.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + module Tweets + # @see XTwitterScraper::Resources::X::Tweets::Retweet#create + class RetweetCreateParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute account + # X account identifier (@username or account ID) + # + # @return [String] + required :account, String + + # @!method initialize(id:, account:, request_options: {}) + # @param id [String] + # + # @param account [String] X account identifier (@username or account ID) + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/tweets/retweet_create_response.rb b/lib/x_twitter_scraper/models/x/tweets/retweet_create_response.rb new file mode 100644 index 0000000..0c1b16d --- /dev/null +++ b/lib/x_twitter_scraper/models/x/tweets/retweet_create_response.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + module Tweets + # @see XTwitterScraper::Resources::X::Tweets::Retweet#create + class RetweetCreateResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute success + # + # @return [Boolean, true] + required :success, const: true + + # @!method initialize(success: true) + # @param success [Boolean, true] + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/tweets/retweet_delete_params.rb b/lib/x_twitter_scraper/models/x/tweets/retweet_delete_params.rb new file mode 100644 index 0000000..115dc5e --- /dev/null +++ b/lib/x_twitter_scraper/models/x/tweets/retweet_delete_params.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + module Tweets + # @see XTwitterScraper::Resources::X::Tweets::Retweet#delete + class RetweetDeleteParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute account + # X account identifier (@username or account ID) + # + # @return [String] + required :account, String + + # @!method initialize(id:, account:, request_options: {}) + # @param id [String] + # + # @param account [String] X account identifier (@username or account ID) + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/tweets/retweet_delete_response.rb b/lib/x_twitter_scraper/models/x/tweets/retweet_delete_response.rb new file mode 100644 index 0000000..581ce97 --- /dev/null +++ b/lib/x_twitter_scraper/models/x/tweets/retweet_delete_response.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + module Tweets + # @see XTwitterScraper::Resources::X::Tweets::Retweet#delete + class RetweetDeleteResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute success + # + # @return [Boolean, true] + required :success, const: true + + # @!method initialize(success: true) + # @param success [Boolean, true] + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/user_profile.rb b/lib/x_twitter_scraper/models/x/user_profile.rb index 274de80..b570228 100644 --- a/lib/x_twitter_scraper/models/x/user_profile.rb +++ b/lib/x_twitter_scraper/models/x/user_profile.rb @@ -3,6 +3,7 @@ module XTwitterScraper module Models module X + # @see XTwitterScraper::Resources::X::Users#retrieve class UserProfile < XTwitterScraper::Internal::Type::BaseModel # @!attribute id # diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_batch_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_batch_response.rb deleted file mode 100644 index fea807f..0000000 --- a/lib/x_twitter_scraper/models/x/user_retrieve_batch_response.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Users#retrieve_batch - class UserRetrieveBatchResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute users - # - # @return [Array] - required :users, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveBatchResponse::User] } - - # @!method initialize(has_next_page:, next_cursor:, users:) - # Paginated list of user profiles with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param users [Array] - - class User < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute description - # - # @return [String, nil] - optional :description, String - - # @!attribute followers - # - # @return [Integer, nil] - optional :followers, Integer - - # @!attribute following - # - # @return [Integer, nil] - optional :following, Integer - - # @!attribute location - # - # @return [String, nil] - optional :location, String - - # @!attribute profile_picture - # - # @return [String, nil] - optional :profile_picture, String, api_name: :profilePicture - - # @!attribute statuses_count - # - # @return [Integer, nil] - optional :statuses_count, Integer, api_name: :statusesCount - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) - # X user profile with bio, follower counts, and verification status. - # - # @param id [String] - # @param name [String] - # @param username [String] - # @param created_at [String] - # @param description [String] - # @param followers [Integer] - # @param following [Integer] - # @param location [String] - # @param profile_picture [String] - # @param statuses_count [Integer] - # @param verified [Boolean] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_followers_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_followers_response.rb deleted file mode 100644 index 9444e46..0000000 --- a/lib/x_twitter_scraper/models/x/user_retrieve_followers_response.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Users#retrieve_followers - class UserRetrieveFollowersResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute users - # - # @return [Array] - required :users, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveFollowersResponse::User] } - - # @!method initialize(has_next_page:, next_cursor:, users:) - # Paginated list of user profiles with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param users [Array] - - class User < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute description - # - # @return [String, nil] - optional :description, String - - # @!attribute followers - # - # @return [Integer, nil] - optional :followers, Integer - - # @!attribute following - # - # @return [Integer, nil] - optional :following, Integer - - # @!attribute location - # - # @return [String, nil] - optional :location, String - - # @!attribute profile_picture - # - # @return [String, nil] - optional :profile_picture, String, api_name: :profilePicture - - # @!attribute statuses_count - # - # @return [Integer, nil] - optional :statuses_count, Integer, api_name: :statusesCount - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) - # X user profile with bio, follower counts, and verification status. - # - # @param id [String] - # @param name [String] - # @param username [String] - # @param created_at [String] - # @param description [String] - # @param followers [Integer] - # @param following [Integer] - # @param location [String] - # @param profile_picture [String] - # @param statuses_count [Integer] - # @param verified [Boolean] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_followers_you_know_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_followers_you_know_response.rb deleted file mode 100644 index 3777b7d..0000000 --- a/lib/x_twitter_scraper/models/x/user_retrieve_followers_you_know_response.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Users#retrieve_followers_you_know - class UserRetrieveFollowersYouKnowResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute users - # - # @return [Array] - required :users, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveFollowersYouKnowResponse::User] } - - # @!method initialize(has_next_page:, next_cursor:, users:) - # Paginated list of user profiles with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param users [Array] - - class User < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute description - # - # @return [String, nil] - optional :description, String - - # @!attribute followers - # - # @return [Integer, nil] - optional :followers, Integer - - # @!attribute following - # - # @return [Integer, nil] - optional :following, Integer - - # @!attribute location - # - # @return [String, nil] - optional :location, String - - # @!attribute profile_picture - # - # @return [String, nil] - optional :profile_picture, String, api_name: :profilePicture - - # @!attribute statuses_count - # - # @return [Integer, nil] - optional :statuses_count, Integer, api_name: :statusesCount - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) - # X user profile with bio, follower counts, and verification status. - # - # @param id [String] - # @param name [String] - # @param username [String] - # @param created_at [String] - # @param description [String] - # @param followers [Integer] - # @param following [Integer] - # @param location [String] - # @param profile_picture [String] - # @param statuses_count [Integer] - # @param verified [Boolean] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_following_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_following_response.rb deleted file mode 100644 index 68f67fb..0000000 --- a/lib/x_twitter_scraper/models/x/user_retrieve_following_response.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Users#retrieve_following - class UserRetrieveFollowingResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute users - # - # @return [Array] - required :users, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveFollowingResponse::User] } - - # @!method initialize(has_next_page:, next_cursor:, users:) - # Paginated list of user profiles with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param users [Array] - - class User < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute description - # - # @return [String, nil] - optional :description, String - - # @!attribute followers - # - # @return [Integer, nil] - optional :followers, Integer - - # @!attribute following - # - # @return [Integer, nil] - optional :following, Integer - - # @!attribute location - # - # @return [String, nil] - optional :location, String - - # @!attribute profile_picture - # - # @return [String, nil] - optional :profile_picture, String, api_name: :profilePicture - - # @!attribute statuses_count - # - # @return [Integer, nil] - optional :statuses_count, Integer, api_name: :statusesCount - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) - # X user profile with bio, follower counts, and verification status. - # - # @param id [String] - # @param name [String] - # @param username [String] - # @param created_at [String] - # @param description [String] - # @param followers [Integer] - # @param following [Integer] - # @param location [String] - # @param profile_picture [String] - # @param statuses_count [Integer] - # @param verified [Boolean] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_likes_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_likes_response.rb deleted file mode 100644 index 4894b9f..0000000 --- a/lib/x_twitter_scraper/models/x/user_retrieve_likes_response.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Users#retrieve_likes - class UserRetrieveLikesResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute tweets - # - # @return [Array] - required :tweets, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet] } - - # @!method initialize(has_next_page:, next_cursor:, tweets:) - # Paginated list of tweets with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param tweets [Array] - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute author - # - # @return [XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet::Author, nil] - optional :author, -> { XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet::Author } - - # @!attribute bookmark_count - # - # @return [Integer, nil] - optional :bookmark_count, Integer, api_name: :bookmarkCount - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute is_note_tweet - # True for Note Tweets (long-form content, up to 25,000 characters) - # - # @return [Boolean, nil] - optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet - - # @!attribute like_count - # - # @return [Integer, nil] - optional :like_count, Integer, api_name: :likeCount - - # @!attribute quote_count - # - # @return [Integer, nil] - optional :quote_count, Integer, api_name: :quoteCount - - # @!attribute reply_count - # - # @return [Integer, nil] - optional :reply_count, Integer, api_name: :replyCount - - # @!attribute retweet_count - # - # @return [Integer, nil] - optional :retweet_count, Integer, api_name: :retweetCount - - # @!attribute view_count - # - # @return [Integer, nil] - optional :view_count, Integer, api_name: :viewCount - - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) - # Tweet returned from search results with inline author info. - # - # @param id [String] - # - # @param text [String] - # - # @param author [XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet::Author] - # - # @param bookmark_count [Integer] - # - # @param created_at [String] - # - # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) - # - # @param like_count [Integer] - # - # @param quote_count [Integer] - # - # @param reply_count [Integer] - # - # @param retweet_count [Integer] - # - # @param view_count [Integer] - - # @see XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet#author - class Author < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, verified: nil) - # @param id [String] - # @param name [String] - # @param username [String] - # @param verified [Boolean] - end - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_media_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_media_response.rb deleted file mode 100644 index ad86001..0000000 --- a/lib/x_twitter_scraper/models/x/user_retrieve_media_response.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Users#retrieve_media - class UserRetrieveMediaResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute tweets - # - # @return [Array] - required :tweets, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet] } - - # @!method initialize(has_next_page:, next_cursor:, tweets:) - # Paginated list of tweets with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param tweets [Array] - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute author - # - # @return [XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet::Author, nil] - optional :author, -> { XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet::Author } - - # @!attribute bookmark_count - # - # @return [Integer, nil] - optional :bookmark_count, Integer, api_name: :bookmarkCount - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute is_note_tweet - # True for Note Tweets (long-form content, up to 25,000 characters) - # - # @return [Boolean, nil] - optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet - - # @!attribute like_count - # - # @return [Integer, nil] - optional :like_count, Integer, api_name: :likeCount - - # @!attribute quote_count - # - # @return [Integer, nil] - optional :quote_count, Integer, api_name: :quoteCount - - # @!attribute reply_count - # - # @return [Integer, nil] - optional :reply_count, Integer, api_name: :replyCount - - # @!attribute retweet_count - # - # @return [Integer, nil] - optional :retweet_count, Integer, api_name: :retweetCount - - # @!attribute view_count - # - # @return [Integer, nil] - optional :view_count, Integer, api_name: :viewCount - - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) - # Tweet returned from search results with inline author info. - # - # @param id [String] - # - # @param text [String] - # - # @param author [XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet::Author] - # - # @param bookmark_count [Integer] - # - # @param created_at [String] - # - # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) - # - # @param like_count [Integer] - # - # @param quote_count [Integer] - # - # @param reply_count [Integer] - # - # @param retweet_count [Integer] - # - # @param view_count [Integer] - - # @see XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet#author - class Author < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, verified: nil) - # @param id [String] - # @param name [String] - # @param username [String] - # @param verified [Boolean] - end - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_mentions_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_mentions_response.rb deleted file mode 100644 index 1c6fc65..0000000 --- a/lib/x_twitter_scraper/models/x/user_retrieve_mentions_response.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Users#retrieve_mentions - class UserRetrieveMentionsResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute tweets - # - # @return [Array] - required :tweets, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet] } - - # @!method initialize(has_next_page:, next_cursor:, tweets:) - # Paginated list of tweets with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param tweets [Array] - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute author - # - # @return [XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author, nil] - optional :author, -> { XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author } - - # @!attribute bookmark_count - # - # @return [Integer, nil] - optional :bookmark_count, Integer, api_name: :bookmarkCount - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute is_note_tweet - # True for Note Tweets (long-form content, up to 25,000 characters) - # - # @return [Boolean, nil] - optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet - - # @!attribute like_count - # - # @return [Integer, nil] - optional :like_count, Integer, api_name: :likeCount - - # @!attribute quote_count - # - # @return [Integer, nil] - optional :quote_count, Integer, api_name: :quoteCount - - # @!attribute reply_count - # - # @return [Integer, nil] - optional :reply_count, Integer, api_name: :replyCount - - # @!attribute retweet_count - # - # @return [Integer, nil] - optional :retweet_count, Integer, api_name: :retweetCount - - # @!attribute view_count - # - # @return [Integer, nil] - optional :view_count, Integer, api_name: :viewCount - - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) - # Tweet returned from search results with inline author info. - # - # @param id [String] - # - # @param text [String] - # - # @param author [XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author] - # - # @param bookmark_count [Integer] - # - # @param created_at [String] - # - # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) - # - # @param like_count [Integer] - # - # @param quote_count [Integer] - # - # @param reply_count [Integer] - # - # @param retweet_count [Integer] - # - # @param view_count [Integer] - - # @see XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet#author - class Author < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, verified: nil) - # @param id [String] - # @param name [String] - # @param username [String] - # @param verified [Boolean] - end - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_params.rb b/lib/x_twitter_scraper/models/x/user_retrieve_params.rb new file mode 100644 index 0000000..eba408f --- /dev/null +++ b/lib/x_twitter_scraper/models/x/user_retrieve_params.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + # @see XTwitterScraper::Resources::X::Users#retrieve + class UserRetrieveParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!method initialize(id:, request_options: {}) + # @param id [String] + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_search_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_search_response.rb deleted file mode 100644 index bd5282e..0000000 --- a/lib/x_twitter_scraper/models/x/user_retrieve_search_response.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Users#retrieve_search - class UserRetrieveSearchResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute users - # - # @return [Array] - required :users, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveSearchResponse::User] } - - # @!method initialize(has_next_page:, next_cursor:, users:) - # Paginated list of user profiles with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param users [Array] - - class User < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute description - # - # @return [String, nil] - optional :description, String - - # @!attribute followers - # - # @return [Integer, nil] - optional :followers, Integer - - # @!attribute following - # - # @return [Integer, nil] - optional :following, Integer - - # @!attribute location - # - # @return [String, nil] - optional :location, String - - # @!attribute profile_picture - # - # @return [String, nil] - optional :profile_picture, String, api_name: :profilePicture - - # @!attribute statuses_count - # - # @return [Integer, nil] - optional :statuses_count, Integer, api_name: :statusesCount - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) - # X user profile with bio, follower counts, and verification status. - # - # @param id [String] - # @param name [String] - # @param username [String] - # @param created_at [String] - # @param description [String] - # @param followers [Integer] - # @param following [Integer] - # @param location [String] - # @param profile_picture [String] - # @param statuses_count [Integer] - # @param verified [Boolean] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_tweets_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_tweets_response.rb deleted file mode 100644 index 35b4c25..0000000 --- a/lib/x_twitter_scraper/models/x/user_retrieve_tweets_response.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Users#retrieve_tweets - class UserRetrieveTweetsResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute tweets - # - # @return [Array] - required :tweets, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet] } - - # @!method initialize(has_next_page:, next_cursor:, tweets:) - # Paginated list of tweets with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param tweets [Array] - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute author - # - # @return [XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet::Author, nil] - optional :author, -> { XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet::Author } - - # @!attribute bookmark_count - # - # @return [Integer, nil] - optional :bookmark_count, Integer, api_name: :bookmarkCount - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute is_note_tweet - # True for Note Tweets (long-form content, up to 25,000 characters) - # - # @return [Boolean, nil] - optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet - - # @!attribute like_count - # - # @return [Integer, nil] - optional :like_count, Integer, api_name: :likeCount - - # @!attribute quote_count - # - # @return [Integer, nil] - optional :quote_count, Integer, api_name: :quoteCount - - # @!attribute reply_count - # - # @return [Integer, nil] - optional :reply_count, Integer, api_name: :replyCount - - # @!attribute retweet_count - # - # @return [Integer, nil] - optional :retweet_count, Integer, api_name: :retweetCount - - # @!attribute view_count - # - # @return [Integer, nil] - optional :view_count, Integer, api_name: :viewCount - - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) - # Tweet returned from search results with inline author info. - # - # @param id [String] - # - # @param text [String] - # - # @param author [XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet::Author] - # - # @param bookmark_count [Integer] - # - # @param created_at [String] - # - # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) - # - # @param like_count [Integer] - # - # @param quote_count [Integer] - # - # @param reply_count [Integer] - # - # @param retweet_count [Integer] - # - # @param view_count [Integer] - - # @see XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet#author - class Author < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, verified: nil) - # @param id [String] - # @param name [String] - # @param username [String] - # @param verified [Boolean] - end - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rb b/lib/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rb deleted file mode 100644 index fbc00ec..0000000 --- a/lib/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - module X - # @see XTwitterScraper::Resources::X::Users#retrieve_verified_followers - class UserRetrieveVerifiedFollowersResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute users - # - # @return [Array] - required :users, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse::User] } - - # @!method initialize(has_next_page:, next_cursor:, users:) - # Paginated list of user profiles with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param users [Array] - - class User < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute description - # - # @return [String, nil] - optional :description, String - - # @!attribute followers - # - # @return [Integer, nil] - optional :followers, Integer - - # @!attribute following - # - # @return [Integer, nil] - optional :following, Integer - - # @!attribute location - # - # @return [String, nil] - optional :location, String - - # @!attribute profile_picture - # - # @return [String, nil] - optional :profile_picture, String, api_name: :profilePicture - - # @!attribute statuses_count - # - # @return [Integer, nil] - optional :statuses_count, Integer, api_name: :statusesCount - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) - # X user profile with bio, follower counts, and verification status. - # - # @param id [String] - # @param name [String] - # @param username [String] - # @param created_at [String] - # @param description [String] - # @param followers [Integer] - # @param following [Integer] - # @param location [String] - # @param profile_picture [String] - # @param statuses_count [Integer] - # @param verified [Boolean] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/models/x/users/follow_create_params.rb b/lib/x_twitter_scraper/models/x/users/follow_create_params.rb new file mode 100644 index 0000000..ae79adb --- /dev/null +++ b/lib/x_twitter_scraper/models/x/users/follow_create_params.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + module Users + # @see XTwitterScraper::Resources::X::Users::Follow#create + class FollowCreateParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute account + # X account identifier (@username or account ID) + # + # @return [String] + required :account, String + + # @!method initialize(id:, account:, request_options: {}) + # @param id [String] + # + # @param account [String] X account identifier (@username or account ID) + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/users/follow_create_response.rb b/lib/x_twitter_scraper/models/x/users/follow_create_response.rb new file mode 100644 index 0000000..d59b4eb --- /dev/null +++ b/lib/x_twitter_scraper/models/x/users/follow_create_response.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + module Users + # @see XTwitterScraper::Resources::X::Users::Follow#create + class FollowCreateResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute success + # + # @return [Boolean, true] + required :success, const: true + + # @!method initialize(success: true) + # @param success [Boolean, true] + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/users/follow_delete_all_params.rb b/lib/x_twitter_scraper/models/x/users/follow_delete_all_params.rb new file mode 100644 index 0000000..76b44c9 --- /dev/null +++ b/lib/x_twitter_scraper/models/x/users/follow_delete_all_params.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + module Users + # @see XTwitterScraper::Resources::X::Users::Follow#delete_all + class FollowDeleteAllParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute account + # X account identifier (@username or account ID) + # + # @return [String] + required :account, String + + # @!method initialize(id:, account:, request_options: {}) + # @param id [String] + # + # @param account [String] X account identifier (@username or account ID) + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/users/follow_delete_all_response.rb b/lib/x_twitter_scraper/models/x/users/follow_delete_all_response.rb new file mode 100644 index 0000000..a8afee1 --- /dev/null +++ b/lib/x_twitter_scraper/models/x/users/follow_delete_all_response.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module XTwitterScraper + module Models + module X + module Users + # @see XTwitterScraper::Resources::X::Users::Follow#delete_all + class FollowDeleteAllResponse < XTwitterScraper::Internal::Type::BaseModel + # @!attribute success + # + # @return [Boolean, true] + required :success, const: true + + # @!method initialize(success: true) + # @param success [Boolean, true] + end + end + end + end +end diff --git a/lib/x_twitter_scraper/models/x/x_account_detail.rb b/lib/x_twitter_scraper/models/x/x_account_detail.rb index 77b3dcf..4b7e069 100644 --- a/lib/x_twitter_scraper/models/x/x_account_detail.rb +++ b/lib/x_twitter_scraper/models/x/x_account_detail.rb @@ -3,6 +3,7 @@ module XTwitterScraper module Models module X + # @see XTwitterScraper::Resources::X::Accounts#retrieve class XAccountDetail < XTwitterScraper::Internal::Type::BaseModel # @!attribute id # diff --git a/lib/x_twitter_scraper/models/x_get_article_response.rb b/lib/x_twitter_scraper/models/x_get_article_response.rb index 45ab992..47bac28 100644 --- a/lib/x_twitter_scraper/models/x_get_article_response.rb +++ b/lib/x_twitter_scraper/models/x_get_article_response.rb @@ -12,13 +12,13 @@ class XGetArticleResponse < XTwitterScraper::Internal::Type::BaseModel # @!attribute author # Author of a tweet with follower count and verification status. # - # @return [XTwitterScraper::Models::XGetArticleResponse::Author, nil] - optional :author, -> { XTwitterScraper::Models::XGetArticleResponse::Author } + # @return [XTwitterScraper::Models::X::TweetAuthor, nil] + optional :author, -> { XTwitterScraper::X::TweetAuthor } # @!method initialize(article:, author: nil) # @param article [XTwitterScraper::Models::XGetArticleResponse::Article] # - # @param author [XTwitterScraper::Models::XGetArticleResponse::Author] Author of a tweet with follower count and verification status. + # @param author [XTwitterScraper::Models::X::TweetAuthor] Author of a tweet with follower count and verification status. # @see XTwitterScraper::Models::XGetArticleResponse#article class Article < XTwitterScraper::Internal::Type::BaseModel @@ -124,43 +124,6 @@ class Content < XTwitterScraper::Internal::Type::BaseModel # @param width [Integer] end end - - # @see XTwitterScraper::Models::XGetArticleResponse#author - class Author < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute followers - # - # @return [Integer] - required :followers, Integer - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute verified - # - # @return [Boolean] - required :verified, XTwitterScraper::Internal::Type::Boolean - - # @!attribute profile_picture - # - # @return [String, nil] - optional :profile_picture, String, api_name: :profilePicture - - # @!method initialize(id:, followers:, username:, verified:, profile_picture: nil) - # Author of a tweet with follower count and verification status. - # - # @param id [String] - # @param followers [Integer] - # @param username [String] - # @param verified [Boolean] - # @param profile_picture [String] - end end end end diff --git a/lib/x_twitter_scraper/models/x_get_home_timeline_response.rb b/lib/x_twitter_scraper/models/x_get_home_timeline_response.rb deleted file mode 100644 index 89f4b74..0000000 --- a/lib/x_twitter_scraper/models/x_get_home_timeline_response.rb +++ /dev/null @@ -1,143 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Models - # @see XTwitterScraper::Resources::X#get_home_timeline - class XGetHomeTimelineResponse < XTwitterScraper::Internal::Type::BaseModel - # @!attribute has_next_page - # - # @return [Boolean] - required :has_next_page, XTwitterScraper::Internal::Type::Boolean - - # @!attribute next_cursor - # - # @return [String] - required :next_cursor, String - - # @!attribute tweets - # - # @return [Array] - required :tweets, - -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet] } - - # @!method initialize(has_next_page:, next_cursor:, tweets:) - # Paginated list of tweets with cursor-based navigation. - # - # @param has_next_page [Boolean] - # @param next_cursor [String] - # @param tweets [Array] - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute text - # - # @return [String] - required :text, String - - # @!attribute author - # - # @return [XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet::Author, nil] - optional :author, -> { XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet::Author } - - # @!attribute bookmark_count - # - # @return [Integer, nil] - optional :bookmark_count, Integer, api_name: :bookmarkCount - - # @!attribute created_at - # - # @return [String, nil] - optional :created_at, String, api_name: :createdAt - - # @!attribute is_note_tweet - # True for Note Tweets (long-form content, up to 25,000 characters) - # - # @return [Boolean, nil] - optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet - - # @!attribute like_count - # - # @return [Integer, nil] - optional :like_count, Integer, api_name: :likeCount - - # @!attribute quote_count - # - # @return [Integer, nil] - optional :quote_count, Integer, api_name: :quoteCount - - # @!attribute reply_count - # - # @return [Integer, nil] - optional :reply_count, Integer, api_name: :replyCount - - # @!attribute retweet_count - # - # @return [Integer, nil] - optional :retweet_count, Integer, api_name: :retweetCount - - # @!attribute view_count - # - # @return [Integer, nil] - optional :view_count, Integer, api_name: :viewCount - - # @!method initialize(id:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) - # Tweet returned from search results with inline author info. - # - # @param id [String] - # - # @param text [String] - # - # @param author [XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet::Author] - # - # @param bookmark_count [Integer] - # - # @param created_at [String] - # - # @param is_note_tweet [Boolean] True for Note Tweets (long-form content, up to 25,000 characters) - # - # @param like_count [Integer] - # - # @param quote_count [Integer] - # - # @param reply_count [Integer] - # - # @param retweet_count [Integer] - # - # @param view_count [Integer] - - # @see XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet#author - class Author < XTwitterScraper::Internal::Type::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute username - # - # @return [String] - required :username, String - - # @!attribute verified - # - # @return [Boolean, nil] - optional :verified, XTwitterScraper::Internal::Type::Boolean - - # @!method initialize(id:, name:, username:, verified: nil) - # @param id [String] - # @param name [String] - # @param username [String] - # @param verified [Boolean] - end - end - end - end -end diff --git a/lib/x_twitter_scraper/resources/drafts.rb b/lib/x_twitter_scraper/resources/drafts.rb index 69beb08..cd46d58 100644 --- a/lib/x_twitter_scraper/resources/drafts.rb +++ b/lib/x_twitter_scraper/resources/drafts.rb @@ -13,7 +13,7 @@ class Drafts # @param topic [String] # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::DraftCreateResponse] + # @return [XTwitterScraper::Models::DraftDetail] # # @see XTwitterScraper::Models::DraftCreateParams def create(params) @@ -22,7 +22,7 @@ def create(params) method: :post, path: "drafts", body: parsed, - model: XTwitterScraper::Models::DraftCreateResponse, + model: XTwitterScraper::DraftDetail, options: options ) end @@ -35,14 +35,14 @@ def create(params) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::DraftRetrieveResponse] + # @return [XTwitterScraper::Models::DraftDetail] # # @see XTwitterScraper::Models::DraftRetrieveParams def retrieve(id, params = {}) @client.request( method: :get, path: ["drafts/%1$s", id], - model: XTwitterScraper::Models::DraftRetrieveResponse, + model: XTwitterScraper::DraftDetail, options: params[:request_options] ) end diff --git a/lib/x_twitter_scraper/resources/events.rb b/lib/x_twitter_scraper/resources/events.rb index c2f6b5d..213f663 100644 --- a/lib/x_twitter_scraper/resources/events.rb +++ b/lib/x_twitter_scraper/resources/events.rb @@ -12,14 +12,14 @@ class Events # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::EventRetrieveResponse] + # @return [XTwitterScraper::Models::EventDetail] # # @see XTwitterScraper::Models::EventRetrieveParams def retrieve(id, params = {}) @client.request( method: :get, path: ["events/%1$s", id], - model: XTwitterScraper::Models::EventRetrieveResponse, + model: XTwitterScraper::EventDetail, options: params[:request_options] ) end @@ -30,7 +30,7 @@ def retrieve(id, params = {}) # # @param after [String] Cursor for keyset pagination # - # @param event_type [Symbol, XTwitterScraper::Models::EventListParams::EventType] Filter events by type + # @param event_type [Symbol, XTwitterScraper::Models::EventType] Filter events by type # # @param limit [Integer] Maximum number of items to return (1-100, default 50) # diff --git a/lib/x_twitter_scraper/resources/integrations.rb b/lib/x_twitter_scraper/resources/integrations.rb index 1d78ffc..ac2ef99 100644 --- a/lib/x_twitter_scraper/resources/integrations.rb +++ b/lib/x_twitter_scraper/resources/integrations.rb @@ -10,7 +10,7 @@ class Integrations # # @param config [XTwitterScraper::Models::IntegrationCreateParams::Config] Integration config (e.g. Telegram chatId) # - # @param event_types [Array] Array of event types to subscribe to. + # @param event_types [Array] Array of event types to subscribe to. # # @param name [String] # @@ -18,7 +18,7 @@ class Integrations # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::IntegrationCreateResponse] + # @return [XTwitterScraper::Models::Integration] # # @see XTwitterScraper::Models::IntegrationCreateParams def create(params) @@ -27,7 +27,7 @@ def create(params) method: :post, path: "integrations", body: parsed, - model: XTwitterScraper::Models::IntegrationCreateResponse, + model: XTwitterScraper::Integration, options: options ) end @@ -40,14 +40,14 @@ def create(params) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::IntegrationRetrieveResponse] + # @return [XTwitterScraper::Models::Integration] # # @see XTwitterScraper::Models::IntegrationRetrieveParams def retrieve(id, params = {}) @client.request( method: :get, path: ["integrations/%1$s", id], - model: XTwitterScraper::Models::IntegrationRetrieveResponse, + model: XTwitterScraper::Integration, options: params[:request_options] ) end @@ -58,7 +58,7 @@ def retrieve(id, params = {}) # # @param id [String] Resource ID (stringified bigint) # - # @param event_types [Array] Array of event types to subscribe to. + # @param event_types [Array] Array of event types to subscribe to. # # @param filters [Hash{Symbol=>Object}] Event filter rules (JSON) # @@ -74,7 +74,7 @@ def retrieve(id, params = {}) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::IntegrationUpdateResponse] + # @return [XTwitterScraper::Models::Integration] # # @see XTwitterScraper::Models::IntegrationUpdateParams def update(id, params = {}) @@ -83,7 +83,7 @@ def update(id, params = {}) method: :patch, path: ["integrations/%1$s", id], body: parsed, - model: XTwitterScraper::Models::IntegrationUpdateResponse, + model: XTwitterScraper::Integration, options: options ) end diff --git a/lib/x_twitter_scraper/resources/monitors.rb b/lib/x_twitter_scraper/resources/monitors.rb index d827f8a..a1f279c 100644 --- a/lib/x_twitter_scraper/resources/monitors.rb +++ b/lib/x_twitter_scraper/resources/monitors.rb @@ -8,7 +8,7 @@ class Monitors # # @overload create(event_types:, username:, request_options: {}) # - # @param event_types [Array] Array of event types to subscribe to. + # @param event_types [Array] Array of event types to subscribe to. # # @param username [String] X username (without @) # @@ -36,14 +36,14 @@ def create(params) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::MonitorRetrieveResponse] + # @return [XTwitterScraper::Models::Monitor] # # @see XTwitterScraper::Models::MonitorRetrieveParams def retrieve(id, params = {}) @client.request( method: :get, path: ["monitors/%1$s", id], - model: XTwitterScraper::Models::MonitorRetrieveResponse, + model: XTwitterScraper::Monitor, options: params[:request_options] ) end @@ -54,13 +54,13 @@ def retrieve(id, params = {}) # # @param id [String] Resource ID (stringified bigint) # - # @param event_types [Array] Array of event types to subscribe to. + # @param event_types [Array] Array of event types to subscribe to. # # @param is_active [Boolean] # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::MonitorUpdateResponse] + # @return [XTwitterScraper::Models::Monitor] # # @see XTwitterScraper::Models::MonitorUpdateParams def update(id, params = {}) @@ -69,7 +69,7 @@ def update(id, params = {}) method: :patch, path: ["monitors/%1$s", id], body: parsed, - model: XTwitterScraper::Models::MonitorUpdateResponse, + model: XTwitterScraper::Monitor, options: options ) end diff --git a/lib/x_twitter_scraper/resources/styles.rb b/lib/x_twitter_scraper/resources/styles.rb index a56ccbb..59708df 100644 --- a/lib/x_twitter_scraper/resources/styles.rb +++ b/lib/x_twitter_scraper/resources/styles.rb @@ -4,6 +4,52 @@ module XTwitterScraper module Resources # Tweet composition, drafts, writing styles & radar class Styles + # Get cached style profile + # + # @overload retrieve(id, request_options: {}) + # + # @param id [String] Style profile ID or X username + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [XTwitterScraper::Models::StyleProfile] + # + # @see XTwitterScraper::Models::StyleRetrieveParams + def retrieve(id, params = {}) + @client.request( + method: :get, + path: ["styles/%1$s", id], + model: XTwitterScraper::StyleProfile, + options: params[:request_options] + ) + end + + # Save style profile with custom tweets + # + # @overload update(id, label:, tweets:, request_options: {}) + # + # @param id [String] Style profile ID or X username + # + # @param label [String] Display label for the style + # + # @param tweets [Array] Array of tweet objects + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [XTwitterScraper::Models::StyleProfile] + # + # @see XTwitterScraper::Models::StyleUpdateParams + def update(id, params) + parsed, options = XTwitterScraper::StyleUpdateParams.dump_request(params) + @client.request( + method: :put, + path: ["styles/%1$s", id], + body: parsed, + model: XTwitterScraper::StyleProfile, + options: options + ) + end + # List cached style profiles # # @overload list(request_options: {}) @@ -22,6 +68,26 @@ def list(params = {}) ) end + # Delete a style profile + # + # @overload delete(id, request_options: {}) + # + # @param id [String] Style profile ID or X username + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [nil] + # + # @see XTwitterScraper::Models::StyleDeleteParams + def delete(id, params = {}) + @client.request( + method: :delete, + path: ["styles/%1$s", id], + model: NilClass, + options: params[:request_options] + ) + end + # Analyze writing style from recent tweets # # @overload analyze(username:, request_options: {}) @@ -30,7 +96,7 @@ def list(params = {}) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::StyleAnalyzeResponse] + # @return [XTwitterScraper::Models::StyleProfile] # # @see XTwitterScraper::Models::StyleAnalyzeParams def analyze(params) @@ -39,7 +105,7 @@ def analyze(params) method: :post, path: "styles", body: parsed, - model: XTwitterScraper::Models::StyleAnalyzeResponse, + model: XTwitterScraper::StyleProfile, options: options ) end @@ -69,6 +135,26 @@ def compare(params) ) end + # Get engagement metrics for style tweets + # + # @overload get_performance(id, request_options: {}) + # + # @param id [String] Style profile ID or X username + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [XTwitterScraper::Models::StyleGetPerformanceResponse] + # + # @see XTwitterScraper::Models::StyleGetPerformanceParams + def get_performance(id, params = {}) + @client.request( + method: :get, + path: ["styles/%1$s/performance", id], + model: XTwitterScraper::Models::StyleGetPerformanceResponse, + options: params[:request_options] + ) + end + # @api private # # @param client [XTwitterScraper::Client] diff --git a/lib/x_twitter_scraper/resources/webhooks.rb b/lib/x_twitter_scraper/resources/webhooks.rb index 767a1a9..e3bd142 100644 --- a/lib/x_twitter_scraper/resources/webhooks.rb +++ b/lib/x_twitter_scraper/resources/webhooks.rb @@ -8,7 +8,7 @@ class Webhooks # # @overload create(event_types:, url:, request_options: {}) # - # @param event_types [Array] Array of event types to subscribe to. + # @param event_types [Array] Array of event types to subscribe to. # # @param url [String] HTTPS URL # @@ -34,7 +34,7 @@ def create(params) # # @param id [String] Resource ID (stringified bigint) # - # @param event_types [Array] Array of event types to subscribe to. + # @param event_types [Array] Array of event types to subscribe to. # # @param is_active [Boolean] # @@ -42,7 +42,7 @@ def create(params) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::WebhookUpdateResponse] + # @return [XTwitterScraper::Models::Webhook] # # @see XTwitterScraper::Models::WebhookUpdateParams def update(id, params = {}) @@ -51,7 +51,7 @@ def update(id, params = {}) method: :patch, path: ["webhooks/%1$s", id], body: parsed, - model: XTwitterScraper::Models::WebhookUpdateResponse, + model: XTwitterScraper::Webhook, options: options ) end diff --git a/lib/x_twitter_scraper/resources/x.rb b/lib/x_twitter_scraper/resources/x.rb index 7270b56..61f73cf 100644 --- a/lib/x_twitter_scraper/resources/x.rb +++ b/lib/x_twitter_scraper/resources/x.rb @@ -71,7 +71,7 @@ def get_article(tweet_id, params = {}) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::XGetHomeTimelineResponse] + # @return [XTwitterScraper::Models::PaginatedTweets] # # @see XTwitterScraper::Models::XGetHomeTimelineParams def get_home_timeline(params = {}) @@ -81,7 +81,7 @@ def get_home_timeline(params = {}) method: :get, path: "x/timeline", query: query.transform_keys(seen_tweet_ids: "seenTweetIds"), - model: XTwitterScraper::Models::XGetHomeTimelineResponse, + model: XTwitterScraper::PaginatedTweets, options: options ) end diff --git a/lib/x_twitter_scraper/resources/x/accounts.rb b/lib/x_twitter_scraper/resources/x/accounts.rb index a59c6c8..ef832fb 100644 --- a/lib/x_twitter_scraper/resources/x/accounts.rb +++ b/lib/x_twitter_scraper/resources/x/accounts.rb @@ -44,14 +44,14 @@ def create(params) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::AccountRetrieveResponse] + # @return [XTwitterScraper::Models::X::XAccountDetail] # # @see XTwitterScraper::Models::X::AccountRetrieveParams def retrieve(id, params = {}) @client.request( method: :get, path: ["x/accounts/%1$s", id], - model: XTwitterScraper::Models::X::AccountRetrieveResponse, + model: XTwitterScraper::X::XAccountDetail, security: {auth_api_key: true}, options: params[:request_options] ) @@ -97,6 +97,26 @@ def delete(id, params = {}) ) end + # Clears loginFailedAt and loginFailureReason for all accounts with transient or + # automated failure reasons, making them eligible for retry on next use. + # + # @overload bulk_retry(request_options: {}) + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [XTwitterScraper::Models::X::AccountBulkRetryResponse] + # + # @see XTwitterScraper::Models::X::AccountBulkRetryParams + def bulk_retry(params = {}) + @client.request( + method: :post, + path: "x/accounts/bulk-retry", + model: XTwitterScraper::Models::X::AccountBulkRetryResponse, + security: {auth_api_key: true}, + options: params[:request_options] + ) + end + # Re-authenticate X account # # @overload reauth(id, password:, totp_secret: nil, request_options: {}) diff --git a/lib/x_twitter_scraper/resources/x/bookmarks.rb b/lib/x_twitter_scraper/resources/x/bookmarks.rb index a7cbabb..edf53ff 100644 --- a/lib/x_twitter_scraper/resources/x/bookmarks.rb +++ b/lib/x_twitter_scraper/resources/x/bookmarks.rb @@ -15,7 +15,7 @@ class Bookmarks # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::BookmarkListResponse] + # @return [XTwitterScraper::Internal::CursorPage] # # @see XTwitterScraper::Models::X::BookmarkListParams def list(params = {}) @@ -25,7 +25,8 @@ def list(params = {}) method: :get, path: "x/bookmarks", query: query.transform_keys(folder_id: "folderId"), - model: XTwitterScraper::Models::X::BookmarkListResponse, + page: XTwitterScraper::Internal::CursorPage, + model: XTwitterScraper::PaginatedTweets, options: options ) end diff --git a/lib/x_twitter_scraper/resources/x/communities.rb b/lib/x_twitter_scraper/resources/x/communities.rb index cde37ee..7c899df 100644 --- a/lib/x_twitter_scraper/resources/x/communities.rb +++ b/lib/x_twitter_scraper/resources/x/communities.rb @@ -94,7 +94,7 @@ def retrieve_info(id, params = {}) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::CommunityRetrieveMembersResponse] + # @return [XTwitterScraper::Models::PaginatedUsers] # # @see XTwitterScraper::Models::X::CommunityRetrieveMembersParams def retrieve_members(id, params = {}) @@ -104,7 +104,7 @@ def retrieve_members(id, params = {}) method: :get, path: ["x/communities/%1$s/members", id], query: query, - model: XTwitterScraper::Models::X::CommunityRetrieveMembersResponse, + model: XTwitterScraper::PaginatedUsers, options: options ) end @@ -119,7 +119,7 @@ def retrieve_members(id, params = {}) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse] + # @return [XTwitterScraper::Models::PaginatedUsers] # # @see XTwitterScraper::Models::X::CommunityRetrieveModeratorsParams def retrieve_moderators(id, params = {}) @@ -129,7 +129,7 @@ def retrieve_moderators(id, params = {}) method: :get, path: ["x/communities/%1$s/moderators", id], query: query, - model: XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse, + model: XTwitterScraper::PaginatedUsers, options: options ) end @@ -146,7 +146,7 @@ def retrieve_moderators(id, params = {}) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::CommunityRetrieveSearchResponse] + # @return [XTwitterScraper::Models::PaginatedTweets] # # @see XTwitterScraper::Models::X::CommunityRetrieveSearchParams def retrieve_search(params) @@ -156,7 +156,7 @@ def retrieve_search(params) method: :get, path: "x/communities/search", query: query.transform_keys(query_type: "queryType"), - model: XTwitterScraper::Models::X::CommunityRetrieveSearchResponse, + model: XTwitterScraper::PaginatedTweets, options: options ) end diff --git a/lib/x_twitter_scraper/resources/x/communities/join.rb b/lib/x_twitter_scraper/resources/x/communities/join.rb index 1317d46..5f6a8fd 100644 --- a/lib/x_twitter_scraper/resources/x/communities/join.rb +++ b/lib/x_twitter_scraper/resources/x/communities/join.rb @@ -16,7 +16,7 @@ class Join # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::Communities::JoinCreateResponse] + # @return [XTwitterScraper::Models::X::CommunityActionResult] # # @see XTwitterScraper::Models::X::Communities::JoinCreateParams def create(id, params) @@ -25,7 +25,7 @@ def create(id, params) method: :post, path: ["x/communities/%1$s/join", id], body: parsed, - model: XTwitterScraper::Models::X::Communities::JoinCreateResponse, + model: XTwitterScraper::X::CommunityActionResult, options: options ) end @@ -40,7 +40,7 @@ def create(id, params) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::Communities::JoinDeleteAllResponse] + # @return [XTwitterScraper::Models::X::CommunityActionResult] # # @see XTwitterScraper::Models::X::Communities::JoinDeleteAllParams def delete_all(id, params) @@ -49,7 +49,7 @@ def delete_all(id, params) method: :delete, path: ["x/communities/%1$s/join", id], body: parsed, - model: XTwitterScraper::Models::X::Communities::JoinDeleteAllResponse, + model: XTwitterScraper::X::CommunityActionResult, options: options ) end diff --git a/lib/x_twitter_scraper/resources/x/communities/tweets.rb b/lib/x_twitter_scraper/resources/x/communities/tweets.rb index e99302b..468b313 100644 --- a/lib/x_twitter_scraper/resources/x/communities/tweets.rb +++ b/lib/x_twitter_scraper/resources/x/communities/tweets.rb @@ -18,7 +18,7 @@ class Tweets # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::Communities::TweetListResponse] + # @return [XTwitterScraper::Internal::CursorPage] # # @see XTwitterScraper::Models::X::Communities::TweetListParams def list(params) @@ -28,7 +28,34 @@ def list(params) method: :get, path: "x/communities/tweets", query: query.transform_keys(query_type: "queryType"), - model: XTwitterScraper::Models::X::Communities::TweetListResponse, + page: XTwitterScraper::Internal::CursorPage, + model: XTwitterScraper::PaginatedTweets, + options: options + ) + end + + # Get community tweets + # + # @overload list_by_community(id, cursor: nil, request_options: {}) + # + # @param id [String] Community ID for tweet lookup + # + # @param cursor [String] Pagination cursor for community tweets + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [XTwitterScraper::Internal::CursorPage] + # + # @see XTwitterScraper::Models::X::Communities::TweetListByCommunityParams + def list_by_community(id, params = {}) + parsed, options = XTwitterScraper::X::Communities::TweetListByCommunityParams.dump_request(params) + query = XTwitterScraper::Internal::Util.encode_query_params(parsed) + @client.request( + method: :get, + path: ["x/communities/%1$s/tweets", id], + query: query, + page: XTwitterScraper::Internal::CursorPage, + model: XTwitterScraper::PaginatedTweets, options: options ) end diff --git a/lib/x_twitter_scraper/resources/x/lists.rb b/lib/x_twitter_scraper/resources/x/lists.rb index ffac086..785b207 100644 --- a/lib/x_twitter_scraper/resources/x/lists.rb +++ b/lib/x_twitter_scraper/resources/x/lists.rb @@ -15,7 +15,7 @@ class Lists # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::ListRetrieveFollowersResponse] + # @return [XTwitterScraper::Models::PaginatedUsers] # # @see XTwitterScraper::Models::X::ListRetrieveFollowersParams def retrieve_followers(id, params = {}) @@ -25,7 +25,7 @@ def retrieve_followers(id, params = {}) method: :get, path: ["x/lists/%1$s/followers", id], query: query, - model: XTwitterScraper::Models::X::ListRetrieveFollowersResponse, + model: XTwitterScraper::PaginatedUsers, options: options ) end @@ -40,7 +40,7 @@ def retrieve_followers(id, params = {}) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::ListRetrieveMembersResponse] + # @return [XTwitterScraper::Models::PaginatedUsers] # # @see XTwitterScraper::Models::X::ListRetrieveMembersParams def retrieve_members(id, params = {}) @@ -50,7 +50,7 @@ def retrieve_members(id, params = {}) method: :get, path: ["x/lists/%1$s/members", id], query: query, - model: XTwitterScraper::Models::X::ListRetrieveMembersResponse, + model: XTwitterScraper::PaginatedUsers, options: options ) end @@ -71,7 +71,7 @@ def retrieve_members(id, params = {}) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::ListRetrieveTweetsResponse] + # @return [XTwitterScraper::Models::PaginatedTweets] # # @see XTwitterScraper::Models::X::ListRetrieveTweetsParams def retrieve_tweets(id, params = {}) @@ -85,7 +85,7 @@ def retrieve_tweets(id, params = {}) since_time: "sinceTime", until_time: "untilTime" ), - model: XTwitterScraper::Models::X::ListRetrieveTweetsResponse, + model: XTwitterScraper::PaginatedTweets, options: options ) end diff --git a/lib/x_twitter_scraper/resources/x/tweets.rb b/lib/x_twitter_scraper/resources/x/tweets.rb index 0ff0df5..2ab9e5d 100644 --- a/lib/x_twitter_scraper/resources/x/tweets.rb +++ b/lib/x_twitter_scraper/resources/x/tweets.rb @@ -4,9 +4,11 @@ module XTwitterScraper module Resources class X class Tweets + # X write actions (tweets, likes, follows, DMs) # @return [XTwitterScraper::Resources::X::Tweets::Like] attr_reader :like + # X write actions (tweets, likes, follows, DMs) # @return [XTwitterScraper::Resources::X::Tweets::Retweet] attr_reader :retweet @@ -44,6 +46,26 @@ def create(params) ) end + # Look up tweet + # + # @overload retrieve(id, request_options: {}) + # + # @param id [String] Tweet ID + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [XTwitterScraper::Models::X::TweetRetrieveResponse] + # + # @see XTwitterScraper::Models::X::TweetRetrieveParams + def retrieve(id, params = {}) + @client.request( + method: :get, + path: ["x/tweets/%1$s", id], + model: XTwitterScraper::Models::X::TweetRetrieveResponse, + options: params[:request_options] + ) + end + # Get multiple tweets by IDs # # @overload list(ids:, request_options: {}) @@ -52,7 +74,7 @@ def create(params) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::TweetListResponse] + # @return [XTwitterScraper::Models::PaginatedTweets] # # @see XTwitterScraper::Models::X::TweetListParams def list(params) @@ -62,7 +84,31 @@ def list(params) method: :get, path: "x/tweets", query: query, - model: XTwitterScraper::Models::X::TweetListResponse, + model: XTwitterScraper::PaginatedTweets, + options: options + ) + end + + # Delete tweet + # + # @overload delete(id, account:, request_options: {}) + # + # @param id [String] Tweet ID to delete + # + # @param account [String] X account identifier (@username or account ID) + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [XTwitterScraper::Models::X::TweetDeleteResponse] + # + # @see XTwitterScraper::Models::X::TweetDeleteParams + def delete(id, params) + parsed, options = XTwitterScraper::X::TweetDeleteParams.dump_request(params) + @client.request( + method: :delete, + path: ["x/tweets/%1$s", id], + body: parsed, + model: XTwitterScraper::Models::X::TweetDeleteResponse, options: options ) end @@ -77,7 +123,7 @@ def list(params) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::TweetGetFavoritersResponse] + # @return [XTwitterScraper::Models::PaginatedUsers] # # @see XTwitterScraper::Models::X::TweetGetFavoritersParams def get_favoriters(id, params = {}) @@ -87,7 +133,7 @@ def get_favoriters(id, params = {}) method: :get, path: ["x/tweets/%1$s/favoriters", id], query: query, - model: XTwitterScraper::Models::X::TweetGetFavoritersResponse, + model: XTwitterScraper::PaginatedUsers, options: options ) end @@ -108,7 +154,7 @@ def get_favoriters(id, params = {}) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::TweetGetQuotesResponse] + # @return [XTwitterScraper::Models::PaginatedTweets] # # @see XTwitterScraper::Models::X::TweetGetQuotesParams def get_quotes(id, params = {}) @@ -122,7 +168,7 @@ def get_quotes(id, params = {}) since_time: "sinceTime", until_time: "untilTime" ), - model: XTwitterScraper::Models::X::TweetGetQuotesResponse, + model: XTwitterScraper::PaginatedTweets, options: options ) end @@ -141,7 +187,7 @@ def get_quotes(id, params = {}) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::TweetGetRepliesResponse] + # @return [XTwitterScraper::Models::PaginatedTweets] # # @see XTwitterScraper::Models::X::TweetGetRepliesParams def get_replies(id, params = {}) @@ -151,7 +197,7 @@ def get_replies(id, params = {}) method: :get, path: ["x/tweets/%1$s/replies", id], query: query.transform_keys(since_time: "sinceTime", until_time: "untilTime"), - model: XTwitterScraper::Models::X::TweetGetRepliesResponse, + model: XTwitterScraper::PaginatedTweets, options: options ) end @@ -166,7 +212,7 @@ def get_replies(id, params = {}) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::TweetGetRetweetersResponse] + # @return [XTwitterScraper::Models::PaginatedUsers] # # @see XTwitterScraper::Models::X::TweetGetRetweetersParams def get_retweeters(id, params = {}) @@ -176,7 +222,7 @@ def get_retweeters(id, params = {}) method: :get, path: ["x/tweets/%1$s/retweeters", id], query: query, - model: XTwitterScraper::Models::X::TweetGetRetweetersResponse, + model: XTwitterScraper::PaginatedUsers, options: options ) end @@ -191,7 +237,7 @@ def get_retweeters(id, params = {}) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::TweetGetThreadResponse] + # @return [XTwitterScraper::Models::PaginatedTweets] # # @see XTwitterScraper::Models::X::TweetGetThreadParams def get_thread(id, params = {}) @@ -201,7 +247,7 @@ def get_thread(id, params = {}) method: :get, path: ["x/tweets/%1$s/thread", id], query: query, - model: XTwitterScraper::Models::X::TweetGetThreadResponse, + model: XTwitterScraper::PaginatedTweets, options: options ) end @@ -224,7 +270,7 @@ def get_thread(id, params = {}) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::TweetSearchResponse] + # @return [XTwitterScraper::Models::PaginatedTweets] # # @see XTwitterScraper::Models::X::TweetSearchParams def search(params) @@ -238,7 +284,7 @@ def search(params) since_time: "sinceTime", until_time: "untilTime" ), - model: XTwitterScraper::Models::X::TweetSearchResponse, + model: XTwitterScraper::PaginatedTweets, options: options ) end diff --git a/lib/x_twitter_scraper/resources/x/tweets/like.rb b/lib/x_twitter_scraper/resources/x/tweets/like.rb index fa73fd8..483942c 100644 --- a/lib/x_twitter_scraper/resources/x/tweets/like.rb +++ b/lib/x_twitter_scraper/resources/x/tweets/like.rb @@ -4,7 +4,56 @@ module XTwitterScraper module Resources class X class Tweets + # X write actions (tweets, likes, follows, DMs) class Like + # Like tweet + # + # @overload create(id, account:, request_options: {}) + # + # @param id [String] Tweet ID to like + # + # @param account [String] X account identifier (@username or account ID) + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [XTwitterScraper::Models::X::Tweets::LikeCreateResponse] + # + # @see XTwitterScraper::Models::X::Tweets::LikeCreateParams + def create(id, params) + parsed, options = XTwitterScraper::X::Tweets::LikeCreateParams.dump_request(params) + @client.request( + method: :post, + path: ["x/tweets/%1$s/like", id], + body: parsed, + model: XTwitterScraper::Models::X::Tweets::LikeCreateResponse, + options: options + ) + end + + # Unlike tweet + # + # @overload delete(id, account:, request_options: {}) + # + # @param id [String] Tweet ID to unlike + # + # @param account [String] X account identifier (@username or account ID) + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [XTwitterScraper::Models::X::Tweets::LikeDeleteResponse] + # + # @see XTwitterScraper::Models::X::Tweets::LikeDeleteParams + def delete(id, params) + parsed, options = XTwitterScraper::X::Tweets::LikeDeleteParams.dump_request(params) + @client.request( + method: :delete, + path: ["x/tweets/%1$s/like", id], + body: parsed, + model: XTwitterScraper::Models::X::Tweets::LikeDeleteResponse, + options: options + ) + end + # @api private # # @param client [XTwitterScraper::Client] diff --git a/lib/x_twitter_scraper/resources/x/tweets/retweet.rb b/lib/x_twitter_scraper/resources/x/tweets/retweet.rb index 8c422d3..7571505 100644 --- a/lib/x_twitter_scraper/resources/x/tweets/retweet.rb +++ b/lib/x_twitter_scraper/resources/x/tweets/retweet.rb @@ -4,7 +4,56 @@ module XTwitterScraper module Resources class X class Tweets + # X write actions (tweets, likes, follows, DMs) class Retweet + # Retweet + # + # @overload create(id, account:, request_options: {}) + # + # @param id [String] Tweet ID to retweet + # + # @param account [String] X account identifier (@username or account ID) + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [XTwitterScraper::Models::X::Tweets::RetweetCreateResponse] + # + # @see XTwitterScraper::Models::X::Tweets::RetweetCreateParams + def create(id, params) + parsed, options = XTwitterScraper::X::Tweets::RetweetCreateParams.dump_request(params) + @client.request( + method: :post, + path: ["x/tweets/%1$s/retweet", id], + body: parsed, + model: XTwitterScraper::Models::X::Tweets::RetweetCreateResponse, + options: options + ) + end + + # Unretweet + # + # @overload delete(id, account:, request_options: {}) + # + # @param id [String] Tweet ID to unretweet + # + # @param account [String] X account identifier (@username or account ID) + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [XTwitterScraper::Models::X::Tweets::RetweetDeleteResponse] + # + # @see XTwitterScraper::Models::X::Tweets::RetweetDeleteParams + def delete(id, params) + parsed, options = XTwitterScraper::X::Tweets::RetweetDeleteParams.dump_request(params) + @client.request( + method: :delete, + path: ["x/tweets/%1$s/retweet", id], + body: parsed, + model: XTwitterScraper::Models::X::Tweets::RetweetDeleteResponse, + options: options + ) + end + # @api private # # @param client [XTwitterScraper::Client] diff --git a/lib/x_twitter_scraper/resources/x/users.rb b/lib/x_twitter_scraper/resources/x/users.rb index fb95429..4fb06d8 100644 --- a/lib/x_twitter_scraper/resources/x/users.rb +++ b/lib/x_twitter_scraper/resources/x/users.rb @@ -5,9 +5,30 @@ module Resources class X # X data lookups (subscription required) class Users + # X write actions (tweets, likes, follows, DMs) # @return [XTwitterScraper::Resources::X::Users::Follow] attr_reader :follow + # Look up X user + # + # @overload retrieve(id, request_options: {}) + # + # @param id [String] X username (without @) or user ID + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [XTwitterScraper::Models::X::UserProfile] + # + # @see XTwitterScraper::Models::X::UserRetrieveParams + def retrieve(id, params = {}) + @client.request( + method: :get, + path: ["x/users/%1$s", id], + model: XTwitterScraper::X::UserProfile, + options: params[:request_options] + ) + end + # Get multiple users by IDs # # @overload retrieve_batch(ids:, request_options: {}) @@ -16,7 +37,7 @@ class Users # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::UserRetrieveBatchResponse] + # @return [XTwitterScraper::Models::PaginatedUsers] # # @see XTwitterScraper::Models::X::UserRetrieveBatchParams def retrieve_batch(params) @@ -26,7 +47,7 @@ def retrieve_batch(params) method: :get, path: "x/users/batch", query: query, - model: XTwitterScraper::Models::X::UserRetrieveBatchResponse, + model: XTwitterScraper::PaginatedUsers, options: options ) end @@ -43,7 +64,7 @@ def retrieve_batch(params) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::UserRetrieveFollowersResponse] + # @return [XTwitterScraper::Models::PaginatedUsers] # # @see XTwitterScraper::Models::X::UserRetrieveFollowersParams def retrieve_followers(id, params = {}) @@ -53,7 +74,7 @@ def retrieve_followers(id, params = {}) method: :get, path: ["x/users/%1$s/followers", id], query: query.transform_keys(page_size: "pageSize"), - model: XTwitterScraper::Models::X::UserRetrieveFollowersResponse, + model: XTwitterScraper::PaginatedUsers, options: options ) end @@ -68,7 +89,7 @@ def retrieve_followers(id, params = {}) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::UserRetrieveFollowersYouKnowResponse] + # @return [XTwitterScraper::Models::PaginatedUsers] # # @see XTwitterScraper::Models::X::UserRetrieveFollowersYouKnowParams def retrieve_followers_you_know(id, params = {}) @@ -78,7 +99,7 @@ def retrieve_followers_you_know(id, params = {}) method: :get, path: ["x/users/%1$s/followers-you-know", id], query: query, - model: XTwitterScraper::Models::X::UserRetrieveFollowersYouKnowResponse, + model: XTwitterScraper::PaginatedUsers, options: options ) end @@ -95,7 +116,7 @@ def retrieve_followers_you_know(id, params = {}) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::UserRetrieveFollowingResponse] + # @return [XTwitterScraper::Models::PaginatedUsers] # # @see XTwitterScraper::Models::X::UserRetrieveFollowingParams def retrieve_following(id, params = {}) @@ -105,7 +126,7 @@ def retrieve_following(id, params = {}) method: :get, path: ["x/users/%1$s/following", id], query: query.transform_keys(page_size: "pageSize"), - model: XTwitterScraper::Models::X::UserRetrieveFollowingResponse, + model: XTwitterScraper::PaginatedUsers, options: options ) end @@ -120,7 +141,7 @@ def retrieve_following(id, params = {}) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::UserRetrieveLikesResponse] + # @return [XTwitterScraper::Models::PaginatedTweets] # # @see XTwitterScraper::Models::X::UserRetrieveLikesParams def retrieve_likes(id, params = {}) @@ -130,7 +151,7 @@ def retrieve_likes(id, params = {}) method: :get, path: ["x/users/%1$s/likes", id], query: query, - model: XTwitterScraper::Models::X::UserRetrieveLikesResponse, + model: XTwitterScraper::PaginatedTweets, options: options ) end @@ -145,7 +166,7 @@ def retrieve_likes(id, params = {}) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::UserRetrieveMediaResponse] + # @return [XTwitterScraper::Models::PaginatedTweets] # # @see XTwitterScraper::Models::X::UserRetrieveMediaParams def retrieve_media(id, params = {}) @@ -155,7 +176,7 @@ def retrieve_media(id, params = {}) method: :get, path: ["x/users/%1$s/media", id], query: query, - model: XTwitterScraper::Models::X::UserRetrieveMediaResponse, + model: XTwitterScraper::PaginatedTweets, options: options ) end @@ -174,7 +195,7 @@ def retrieve_media(id, params = {}) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::UserRetrieveMentionsResponse] + # @return [XTwitterScraper::Models::PaginatedTweets] # # @see XTwitterScraper::Models::X::UserRetrieveMentionsParams def retrieve_mentions(id, params = {}) @@ -184,7 +205,7 @@ def retrieve_mentions(id, params = {}) method: :get, path: ["x/users/%1$s/mentions", id], query: query.transform_keys(since_time: "sinceTime", until_time: "untilTime"), - model: XTwitterScraper::Models::X::UserRetrieveMentionsResponse, + model: XTwitterScraper::PaginatedTweets, options: options ) end @@ -199,7 +220,7 @@ def retrieve_mentions(id, params = {}) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::UserRetrieveSearchResponse] + # @return [XTwitterScraper::Models::PaginatedUsers] # # @see XTwitterScraper::Models::X::UserRetrieveSearchParams def retrieve_search(params) @@ -209,7 +230,7 @@ def retrieve_search(params) method: :get, path: "x/users/search", query: query, - model: XTwitterScraper::Models::X::UserRetrieveSearchResponse, + model: XTwitterScraper::PaginatedUsers, options: options ) end @@ -228,7 +249,7 @@ def retrieve_search(params) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::UserRetrieveTweetsResponse] + # @return [XTwitterScraper::Models::PaginatedTweets] # # @see XTwitterScraper::Models::X::UserRetrieveTweetsParams def retrieve_tweets(id, params = {}) @@ -241,7 +262,7 @@ def retrieve_tweets(id, params = {}) include_parent_tweet: "includeParentTweet", include_replies: "includeReplies" ), - model: XTwitterScraper::Models::X::UserRetrieveTweetsResponse, + model: XTwitterScraper::PaginatedTweets, options: options ) end @@ -256,7 +277,7 @@ def retrieve_tweets(id, params = {}) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse] + # @return [XTwitterScraper::Models::PaginatedUsers] # # @see XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersParams def retrieve_verified_followers(id, params = {}) @@ -266,7 +287,7 @@ def retrieve_verified_followers(id, params = {}) method: :get, path: ["x/users/%1$s/verified-followers", id], query: query, - model: XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse, + model: XTwitterScraper::PaginatedUsers, options: options ) end diff --git a/lib/x_twitter_scraper/resources/x/users/follow.rb b/lib/x_twitter_scraper/resources/x/users/follow.rb index 8315aee..1272c93 100644 --- a/lib/x_twitter_scraper/resources/x/users/follow.rb +++ b/lib/x_twitter_scraper/resources/x/users/follow.rb @@ -4,7 +4,56 @@ module XTwitterScraper module Resources class X class Users + # X write actions (tweets, likes, follows, DMs) class Follow + # Follow user + # + # @overload create(id, account:, request_options: {}) + # + # @param id [String] User ID to follow + # + # @param account [String] X account identifier (@username or account ID) + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [XTwitterScraper::Models::X::Users::FollowCreateResponse] + # + # @see XTwitterScraper::Models::X::Users::FollowCreateParams + def create(id, params) + parsed, options = XTwitterScraper::X::Users::FollowCreateParams.dump_request(params) + @client.request( + method: :post, + path: ["x/users/%1$s/follow", id], + body: parsed, + model: XTwitterScraper::Models::X::Users::FollowCreateResponse, + options: options + ) + end + + # Unfollow user + # + # @overload delete_all(id, account:, request_options: {}) + # + # @param id [String] User ID to unfollow + # + # @param account [String] X account identifier (@username or account ID) + # + # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [XTwitterScraper::Models::X::Users::FollowDeleteAllResponse] + # + # @see XTwitterScraper::Models::X::Users::FollowDeleteAllParams + def delete_all(id, params) + parsed, options = XTwitterScraper::X::Users::FollowDeleteAllParams.dump_request(params) + @client.request( + method: :delete, + path: ["x/users/%1$s/follow", id], + body: parsed, + model: XTwitterScraper::Models::X::Users::FollowDeleteAllResponse, + options: options + ) + end + # @api private # # @param client [XTwitterScraper::Client] diff --git a/rbi/x_twitter_scraper/internal/cursor_page.rbi b/rbi/x_twitter_scraper/internal/cursor_page.rbi new file mode 100644 index 0000000..33a3c9a --- /dev/null +++ b/rbi/x_twitter_scraper/internal/cursor_page.rbi @@ -0,0 +1,22 @@ +# typed: strong + +module XTwitterScraper + module Internal + class CursorPage + include XTwitterScraper::Internal::Type::BasePage + + Elem = type_member + + sig { returns(T.nilable(String)) } + attr_accessor :next_cursor + + sig { returns(T::Boolean) } + attr_accessor :has_next_page + + # @api private + sig { returns(String) } + def inspect + end + end + end +end diff --git a/rbi/x_twitter_scraper/models.rbi b/rbi/x_twitter_scraper/models.rbi index 178ee17..99499ab 100644 --- a/rbi/x_twitter_scraper/models.rbi +++ b/rbi/x_twitter_scraper/models.rbi @@ -118,12 +118,20 @@ module XTwitterScraper StyleCompareParams = XTwitterScraper::Models::StyleCompareParams + StyleDeleteParams = XTwitterScraper::Models::StyleDeleteParams + + StyleGetPerformanceParams = XTwitterScraper::Models::StyleGetPerformanceParams + StyleListParams = XTwitterScraper::Models::StyleListParams StyleProfile = XTwitterScraper::Models::StyleProfile StyleProfileSummary = XTwitterScraper::Models::StyleProfileSummary + StyleRetrieveParams = XTwitterScraper::Models::StyleRetrieveParams + + StyleUpdateParams = XTwitterScraper::Models::StyleUpdateParams + SubscribeCreateParams = XTwitterScraper::Models::SubscribeCreateParams Support = XTwitterScraper::Models::Support diff --git a/rbi/x_twitter_scraper/models/api_key_list_response.rbi b/rbi/x_twitter_scraper/models/api_key_list_response.rbi index 0b3365c..e8a3dd2 100644 --- a/rbi/x_twitter_scraper/models/api_key_list_response.rbi +++ b/rbi/x_twitter_scraper/models/api_key_list_response.rbi @@ -11,94 +11,20 @@ module XTwitterScraper ) end - sig do - returns(T::Array[XTwitterScraper::Models::APIKeyListResponse::Key]) - end + sig { returns(T::Array[XTwitterScraper::APIKey]) } attr_accessor :keys sig do - params( - keys: - T::Array[XTwitterScraper::Models::APIKeyListResponse::Key::OrHash] - ).returns(T.attached_class) + params(keys: T::Array[XTwitterScraper::APIKey::OrHash]).returns( + T.attached_class + ) end def self.new(keys:) end - sig do - override.returns( - { keys: T::Array[XTwitterScraper::Models::APIKeyListResponse::Key] } - ) - end + sig { override.returns({ keys: T::Array[XTwitterScraper::APIKey] }) } def to_hash end - - class Key < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::APIKeyListResponse::Key, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(Time) } - attr_accessor :created_at - - sig { returns(T::Boolean) } - attr_accessor :is_active - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :prefix - - sig { returns(T.nilable(Time)) } - attr_reader :last_used_at - - sig { params(last_used_at: Time).void } - attr_writer :last_used_at - - # API key metadata returned when listing keys. - sig do - params( - id: String, - created_at: Time, - is_active: T::Boolean, - name: String, - prefix: String, - last_used_at: Time - ).returns(T.attached_class) - end - def self.new( - id:, - created_at:, - is_active:, - name:, - prefix:, - last_used_at: nil - ) - end - - sig do - override.returns( - { - id: String, - created_at: Time, - is_active: T::Boolean, - name: String, - prefix: String, - last_used_at: Time - } - ) - end - def to_hash - end - end end end end diff --git a/rbi/x_twitter_scraper/models/draft_create_response.rbi b/rbi/x_twitter_scraper/models/draft_create_response.rbi deleted file mode 100644 index ab87ff9..0000000 --- a/rbi/x_twitter_scraper/models/draft_create_response.rbi +++ /dev/null @@ -1,68 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - class DraftCreateResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::DraftCreateResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(Time) } - attr_accessor :created_at - - sig { returns(String) } - attr_accessor :text - - sig { returns(Time) } - attr_accessor :updated_at - - sig { returns(T.nilable(String)) } - attr_reader :goal - - sig { params(goal: String).void } - attr_writer :goal - - sig { returns(T.nilable(String)) } - attr_reader :topic - - sig { params(topic: String).void } - attr_writer :topic - - # Full tweet draft including update timestamp. - sig do - params( - id: String, - created_at: Time, - text: String, - updated_at: Time, - goal: String, - topic: String - ).returns(T.attached_class) - end - def self.new(id:, created_at:, text:, updated_at:, goal: nil, topic: nil) - end - - sig do - override.returns( - { - id: String, - created_at: Time, - text: String, - updated_at: Time, - goal: String, - topic: String - } - ) - end - def to_hash - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/draft_list_response.rbi b/rbi/x_twitter_scraper/models/draft_list_response.rbi index ae180c2..60eda0c 100644 --- a/rbi/x_twitter_scraper/models/draft_list_response.rbi +++ b/rbi/x_twitter_scraper/models/draft_list_response.rbi @@ -11,9 +11,7 @@ module XTwitterScraper ) end - sig do - returns(T::Array[XTwitterScraper::Models::DraftListResponse::Draft]) - end + sig { returns(T::Array[XTwitterScraper::Draft]) } attr_accessor :drafts sig { returns(T::Boolean) } @@ -27,8 +25,7 @@ module XTwitterScraper sig do params( - drafts: - T::Array[XTwitterScraper::Models::DraftListResponse::Draft::OrHash], + drafts: T::Array[XTwitterScraper::Draft::OrHash], has_more: T::Boolean, next_cursor: String ).returns(T.attached_class) @@ -39,7 +36,7 @@ module XTwitterScraper sig do override.returns( { - drafts: T::Array[XTwitterScraper::Models::DraftListResponse::Draft], + drafts: T::Array[XTwitterScraper::Draft], has_more: T::Boolean, next_cursor: String } @@ -47,64 +44,6 @@ module XTwitterScraper end def to_hash end - - class Draft < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::DraftListResponse::Draft, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(Time) } - attr_accessor :created_at - - sig { returns(String) } - attr_accessor :text - - sig { returns(T.nilable(String)) } - attr_reader :goal - - sig { params(goal: String).void } - attr_writer :goal - - sig { returns(T.nilable(String)) } - attr_reader :topic - - sig { params(topic: String).void } - attr_writer :topic - - # Saved tweet draft with optional topic and goal. - sig do - params( - id: String, - created_at: Time, - text: String, - goal: String, - topic: String - ).returns(T.attached_class) - end - def self.new(id:, created_at:, text:, goal: nil, topic: nil) - end - - sig do - override.returns( - { - id: String, - created_at: Time, - text: String, - goal: String, - topic: String - } - ) - end - def to_hash - end - end end end end diff --git a/rbi/x_twitter_scraper/models/draft_retrieve_response.rbi b/rbi/x_twitter_scraper/models/draft_retrieve_response.rbi deleted file mode 100644 index 3ba981b..0000000 --- a/rbi/x_twitter_scraper/models/draft_retrieve_response.rbi +++ /dev/null @@ -1,68 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - class DraftRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::DraftRetrieveResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(Time) } - attr_accessor :created_at - - sig { returns(String) } - attr_accessor :text - - sig { returns(Time) } - attr_accessor :updated_at - - sig { returns(T.nilable(String)) } - attr_reader :goal - - sig { params(goal: String).void } - attr_writer :goal - - sig { returns(T.nilable(String)) } - attr_reader :topic - - sig { params(topic: String).void } - attr_writer :topic - - # Full tweet draft including update timestamp. - sig do - params( - id: String, - created_at: Time, - text: String, - updated_at: Time, - goal: String, - topic: String - ).returns(T.attached_class) - end - def self.new(id:, created_at:, text:, updated_at:, goal: nil, topic: nil) - end - - sig do - override.returns( - { - id: String, - created_at: Time, - text: String, - updated_at: Time, - goal: String, - topic: String - } - ) - end - def to_hash - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/draw_list_response.rbi b/rbi/x_twitter_scraper/models/draw_list_response.rbi index 5ab0661..664d21f 100644 --- a/rbi/x_twitter_scraper/models/draw_list_response.rbi +++ b/rbi/x_twitter_scraper/models/draw_list_response.rbi @@ -11,7 +11,7 @@ module XTwitterScraper ) end - sig { returns(T::Array[XTwitterScraper::Models::DrawListResponse::Draw]) } + sig { returns(T::Array[XTwitterScraper::DrawListItem]) } attr_accessor :draws sig { returns(T::Boolean) } @@ -25,8 +25,7 @@ module XTwitterScraper sig do params( - draws: - T::Array[XTwitterScraper::Models::DrawListResponse::Draw::OrHash], + draws: T::Array[XTwitterScraper::DrawListItem::OrHash], has_more: T::Boolean, next_cursor: String ).returns(T.attached_class) @@ -37,7 +36,7 @@ module XTwitterScraper sig do override.returns( { - draws: T::Array[XTwitterScraper::Models::DrawListResponse::Draw], + draws: T::Array[XTwitterScraper::DrawListItem], has_more: T::Boolean, next_cursor: String } @@ -45,79 +44,6 @@ module XTwitterScraper end def to_hash end - - class Draw < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::DrawListResponse::Draw, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(Time) } - attr_accessor :created_at - - sig { returns(String) } - attr_accessor :status - - sig { returns(Integer) } - attr_accessor :total_entries - - sig { returns(String) } - attr_accessor :tweet_url - - sig { returns(Integer) } - attr_accessor :valid_entries - - sig { returns(T.nilable(Time)) } - attr_reader :drawn_at - - sig { params(drawn_at: Time).void } - attr_writer :drawn_at - - # Giveaway draw summary with entry counts and status. - sig do - params( - id: String, - created_at: Time, - status: String, - total_entries: Integer, - tweet_url: String, - valid_entries: Integer, - drawn_at: Time - ).returns(T.attached_class) - end - def self.new( - id:, - created_at:, - status:, - total_entries:, - tweet_url:, - valid_entries:, - drawn_at: nil - ) - end - - sig do - override.returns( - { - id: String, - created_at: Time, - status: String, - total_entries: Integer, - tweet_url: String, - valid_entries: Integer, - drawn_at: Time - } - ) - end - def to_hash - end - end end end end diff --git a/rbi/x_twitter_scraper/models/draw_retrieve_response.rbi b/rbi/x_twitter_scraper/models/draw_retrieve_response.rbi index bf0935e..3749ed4 100644 --- a/rbi/x_twitter_scraper/models/draw_retrieve_response.rbi +++ b/rbi/x_twitter_scraper/models/draw_retrieve_response.rbi @@ -12,28 +12,19 @@ module XTwitterScraper end # Full giveaway draw with tweet metrics, entries, and timing. - sig { returns(XTwitterScraper::Models::DrawRetrieveResponse::Draw) } + sig { returns(XTwitterScraper::DrawDetail) } attr_reader :draw - sig do - params( - draw: XTwitterScraper::Models::DrawRetrieveResponse::Draw::OrHash - ).void - end + sig { params(draw: XTwitterScraper::DrawDetail::OrHash).void } attr_writer :draw - sig do - returns(T::Array[XTwitterScraper::Models::DrawRetrieveResponse::Winner]) - end + sig { returns(T::Array[XTwitterScraper::Winner]) } attr_accessor :winners sig do params( - draw: XTwitterScraper::Models::DrawRetrieveResponse::Draw::OrHash, - winners: - T::Array[ - XTwitterScraper::Models::DrawRetrieveResponse::Winner::OrHash - ] + draw: XTwitterScraper::DrawDetail::OrHash, + winners: T::Array[XTwitterScraper::Winner::OrHash] ).returns(T.attached_class) end def self.new( @@ -46,176 +37,13 @@ module XTwitterScraper sig do override.returns( { - draw: XTwitterScraper::Models::DrawRetrieveResponse::Draw, - winners: - T::Array[XTwitterScraper::Models::DrawRetrieveResponse::Winner] + draw: XTwitterScraper::DrawDetail, + winners: T::Array[XTwitterScraper::Winner] } ) end def to_hash end - - class Draw < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::DrawRetrieveResponse::Draw, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(Time) } - attr_accessor :created_at - - sig { returns(String) } - attr_accessor :status - - sig { returns(Integer) } - attr_accessor :total_entries - - sig { returns(String) } - attr_accessor :tweet_author_username - - sig { returns(String) } - attr_accessor :tweet_id - - sig { returns(Integer) } - attr_accessor :tweet_like_count - - sig { returns(Integer) } - attr_accessor :tweet_quote_count - - sig { returns(Integer) } - attr_accessor :tweet_reply_count - - sig { returns(Integer) } - attr_accessor :tweet_retweet_count - - sig { returns(String) } - attr_accessor :tweet_text - - sig { returns(String) } - attr_accessor :tweet_url - - sig { returns(Integer) } - attr_accessor :valid_entries - - sig { returns(T.nilable(Time)) } - attr_reader :drawn_at - - sig { params(drawn_at: Time).void } - attr_writer :drawn_at - - # Full giveaway draw with tweet metrics, entries, and timing. - sig do - params( - id: String, - created_at: Time, - status: String, - total_entries: Integer, - tweet_author_username: String, - tweet_id: String, - tweet_like_count: Integer, - tweet_quote_count: Integer, - tweet_reply_count: Integer, - tweet_retweet_count: Integer, - tweet_text: String, - tweet_url: String, - valid_entries: Integer, - drawn_at: Time - ).returns(T.attached_class) - end - def self.new( - id:, - created_at:, - status:, - total_entries:, - tweet_author_username:, - tweet_id:, - tweet_like_count:, - tweet_quote_count:, - tweet_reply_count:, - tweet_retweet_count:, - tweet_text:, - tweet_url:, - valid_entries:, - drawn_at: nil - ) - end - - sig do - override.returns( - { - id: String, - created_at: Time, - status: String, - total_entries: Integer, - tweet_author_username: String, - tweet_id: String, - tweet_like_count: Integer, - tweet_quote_count: Integer, - tweet_reply_count: Integer, - tweet_retweet_count: Integer, - tweet_text: String, - tweet_url: String, - valid_entries: Integer, - drawn_at: Time - } - ) - end - def to_hash - end - end - - class Winner < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::DrawRetrieveResponse::Winner, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :author_username - - sig { returns(T::Boolean) } - attr_accessor :is_backup - - sig { returns(Integer) } - attr_accessor :position - - sig { returns(String) } - attr_accessor :tweet_id - - # Giveaway draw winner with position and backup flag. - sig do - params( - author_username: String, - is_backup: T::Boolean, - position: Integer, - tweet_id: String - ).returns(T.attached_class) - end - def self.new(author_username:, is_backup:, position:, tweet_id:) - end - - sig do - override.returns( - { - author_username: String, - is_backup: T::Boolean, - position: Integer, - tweet_id: String - } - ) - end - def to_hash - end - end end end end diff --git a/rbi/x_twitter_scraper/models/draw_run_response.rbi b/rbi/x_twitter_scraper/models/draw_run_response.rbi index 251252e..33b2005 100644 --- a/rbi/x_twitter_scraper/models/draw_run_response.rbi +++ b/rbi/x_twitter_scraper/models/draw_run_response.rbi @@ -23,9 +23,7 @@ module XTwitterScraper sig { returns(Integer) } attr_accessor :valid_entries - sig do - returns(T::Array[XTwitterScraper::Models::DrawRunResponse::Winner]) - end + sig { returns(T::Array[XTwitterScraper::Winner]) } attr_accessor :winners sig do @@ -34,8 +32,7 @@ module XTwitterScraper total_entries: Integer, tweet_id: String, valid_entries: Integer, - winners: - T::Array[XTwitterScraper::Models::DrawRunResponse::Winner::OrHash] + winners: T::Array[XTwitterScraper::Winner::OrHash] ).returns(T.attached_class) end def self.new(id:, total_entries:, tweet_id:, valid_entries:, winners:) @@ -48,59 +45,12 @@ module XTwitterScraper total_entries: Integer, tweet_id: String, valid_entries: Integer, - winners: T::Array[XTwitterScraper::Models::DrawRunResponse::Winner] + winners: T::Array[XTwitterScraper::Winner] } ) end def to_hash end - - class Winner < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::DrawRunResponse::Winner, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :author_username - - sig { returns(T::Boolean) } - attr_accessor :is_backup - - sig { returns(Integer) } - attr_accessor :position - - sig { returns(String) } - attr_accessor :tweet_id - - # Giveaway draw winner with position and backup flag. - sig do - params( - author_username: String, - is_backup: T::Boolean, - position: Integer, - tweet_id: String - ).returns(T.attached_class) - end - def self.new(author_username:, is_backup:, position:, tweet_id:) - end - - sig do - override.returns( - { - author_username: String, - is_backup: T::Boolean, - position: Integer, - tweet_id: String - } - ) - end - def to_hash - end - end end end end diff --git a/rbi/x_twitter_scraper/models/event.rbi b/rbi/x_twitter_scraper/models/event.rbi index be8ab8e..c5725db 100644 --- a/rbi/x_twitter_scraper/models/event.rbi +++ b/rbi/x_twitter_scraper/models/event.rbi @@ -21,7 +21,7 @@ module XTwitterScraper attr_accessor :occurred_at # Type of monitor event fired when account activity occurs. - sig { returns(XTwitterScraper::Event::Type::OrSymbol) } + sig { returns(XTwitterScraper::EventType::TaggedSymbol) } attr_accessor :type sig { returns(String) } @@ -34,7 +34,7 @@ module XTwitterScraper data: T::Hash[Symbol, T.anything], monitor_id: String, occurred_at: Time, - type: XTwitterScraper::Event::Type::OrSymbol, + type: XTwitterScraper::EventType::OrSymbol, username: String ).returns(T.attached_class) end @@ -56,41 +56,13 @@ module XTwitterScraper data: T::Hash[Symbol, T.anything], monitor_id: String, occurred_at: Time, - type: XTwitterScraper::Event::Type::OrSymbol, + type: XTwitterScraper::EventType::TaggedSymbol, username: String } ) end def to_hash end - - # Type of monitor event fired when account activity occurs. - module Type - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias { T.all(Symbol, XTwitterScraper::Event::Type) } - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let(:"tweet.new", XTwitterScraper::Event::Type::TaggedSymbol) - TWEET_REPLY = - T.let(:"tweet.reply", XTwitterScraper::Event::Type::TaggedSymbol) - TWEET_RETWEET = - T.let(:"tweet.retweet", XTwitterScraper::Event::Type::TaggedSymbol) - TWEET_QUOTE = - T.let(:"tweet.quote", XTwitterScraper::Event::Type::TaggedSymbol) - FOLLOWER_GAINED = - T.let(:"follower.gained", XTwitterScraper::Event::Type::TaggedSymbol) - FOLLOWER_LOST = - T.let(:"follower.lost", XTwitterScraper::Event::Type::TaggedSymbol) - - sig do - override.returns(T::Array[XTwitterScraper::Event::Type::TaggedSymbol]) - end - def self.values - end - end end end end diff --git a/rbi/x_twitter_scraper/models/event_detail.rbi b/rbi/x_twitter_scraper/models/event_detail.rbi index 1261ab8..c5e3279 100644 --- a/rbi/x_twitter_scraper/models/event_detail.rbi +++ b/rbi/x_twitter_scraper/models/event_detail.rbi @@ -25,7 +25,7 @@ module XTwitterScraper attr_accessor :occurred_at # Type of monitor event fired when account activity occurs. - sig { returns(XTwitterScraper::EventDetail::Type::OrSymbol) } + sig { returns(XTwitterScraper::EventType::TaggedSymbol) } attr_accessor :type sig { returns(String) } @@ -44,7 +44,7 @@ module XTwitterScraper data: T::Hash[Symbol, T.anything], monitor_id: String, occurred_at: Time, - type: XTwitterScraper::EventDetail::Type::OrSymbol, + type: XTwitterScraper::EventType::OrSymbol, username: String, x_event_id: String ).returns(T.attached_class) @@ -69,7 +69,7 @@ module XTwitterScraper data: T::Hash[Symbol, T.anything], monitor_id: String, occurred_at: Time, - type: XTwitterScraper::EventDetail::Type::OrSymbol, + type: XTwitterScraper::EventType::TaggedSymbol, username: String, x_event_id: String } @@ -77,51 +77,6 @@ module XTwitterScraper end def to_hash end - - # Type of monitor event fired when account activity occurs. - module Type - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias { T.all(Symbol, XTwitterScraper::EventDetail::Type) } - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let(:"tweet.new", XTwitterScraper::EventDetail::Type::TaggedSymbol) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::EventDetail::Type::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::EventDetail::Type::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::EventDetail::Type::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::EventDetail::Type::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::EventDetail::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[XTwitterScraper::EventDetail::Type::TaggedSymbol] - ) - end - def self.values - end - end end end end diff --git a/rbi/x_twitter_scraper/models/event_list_params.rbi b/rbi/x_twitter_scraper/models/event_list_params.rbi index eb47a81..f2f84a2 100644 --- a/rbi/x_twitter_scraper/models/event_list_params.rbi +++ b/rbi/x_twitter_scraper/models/event_list_params.rbi @@ -22,18 +22,10 @@ module XTwitterScraper attr_writer :after # Filter events by type - sig do - returns( - T.nilable(XTwitterScraper::EventListParams::EventType::OrSymbol) - ) - end + sig { returns(T.nilable(XTwitterScraper::EventType::OrSymbol)) } attr_reader :event_type - sig do - params( - event_type: XTwitterScraper::EventListParams::EventType::OrSymbol - ).void - end + sig { params(event_type: XTwitterScraper::EventType::OrSymbol).void } attr_writer :event_type # Maximum number of items to return (1-100, default 50) @@ -53,7 +45,7 @@ module XTwitterScraper sig do params( after: String, - event_type: XTwitterScraper::EventListParams::EventType::OrSymbol, + event_type: XTwitterScraper::EventType::OrSymbol, limit: Integer, monitor_id: String, request_options: XTwitterScraper::RequestOptions::OrHash @@ -76,7 +68,7 @@ module XTwitterScraper override.returns( { after: String, - event_type: XTwitterScraper::EventListParams::EventType::OrSymbol, + event_type: XTwitterScraper::EventType::OrSymbol, limit: Integer, monitor_id: String, request_options: XTwitterScraper::RequestOptions @@ -85,56 +77,6 @@ module XTwitterScraper end def to_hash end - - # Filter events by type - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, XTwitterScraper::EventListParams::EventType) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let( - :"tweet.new", - XTwitterScraper::EventListParams::EventType::TaggedSymbol - ) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::EventListParams::EventType::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::EventListParams::EventType::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::EventListParams::EventType::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::EventListParams::EventType::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::EventListParams::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[XTwitterScraper::EventListParams::EventType::TaggedSymbol] - ) - end - def self.values - end - end end end end diff --git a/rbi/x_twitter_scraper/models/event_list_response.rbi b/rbi/x_twitter_scraper/models/event_list_response.rbi index fe34fb5..c1d7d95 100644 --- a/rbi/x_twitter_scraper/models/event_list_response.rbi +++ b/rbi/x_twitter_scraper/models/event_list_response.rbi @@ -11,9 +11,7 @@ module XTwitterScraper ) end - sig do - returns(T::Array[XTwitterScraper::Models::EventListResponse::Event]) - end + sig { returns(T::Array[XTwitterScraper::Event]) } attr_accessor :events sig { returns(T::Boolean) } @@ -27,8 +25,7 @@ module XTwitterScraper sig do params( - events: - T::Array[XTwitterScraper::Models::EventListResponse::Event::OrHash], + events: T::Array[XTwitterScraper::Event::OrHash], has_more: T::Boolean, next_cursor: String ).returns(T.attached_class) @@ -39,7 +36,7 @@ module XTwitterScraper sig do override.returns( { - events: T::Array[XTwitterScraper::Models::EventListResponse::Event], + events: T::Array[XTwitterScraper::Event], has_more: T::Boolean, next_cursor: String } @@ -47,133 +44,6 @@ module XTwitterScraper end def to_hash end - - class Event < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::EventListResponse::Event, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(T::Hash[Symbol, T.anything]) } - attr_accessor :data - - sig { returns(String) } - attr_accessor :monitor_id - - sig { returns(Time) } - attr_accessor :occurred_at - - # Type of monitor event fired when account activity occurs. - sig do - returns( - XTwitterScraper::Models::EventListResponse::Event::Type::TaggedSymbol - ) - end - attr_accessor :type - - sig { returns(String) } - attr_accessor :username - - # Monitor event summary with type, username, and occurrence time. - sig do - params( - id: String, - data: T::Hash[Symbol, T.anything], - monitor_id: String, - occurred_at: Time, - type: - XTwitterScraper::Models::EventListResponse::Event::Type::OrSymbol, - username: String - ).returns(T.attached_class) - end - def self.new( - id:, - data:, - monitor_id:, - occurred_at:, - # Type of monitor event fired when account activity occurs. - type:, - username: - ) - end - - sig do - override.returns( - { - id: String, - data: T::Hash[Symbol, T.anything], - monitor_id: String, - occurred_at: Time, - type: - XTwitterScraper::Models::EventListResponse::Event::Type::TaggedSymbol, - username: String - } - ) - end - def to_hash - end - - # Type of monitor event fired when account activity occurs. - module Type - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - XTwitterScraper::Models::EventListResponse::Event::Type - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let( - :"tweet.new", - XTwitterScraper::Models::EventListResponse::Event::Type::TaggedSymbol - ) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::Models::EventListResponse::Event::Type::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::Models::EventListResponse::Event::Type::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::Models::EventListResponse::Event::Type::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::Models::EventListResponse::Event::Type::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::Models::EventListResponse::Event::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::Models::EventListResponse::Event::Type::TaggedSymbol - ] - ) - end - def self.values - end - end - end end end end diff --git a/rbi/x_twitter_scraper/models/event_retrieve_response.rbi b/rbi/x_twitter_scraper/models/event_retrieve_response.rbi deleted file mode 100644 index e09dc08..0000000 --- a/rbi/x_twitter_scraper/models/event_retrieve_response.rbi +++ /dev/null @@ -1,139 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - class EventRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::EventRetrieveResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - # Event payload — shape varies by event type (JSON) - sig { returns(T::Hash[Symbol, T.anything]) } - attr_accessor :data - - sig { returns(String) } - attr_accessor :monitor_id - - sig { returns(Time) } - attr_accessor :occurred_at - - # Type of monitor event fired when account activity occurs. - sig do - returns( - XTwitterScraper::Models::EventRetrieveResponse::Type::TaggedSymbol - ) - end - attr_accessor :type - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(String)) } - attr_reader :x_event_id - - sig { params(x_event_id: String).void } - attr_writer :x_event_id - - # Full monitor event including payload data and optional X event ID. - sig do - params( - id: String, - data: T::Hash[Symbol, T.anything], - monitor_id: String, - occurred_at: Time, - type: XTwitterScraper::Models::EventRetrieveResponse::Type::OrSymbol, - username: String, - x_event_id: String - ).returns(T.attached_class) - end - def self.new( - id:, - # Event payload — shape varies by event type (JSON) - data:, - monitor_id:, - occurred_at:, - # Type of monitor event fired when account activity occurs. - type:, - username:, - x_event_id: nil - ) - end - - sig do - override.returns( - { - id: String, - data: T::Hash[Symbol, T.anything], - monitor_id: String, - occurred_at: Time, - type: - XTwitterScraper::Models::EventRetrieveResponse::Type::TaggedSymbol, - username: String, - x_event_id: String - } - ) - end - def to_hash - end - - # Type of monitor event fired when account activity occurs. - module Type - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, XTwitterScraper::Models::EventRetrieveResponse::Type) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let( - :"tweet.new", - XTwitterScraper::Models::EventRetrieveResponse::Type::TaggedSymbol - ) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::Models::EventRetrieveResponse::Type::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::Models::EventRetrieveResponse::Type::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::Models::EventRetrieveResponse::Type::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::Models::EventRetrieveResponse::Type::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::Models::EventRetrieveResponse::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::Models::EventRetrieveResponse::Type::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/extraction_job.rbi b/rbi/x_twitter_scraper/models/extraction_job.rbi index 43f4e2d..52f77cc 100644 --- a/rbi/x_twitter_scraper/models/extraction_job.rbi +++ b/rbi/x_twitter_scraper/models/extraction_job.rbi @@ -17,11 +17,11 @@ module XTwitterScraper sig { returns(Time) } attr_accessor :created_at - sig { returns(XTwitterScraper::ExtractionJob::Status::OrSymbol) } + sig { returns(XTwitterScraper::ExtractionJob::Status::TaggedSymbol) } attr_accessor :status # Identifier for the extraction tool used to run a job. - sig { returns(XTwitterScraper::ExtractionJob::ToolType::OrSymbol) } + sig { returns(XTwitterScraper::ExtractionJob::ToolType::TaggedSymbol) } attr_accessor :tool_type sig { returns(Integer) } @@ -60,8 +60,8 @@ module XTwitterScraper { id: String, created_at: Time, - status: XTwitterScraper::ExtractionJob::Status::OrSymbol, - tool_type: XTwitterScraper::ExtractionJob::ToolType::OrSymbol, + status: XTwitterScraper::ExtractionJob::Status::TaggedSymbol, + tool_type: XTwitterScraper::ExtractionJob::ToolType::TaggedSymbol, total_results: Integer, completed_at: Time } diff --git a/rbi/x_twitter_scraper/models/extraction_list_response.rbi b/rbi/x_twitter_scraper/models/extraction_list_response.rbi index a656289..dfe2955 100644 --- a/rbi/x_twitter_scraper/models/extraction_list_response.rbi +++ b/rbi/x_twitter_scraper/models/extraction_list_response.rbi @@ -11,11 +11,7 @@ module XTwitterScraper ) end - sig do - returns( - T::Array[XTwitterScraper::Models::ExtractionListResponse::Extraction] - ) - end + sig { returns(T::Array[XTwitterScraper::ExtractionJob]) } attr_accessor :extractions sig { returns(T::Boolean) } @@ -29,10 +25,7 @@ module XTwitterScraper sig do params( - extractions: - T::Array[ - XTwitterScraper::Models::ExtractionListResponse::Extraction::OrHash - ], + extractions: T::Array[XTwitterScraper::ExtractionJob::OrHash], has_more: T::Boolean, next_cursor: String ).returns(T.attached_class) @@ -43,10 +36,7 @@ module XTwitterScraper sig do override.returns( { - extractions: - T::Array[ - XTwitterScraper::Models::ExtractionListResponse::Extraction - ], + extractions: T::Array[XTwitterScraper::ExtractionJob], has_more: T::Boolean, next_cursor: String } @@ -54,251 +44,6 @@ module XTwitterScraper end def to_hash end - - class Extraction < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::ExtractionListResponse::Extraction, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(Time) } - attr_accessor :created_at - - sig do - returns( - XTwitterScraper::Models::ExtractionListResponse::Extraction::Status::TaggedSymbol - ) - end - attr_accessor :status - - # Identifier for the extraction tool used to run a job. - sig do - returns( - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol - ) - end - attr_accessor :tool_type - - sig { returns(Integer) } - attr_accessor :total_results - - sig { returns(T.nilable(Time)) } - attr_reader :completed_at - - sig { params(completed_at: Time).void } - attr_writer :completed_at - - # Extraction job tracking status, tool type, and result count. - sig do - params( - id: String, - created_at: Time, - status: - XTwitterScraper::Models::ExtractionListResponse::Extraction::Status::OrSymbol, - tool_type: - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::OrSymbol, - total_results: Integer, - completed_at: Time - ).returns(T.attached_class) - end - def self.new( - id:, - created_at:, - status:, - # Identifier for the extraction tool used to run a job. - tool_type:, - total_results:, - completed_at: nil - ) - end - - sig do - override.returns( - { - id: String, - created_at: Time, - status: - XTwitterScraper::Models::ExtractionListResponse::Extraction::Status::TaggedSymbol, - tool_type: - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol, - total_results: Integer, - completed_at: Time - } - ) - end - def to_hash - end - - module Status - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - XTwitterScraper::Models::ExtractionListResponse::Extraction::Status - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - RUNNING = - T.let( - :running, - XTwitterScraper::Models::ExtractionListResponse::Extraction::Status::TaggedSymbol - ) - COMPLETED = - T.let( - :completed, - XTwitterScraper::Models::ExtractionListResponse::Extraction::Status::TaggedSymbol - ) - FAILED = - T.let( - :failed, - XTwitterScraper::Models::ExtractionListResponse::Extraction::Status::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::Models::ExtractionListResponse::Extraction::Status::TaggedSymbol - ] - ) - end - def self.values - end - end - - # Identifier for the extraction tool used to run a job. - module ToolType - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ARTICLE_EXTRACTOR = - T.let( - :article_extractor, - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol - ) - COMMUNITY_EXTRACTOR = - T.let( - :community_extractor, - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol - ) - COMMUNITY_MODERATOR_EXPLORER = - T.let( - :community_moderator_explorer, - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol - ) - COMMUNITY_POST_EXTRACTOR = - T.let( - :community_post_extractor, - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol - ) - COMMUNITY_SEARCH = - T.let( - :community_search, - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol - ) - FOLLOWER_EXPLORER = - T.let( - :follower_explorer, - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol - ) - FOLLOWING_EXPLORER = - T.let( - :following_explorer, - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol - ) - LIST_FOLLOWER_EXPLORER = - T.let( - :list_follower_explorer, - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol - ) - LIST_MEMBER_EXTRACTOR = - T.let( - :list_member_extractor, - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol - ) - LIST_POST_EXTRACTOR = - T.let( - :list_post_extractor, - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol - ) - MENTION_EXTRACTOR = - T.let( - :mention_extractor, - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol - ) - PEOPLE_SEARCH = - T.let( - :people_search, - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol - ) - POST_EXTRACTOR = - T.let( - :post_extractor, - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol - ) - QUOTE_EXTRACTOR = - T.let( - :quote_extractor, - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol - ) - REPLY_EXTRACTOR = - T.let( - :reply_extractor, - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol - ) - REPOST_EXTRACTOR = - T.let( - :repost_extractor, - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol - ) - SPACE_EXPLORER = - T.let( - :space_explorer, - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol - ) - THREAD_EXTRACTOR = - T.let( - :thread_extractor, - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol - ) - TWEET_SEARCH_EXTRACTOR = - T.let( - :tweet_search_extractor, - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol - ) - VERIFIED_FOLLOWER_EXPLORER = - T.let( - :verified_follower_explorer, - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::Models::ExtractionListResponse::Extraction::ToolType::TaggedSymbol - ] - ) - end - def self.values - end - end - end end end end diff --git a/rbi/x_twitter_scraper/models/integration.rbi b/rbi/x_twitter_scraper/models/integration.rbi index a0c36ed..b182039 100644 --- a/rbi/x_twitter_scraper/models/integration.rbi +++ b/rbi/x_twitter_scraper/models/integration.rbi @@ -22,9 +22,7 @@ module XTwitterScraper attr_accessor :created_at # Array of event types to subscribe to. - sig do - returns(T::Array[XTwitterScraper::Integration::EventType::OrSymbol]) - end + sig { returns(T::Array[XTwitterScraper::EventType::TaggedSymbol]) } attr_accessor :event_types sig { returns(T::Boolean) } @@ -33,7 +31,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :name - sig { returns(XTwitterScraper::Integration::Type::OrSymbol) } + sig { returns(XTwitterScraper::Integration::Type::TaggedSymbol) } attr_accessor :type # Event filter rules (JSON) @@ -67,8 +65,7 @@ module XTwitterScraper id: String, config: T::Hash[Symbol, T.anything], created_at: Time, - event_types: - T::Array[XTwitterScraper::Integration::EventType::OrSymbol], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], is_active: T::Boolean, name: String, type: XTwitterScraper::Integration::Type::OrSymbol, @@ -102,11 +99,10 @@ module XTwitterScraper id: String, config: T::Hash[Symbol, T.anything], created_at: Time, - event_types: - T::Array[XTwitterScraper::Integration::EventType::OrSymbol], + event_types: T::Array[XTwitterScraper::EventType::TaggedSymbol], is_active: T::Boolean, name: String, - type: XTwitterScraper::Integration::Type::OrSymbol, + type: XTwitterScraper::Integration::Type::TaggedSymbol, filters: T::Hash[Symbol, T.anything], message_template: String, scope_all_monitors: T::Boolean, @@ -117,56 +113,6 @@ module XTwitterScraper def to_hash end - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, XTwitterScraper::Integration::EventType) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let( - :"tweet.new", - XTwitterScraper::Integration::EventType::TaggedSymbol - ) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::Integration::EventType::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::Integration::EventType::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::Integration::EventType::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::Integration::EventType::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::Integration::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[XTwitterScraper::Integration::EventType::TaggedSymbol] - ) - end - def self.values - end - end - module Type extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/integration_create_params.rbi b/rbi/x_twitter_scraper/models/integration_create_params.rbi index e8cd966..dd254ef 100644 --- a/rbi/x_twitter_scraper/models/integration_create_params.rbi +++ b/rbi/x_twitter_scraper/models/integration_create_params.rbi @@ -26,13 +26,7 @@ module XTwitterScraper attr_writer :config # Array of event types to subscribe to. - sig do - returns( - T::Array[ - XTwitterScraper::IntegrationCreateParams::EventType::OrSymbol - ] - ) - end + sig { returns(T::Array[XTwitterScraper::EventType::OrSymbol]) } attr_accessor :event_types sig { returns(String) } @@ -44,10 +38,7 @@ module XTwitterScraper sig do params( config: XTwitterScraper::IntegrationCreateParams::Config::OrHash, - event_types: - T::Array[ - XTwitterScraper::IntegrationCreateParams::EventType::OrSymbol - ], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], name: String, type: XTwitterScraper::IntegrationCreateParams::Type::OrSymbol, request_options: XTwitterScraper::RequestOptions::OrHash @@ -68,10 +59,7 @@ module XTwitterScraper override.returns( { config: XTwitterScraper::IntegrationCreateParams::Config, - event_types: - T::Array[ - XTwitterScraper::IntegrationCreateParams::EventType::OrSymbol - ], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], name: String, type: XTwitterScraper::IntegrationCreateParams::Type::OrSymbol, request_options: XTwitterScraper::RequestOptions @@ -103,58 +91,6 @@ module XTwitterScraper end end - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, XTwitterScraper::IntegrationCreateParams::EventType) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let( - :"tweet.new", - XTwitterScraper::IntegrationCreateParams::EventType::TaggedSymbol - ) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::IntegrationCreateParams::EventType::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::IntegrationCreateParams::EventType::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::IntegrationCreateParams::EventType::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::IntegrationCreateParams::EventType::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::IntegrationCreateParams::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::IntegrationCreateParams::EventType::TaggedSymbol - ] - ) - end - def self.values - end - end - module Type extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/integration_create_response.rbi b/rbi/x_twitter_scraper/models/integration_create_response.rbi deleted file mode 100644 index 43e0c62..0000000 --- a/rbi/x_twitter_scraper/models/integration_create_response.rbi +++ /dev/null @@ -1,219 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - class IntegrationCreateResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::IntegrationCreateResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - # Integration config — shape varies by type (JSON) - sig { returns(T::Hash[Symbol, T.anything]) } - attr_accessor :config - - sig { returns(Time) } - attr_accessor :created_at - - # Array of event types to subscribe to. - sig do - returns( - T::Array[ - XTwitterScraper::Models::IntegrationCreateResponse::EventType::TaggedSymbol - ] - ) - end - attr_accessor :event_types - - sig { returns(T::Boolean) } - attr_accessor :is_active - - sig { returns(String) } - attr_accessor :name - - sig do - returns( - XTwitterScraper::Models::IntegrationCreateResponse::Type::TaggedSymbol - ) - end - attr_accessor :type - - # Event filter rules (JSON) - sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } - attr_reader :filters - - sig { params(filters: T::Hash[Symbol, T.anything]).void } - attr_writer :filters - - sig { returns(T.nilable(String)) } - attr_reader :message_template - - sig { params(message_template: String).void } - attr_writer :message_template - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :scope_all_monitors - - sig { params(scope_all_monitors: T::Boolean).void } - attr_writer :scope_all_monitors - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :silent_push - - sig { params(silent_push: T::Boolean).void } - attr_writer :silent_push - - # Third-party integration (e.g. Telegram) subscribed to monitor events. - sig do - params( - id: String, - config: T::Hash[Symbol, T.anything], - created_at: Time, - event_types: - T::Array[ - XTwitterScraper::Models::IntegrationCreateResponse::EventType::OrSymbol - ], - is_active: T::Boolean, - name: String, - type: - XTwitterScraper::Models::IntegrationCreateResponse::Type::OrSymbol, - filters: T::Hash[Symbol, T.anything], - message_template: String, - scope_all_monitors: T::Boolean, - silent_push: T::Boolean - ).returns(T.attached_class) - end - def self.new( - id:, - # Integration config — shape varies by type (JSON) - config:, - created_at:, - # Array of event types to subscribe to. - event_types:, - is_active:, - name:, - type:, - # Event filter rules (JSON) - filters: nil, - message_template: nil, - scope_all_monitors: nil, - silent_push: nil - ) - end - - sig do - override.returns( - { - id: String, - config: T::Hash[Symbol, T.anything], - created_at: Time, - event_types: - T::Array[ - XTwitterScraper::Models::IntegrationCreateResponse::EventType::TaggedSymbol - ], - is_active: T::Boolean, - name: String, - type: - XTwitterScraper::Models::IntegrationCreateResponse::Type::TaggedSymbol, - filters: T::Hash[Symbol, T.anything], - message_template: String, - scope_all_monitors: T::Boolean, - silent_push: T::Boolean - } - ) - end - def to_hash - end - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - XTwitterScraper::Models::IntegrationCreateResponse::EventType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let( - :"tweet.new", - XTwitterScraper::Models::IntegrationCreateResponse::EventType::TaggedSymbol - ) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::Models::IntegrationCreateResponse::EventType::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::Models::IntegrationCreateResponse::EventType::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::Models::IntegrationCreateResponse::EventType::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::Models::IntegrationCreateResponse::EventType::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::Models::IntegrationCreateResponse::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::Models::IntegrationCreateResponse::EventType::TaggedSymbol - ] - ) - end - def self.values - end - end - - module Type - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - XTwitterScraper::Models::IntegrationCreateResponse::Type - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TELEGRAM = - T.let( - :telegram, - XTwitterScraper::Models::IntegrationCreateResponse::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::Models::IntegrationCreateResponse::Type::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/integration_list_deliveries_response.rbi b/rbi/x_twitter_scraper/models/integration_list_deliveries_response.rbi index b6d0d9f..d1b45e4 100644 --- a/rbi/x_twitter_scraper/models/integration_list_deliveries_response.rbi +++ b/rbi/x_twitter_scraper/models/integration_list_deliveries_response.rbi @@ -11,21 +11,12 @@ module XTwitterScraper ) end - sig do - returns( - T::Array[ - XTwitterScraper::Models::IntegrationListDeliveriesResponse::Delivery - ] - ) - end + sig { returns(T::Array[XTwitterScraper::IntegrationDelivery]) } attr_accessor :deliveries sig do params( - deliveries: - T::Array[ - XTwitterScraper::Models::IntegrationListDeliveriesResponse::Delivery::OrHash - ] + deliveries: T::Array[XTwitterScraper::IntegrationDelivery::OrHash] ).returns(T.attached_class) end def self.new(deliveries:) @@ -33,119 +24,11 @@ module XTwitterScraper sig do override.returns( - { - deliveries: - T::Array[ - XTwitterScraper::Models::IntegrationListDeliveriesResponse::Delivery - ] - } + { deliveries: T::Array[XTwitterScraper::IntegrationDelivery] } ) end def to_hash end - - class Delivery < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::IntegrationListDeliveriesResponse::Delivery, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(Integer) } - attr_accessor :attempts - - sig { returns(Time) } - attr_accessor :created_at - - sig { returns(String) } - attr_accessor :event_type - - sig { returns(String) } - attr_accessor :status - - sig { returns(T.nilable(Time)) } - attr_reader :delivered_at - - sig { params(delivered_at: Time).void } - attr_writer :delivered_at - - sig { returns(T.nilable(String)) } - attr_reader :last_error - - sig { params(last_error: String).void } - attr_writer :last_error - - sig { returns(T.nilable(Integer)) } - attr_reader :last_status_code - - sig { params(last_status_code: Integer).void } - attr_writer :last_status_code - - sig { returns(T.nilable(String)) } - attr_reader :source_id - - sig { params(source_id: String).void } - attr_writer :source_id - - sig { returns(T.nilable(String)) } - attr_reader :source_type - - sig { params(source_type: String).void } - attr_writer :source_type - - # Integration delivery attempt record with status and retry count. - sig do - params( - id: String, - attempts: Integer, - created_at: Time, - event_type: String, - status: String, - delivered_at: Time, - last_error: String, - last_status_code: Integer, - source_id: String, - source_type: String - ).returns(T.attached_class) - end - def self.new( - id:, - attempts:, - created_at:, - event_type:, - status:, - delivered_at: nil, - last_error: nil, - last_status_code: nil, - source_id: nil, - source_type: nil - ) - end - - sig do - override.returns( - { - id: String, - attempts: Integer, - created_at: Time, - event_type: String, - status: String, - delivered_at: Time, - last_error: String, - last_status_code: Integer, - source_id: String, - source_type: String - } - ) - end - def to_hash - end - end end end end diff --git a/rbi/x_twitter_scraper/models/integration_list_response.rbi b/rbi/x_twitter_scraper/models/integration_list_response.rbi index a3fc9cb..be7e3d4 100644 --- a/rbi/x_twitter_scraper/models/integration_list_response.rbi +++ b/rbi/x_twitter_scraper/models/integration_list_response.rbi @@ -11,21 +11,12 @@ module XTwitterScraper ) end - sig do - returns( - T::Array[ - XTwitterScraper::Models::IntegrationListResponse::Integration - ] - ) - end + sig { returns(T::Array[XTwitterScraper::Integration]) } attr_accessor :integrations sig do params( - integrations: - T::Array[ - XTwitterScraper::Models::IntegrationListResponse::Integration::OrHash - ] + integrations: T::Array[XTwitterScraper::Integration::OrHash] ).returns(T.attached_class) end def self.new(integrations:) @@ -33,230 +24,11 @@ module XTwitterScraper sig do override.returns( - { - integrations: - T::Array[ - XTwitterScraper::Models::IntegrationListResponse::Integration - ] - } + { integrations: T::Array[XTwitterScraper::Integration] } ) end def to_hash end - - class Integration < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::IntegrationListResponse::Integration, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - # Integration config — shape varies by type (JSON) - sig { returns(T::Hash[Symbol, T.anything]) } - attr_accessor :config - - sig { returns(Time) } - attr_accessor :created_at - - # Array of event types to subscribe to. - sig do - returns( - T::Array[ - XTwitterScraper::Models::IntegrationListResponse::Integration::EventType::TaggedSymbol - ] - ) - end - attr_accessor :event_types - - sig { returns(T::Boolean) } - attr_accessor :is_active - - sig { returns(String) } - attr_accessor :name - - sig do - returns( - XTwitterScraper::Models::IntegrationListResponse::Integration::Type::TaggedSymbol - ) - end - attr_accessor :type - - # Event filter rules (JSON) - sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } - attr_reader :filters - - sig { params(filters: T::Hash[Symbol, T.anything]).void } - attr_writer :filters - - sig { returns(T.nilable(String)) } - attr_reader :message_template - - sig { params(message_template: String).void } - attr_writer :message_template - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :scope_all_monitors - - sig { params(scope_all_monitors: T::Boolean).void } - attr_writer :scope_all_monitors - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :silent_push - - sig { params(silent_push: T::Boolean).void } - attr_writer :silent_push - - # Third-party integration (e.g. Telegram) subscribed to monitor events. - sig do - params( - id: String, - config: T::Hash[Symbol, T.anything], - created_at: Time, - event_types: - T::Array[ - XTwitterScraper::Models::IntegrationListResponse::Integration::EventType::OrSymbol - ], - is_active: T::Boolean, - name: String, - type: - XTwitterScraper::Models::IntegrationListResponse::Integration::Type::OrSymbol, - filters: T::Hash[Symbol, T.anything], - message_template: String, - scope_all_monitors: T::Boolean, - silent_push: T::Boolean - ).returns(T.attached_class) - end - def self.new( - id:, - # Integration config — shape varies by type (JSON) - config:, - created_at:, - # Array of event types to subscribe to. - event_types:, - is_active:, - name:, - type:, - # Event filter rules (JSON) - filters: nil, - message_template: nil, - scope_all_monitors: nil, - silent_push: nil - ) - end - - sig do - override.returns( - { - id: String, - config: T::Hash[Symbol, T.anything], - created_at: Time, - event_types: - T::Array[ - XTwitterScraper::Models::IntegrationListResponse::Integration::EventType::TaggedSymbol - ], - is_active: T::Boolean, - name: String, - type: - XTwitterScraper::Models::IntegrationListResponse::Integration::Type::TaggedSymbol, - filters: T::Hash[Symbol, T.anything], - message_template: String, - scope_all_monitors: T::Boolean, - silent_push: T::Boolean - } - ) - end - def to_hash - end - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - XTwitterScraper::Models::IntegrationListResponse::Integration::EventType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let( - :"tweet.new", - XTwitterScraper::Models::IntegrationListResponse::Integration::EventType::TaggedSymbol - ) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::Models::IntegrationListResponse::Integration::EventType::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::Models::IntegrationListResponse::Integration::EventType::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::Models::IntegrationListResponse::Integration::EventType::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::Models::IntegrationListResponse::Integration::EventType::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::Models::IntegrationListResponse::Integration::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::Models::IntegrationListResponse::Integration::EventType::TaggedSymbol - ] - ) - end - def self.values - end - end - - module Type - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - XTwitterScraper::Models::IntegrationListResponse::Integration::Type - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TELEGRAM = - T.let( - :telegram, - XTwitterScraper::Models::IntegrationListResponse::Integration::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::Models::IntegrationListResponse::Integration::Type::TaggedSymbol - ] - ) - end - def self.values - end - end - end end end end diff --git a/rbi/x_twitter_scraper/models/integration_retrieve_response.rbi b/rbi/x_twitter_scraper/models/integration_retrieve_response.rbi deleted file mode 100644 index a0e180f..0000000 --- a/rbi/x_twitter_scraper/models/integration_retrieve_response.rbi +++ /dev/null @@ -1,219 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - class IntegrationRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::IntegrationRetrieveResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - # Integration config — shape varies by type (JSON) - sig { returns(T::Hash[Symbol, T.anything]) } - attr_accessor :config - - sig { returns(Time) } - attr_accessor :created_at - - # Array of event types to subscribe to. - sig do - returns( - T::Array[ - XTwitterScraper::Models::IntegrationRetrieveResponse::EventType::TaggedSymbol - ] - ) - end - attr_accessor :event_types - - sig { returns(T::Boolean) } - attr_accessor :is_active - - sig { returns(String) } - attr_accessor :name - - sig do - returns( - XTwitterScraper::Models::IntegrationRetrieveResponse::Type::TaggedSymbol - ) - end - attr_accessor :type - - # Event filter rules (JSON) - sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } - attr_reader :filters - - sig { params(filters: T::Hash[Symbol, T.anything]).void } - attr_writer :filters - - sig { returns(T.nilable(String)) } - attr_reader :message_template - - sig { params(message_template: String).void } - attr_writer :message_template - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :scope_all_monitors - - sig { params(scope_all_monitors: T::Boolean).void } - attr_writer :scope_all_monitors - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :silent_push - - sig { params(silent_push: T::Boolean).void } - attr_writer :silent_push - - # Third-party integration (e.g. Telegram) subscribed to monitor events. - sig do - params( - id: String, - config: T::Hash[Symbol, T.anything], - created_at: Time, - event_types: - T::Array[ - XTwitterScraper::Models::IntegrationRetrieveResponse::EventType::OrSymbol - ], - is_active: T::Boolean, - name: String, - type: - XTwitterScraper::Models::IntegrationRetrieveResponse::Type::OrSymbol, - filters: T::Hash[Symbol, T.anything], - message_template: String, - scope_all_monitors: T::Boolean, - silent_push: T::Boolean - ).returns(T.attached_class) - end - def self.new( - id:, - # Integration config — shape varies by type (JSON) - config:, - created_at:, - # Array of event types to subscribe to. - event_types:, - is_active:, - name:, - type:, - # Event filter rules (JSON) - filters: nil, - message_template: nil, - scope_all_monitors: nil, - silent_push: nil - ) - end - - sig do - override.returns( - { - id: String, - config: T::Hash[Symbol, T.anything], - created_at: Time, - event_types: - T::Array[ - XTwitterScraper::Models::IntegrationRetrieveResponse::EventType::TaggedSymbol - ], - is_active: T::Boolean, - name: String, - type: - XTwitterScraper::Models::IntegrationRetrieveResponse::Type::TaggedSymbol, - filters: T::Hash[Symbol, T.anything], - message_template: String, - scope_all_monitors: T::Boolean, - silent_push: T::Boolean - } - ) - end - def to_hash - end - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - XTwitterScraper::Models::IntegrationRetrieveResponse::EventType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let( - :"tweet.new", - XTwitterScraper::Models::IntegrationRetrieveResponse::EventType::TaggedSymbol - ) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::Models::IntegrationRetrieveResponse::EventType::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::Models::IntegrationRetrieveResponse::EventType::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::Models::IntegrationRetrieveResponse::EventType::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::Models::IntegrationRetrieveResponse::EventType::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::Models::IntegrationRetrieveResponse::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::Models::IntegrationRetrieveResponse::EventType::TaggedSymbol - ] - ) - end - def self.values - end - end - - module Type - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - XTwitterScraper::Models::IntegrationRetrieveResponse::Type - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TELEGRAM = - T.let( - :telegram, - XTwitterScraper::Models::IntegrationRetrieveResponse::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::Models::IntegrationRetrieveResponse::Type::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/integration_update_params.rbi b/rbi/x_twitter_scraper/models/integration_update_params.rbi index dcb0e86..f58d3a6 100644 --- a/rbi/x_twitter_scraper/models/integration_update_params.rbi +++ b/rbi/x_twitter_scraper/models/integration_update_params.rbi @@ -18,24 +18,11 @@ module XTwitterScraper attr_accessor :id # Array of event types to subscribe to. - sig do - returns( - T.nilable( - T::Array[ - XTwitterScraper::IntegrationUpdateParams::EventType::OrSymbol - ] - ) - ) - end + sig { returns(T.nilable(T::Array[XTwitterScraper::EventType::OrSymbol])) } attr_reader :event_types sig do - params( - event_types: - T::Array[ - XTwitterScraper::IntegrationUpdateParams::EventType::OrSymbol - ] - ).void + params(event_types: T::Array[XTwitterScraper::EventType::OrSymbol]).void end attr_writer :event_types @@ -80,10 +67,7 @@ module XTwitterScraper sig do params( id: String, - event_types: - T::Array[ - XTwitterScraper::IntegrationUpdateParams::EventType::OrSymbol - ], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], filters: T::Hash[Symbol, T.anything], is_active: T::Boolean, message_template: T::Hash[Symbol, T.anything], @@ -113,10 +97,7 @@ module XTwitterScraper override.returns( { id: String, - event_types: - T::Array[ - XTwitterScraper::IntegrationUpdateParams::EventType::OrSymbol - ], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], filters: T::Hash[Symbol, T.anything], is_active: T::Boolean, message_template: T::Hash[Symbol, T.anything], @@ -129,58 +110,6 @@ module XTwitterScraper end def to_hash end - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, XTwitterScraper::IntegrationUpdateParams::EventType) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let( - :"tweet.new", - XTwitterScraper::IntegrationUpdateParams::EventType::TaggedSymbol - ) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::IntegrationUpdateParams::EventType::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::IntegrationUpdateParams::EventType::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::IntegrationUpdateParams::EventType::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::IntegrationUpdateParams::EventType::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::IntegrationUpdateParams::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::IntegrationUpdateParams::EventType::TaggedSymbol - ] - ) - end - def self.values - end - end end end end diff --git a/rbi/x_twitter_scraper/models/integration_update_response.rbi b/rbi/x_twitter_scraper/models/integration_update_response.rbi deleted file mode 100644 index af2ee42..0000000 --- a/rbi/x_twitter_scraper/models/integration_update_response.rbi +++ /dev/null @@ -1,219 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - class IntegrationUpdateResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::IntegrationUpdateResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - # Integration config — shape varies by type (JSON) - sig { returns(T::Hash[Symbol, T.anything]) } - attr_accessor :config - - sig { returns(Time) } - attr_accessor :created_at - - # Array of event types to subscribe to. - sig do - returns( - T::Array[ - XTwitterScraper::Models::IntegrationUpdateResponse::EventType::TaggedSymbol - ] - ) - end - attr_accessor :event_types - - sig { returns(T::Boolean) } - attr_accessor :is_active - - sig { returns(String) } - attr_accessor :name - - sig do - returns( - XTwitterScraper::Models::IntegrationUpdateResponse::Type::TaggedSymbol - ) - end - attr_accessor :type - - # Event filter rules (JSON) - sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } - attr_reader :filters - - sig { params(filters: T::Hash[Symbol, T.anything]).void } - attr_writer :filters - - sig { returns(T.nilable(String)) } - attr_reader :message_template - - sig { params(message_template: String).void } - attr_writer :message_template - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :scope_all_monitors - - sig { params(scope_all_monitors: T::Boolean).void } - attr_writer :scope_all_monitors - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :silent_push - - sig { params(silent_push: T::Boolean).void } - attr_writer :silent_push - - # Third-party integration (e.g. Telegram) subscribed to monitor events. - sig do - params( - id: String, - config: T::Hash[Symbol, T.anything], - created_at: Time, - event_types: - T::Array[ - XTwitterScraper::Models::IntegrationUpdateResponse::EventType::OrSymbol - ], - is_active: T::Boolean, - name: String, - type: - XTwitterScraper::Models::IntegrationUpdateResponse::Type::OrSymbol, - filters: T::Hash[Symbol, T.anything], - message_template: String, - scope_all_monitors: T::Boolean, - silent_push: T::Boolean - ).returns(T.attached_class) - end - def self.new( - id:, - # Integration config — shape varies by type (JSON) - config:, - created_at:, - # Array of event types to subscribe to. - event_types:, - is_active:, - name:, - type:, - # Event filter rules (JSON) - filters: nil, - message_template: nil, - scope_all_monitors: nil, - silent_push: nil - ) - end - - sig do - override.returns( - { - id: String, - config: T::Hash[Symbol, T.anything], - created_at: Time, - event_types: - T::Array[ - XTwitterScraper::Models::IntegrationUpdateResponse::EventType::TaggedSymbol - ], - is_active: T::Boolean, - name: String, - type: - XTwitterScraper::Models::IntegrationUpdateResponse::Type::TaggedSymbol, - filters: T::Hash[Symbol, T.anything], - message_template: String, - scope_all_monitors: T::Boolean, - silent_push: T::Boolean - } - ) - end - def to_hash - end - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - XTwitterScraper::Models::IntegrationUpdateResponse::EventType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let( - :"tweet.new", - XTwitterScraper::Models::IntegrationUpdateResponse::EventType::TaggedSymbol - ) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::Models::IntegrationUpdateResponse::EventType::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::Models::IntegrationUpdateResponse::EventType::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::Models::IntegrationUpdateResponse::EventType::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::Models::IntegrationUpdateResponse::EventType::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::Models::IntegrationUpdateResponse::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::Models::IntegrationUpdateResponse::EventType::TaggedSymbol - ] - ) - end - def self.values - end - end - - module Type - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - XTwitterScraper::Models::IntegrationUpdateResponse::Type - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TELEGRAM = - T.let( - :telegram, - XTwitterScraper::Models::IntegrationUpdateResponse::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::Models::IntegrationUpdateResponse::Type::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/monitor.rbi b/rbi/x_twitter_scraper/models/monitor.rbi index 10b9109..9921c01 100644 --- a/rbi/x_twitter_scraper/models/monitor.rbi +++ b/rbi/x_twitter_scraper/models/monitor.rbi @@ -15,7 +15,7 @@ module XTwitterScraper attr_accessor :created_at # Array of event types to subscribe to. - sig { returns(T::Array[XTwitterScraper::Monitor::EventType::OrSymbol]) } + sig { returns(T::Array[XTwitterScraper::EventType::TaggedSymbol]) } attr_accessor :event_types sig { returns(T::Boolean) } @@ -32,7 +32,7 @@ module XTwitterScraper params( id: String, created_at: Time, - event_types: T::Array[XTwitterScraper::Monitor::EventType::OrSymbol], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], is_active: T::Boolean, username: String, x_user_id: String @@ -54,8 +54,7 @@ module XTwitterScraper { id: String, created_at: Time, - event_types: - T::Array[XTwitterScraper::Monitor::EventType::OrSymbol], + event_types: T::Array[XTwitterScraper::EventType::TaggedSymbol], is_active: T::Boolean, username: String, x_user_id: String @@ -64,51 +63,6 @@ module XTwitterScraper end def to_hash end - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias { T.all(Symbol, XTwitterScraper::Monitor::EventType) } - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let(:"tweet.new", XTwitterScraper::Monitor::EventType::TaggedSymbol) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::Monitor::EventType::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::Monitor::EventType::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::Monitor::EventType::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::Monitor::EventType::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::Monitor::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[XTwitterScraper::Monitor::EventType::TaggedSymbol] - ) - end - def self.values - end - end end end end diff --git a/rbi/x_twitter_scraper/models/monitor_create_params.rbi b/rbi/x_twitter_scraper/models/monitor_create_params.rbi index a21e203..6b01fbe 100644 --- a/rbi/x_twitter_scraper/models/monitor_create_params.rbi +++ b/rbi/x_twitter_scraper/models/monitor_create_params.rbi @@ -15,11 +15,7 @@ module XTwitterScraper end # Array of event types to subscribe to. - sig do - returns( - T::Array[XTwitterScraper::MonitorCreateParams::EventType::OrSymbol] - ) - end + sig { returns(T::Array[XTwitterScraper::EventType::OrSymbol]) } attr_accessor :event_types # X username (without @) @@ -28,8 +24,7 @@ module XTwitterScraper sig do params( - event_types: - T::Array[XTwitterScraper::MonitorCreateParams::EventType::OrSymbol], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], username: String, request_options: XTwitterScraper::RequestOptions::OrHash ).returns(T.attached_class) @@ -46,10 +41,7 @@ module XTwitterScraper sig do override.returns( { - event_types: - T::Array[ - XTwitterScraper::MonitorCreateParams::EventType::OrSymbol - ], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], username: String, request_options: XTwitterScraper::RequestOptions } @@ -57,58 +49,6 @@ module XTwitterScraper end def to_hash end - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, XTwitterScraper::MonitorCreateParams::EventType) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let( - :"tweet.new", - XTwitterScraper::MonitorCreateParams::EventType::TaggedSymbol - ) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::MonitorCreateParams::EventType::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::MonitorCreateParams::EventType::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::MonitorCreateParams::EventType::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::MonitorCreateParams::EventType::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::MonitorCreateParams::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::MonitorCreateParams::EventType::TaggedSymbol - ] - ) - end - def self.values - end - end end end end diff --git a/rbi/x_twitter_scraper/models/monitor_create_response.rbi b/rbi/x_twitter_scraper/models/monitor_create_response.rbi index fe94cb3..b68050c 100644 --- a/rbi/x_twitter_scraper/models/monitor_create_response.rbi +++ b/rbi/x_twitter_scraper/models/monitor_create_response.rbi @@ -18,13 +18,7 @@ module XTwitterScraper attr_accessor :created_at # Array of event types to subscribe to. - sig do - returns( - T::Array[ - XTwitterScraper::Models::MonitorCreateResponse::EventType::TaggedSymbol - ] - ) - end + sig { returns(T::Array[XTwitterScraper::EventType::TaggedSymbol]) } attr_accessor :event_types sig { returns(String) } @@ -37,10 +31,7 @@ module XTwitterScraper params( id: String, created_at: Time, - event_types: - T::Array[ - XTwitterScraper::Models::MonitorCreateResponse::EventType::OrSymbol - ], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], username: String, x_user_id: String ).returns(T.attached_class) @@ -60,10 +51,7 @@ module XTwitterScraper { id: String, created_at: Time, - event_types: - T::Array[ - XTwitterScraper::Models::MonitorCreateResponse::EventType::TaggedSymbol - ], + event_types: T::Array[XTwitterScraper::EventType::TaggedSymbol], username: String, x_user_id: String } @@ -71,61 +59,6 @@ module XTwitterScraper end def to_hash end - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - XTwitterScraper::Models::MonitorCreateResponse::EventType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let( - :"tweet.new", - XTwitterScraper::Models::MonitorCreateResponse::EventType::TaggedSymbol - ) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::Models::MonitorCreateResponse::EventType::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::Models::MonitorCreateResponse::EventType::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::Models::MonitorCreateResponse::EventType::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::Models::MonitorCreateResponse::EventType::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::Models::MonitorCreateResponse::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::Models::MonitorCreateResponse::EventType::TaggedSymbol - ] - ) - end - def self.values - end - end end end end diff --git a/rbi/x_twitter_scraper/models/monitor_list_response.rbi b/rbi/x_twitter_scraper/models/monitor_list_response.rbi index d2633f8..abc03ce 100644 --- a/rbi/x_twitter_scraper/models/monitor_list_response.rbi +++ b/rbi/x_twitter_scraper/models/monitor_list_response.rbi @@ -11,9 +11,7 @@ module XTwitterScraper ) end - sig do - returns(T::Array[XTwitterScraper::Models::MonitorListResponse::Monitor]) - end + sig { returns(T::Array[XTwitterScraper::Monitor]) } attr_accessor :monitors sig { returns(Integer) } @@ -21,10 +19,7 @@ module XTwitterScraper sig do params( - monitors: - T::Array[ - XTwitterScraper::Models::MonitorListResponse::Monitor::OrHash - ], + monitors: T::Array[XTwitterScraper::Monitor::OrHash], total: Integer ).returns(T.attached_class) end @@ -33,148 +28,11 @@ module XTwitterScraper sig do override.returns( - { - monitors: - T::Array[XTwitterScraper::Models::MonitorListResponse::Monitor], - total: Integer - } + { monitors: T::Array[XTwitterScraper::Monitor], total: Integer } ) end def to_hash end - - class Monitor < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::MonitorListResponse::Monitor, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(Time) } - attr_accessor :created_at - - # Array of event types to subscribe to. - sig do - returns( - T::Array[ - XTwitterScraper::Models::MonitorListResponse::Monitor::EventType::TaggedSymbol - ] - ) - end - attr_accessor :event_types - - sig { returns(T::Boolean) } - attr_accessor :is_active - - sig { returns(String) } - attr_accessor :username - - sig { returns(String) } - attr_accessor :x_user_id - - # Account monitor that tracks activity for a given X user. - sig do - params( - id: String, - created_at: Time, - event_types: - T::Array[ - XTwitterScraper::Models::MonitorListResponse::Monitor::EventType::OrSymbol - ], - is_active: T::Boolean, - username: String, - x_user_id: String - ).returns(T.attached_class) - end - def self.new( - id:, - created_at:, - # Array of event types to subscribe to. - event_types:, - is_active:, - username:, - x_user_id: - ) - end - - sig do - override.returns( - { - id: String, - created_at: Time, - event_types: - T::Array[ - XTwitterScraper::Models::MonitorListResponse::Monitor::EventType::TaggedSymbol - ], - is_active: T::Boolean, - username: String, - x_user_id: String - } - ) - end - def to_hash - end - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - XTwitterScraper::Models::MonitorListResponse::Monitor::EventType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let( - :"tweet.new", - XTwitterScraper::Models::MonitorListResponse::Monitor::EventType::TaggedSymbol - ) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::Models::MonitorListResponse::Monitor::EventType::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::Models::MonitorListResponse::Monitor::EventType::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::Models::MonitorListResponse::Monitor::EventType::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::Models::MonitorListResponse::Monitor::EventType::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::Models::MonitorListResponse::Monitor::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::Models::MonitorListResponse::Monitor::EventType::TaggedSymbol - ] - ) - end - def self.values - end - end - end end end end diff --git a/rbi/x_twitter_scraper/models/monitor_retrieve_response.rbi b/rbi/x_twitter_scraper/models/monitor_retrieve_response.rbi deleted file mode 100644 index 9475e5f..0000000 --- a/rbi/x_twitter_scraper/models/monitor_retrieve_response.rbi +++ /dev/null @@ -1,138 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - class MonitorRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::MonitorRetrieveResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(Time) } - attr_accessor :created_at - - # Array of event types to subscribe to. - sig do - returns( - T::Array[ - XTwitterScraper::Models::MonitorRetrieveResponse::EventType::TaggedSymbol - ] - ) - end - attr_accessor :event_types - - sig { returns(T::Boolean) } - attr_accessor :is_active - - sig { returns(String) } - attr_accessor :username - - sig { returns(String) } - attr_accessor :x_user_id - - # Account monitor that tracks activity for a given X user. - sig do - params( - id: String, - created_at: Time, - event_types: - T::Array[ - XTwitterScraper::Models::MonitorRetrieveResponse::EventType::OrSymbol - ], - is_active: T::Boolean, - username: String, - x_user_id: String - ).returns(T.attached_class) - end - def self.new( - id:, - created_at:, - # Array of event types to subscribe to. - event_types:, - is_active:, - username:, - x_user_id: - ) - end - - sig do - override.returns( - { - id: String, - created_at: Time, - event_types: - T::Array[ - XTwitterScraper::Models::MonitorRetrieveResponse::EventType::TaggedSymbol - ], - is_active: T::Boolean, - username: String, - x_user_id: String - } - ) - end - def to_hash - end - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - XTwitterScraper::Models::MonitorRetrieveResponse::EventType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let( - :"tweet.new", - XTwitterScraper::Models::MonitorRetrieveResponse::EventType::TaggedSymbol - ) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::Models::MonitorRetrieveResponse::EventType::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::Models::MonitorRetrieveResponse::EventType::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::Models::MonitorRetrieveResponse::EventType::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::Models::MonitorRetrieveResponse::EventType::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::Models::MonitorRetrieveResponse::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::Models::MonitorRetrieveResponse::EventType::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/monitor_update_params.rbi b/rbi/x_twitter_scraper/models/monitor_update_params.rbi index 2e66d4e..bf85f0a 100644 --- a/rbi/x_twitter_scraper/models/monitor_update_params.rbi +++ b/rbi/x_twitter_scraper/models/monitor_update_params.rbi @@ -18,20 +18,11 @@ module XTwitterScraper attr_accessor :id # Array of event types to subscribe to. - sig do - returns( - T.nilable( - T::Array[XTwitterScraper::MonitorUpdateParams::EventType::OrSymbol] - ) - ) - end + sig { returns(T.nilable(T::Array[XTwitterScraper::EventType::OrSymbol])) } attr_reader :event_types sig do - params( - event_types: - T::Array[XTwitterScraper::MonitorUpdateParams::EventType::OrSymbol] - ).void + params(event_types: T::Array[XTwitterScraper::EventType::OrSymbol]).void end attr_writer :event_types @@ -44,8 +35,7 @@ module XTwitterScraper sig do params( id: String, - event_types: - T::Array[XTwitterScraper::MonitorUpdateParams::EventType::OrSymbol], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], is_active: T::Boolean, request_options: XTwitterScraper::RequestOptions::OrHash ).returns(T.attached_class) @@ -63,10 +53,7 @@ module XTwitterScraper override.returns( { id: String, - event_types: - T::Array[ - XTwitterScraper::MonitorUpdateParams::EventType::OrSymbol - ], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], is_active: T::Boolean, request_options: XTwitterScraper::RequestOptions } @@ -74,58 +61,6 @@ module XTwitterScraper end def to_hash end - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, XTwitterScraper::MonitorUpdateParams::EventType) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let( - :"tweet.new", - XTwitterScraper::MonitorUpdateParams::EventType::TaggedSymbol - ) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::MonitorUpdateParams::EventType::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::MonitorUpdateParams::EventType::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::MonitorUpdateParams::EventType::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::MonitorUpdateParams::EventType::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::MonitorUpdateParams::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::MonitorUpdateParams::EventType::TaggedSymbol - ] - ) - end - def self.values - end - end end end end diff --git a/rbi/x_twitter_scraper/models/monitor_update_response.rbi b/rbi/x_twitter_scraper/models/monitor_update_response.rbi deleted file mode 100644 index e72bd82..0000000 --- a/rbi/x_twitter_scraper/models/monitor_update_response.rbi +++ /dev/null @@ -1,138 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - class MonitorUpdateResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::MonitorUpdateResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(Time) } - attr_accessor :created_at - - # Array of event types to subscribe to. - sig do - returns( - T::Array[ - XTwitterScraper::Models::MonitorUpdateResponse::EventType::TaggedSymbol - ] - ) - end - attr_accessor :event_types - - sig { returns(T::Boolean) } - attr_accessor :is_active - - sig { returns(String) } - attr_accessor :username - - sig { returns(String) } - attr_accessor :x_user_id - - # Account monitor that tracks activity for a given X user. - sig do - params( - id: String, - created_at: Time, - event_types: - T::Array[ - XTwitterScraper::Models::MonitorUpdateResponse::EventType::OrSymbol - ], - is_active: T::Boolean, - username: String, - x_user_id: String - ).returns(T.attached_class) - end - def self.new( - id:, - created_at:, - # Array of event types to subscribe to. - event_types:, - is_active:, - username:, - x_user_id: - ) - end - - sig do - override.returns( - { - id: String, - created_at: Time, - event_types: - T::Array[ - XTwitterScraper::Models::MonitorUpdateResponse::EventType::TaggedSymbol - ], - is_active: T::Boolean, - username: String, - x_user_id: String - } - ) - end - def to_hash - end - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - XTwitterScraper::Models::MonitorUpdateResponse::EventType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let( - :"tweet.new", - XTwitterScraper::Models::MonitorUpdateResponse::EventType::TaggedSymbol - ) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::Models::MonitorUpdateResponse::EventType::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::Models::MonitorUpdateResponse::EventType::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::Models::MonitorUpdateResponse::EventType::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::Models::MonitorUpdateResponse::EventType::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::Models::MonitorUpdateResponse::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::Models::MonitorUpdateResponse::EventType::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/paginated_tweets.rbi b/rbi/x_twitter_scraper/models/paginated_tweets.rbi index 737201c..571a80c 100644 --- a/rbi/x_twitter_scraper/models/paginated_tweets.rbi +++ b/rbi/x_twitter_scraper/models/paginated_tweets.rbi @@ -17,7 +17,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :next_cursor - sig { returns(T::Array[XTwitterScraper::PaginatedTweets::Tweet]) } + sig { returns(T::Array[XTwitterScraper::X::SearchTweet]) } attr_accessor :tweets # Paginated list of tweets with cursor-based navigation. @@ -25,7 +25,7 @@ module XTwitterScraper params( has_next_page: T::Boolean, next_cursor: String, - tweets: T::Array[XTwitterScraper::PaginatedTweets::Tweet::OrHash] + tweets: T::Array[XTwitterScraper::X::SearchTweet::OrHash] ).returns(T.attached_class) end def self.new(has_next_page:, next_cursor:, tweets:) @@ -36,190 +36,12 @@ module XTwitterScraper { has_next_page: T::Boolean, next_cursor: String, - tweets: T::Array[XTwitterScraper::PaginatedTweets::Tweet] + tweets: T::Array[XTwitterScraper::X::SearchTweet] } ) end def to_hash end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::PaginatedTweets::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :text - - sig do - returns(T.nilable(XTwitterScraper::PaginatedTweets::Tweet::Author)) - end - attr_reader :author - - sig do - params( - author: XTwitterScraper::PaginatedTweets::Tweet::Author::OrHash - ).void - end - attr_writer :author - - sig { returns(T.nilable(Integer)) } - attr_reader :bookmark_count - - sig { params(bookmark_count: Integer).void } - attr_writer :bookmark_count - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - # True for Note Tweets (long-form content, up to 25,000 characters) - sig { returns(T.nilable(T::Boolean)) } - attr_reader :is_note_tweet - - sig { params(is_note_tweet: T::Boolean).void } - attr_writer :is_note_tweet - - sig { returns(T.nilable(Integer)) } - attr_reader :like_count - - sig { params(like_count: Integer).void } - attr_writer :like_count - - sig { returns(T.nilable(Integer)) } - attr_reader :quote_count - - sig { params(quote_count: Integer).void } - attr_writer :quote_count - - sig { returns(T.nilable(Integer)) } - attr_reader :reply_count - - sig { params(reply_count: Integer).void } - attr_writer :reply_count - - sig { returns(T.nilable(Integer)) } - attr_reader :retweet_count - - sig { params(retweet_count: Integer).void } - attr_writer :retweet_count - - sig { returns(T.nilable(Integer)) } - attr_reader :view_count - - sig { params(view_count: Integer).void } - attr_writer :view_count - - # Tweet returned from search results with inline author info. - sig do - params( - id: String, - text: String, - author: XTwitterScraper::PaginatedTweets::Tweet::Author::OrHash, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - ).returns(T.attached_class) - end - def self.new( - id:, - text:, - author: nil, - bookmark_count: nil, - created_at: nil, - # True for Note Tweets (long-form content, up to 25,000 characters) - is_note_tweet: nil, - like_count: nil, - quote_count: nil, - reply_count: nil, - retweet_count: nil, - view_count: nil - ) - end - - sig do - override.returns( - { - id: String, - text: String, - author: XTwitterScraper::PaginatedTweets::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - ) - end - def to_hash - end - - class Author < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::PaginatedTweets::Tweet::Author, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - sig do - params( - id: String, - name: String, - username: String, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new(id:, name:, username:, verified: nil) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end end end end diff --git a/rbi/x_twitter_scraper/models/paginated_users.rbi b/rbi/x_twitter_scraper/models/paginated_users.rbi index 03d1c52..dd04ec3 100644 --- a/rbi/x_twitter_scraper/models/paginated_users.rbi +++ b/rbi/x_twitter_scraper/models/paginated_users.rbi @@ -17,7 +17,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :next_cursor - sig { returns(T::Array[XTwitterScraper::PaginatedUsers::User]) } + sig { returns(T::Array[XTwitterScraper::X::UserProfile]) } attr_accessor :users # Paginated list of user profiles with cursor-based navigation. @@ -25,7 +25,7 @@ module XTwitterScraper params( has_next_page: T::Boolean, next_cursor: String, - users: T::Array[XTwitterScraper::PaginatedUsers::User::OrHash] + users: T::Array[XTwitterScraper::X::UserProfile::OrHash] ).returns(T.attached_class) end def self.new(has_next_page:, next_cursor:, users:) @@ -36,130 +36,12 @@ module XTwitterScraper { has_next_page: T::Boolean, next_cursor: String, - users: T::Array[XTwitterScraper::PaginatedUsers::User] + users: T::Array[XTwitterScraper::X::UserProfile] } ) end def to_hash end - - class User < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::PaginatedUsers::User, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - sig { returns(T.nilable(String)) } - attr_reader :description - - sig { params(description: String).void } - attr_writer :description - - sig { returns(T.nilable(Integer)) } - attr_reader :followers - - sig { params(followers: Integer).void } - attr_writer :followers - - sig { returns(T.nilable(Integer)) } - attr_reader :following - - sig { params(following: Integer).void } - attr_writer :following - - sig { returns(T.nilable(String)) } - attr_reader :location - - sig { params(location: String).void } - attr_writer :location - - sig { returns(T.nilable(String)) } - attr_reader :profile_picture - - sig { params(profile_picture: String).void } - attr_writer :profile_picture - - sig { returns(T.nilable(Integer)) } - attr_reader :statuses_count - - sig { params(statuses_count: Integer).void } - attr_writer :statuses_count - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - # X user profile with bio, follower counts, and verification status. - sig do - params( - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new( - id:, - name:, - username:, - created_at: nil, - description: nil, - followers: nil, - following: nil, - location: nil, - profile_picture: nil, - statuses_count: nil, - verified: nil - ) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - } - ) - end - def to_hash - end - end end end end diff --git a/rbi/x_twitter_scraper/models/radar_retrieve_trending_topics_response.rbi b/rbi/x_twitter_scraper/models/radar_retrieve_trending_topics_response.rbi index ceb762e..f64fe41 100644 --- a/rbi/x_twitter_scraper/models/radar_retrieve_trending_topics_response.rbi +++ b/rbi/x_twitter_scraper/models/radar_retrieve_trending_topics_response.rbi @@ -11,13 +11,7 @@ module XTwitterScraper ) end - sig do - returns( - T::Array[ - XTwitterScraper::Models::RadarRetrieveTrendingTopicsResponse::Item - ] - ) - end + sig { returns(T::Array[XTwitterScraper::RadarItem]) } attr_accessor :items sig { returns(Integer) } @@ -25,10 +19,7 @@ module XTwitterScraper sig do params( - items: - T::Array[ - XTwitterScraper::Models::RadarRetrieveTrendingTopicsResponse::Item::OrHash - ], + items: T::Array[XTwitterScraper::RadarItem::OrHash], total: Integer ).returns(T.attached_class) end @@ -37,108 +28,11 @@ module XTwitterScraper sig do override.returns( - { - items: - T::Array[ - XTwitterScraper::Models::RadarRetrieveTrendingTopicsResponse::Item - ], - total: Integer - } + { items: T::Array[XTwitterScraper::RadarItem], total: Integer } ) end def to_hash end - - class Item < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::RadarRetrieveTrendingTopicsResponse::Item, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :category - - sig { returns(Time) } - attr_accessor :published_at - - sig { returns(String) } - attr_accessor :region - - sig { returns(Float) } - attr_accessor :score - - sig { returns(String) } - attr_accessor :source - - sig { returns(String) } - attr_accessor :title - - sig { returns(T.nilable(String)) } - attr_reader :description - - sig { params(description: String).void } - attr_writer :description - - sig { returns(T.nilable(String)) } - attr_reader :image_url - - sig { params(image_url: String).void } - attr_writer :image_url - - sig { returns(T.nilable(String)) } - attr_reader :url - - sig { params(url: String).void } - attr_writer :url - - # Trending topic with score, category, source, and region. - sig do - params( - category: String, - published_at: Time, - region: String, - score: Float, - source: String, - title: String, - description: String, - image_url: String, - url: String - ).returns(T.attached_class) - end - def self.new( - category:, - published_at:, - region:, - score:, - source:, - title:, - description: nil, - image_url: nil, - url: nil - ) - end - - sig do - override.returns( - { - category: String, - published_at: Time, - region: String, - score: Float, - source: String, - title: String, - description: String, - image_url: String, - url: String - } - ) - end - def to_hash - end - end end end end diff --git a/rbi/x_twitter_scraper/models/style_analyze_response.rbi b/rbi/x_twitter_scraper/models/style_analyze_response.rbi deleted file mode 100644 index 3badf2f..0000000 --- a/rbi/x_twitter_scraper/models/style_analyze_response.rbi +++ /dev/null @@ -1,121 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - class StyleAnalyzeResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::StyleAnalyzeResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(Time) } - attr_accessor :fetched_at - - sig { returns(T::Boolean) } - attr_accessor :is_own_account - - sig { returns(Integer) } - attr_accessor :tweet_count - - sig do - returns(T::Array[XTwitterScraper::Models::StyleAnalyzeResponse::Tweet]) - end - attr_accessor :tweets - - sig { returns(String) } - attr_accessor :x_username - - # Full style profile with sampled tweets used for tone analysis. - sig do - params( - fetched_at: Time, - is_own_account: T::Boolean, - tweet_count: Integer, - tweets: - T::Array[ - XTwitterScraper::Models::StyleAnalyzeResponse::Tweet::OrHash - ], - x_username: String - ).returns(T.attached_class) - end - def self.new( - fetched_at:, - is_own_account:, - tweet_count:, - tweets:, - x_username: - ) - end - - sig do - override.returns( - { - fetched_at: Time, - is_own_account: T::Boolean, - tweet_count: Integer, - tweets: - T::Array[XTwitterScraper::Models::StyleAnalyzeResponse::Tweet], - x_username: String - } - ) - end - def to_hash - end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::StyleAnalyzeResponse::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :text - - sig { returns(T.nilable(String)) } - attr_reader :author_username - - sig { params(author_username: String).void } - attr_writer :author_username - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - sig do - params( - id: String, - text: String, - author_username: String, - created_at: String - ).returns(T.attached_class) - end - def self.new(id:, text:, author_username: nil, created_at: nil) - end - - sig do - override.returns( - { - id: String, - text: String, - author_username: String, - created_at: String - } - ) - end - def to_hash - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/style_compare_response.rbi b/rbi/x_twitter_scraper/models/style_compare_response.rbi index c764a34..7e69c82 100644 --- a/rbi/x_twitter_scraper/models/style_compare_response.rbi +++ b/rbi/x_twitter_scraper/models/style_compare_response.rbi @@ -12,31 +12,23 @@ module XTwitterScraper end # Full style profile with sampled tweets used for tone analysis. - sig { returns(XTwitterScraper::Models::StyleCompareResponse::Style1) } + sig { returns(XTwitterScraper::StyleProfile) } attr_reader :style1 - sig do - params( - style1: XTwitterScraper::Models::StyleCompareResponse::Style1::OrHash - ).void - end + sig { params(style1: XTwitterScraper::StyleProfile::OrHash).void } attr_writer :style1 # Full style profile with sampled tweets used for tone analysis. - sig { returns(XTwitterScraper::Models::StyleCompareResponse::Style2) } + sig { returns(XTwitterScraper::StyleProfile) } attr_reader :style2 - sig do - params( - style2: XTwitterScraper::Models::StyleCompareResponse::Style2::OrHash - ).void - end + sig { params(style2: XTwitterScraper::StyleProfile::OrHash).void } attr_writer :style2 sig do params( - style1: XTwitterScraper::Models::StyleCompareResponse::Style1::OrHash, - style2: XTwitterScraper::Models::StyleCompareResponse::Style2::OrHash + style1: XTwitterScraper::StyleProfile::OrHash, + style2: XTwitterScraper::StyleProfile::OrHash ).returns(T.attached_class) end def self.new( @@ -50,257 +42,13 @@ module XTwitterScraper sig do override.returns( { - style1: XTwitterScraper::Models::StyleCompareResponse::Style1, - style2: XTwitterScraper::Models::StyleCompareResponse::Style2 + style1: XTwitterScraper::StyleProfile, + style2: XTwitterScraper::StyleProfile } ) end def to_hash end - - class Style1 < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::StyleCompareResponse::Style1, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(Time) } - attr_accessor :fetched_at - - sig { returns(T::Boolean) } - attr_accessor :is_own_account - - sig { returns(Integer) } - attr_accessor :tweet_count - - sig do - returns( - T::Array[ - XTwitterScraper::Models::StyleCompareResponse::Style1::Tweet - ] - ) - end - attr_accessor :tweets - - sig { returns(String) } - attr_accessor :x_username - - # Full style profile with sampled tweets used for tone analysis. - sig do - params( - fetched_at: Time, - is_own_account: T::Boolean, - tweet_count: Integer, - tweets: - T::Array[ - XTwitterScraper::Models::StyleCompareResponse::Style1::Tweet::OrHash - ], - x_username: String - ).returns(T.attached_class) - end - def self.new( - fetched_at:, - is_own_account:, - tweet_count:, - tweets:, - x_username: - ) - end - - sig do - override.returns( - { - fetched_at: Time, - is_own_account: T::Boolean, - tweet_count: Integer, - tweets: - T::Array[ - XTwitterScraper::Models::StyleCompareResponse::Style1::Tweet - ], - x_username: String - } - ) - end - def to_hash - end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::StyleCompareResponse::Style1::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :text - - sig { returns(T.nilable(String)) } - attr_reader :author_username - - sig { params(author_username: String).void } - attr_writer :author_username - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - sig do - params( - id: String, - text: String, - author_username: String, - created_at: String - ).returns(T.attached_class) - end - def self.new(id:, text:, author_username: nil, created_at: nil) - end - - sig do - override.returns( - { - id: String, - text: String, - author_username: String, - created_at: String - } - ) - end - def to_hash - end - end - end - - class Style2 < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::StyleCompareResponse::Style2, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(Time) } - attr_accessor :fetched_at - - sig { returns(T::Boolean) } - attr_accessor :is_own_account - - sig { returns(Integer) } - attr_accessor :tweet_count - - sig do - returns( - T::Array[ - XTwitterScraper::Models::StyleCompareResponse::Style2::Tweet - ] - ) - end - attr_accessor :tweets - - sig { returns(String) } - attr_accessor :x_username - - # Full style profile with sampled tweets used for tone analysis. - sig do - params( - fetched_at: Time, - is_own_account: T::Boolean, - tweet_count: Integer, - tweets: - T::Array[ - XTwitterScraper::Models::StyleCompareResponse::Style2::Tweet::OrHash - ], - x_username: String - ).returns(T.attached_class) - end - def self.new( - fetched_at:, - is_own_account:, - tweet_count:, - tweets:, - x_username: - ) - end - - sig do - override.returns( - { - fetched_at: Time, - is_own_account: T::Boolean, - tweet_count: Integer, - tweets: - T::Array[ - XTwitterScraper::Models::StyleCompareResponse::Style2::Tweet - ], - x_username: String - } - ) - end - def to_hash - end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::StyleCompareResponse::Style2::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :text - - sig { returns(T.nilable(String)) } - attr_reader :author_username - - sig { params(author_username: String).void } - attr_writer :author_username - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - sig do - params( - id: String, - text: String, - author_username: String, - created_at: String - ).returns(T.attached_class) - end - def self.new(id:, text:, author_username: nil, created_at: nil) - end - - sig do - override.returns( - { - id: String, - text: String, - author_username: String, - created_at: String - } - ) - end - def to_hash - end - end - end end end end diff --git a/rbi/x_twitter_scraper/models/style_delete_params.rbi b/rbi/x_twitter_scraper/models/style_delete_params.rbi new file mode 100644 index 0000000..99e5adc --- /dev/null +++ b/rbi/x_twitter_scraper/models/style_delete_params.rbi @@ -0,0 +1,38 @@ +# typed: strong + +module XTwitterScraper + module Models + class StyleDeleteParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + XTwitterScraper::StyleDeleteParams, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig do + params( + id: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(id:, request_options: {}) + end + + sig do + override.returns( + { id: String, request_options: XTwitterScraper::RequestOptions } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/style_get_performance_params.rbi b/rbi/x_twitter_scraper/models/style_get_performance_params.rbi new file mode 100644 index 0000000..0e3339d --- /dev/null +++ b/rbi/x_twitter_scraper/models/style_get_performance_params.rbi @@ -0,0 +1,38 @@ +# typed: strong + +module XTwitterScraper + module Models + class StyleGetPerformanceParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + XTwitterScraper::StyleGetPerformanceParams, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig do + params( + id: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(id:, request_options: {}) + end + + sig do + override.returns( + { id: String, request_options: XTwitterScraper::RequestOptions } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/style_get_performance_response.rbi b/rbi/x_twitter_scraper/models/style_get_performance_response.rbi new file mode 100644 index 0000000..2fb7605 --- /dev/null +++ b/rbi/x_twitter_scraper/models/style_get_performance_response.rbi @@ -0,0 +1,140 @@ +# typed: strong + +module XTwitterScraper + module Models + class StyleGetPerformanceResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::StyleGetPerformanceResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(Integer) } + attr_accessor :tweet_count + + sig do + returns( + T::Array[XTwitterScraper::Models::StyleGetPerformanceResponse::Tweet] + ) + end + attr_accessor :tweets + + sig { returns(String) } + attr_accessor :x_username + + sig do + params( + tweet_count: Integer, + tweets: + T::Array[ + XTwitterScraper::Models::StyleGetPerformanceResponse::Tweet::OrHash + ], + x_username: String + ).returns(T.attached_class) + end + def self.new(tweet_count:, tweets:, x_username:) + end + + sig do + override.returns( + { + tweet_count: Integer, + tweets: + T::Array[ + XTwitterScraper::Models::StyleGetPerformanceResponse::Tweet + ], + x_username: String + } + ) + end + def to_hash + end + + class Tweet < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::StyleGetPerformanceResponse::Tweet, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :text + + sig { returns(T.nilable(String)) } + attr_reader :created_at + + sig { params(created_at: String).void } + attr_writer :created_at + + sig { returns(T.nilable(Integer)) } + attr_reader :like_count + + sig { params(like_count: Integer).void } + attr_writer :like_count + + sig { returns(T.nilable(Integer)) } + attr_reader :reply_count + + sig { params(reply_count: Integer).void } + attr_writer :reply_count + + sig { returns(T.nilable(Integer)) } + attr_reader :retweet_count + + sig { params(retweet_count: Integer).void } + attr_writer :retweet_count + + sig { returns(T.nilable(Integer)) } + attr_reader :view_count + + sig { params(view_count: Integer).void } + attr_writer :view_count + + sig do + params( + id: String, + text: String, + created_at: String, + like_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + ).returns(T.attached_class) + end + def self.new( + id:, + text:, + created_at: nil, + like_count: nil, + reply_count: nil, + retweet_count: nil, + view_count: nil + ) + end + + sig do + override.returns( + { + id: String, + text: String, + created_at: String, + like_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/style_list_response.rbi b/rbi/x_twitter_scraper/models/style_list_response.rbi index b24bc13..10005ba 100644 --- a/rbi/x_twitter_scraper/models/style_list_response.rbi +++ b/rbi/x_twitter_scraper/models/style_list_response.rbi @@ -11,15 +11,12 @@ module XTwitterScraper ) end - sig do - returns(T::Array[XTwitterScraper::Models::StyleListResponse::Style]) - end + sig { returns(T::Array[XTwitterScraper::StyleProfileSummary]) } attr_accessor :styles sig do params( - styles: - T::Array[XTwitterScraper::Models::StyleListResponse::Style::OrHash] + styles: T::Array[XTwitterScraper::StyleProfileSummary::OrHash] ).returns(T.attached_class) end def self.new(styles:) @@ -27,60 +24,11 @@ module XTwitterScraper sig do override.returns( - { - styles: T::Array[XTwitterScraper::Models::StyleListResponse::Style] - } + { styles: T::Array[XTwitterScraper::StyleProfileSummary] } ) end def to_hash end - - class Style < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::StyleListResponse::Style, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(Time) } - attr_accessor :fetched_at - - sig { returns(T::Boolean) } - attr_accessor :is_own_account - - sig { returns(Integer) } - attr_accessor :tweet_count - - sig { returns(String) } - attr_accessor :x_username - - # Style profile summary with tweet count and ownership flag. - sig do - params( - fetched_at: Time, - is_own_account: T::Boolean, - tweet_count: Integer, - x_username: String - ).returns(T.attached_class) - end - def self.new(fetched_at:, is_own_account:, tweet_count:, x_username:) - end - - sig do - override.returns( - { - fetched_at: Time, - is_own_account: T::Boolean, - tweet_count: Integer, - x_username: String - } - ) - end - def to_hash - end - end end end end diff --git a/rbi/x_twitter_scraper/models/style_retrieve_params.rbi b/rbi/x_twitter_scraper/models/style_retrieve_params.rbi new file mode 100644 index 0000000..9d5f256 --- /dev/null +++ b/rbi/x_twitter_scraper/models/style_retrieve_params.rbi @@ -0,0 +1,38 @@ +# typed: strong + +module XTwitterScraper + module Models + class StyleRetrieveParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + XTwitterScraper::StyleRetrieveParams, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig do + params( + id: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(id:, request_options: {}) + end + + sig do + override.returns( + { id: String, request_options: XTwitterScraper::RequestOptions } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/style_update_params.rbi b/rbi/x_twitter_scraper/models/style_update_params.rbi new file mode 100644 index 0000000..1db9365 --- /dev/null +++ b/rbi/x_twitter_scraper/models/style_update_params.rbi @@ -0,0 +1,81 @@ +# typed: strong + +module XTwitterScraper + module Models + class StyleUpdateParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + XTwitterScraper::StyleUpdateParams, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + # Display label for the style + sig { returns(String) } + attr_accessor :label + + # Array of tweet objects + sig { returns(T::Array[XTwitterScraper::StyleUpdateParams::Tweet]) } + attr_accessor :tweets + + sig do + params( + id: String, + label: String, + tweets: T::Array[XTwitterScraper::StyleUpdateParams::Tweet::OrHash], + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + id:, + # Display label for the style + label:, + # Array of tweet objects + tweets:, + request_options: {} + ) + end + + sig do + override.returns( + { + id: String, + label: String, + tweets: T::Array[XTwitterScraper::StyleUpdateParams::Tweet], + request_options: XTwitterScraper::RequestOptions + } + ) + end + def to_hash + end + + class Tweet < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::StyleUpdateParams::Tweet, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :text + + sig { params(text: String).returns(T.attached_class) } + def self.new(text:) + end + + sig { override.returns({ text: String }) } + def to_hash + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/webhook.rbi b/rbi/x_twitter_scraper/models/webhook.rbi index d0d2593..0108dec 100644 --- a/rbi/x_twitter_scraper/models/webhook.rbi +++ b/rbi/x_twitter_scraper/models/webhook.rbi @@ -15,7 +15,7 @@ module XTwitterScraper attr_accessor :created_at # Array of event types to subscribe to. - sig { returns(T::Array[XTwitterScraper::Webhook::EventType::OrSymbol]) } + sig { returns(T::Array[XTwitterScraper::EventType::TaggedSymbol]) } attr_accessor :event_types sig { returns(T::Boolean) } @@ -29,7 +29,7 @@ module XTwitterScraper params( id: String, created_at: Time, - event_types: T::Array[XTwitterScraper::Webhook::EventType::OrSymbol], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], is_active: T::Boolean, url: String ).returns(T.attached_class) @@ -49,8 +49,7 @@ module XTwitterScraper { id: String, created_at: Time, - event_types: - T::Array[XTwitterScraper::Webhook::EventType::OrSymbol], + event_types: T::Array[XTwitterScraper::EventType::TaggedSymbol], is_active: T::Boolean, url: String } @@ -58,51 +57,6 @@ module XTwitterScraper end def to_hash end - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias { T.all(Symbol, XTwitterScraper::Webhook::EventType) } - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let(:"tweet.new", XTwitterScraper::Webhook::EventType::TaggedSymbol) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::Webhook::EventType::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::Webhook::EventType::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::Webhook::EventType::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::Webhook::EventType::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::Webhook::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[XTwitterScraper::Webhook::EventType::TaggedSymbol] - ) - end - def self.values - end - end end end end diff --git a/rbi/x_twitter_scraper/models/webhook_create_params.rbi b/rbi/x_twitter_scraper/models/webhook_create_params.rbi index f60f1b2..2ce25a4 100644 --- a/rbi/x_twitter_scraper/models/webhook_create_params.rbi +++ b/rbi/x_twitter_scraper/models/webhook_create_params.rbi @@ -15,11 +15,7 @@ module XTwitterScraper end # Array of event types to subscribe to. - sig do - returns( - T::Array[XTwitterScraper::WebhookCreateParams::EventType::OrSymbol] - ) - end + sig { returns(T::Array[XTwitterScraper::EventType::OrSymbol]) } attr_accessor :event_types # HTTPS URL @@ -28,8 +24,7 @@ module XTwitterScraper sig do params( - event_types: - T::Array[XTwitterScraper::WebhookCreateParams::EventType::OrSymbol], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], url: String, request_options: XTwitterScraper::RequestOptions::OrHash ).returns(T.attached_class) @@ -46,10 +41,7 @@ module XTwitterScraper sig do override.returns( { - event_types: - T::Array[ - XTwitterScraper::WebhookCreateParams::EventType::OrSymbol - ], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], url: String, request_options: XTwitterScraper::RequestOptions } @@ -57,58 +49,6 @@ module XTwitterScraper end def to_hash end - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, XTwitterScraper::WebhookCreateParams::EventType) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let( - :"tweet.new", - XTwitterScraper::WebhookCreateParams::EventType::TaggedSymbol - ) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::WebhookCreateParams::EventType::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::WebhookCreateParams::EventType::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::WebhookCreateParams::EventType::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::WebhookCreateParams::EventType::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::WebhookCreateParams::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::WebhookCreateParams::EventType::TaggedSymbol - ] - ) - end - def self.values - end - end end end end diff --git a/rbi/x_twitter_scraper/models/webhook_create_response.rbi b/rbi/x_twitter_scraper/models/webhook_create_response.rbi index 7b816ee..d3827c9 100644 --- a/rbi/x_twitter_scraper/models/webhook_create_response.rbi +++ b/rbi/x_twitter_scraper/models/webhook_create_response.rbi @@ -18,13 +18,7 @@ module XTwitterScraper attr_accessor :created_at # Array of event types to subscribe to. - sig do - returns( - T::Array[ - XTwitterScraper::Models::WebhookCreateResponse::EventType::TaggedSymbol - ] - ) - end + sig { returns(T::Array[XTwitterScraper::EventType::TaggedSymbol]) } attr_accessor :event_types sig { returns(String) } @@ -37,10 +31,7 @@ module XTwitterScraper params( id: String, created_at: Time, - event_types: - T::Array[ - XTwitterScraper::Models::WebhookCreateResponse::EventType::OrSymbol - ], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], secret: String, url: String ).returns(T.attached_class) @@ -60,10 +51,7 @@ module XTwitterScraper { id: String, created_at: Time, - event_types: - T::Array[ - XTwitterScraper::Models::WebhookCreateResponse::EventType::TaggedSymbol - ], + event_types: T::Array[XTwitterScraper::EventType::TaggedSymbol], secret: String, url: String } @@ -71,61 +59,6 @@ module XTwitterScraper end def to_hash end - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - XTwitterScraper::Models::WebhookCreateResponse::EventType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let( - :"tweet.new", - XTwitterScraper::Models::WebhookCreateResponse::EventType::TaggedSymbol - ) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::Models::WebhookCreateResponse::EventType::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::Models::WebhookCreateResponse::EventType::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::Models::WebhookCreateResponse::EventType::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::Models::WebhookCreateResponse::EventType::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::Models::WebhookCreateResponse::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::Models::WebhookCreateResponse::EventType::TaggedSymbol - ] - ) - end - def self.values - end - end end end end diff --git a/rbi/x_twitter_scraper/models/webhook_list_deliveries_response.rbi b/rbi/x_twitter_scraper/models/webhook_list_deliveries_response.rbi index c3acae3..aefe98d 100644 --- a/rbi/x_twitter_scraper/models/webhook_list_deliveries_response.rbi +++ b/rbi/x_twitter_scraper/models/webhook_list_deliveries_response.rbi @@ -11,123 +11,22 @@ module XTwitterScraper ) end - sig do - returns( - T::Array[ - XTwitterScraper::Models::WebhookListDeliveriesResponse::Delivery - ] - ) - end + sig { returns(T::Array[XTwitterScraper::Delivery]) } attr_accessor :deliveries sig do - params( - deliveries: - T::Array[ - XTwitterScraper::Models::WebhookListDeliveriesResponse::Delivery::OrHash - ] - ).returns(T.attached_class) + params(deliveries: T::Array[XTwitterScraper::Delivery::OrHash]).returns( + T.attached_class + ) end def self.new(deliveries:) end sig do - override.returns( - { - deliveries: - T::Array[ - XTwitterScraper::Models::WebhookListDeliveriesResponse::Delivery - ] - } - ) + override.returns({ deliveries: T::Array[XTwitterScraper::Delivery] }) end def to_hash end - - class Delivery < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::WebhookListDeliveriesResponse::Delivery, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(Integer) } - attr_accessor :attempts - - sig { returns(Time) } - attr_accessor :created_at - - sig { returns(String) } - attr_accessor :status - - sig { returns(String) } - attr_accessor :stream_event_id - - sig { returns(T.nilable(Time)) } - attr_reader :delivered_at - - sig { params(delivered_at: Time).void } - attr_writer :delivered_at - - sig { returns(T.nilable(String)) } - attr_reader :last_error - - sig { params(last_error: String).void } - attr_writer :last_error - - sig { returns(T.nilable(Integer)) } - attr_reader :last_status_code - - sig { params(last_status_code: Integer).void } - attr_writer :last_status_code - - # Webhook delivery attempt record with status and retry count. - sig do - params( - id: String, - attempts: Integer, - created_at: Time, - status: String, - stream_event_id: String, - delivered_at: Time, - last_error: String, - last_status_code: Integer - ).returns(T.attached_class) - end - def self.new( - id:, - attempts:, - created_at:, - status:, - stream_event_id:, - delivered_at: nil, - last_error: nil, - last_status_code: nil - ) - end - - sig do - override.returns( - { - id: String, - attempts: Integer, - created_at: Time, - status: String, - stream_event_id: String, - delivered_at: Time, - last_error: String, - last_status_code: Integer - } - ) - end - def to_hash - end - end end end end diff --git a/rbi/x_twitter_scraper/models/webhook_list_response.rbi b/rbi/x_twitter_scraper/models/webhook_list_response.rbi index a01546c..8933627 100644 --- a/rbi/x_twitter_scraper/models/webhook_list_response.rbi +++ b/rbi/x_twitter_scraper/models/webhook_list_response.rbi @@ -11,159 +11,20 @@ module XTwitterScraper ) end - sig do - returns(T::Array[XTwitterScraper::Models::WebhookListResponse::Webhook]) - end + sig { returns(T::Array[XTwitterScraper::Webhook]) } attr_accessor :webhooks sig do - params( - webhooks: - T::Array[ - XTwitterScraper::Models::WebhookListResponse::Webhook::OrHash - ] - ).returns(T.attached_class) + params(webhooks: T::Array[XTwitterScraper::Webhook::OrHash]).returns( + T.attached_class + ) end def self.new(webhooks:) end - sig do - override.returns( - { - webhooks: - T::Array[XTwitterScraper::Models::WebhookListResponse::Webhook] - } - ) - end + sig { override.returns({ webhooks: T::Array[XTwitterScraper::Webhook] }) } def to_hash end - - class Webhook < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::WebhookListResponse::Webhook, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(Time) } - attr_accessor :created_at - - # Array of event types to subscribe to. - sig do - returns( - T::Array[ - XTwitterScraper::Models::WebhookListResponse::Webhook::EventType::TaggedSymbol - ] - ) - end - attr_accessor :event_types - - sig { returns(T::Boolean) } - attr_accessor :is_active - - sig { returns(String) } - attr_accessor :url - - # Webhook endpoint registered to receive event deliveries. - sig do - params( - id: String, - created_at: Time, - event_types: - T::Array[ - XTwitterScraper::Models::WebhookListResponse::Webhook::EventType::OrSymbol - ], - is_active: T::Boolean, - url: String - ).returns(T.attached_class) - end - def self.new( - id:, - created_at:, - # Array of event types to subscribe to. - event_types:, - is_active:, - url: - ) - end - - sig do - override.returns( - { - id: String, - created_at: Time, - event_types: - T::Array[ - XTwitterScraper::Models::WebhookListResponse::Webhook::EventType::TaggedSymbol - ], - is_active: T::Boolean, - url: String - } - ) - end - def to_hash - end - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - XTwitterScraper::Models::WebhookListResponse::Webhook::EventType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let( - :"tweet.new", - XTwitterScraper::Models::WebhookListResponse::Webhook::EventType::TaggedSymbol - ) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::Models::WebhookListResponse::Webhook::EventType::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::Models::WebhookListResponse::Webhook::EventType::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::Models::WebhookListResponse::Webhook::EventType::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::Models::WebhookListResponse::Webhook::EventType::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::Models::WebhookListResponse::Webhook::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::Models::WebhookListResponse::Webhook::EventType::TaggedSymbol - ] - ) - end - def self.values - end - end - end end end end diff --git a/rbi/x_twitter_scraper/models/webhook_update_params.rbi b/rbi/x_twitter_scraper/models/webhook_update_params.rbi index 09300ee..49251ea 100644 --- a/rbi/x_twitter_scraper/models/webhook_update_params.rbi +++ b/rbi/x_twitter_scraper/models/webhook_update_params.rbi @@ -18,20 +18,11 @@ module XTwitterScraper attr_accessor :id # Array of event types to subscribe to. - sig do - returns( - T.nilable( - T::Array[XTwitterScraper::WebhookUpdateParams::EventType::OrSymbol] - ) - ) - end + sig { returns(T.nilable(T::Array[XTwitterScraper::EventType::OrSymbol])) } attr_reader :event_types sig do - params( - event_types: - T::Array[XTwitterScraper::WebhookUpdateParams::EventType::OrSymbol] - ).void + params(event_types: T::Array[XTwitterScraper::EventType::OrSymbol]).void end attr_writer :event_types @@ -50,8 +41,7 @@ module XTwitterScraper sig do params( id: String, - event_types: - T::Array[XTwitterScraper::WebhookUpdateParams::EventType::OrSymbol], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], is_active: T::Boolean, url: String, request_options: XTwitterScraper::RequestOptions::OrHash @@ -71,10 +61,7 @@ module XTwitterScraper override.returns( { id: String, - event_types: - T::Array[ - XTwitterScraper::WebhookUpdateParams::EventType::OrSymbol - ], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], is_active: T::Boolean, url: String, request_options: XTwitterScraper::RequestOptions @@ -83,58 +70,6 @@ module XTwitterScraper end def to_hash end - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, XTwitterScraper::WebhookUpdateParams::EventType) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let( - :"tweet.new", - XTwitterScraper::WebhookUpdateParams::EventType::TaggedSymbol - ) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::WebhookUpdateParams::EventType::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::WebhookUpdateParams::EventType::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::WebhookUpdateParams::EventType::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::WebhookUpdateParams::EventType::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::WebhookUpdateParams::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::WebhookUpdateParams::EventType::TaggedSymbol - ] - ) - end - def self.values - end - end end end end diff --git a/rbi/x_twitter_scraper/models/webhook_update_response.rbi b/rbi/x_twitter_scraper/models/webhook_update_response.rbi deleted file mode 100644 index 0380620..0000000 --- a/rbi/x_twitter_scraper/models/webhook_update_response.rbi +++ /dev/null @@ -1,132 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - class WebhookUpdateResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::WebhookUpdateResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(Time) } - attr_accessor :created_at - - # Array of event types to subscribe to. - sig do - returns( - T::Array[ - XTwitterScraper::Models::WebhookUpdateResponse::EventType::TaggedSymbol - ] - ) - end - attr_accessor :event_types - - sig { returns(T::Boolean) } - attr_accessor :is_active - - sig { returns(String) } - attr_accessor :url - - # Webhook endpoint registered to receive event deliveries. - sig do - params( - id: String, - created_at: Time, - event_types: - T::Array[ - XTwitterScraper::Models::WebhookUpdateResponse::EventType::OrSymbol - ], - is_active: T::Boolean, - url: String - ).returns(T.attached_class) - end - def self.new( - id:, - created_at:, - # Array of event types to subscribe to. - event_types:, - is_active:, - url: - ) - end - - sig do - override.returns( - { - id: String, - created_at: Time, - event_types: - T::Array[ - XTwitterScraper::Models::WebhookUpdateResponse::EventType::TaggedSymbol - ], - is_active: T::Boolean, - url: String - } - ) - end - def to_hash - end - - # Type of monitor event fired when account activity occurs. - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - XTwitterScraper::Models::WebhookUpdateResponse::EventType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TWEET_NEW = - T.let( - :"tweet.new", - XTwitterScraper::Models::WebhookUpdateResponse::EventType::TaggedSymbol - ) - TWEET_REPLY = - T.let( - :"tweet.reply", - XTwitterScraper::Models::WebhookUpdateResponse::EventType::TaggedSymbol - ) - TWEET_RETWEET = - T.let( - :"tweet.retweet", - XTwitterScraper::Models::WebhookUpdateResponse::EventType::TaggedSymbol - ) - TWEET_QUOTE = - T.let( - :"tweet.quote", - XTwitterScraper::Models::WebhookUpdateResponse::EventType::TaggedSymbol - ) - FOLLOWER_GAINED = - T.let( - :"follower.gained", - XTwitterScraper::Models::WebhookUpdateResponse::EventType::TaggedSymbol - ) - FOLLOWER_LOST = - T.let( - :"follower.lost", - XTwitterScraper::Models::WebhookUpdateResponse::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::Models::WebhookUpdateResponse::EventType::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/account_bulk_retry_params.rbi b/rbi/x_twitter_scraper/models/x/account_bulk_retry_params.rbi new file mode 100644 index 0000000..ed1b8b2 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/account_bulk_retry_params.rbi @@ -0,0 +1,34 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + class AccountBulkRetryParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + XTwitterScraper::X::AccountBulkRetryParams, + XTwitterScraper::Internal::AnyHash + ) + end + + sig do + params( + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(request_options: {}) + end + + sig do + override.returns({ request_options: XTwitterScraper::RequestOptions }) + end + def to_hash + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/account_bulk_retry_response.rbi b/rbi/x_twitter_scraper/models/x/account_bulk_retry_response.rbi new file mode 100644 index 0000000..90301cf --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/account_bulk_retry_response.rbi @@ -0,0 +1,32 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + class AccountBulkRetryResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::AccountBulkRetryResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + # Number of accounts cleared + sig { returns(Integer) } + attr_accessor :cleared + + sig { params(cleared: Integer).returns(T.attached_class) } + def self.new( + # Number of accounts cleared + cleared: + ) + end + + sig { override.returns({ cleared: Integer }) } + def to_hash + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/account_list_response.rbi b/rbi/x_twitter_scraper/models/x/account_list_response.rbi index e3e4462..aa53da0 100644 --- a/rbi/x_twitter_scraper/models/x/account_list_response.rbi +++ b/rbi/x_twitter_scraper/models/x/account_list_response.rbi @@ -12,88 +12,22 @@ module XTwitterScraper ) end - sig do - returns( - T::Array[XTwitterScraper::Models::X::AccountListResponse::Account] - ) - end + sig { returns(T::Array[XTwitterScraper::X::XAccount]) } attr_accessor :accounts sig do params( - accounts: - T::Array[ - XTwitterScraper::Models::X::AccountListResponse::Account::OrHash - ] + accounts: T::Array[XTwitterScraper::X::XAccount::OrHash] ).returns(T.attached_class) end def self.new(accounts:) end sig do - override.returns( - { - accounts: - T::Array[ - XTwitterScraper::Models::X::AccountListResponse::Account - ] - } - ) + override.returns({ accounts: T::Array[XTwitterScraper::X::XAccount] }) end def to_hash end - - class Account < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::AccountListResponse::Account, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(Time) } - attr_accessor :created_at - - sig { returns(String) } - attr_accessor :status - - sig { returns(String) } - attr_accessor :x_user_id - - sig { returns(String) } - attr_accessor :x_username - - # Linked X account summary with username and connection status. - sig do - params( - id: String, - created_at: Time, - status: String, - x_user_id: String, - x_username: String - ).returns(T.attached_class) - end - def self.new(id:, created_at:, status:, x_user_id:, x_username:) - end - - sig do - override.returns( - { - id: String, - created_at: Time, - status: String, - x_user_id: String, - x_username: String - } - ) - end - def to_hash - end - end end end end diff --git a/rbi/x_twitter_scraper/models/x/account_retrieve_response.rbi b/rbi/x_twitter_scraper/models/x/account_retrieve_response.rbi deleted file mode 100644 index 2d0450e..0000000 --- a/rbi/x_twitter_scraper/models/x/account_retrieve_response.rbi +++ /dev/null @@ -1,92 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class AccountRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::AccountRetrieveResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(Time) } - attr_accessor :created_at - - sig { returns(String) } - attr_accessor :status - - sig { returns(String) } - attr_accessor :x_user_id - - sig { returns(String) } - attr_accessor :x_username - - sig { returns(T.nilable(Time)) } - attr_reader :cookies_obtained_at - - sig { params(cookies_obtained_at: Time).void } - attr_writer :cookies_obtained_at - - sig { returns(T.nilable(String)) } - attr_reader :proxy_country - - sig { params(proxy_country: String).void } - attr_writer :proxy_country - - sig { returns(T.nilable(Time)) } - attr_reader :updated_at - - sig { params(updated_at: Time).void } - attr_writer :updated_at - - # Full X account details including proxy, cookies, and update timestamp. - sig do - params( - id: String, - created_at: Time, - status: String, - x_user_id: String, - x_username: String, - cookies_obtained_at: Time, - proxy_country: String, - updated_at: Time - ).returns(T.attached_class) - end - def self.new( - id:, - created_at:, - status:, - x_user_id:, - x_username:, - cookies_obtained_at: nil, - proxy_country: nil, - updated_at: nil - ) - end - - sig do - override.returns( - { - id: String, - created_at: Time, - status: String, - x_user_id: String, - x_username: String, - cookies_obtained_at: Time, - proxy_country: String, - updated_at: Time - } - ) - end - def to_hash - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/bookmark_list_response.rbi b/rbi/x_twitter_scraper/models/x/bookmark_list_response.rbi deleted file mode 100644 index 7fc2cea..0000000 --- a/rbi/x_twitter_scraper/models/x/bookmark_list_response.rbi +++ /dev/null @@ -1,244 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class BookmarkListResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::BookmarkListResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[XTwitterScraper::Models::X::BookmarkListResponse::Tweet] - ) - end - attr_accessor :tweets - - # Paginated list of tweets with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::BookmarkListResponse::Tweet::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, tweets:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::BookmarkListResponse::Tweet - ] - } - ) - end - def to_hash - end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::BookmarkListResponse::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :text - - sig do - returns( - T.nilable( - XTwitterScraper::Models::X::BookmarkListResponse::Tweet::Author - ) - ) - end - attr_reader :author - - sig do - params( - author: - XTwitterScraper::Models::X::BookmarkListResponse::Tweet::Author::OrHash - ).void - end - attr_writer :author - - sig { returns(T.nilable(Integer)) } - attr_reader :bookmark_count - - sig { params(bookmark_count: Integer).void } - attr_writer :bookmark_count - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - # True for Note Tweets (long-form content, up to 25,000 characters) - sig { returns(T.nilable(T::Boolean)) } - attr_reader :is_note_tweet - - sig { params(is_note_tweet: T::Boolean).void } - attr_writer :is_note_tweet - - sig { returns(T.nilable(Integer)) } - attr_reader :like_count - - sig { params(like_count: Integer).void } - attr_writer :like_count - - sig { returns(T.nilable(Integer)) } - attr_reader :quote_count - - sig { params(quote_count: Integer).void } - attr_writer :quote_count - - sig { returns(T.nilable(Integer)) } - attr_reader :reply_count - - sig { params(reply_count: Integer).void } - attr_writer :reply_count - - sig { returns(T.nilable(Integer)) } - attr_reader :retweet_count - - sig { params(retweet_count: Integer).void } - attr_writer :retweet_count - - sig { returns(T.nilable(Integer)) } - attr_reader :view_count - - sig { params(view_count: Integer).void } - attr_writer :view_count - - # Tweet returned from search results with inline author info. - sig do - params( - id: String, - text: String, - author: - XTwitterScraper::Models::X::BookmarkListResponse::Tweet::Author::OrHash, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - ).returns(T.attached_class) - end - def self.new( - id:, - text:, - author: nil, - bookmark_count: nil, - created_at: nil, - # True for Note Tweets (long-form content, up to 25,000 characters) - is_note_tweet: nil, - like_count: nil, - quote_count: nil, - reply_count: nil, - retweet_count: nil, - view_count: nil - ) - end - - sig do - override.returns( - { - id: String, - text: String, - author: - XTwitterScraper::Models::X::BookmarkListResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - ) - end - def to_hash - end - - class Author < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::BookmarkListResponse::Tweet::Author, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - sig do - params( - id: String, - name: String, - username: String, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new(id:, name:, username:, verified: nil) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/communities/join_create_response.rbi b/rbi/x_twitter_scraper/models/x/communities/join_create_response.rbi deleted file mode 100644 index 636539c..0000000 --- a/rbi/x_twitter_scraper/models/x/communities/join_create_response.rbi +++ /dev/null @@ -1,51 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - module Communities - class JoinCreateResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::Communities::JoinCreateResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :community_id - - sig { returns(String) } - attr_accessor :community_name - - sig { returns(T::Boolean) } - attr_accessor :success - - # Result of a community join or leave action. - sig do - params( - community_id: String, - community_name: String, - success: T::Boolean - ).returns(T.attached_class) - end - def self.new(community_id:, community_name:, success: true) - end - - sig do - override.returns( - { - community_id: String, - community_name: String, - success: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/communities/join_delete_all_response.rbi b/rbi/x_twitter_scraper/models/x/communities/join_delete_all_response.rbi deleted file mode 100644 index fd775fe..0000000 --- a/rbi/x_twitter_scraper/models/x/communities/join_delete_all_response.rbi +++ /dev/null @@ -1,51 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - module Communities - class JoinDeleteAllResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::Communities::JoinDeleteAllResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :community_id - - sig { returns(String) } - attr_accessor :community_name - - sig { returns(T::Boolean) } - attr_accessor :success - - # Result of a community join or leave action. - sig do - params( - community_id: String, - community_name: String, - success: T::Boolean - ).returns(T.attached_class) - end - def self.new(community_id:, community_name:, success: true) - end - - sig do - override.returns( - { - community_id: String, - community_name: String, - success: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rbi b/rbi/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rbi new file mode 100644 index 0000000..49b81e6 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rbi @@ -0,0 +1,59 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + module Communities + class TweetListByCommunityParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + XTwitterScraper::X::Communities::TweetListByCommunityParams, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + # Pagination cursor for community tweets + sig { returns(T.nilable(String)) } + attr_reader :cursor + + sig { params(cursor: String).void } + attr_writer :cursor + + sig do + params( + id: String, + cursor: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + id:, + # Pagination cursor for community tweets + cursor: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + id: String, + cursor: String, + request_options: XTwitterScraper::RequestOptions + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/communities/tweet_list_response.rbi b/rbi/x_twitter_scraper/models/x/communities/tweet_list_response.rbi deleted file mode 100644 index 4929b89..0000000 --- a/rbi/x_twitter_scraper/models/x/communities/tweet_list_response.rbi +++ /dev/null @@ -1,248 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - module Communities - class TweetListResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::Communities::TweetListResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[ - XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet - ] - ) - end - attr_accessor :tweets - - # Paginated list of tweets with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, tweets:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet - ] - } - ) - end - def to_hash - end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :text - - sig do - returns( - T.nilable( - XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author - ) - ) - end - attr_reader :author - - sig do - params( - author: - XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author::OrHash - ).void - end - attr_writer :author - - sig { returns(T.nilable(Integer)) } - attr_reader :bookmark_count - - sig { params(bookmark_count: Integer).void } - attr_writer :bookmark_count - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - # True for Note Tweets (long-form content, up to 25,000 characters) - sig { returns(T.nilable(T::Boolean)) } - attr_reader :is_note_tweet - - sig { params(is_note_tweet: T::Boolean).void } - attr_writer :is_note_tweet - - sig { returns(T.nilable(Integer)) } - attr_reader :like_count - - sig { params(like_count: Integer).void } - attr_writer :like_count - - sig { returns(T.nilable(Integer)) } - attr_reader :quote_count - - sig { params(quote_count: Integer).void } - attr_writer :quote_count - - sig { returns(T.nilable(Integer)) } - attr_reader :reply_count - - sig { params(reply_count: Integer).void } - attr_writer :reply_count - - sig { returns(T.nilable(Integer)) } - attr_reader :retweet_count - - sig { params(retweet_count: Integer).void } - attr_writer :retweet_count - - sig { returns(T.nilable(Integer)) } - attr_reader :view_count - - sig { params(view_count: Integer).void } - attr_writer :view_count - - # Tweet returned from search results with inline author info. - sig do - params( - id: String, - text: String, - author: - XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author::OrHash, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - ).returns(T.attached_class) - end - def self.new( - id:, - text:, - author: nil, - bookmark_count: nil, - created_at: nil, - # True for Note Tweets (long-form content, up to 25,000 characters) - is_note_tweet: nil, - like_count: nil, - quote_count: nil, - reply_count: nil, - retweet_count: nil, - view_count: nil - ) - end - - sig do - override.returns( - { - id: String, - text: String, - author: - XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - ) - end - def to_hash - end - - class Author < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - sig do - params( - id: String, - name: String, - username: String, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new(id:, name:, username:, verified: nil) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/community_retrieve_members_response.rbi b/rbi/x_twitter_scraper/models/x/community_retrieve_members_response.rbi deleted file mode 100644 index 67626bf..0000000 --- a/rbi/x_twitter_scraper/models/x/community_retrieve_members_response.rbi +++ /dev/null @@ -1,179 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class CommunityRetrieveMembersResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::CommunityRetrieveMembersResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[ - XTwitterScraper::Models::X::CommunityRetrieveMembersResponse::User - ] - ) - end - attr_accessor :users - - # Paginated list of user profiles with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::CommunityRetrieveMembersResponse::User::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, users:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::CommunityRetrieveMembersResponse::User - ] - } - ) - end - def to_hash - end - - class User < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::CommunityRetrieveMembersResponse::User, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - sig { returns(T.nilable(String)) } - attr_reader :description - - sig { params(description: String).void } - attr_writer :description - - sig { returns(T.nilable(Integer)) } - attr_reader :followers - - sig { params(followers: Integer).void } - attr_writer :followers - - sig { returns(T.nilable(Integer)) } - attr_reader :following - - sig { params(following: Integer).void } - attr_writer :following - - sig { returns(T.nilable(String)) } - attr_reader :location - - sig { params(location: String).void } - attr_writer :location - - sig { returns(T.nilable(String)) } - attr_reader :profile_picture - - sig { params(profile_picture: String).void } - attr_writer :profile_picture - - sig { returns(T.nilable(Integer)) } - attr_reader :statuses_count - - sig { params(statuses_count: Integer).void } - attr_writer :statuses_count - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - # X user profile with bio, follower counts, and verification status. - sig do - params( - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new( - id:, - name:, - username:, - created_at: nil, - description: nil, - followers: nil, - following: nil, - location: nil, - profile_picture: nil, - statuses_count: nil, - verified: nil - ) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/community_retrieve_moderators_response.rbi b/rbi/x_twitter_scraper/models/x/community_retrieve_moderators_response.rbi deleted file mode 100644 index b6ebd74..0000000 --- a/rbi/x_twitter_scraper/models/x/community_retrieve_moderators_response.rbi +++ /dev/null @@ -1,179 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class CommunityRetrieveModeratorsResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[ - XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse::User - ] - ) - end - attr_accessor :users - - # Paginated list of user profiles with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse::User::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, users:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse::User - ] - } - ) - end - def to_hash - end - - class User < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse::User, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - sig { returns(T.nilable(String)) } - attr_reader :description - - sig { params(description: String).void } - attr_writer :description - - sig { returns(T.nilable(Integer)) } - attr_reader :followers - - sig { params(followers: Integer).void } - attr_writer :followers - - sig { returns(T.nilable(Integer)) } - attr_reader :following - - sig { params(following: Integer).void } - attr_writer :following - - sig { returns(T.nilable(String)) } - attr_reader :location - - sig { params(location: String).void } - attr_writer :location - - sig { returns(T.nilable(String)) } - attr_reader :profile_picture - - sig { params(profile_picture: String).void } - attr_writer :profile_picture - - sig { returns(T.nilable(Integer)) } - attr_reader :statuses_count - - sig { params(statuses_count: Integer).void } - attr_writer :statuses_count - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - # X user profile with bio, follower counts, and verification status. - sig do - params( - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new( - id:, - name:, - username:, - created_at: nil, - description: nil, - followers: nil, - following: nil, - location: nil, - profile_picture: nil, - statuses_count: nil, - verified: nil - ) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/community_retrieve_search_response.rbi b/rbi/x_twitter_scraper/models/x/community_retrieve_search_response.rbi deleted file mode 100644 index f45de4a..0000000 --- a/rbi/x_twitter_scraper/models/x/community_retrieve_search_response.rbi +++ /dev/null @@ -1,246 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class CommunityRetrieveSearchResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::CommunityRetrieveSearchResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[ - XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet - ] - ) - end - attr_accessor :tweets - - # Paginated list of tweets with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, tweets:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet - ] - } - ) - end - def to_hash - end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :text - - sig do - returns( - T.nilable( - XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author - ) - ) - end - attr_reader :author - - sig do - params( - author: - XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author::OrHash - ).void - end - attr_writer :author - - sig { returns(T.nilable(Integer)) } - attr_reader :bookmark_count - - sig { params(bookmark_count: Integer).void } - attr_writer :bookmark_count - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - # True for Note Tweets (long-form content, up to 25,000 characters) - sig { returns(T.nilable(T::Boolean)) } - attr_reader :is_note_tweet - - sig { params(is_note_tweet: T::Boolean).void } - attr_writer :is_note_tweet - - sig { returns(T.nilable(Integer)) } - attr_reader :like_count - - sig { params(like_count: Integer).void } - attr_writer :like_count - - sig { returns(T.nilable(Integer)) } - attr_reader :quote_count - - sig { params(quote_count: Integer).void } - attr_writer :quote_count - - sig { returns(T.nilable(Integer)) } - attr_reader :reply_count - - sig { params(reply_count: Integer).void } - attr_writer :reply_count - - sig { returns(T.nilable(Integer)) } - attr_reader :retweet_count - - sig { params(retweet_count: Integer).void } - attr_writer :retweet_count - - sig { returns(T.nilable(Integer)) } - attr_reader :view_count - - sig { params(view_count: Integer).void } - attr_writer :view_count - - # Tweet returned from search results with inline author info. - sig do - params( - id: String, - text: String, - author: - XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author::OrHash, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - ).returns(T.attached_class) - end - def self.new( - id:, - text:, - author: nil, - bookmark_count: nil, - created_at: nil, - # True for Note Tweets (long-form content, up to 25,000 characters) - is_note_tweet: nil, - like_count: nil, - quote_count: nil, - reply_count: nil, - retweet_count: nil, - view_count: nil - ) - end - - sig do - override.returns( - { - id: String, - text: String, - author: - XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - ) - end - def to_hash - end - - class Author < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - sig do - params( - id: String, - name: String, - username: String, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new(id:, name:, username:, verified: nil) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/list_retrieve_followers_response.rbi b/rbi/x_twitter_scraper/models/x/list_retrieve_followers_response.rbi deleted file mode 100644 index d6286ad..0000000 --- a/rbi/x_twitter_scraper/models/x/list_retrieve_followers_response.rbi +++ /dev/null @@ -1,179 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class ListRetrieveFollowersResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::ListRetrieveFollowersResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[ - XTwitterScraper::Models::X::ListRetrieveFollowersResponse::User - ] - ) - end - attr_accessor :users - - # Paginated list of user profiles with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::ListRetrieveFollowersResponse::User::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, users:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::ListRetrieveFollowersResponse::User - ] - } - ) - end - def to_hash - end - - class User < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::ListRetrieveFollowersResponse::User, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - sig { returns(T.nilable(String)) } - attr_reader :description - - sig { params(description: String).void } - attr_writer :description - - sig { returns(T.nilable(Integer)) } - attr_reader :followers - - sig { params(followers: Integer).void } - attr_writer :followers - - sig { returns(T.nilable(Integer)) } - attr_reader :following - - sig { params(following: Integer).void } - attr_writer :following - - sig { returns(T.nilable(String)) } - attr_reader :location - - sig { params(location: String).void } - attr_writer :location - - sig { returns(T.nilable(String)) } - attr_reader :profile_picture - - sig { params(profile_picture: String).void } - attr_writer :profile_picture - - sig { returns(T.nilable(Integer)) } - attr_reader :statuses_count - - sig { params(statuses_count: Integer).void } - attr_writer :statuses_count - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - # X user profile with bio, follower counts, and verification status. - sig do - params( - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new( - id:, - name:, - username:, - created_at: nil, - description: nil, - followers: nil, - following: nil, - location: nil, - profile_picture: nil, - statuses_count: nil, - verified: nil - ) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/list_retrieve_members_response.rbi b/rbi/x_twitter_scraper/models/x/list_retrieve_members_response.rbi deleted file mode 100644 index d8e5aa5..0000000 --- a/rbi/x_twitter_scraper/models/x/list_retrieve_members_response.rbi +++ /dev/null @@ -1,179 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class ListRetrieveMembersResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::ListRetrieveMembersResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[ - XTwitterScraper::Models::X::ListRetrieveMembersResponse::User - ] - ) - end - attr_accessor :users - - # Paginated list of user profiles with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::ListRetrieveMembersResponse::User::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, users:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::ListRetrieveMembersResponse::User - ] - } - ) - end - def to_hash - end - - class User < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::ListRetrieveMembersResponse::User, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - sig { returns(T.nilable(String)) } - attr_reader :description - - sig { params(description: String).void } - attr_writer :description - - sig { returns(T.nilable(Integer)) } - attr_reader :followers - - sig { params(followers: Integer).void } - attr_writer :followers - - sig { returns(T.nilable(Integer)) } - attr_reader :following - - sig { params(following: Integer).void } - attr_writer :following - - sig { returns(T.nilable(String)) } - attr_reader :location - - sig { params(location: String).void } - attr_writer :location - - sig { returns(T.nilable(String)) } - attr_reader :profile_picture - - sig { params(profile_picture: String).void } - attr_writer :profile_picture - - sig { returns(T.nilable(Integer)) } - attr_reader :statuses_count - - sig { params(statuses_count: Integer).void } - attr_writer :statuses_count - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - # X user profile with bio, follower counts, and verification status. - sig do - params( - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new( - id:, - name:, - username:, - created_at: nil, - description: nil, - followers: nil, - following: nil, - location: nil, - profile_picture: nil, - statuses_count: nil, - verified: nil - ) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/list_retrieve_tweets_response.rbi b/rbi/x_twitter_scraper/models/x/list_retrieve_tweets_response.rbi deleted file mode 100644 index 06b8ee1..0000000 --- a/rbi/x_twitter_scraper/models/x/list_retrieve_tweets_response.rbi +++ /dev/null @@ -1,246 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class ListRetrieveTweetsResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::ListRetrieveTweetsResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[ - XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet - ] - ) - end - attr_accessor :tweets - - # Paginated list of tweets with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, tweets:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet - ] - } - ) - end - def to_hash - end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :text - - sig do - returns( - T.nilable( - XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author - ) - ) - end - attr_reader :author - - sig do - params( - author: - XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author::OrHash - ).void - end - attr_writer :author - - sig { returns(T.nilable(Integer)) } - attr_reader :bookmark_count - - sig { params(bookmark_count: Integer).void } - attr_writer :bookmark_count - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - # True for Note Tweets (long-form content, up to 25,000 characters) - sig { returns(T.nilable(T::Boolean)) } - attr_reader :is_note_tweet - - sig { params(is_note_tweet: T::Boolean).void } - attr_writer :is_note_tweet - - sig { returns(T.nilable(Integer)) } - attr_reader :like_count - - sig { params(like_count: Integer).void } - attr_writer :like_count - - sig { returns(T.nilable(Integer)) } - attr_reader :quote_count - - sig { params(quote_count: Integer).void } - attr_writer :quote_count - - sig { returns(T.nilable(Integer)) } - attr_reader :reply_count - - sig { params(reply_count: Integer).void } - attr_writer :reply_count - - sig { returns(T.nilable(Integer)) } - attr_reader :retweet_count - - sig { params(retweet_count: Integer).void } - attr_writer :retweet_count - - sig { returns(T.nilable(Integer)) } - attr_reader :view_count - - sig { params(view_count: Integer).void } - attr_writer :view_count - - # Tweet returned from search results with inline author info. - sig do - params( - id: String, - text: String, - author: - XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author::OrHash, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - ).returns(T.attached_class) - end - def self.new( - id:, - text:, - author: nil, - bookmark_count: nil, - created_at: nil, - # True for Note Tweets (long-form content, up to 25,000 characters) - is_note_tweet: nil, - like_count: nil, - quote_count: nil, - reply_count: nil, - retweet_count: nil, - view_count: nil - ) - end - - sig do - override.returns( - { - id: String, - text: String, - author: - XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - ) - end - def to_hash - end - - class Author < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - sig do - params( - id: String, - name: String, - username: String, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new(id:, name:, username:, verified: nil) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/tweet_delete_params.rbi b/rbi/x_twitter_scraper/models/x/tweet_delete_params.rbi new file mode 100644 index 0000000..ae02874 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/tweet_delete_params.rbi @@ -0,0 +1,54 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + class TweetDeleteParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + XTwitterScraper::X::TweetDeleteParams, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + # X account identifier (@username or account ID) + sig { returns(String) } + attr_accessor :account + + sig do + params( + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + id:, + # X account identifier (@username or account ID) + account:, + request_options: {} + ) + end + + sig do + override.returns( + { + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/tweet_delete_response.rbi b/rbi/x_twitter_scraper/models/x/tweet_delete_response.rbi new file mode 100644 index 0000000..93ac06e --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/tweet_delete_response.rbi @@ -0,0 +1,28 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + class TweetDeleteResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::TweetDeleteResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(T::Boolean) } + attr_accessor :success + + sig { params(success: T::Boolean).returns(T.attached_class) } + def self.new(success: true) + end + + sig { override.returns({ success: T::Boolean }) } + def to_hash + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/tweet_detail.rbi b/rbi/x_twitter_scraper/models/x/tweet_detail.rbi index b785a04..5e1e78d 100644 --- a/rbi/x_twitter_scraper/models/x/tweet_detail.rbi +++ b/rbi/x_twitter_scraper/models/x/tweet_detail.rbi @@ -198,7 +198,9 @@ module XTwitterScraper sig do returns( - T.nilable(XTwitterScraper::X::TweetDetail::Media::Type::OrSymbol) + T.nilable( + XTwitterScraper::X::TweetDetail::Media::Type::TaggedSymbol + ) ) end attr_reader :type @@ -230,7 +232,8 @@ module XTwitterScraper override.returns( { media_url: String, - type: XTwitterScraper::X::TweetDetail::Media::Type::OrSymbol, + type: + XTwitterScraper::X::TweetDetail::Media::Type::TaggedSymbol, url: String } ) diff --git a/rbi/x_twitter_scraper/models/x/tweet_get_favoriters_response.rbi b/rbi/x_twitter_scraper/models/x/tweet_get_favoriters_response.rbi deleted file mode 100644 index c7eda49..0000000 --- a/rbi/x_twitter_scraper/models/x/tweet_get_favoriters_response.rbi +++ /dev/null @@ -1,179 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class TweetGetFavoritersResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetGetFavoritersResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[ - XTwitterScraper::Models::X::TweetGetFavoritersResponse::User - ] - ) - end - attr_accessor :users - - # Paginated list of user profiles with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::TweetGetFavoritersResponse::User::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, users:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::TweetGetFavoritersResponse::User - ] - } - ) - end - def to_hash - end - - class User < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetGetFavoritersResponse::User, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - sig { returns(T.nilable(String)) } - attr_reader :description - - sig { params(description: String).void } - attr_writer :description - - sig { returns(T.nilable(Integer)) } - attr_reader :followers - - sig { params(followers: Integer).void } - attr_writer :followers - - sig { returns(T.nilable(Integer)) } - attr_reader :following - - sig { params(following: Integer).void } - attr_writer :following - - sig { returns(T.nilable(String)) } - attr_reader :location - - sig { params(location: String).void } - attr_writer :location - - sig { returns(T.nilable(String)) } - attr_reader :profile_picture - - sig { params(profile_picture: String).void } - attr_writer :profile_picture - - sig { returns(T.nilable(Integer)) } - attr_reader :statuses_count - - sig { params(statuses_count: Integer).void } - attr_writer :statuses_count - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - # X user profile with bio, follower counts, and verification status. - sig do - params( - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new( - id:, - name:, - username:, - created_at: nil, - description: nil, - followers: nil, - following: nil, - location: nil, - profile_picture: nil, - statuses_count: nil, - verified: nil - ) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/tweet_get_quotes_response.rbi b/rbi/x_twitter_scraper/models/x/tweet_get_quotes_response.rbi deleted file mode 100644 index bcead97..0000000 --- a/rbi/x_twitter_scraper/models/x/tweet_get_quotes_response.rbi +++ /dev/null @@ -1,244 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class TweetGetQuotesResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetGetQuotesResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet] - ) - end - attr_accessor :tweets - - # Paginated list of tweets with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, tweets:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet - ] - } - ) - end - def to_hash - end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :text - - sig do - returns( - T.nilable( - XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet::Author - ) - ) - end - attr_reader :author - - sig do - params( - author: - XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet::Author::OrHash - ).void - end - attr_writer :author - - sig { returns(T.nilable(Integer)) } - attr_reader :bookmark_count - - sig { params(bookmark_count: Integer).void } - attr_writer :bookmark_count - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - # True for Note Tweets (long-form content, up to 25,000 characters) - sig { returns(T.nilable(T::Boolean)) } - attr_reader :is_note_tweet - - sig { params(is_note_tweet: T::Boolean).void } - attr_writer :is_note_tweet - - sig { returns(T.nilable(Integer)) } - attr_reader :like_count - - sig { params(like_count: Integer).void } - attr_writer :like_count - - sig { returns(T.nilable(Integer)) } - attr_reader :quote_count - - sig { params(quote_count: Integer).void } - attr_writer :quote_count - - sig { returns(T.nilable(Integer)) } - attr_reader :reply_count - - sig { params(reply_count: Integer).void } - attr_writer :reply_count - - sig { returns(T.nilable(Integer)) } - attr_reader :retweet_count - - sig { params(retweet_count: Integer).void } - attr_writer :retweet_count - - sig { returns(T.nilable(Integer)) } - attr_reader :view_count - - sig { params(view_count: Integer).void } - attr_writer :view_count - - # Tweet returned from search results with inline author info. - sig do - params( - id: String, - text: String, - author: - XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet::Author::OrHash, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - ).returns(T.attached_class) - end - def self.new( - id:, - text:, - author: nil, - bookmark_count: nil, - created_at: nil, - # True for Note Tweets (long-form content, up to 25,000 characters) - is_note_tweet: nil, - like_count: nil, - quote_count: nil, - reply_count: nil, - retweet_count: nil, - view_count: nil - ) - end - - sig do - override.returns( - { - id: String, - text: String, - author: - XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - ) - end - def to_hash - end - - class Author < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet::Author, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - sig do - params( - id: String, - name: String, - username: String, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new(id:, name:, username:, verified: nil) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/tweet_get_replies_response.rbi b/rbi/x_twitter_scraper/models/x/tweet_get_replies_response.rbi deleted file mode 100644 index f4dc08a..0000000 --- a/rbi/x_twitter_scraper/models/x/tweet_get_replies_response.rbi +++ /dev/null @@ -1,244 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class TweetGetRepliesResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetGetRepliesResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet] - ) - end - attr_accessor :tweets - - # Paginated list of tweets with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, tweets:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet - ] - } - ) - end - def to_hash - end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :text - - sig do - returns( - T.nilable( - XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet::Author - ) - ) - end - attr_reader :author - - sig do - params( - author: - XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet::Author::OrHash - ).void - end - attr_writer :author - - sig { returns(T.nilable(Integer)) } - attr_reader :bookmark_count - - sig { params(bookmark_count: Integer).void } - attr_writer :bookmark_count - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - # True for Note Tweets (long-form content, up to 25,000 characters) - sig { returns(T.nilable(T::Boolean)) } - attr_reader :is_note_tweet - - sig { params(is_note_tweet: T::Boolean).void } - attr_writer :is_note_tweet - - sig { returns(T.nilable(Integer)) } - attr_reader :like_count - - sig { params(like_count: Integer).void } - attr_writer :like_count - - sig { returns(T.nilable(Integer)) } - attr_reader :quote_count - - sig { params(quote_count: Integer).void } - attr_writer :quote_count - - sig { returns(T.nilable(Integer)) } - attr_reader :reply_count - - sig { params(reply_count: Integer).void } - attr_writer :reply_count - - sig { returns(T.nilable(Integer)) } - attr_reader :retweet_count - - sig { params(retweet_count: Integer).void } - attr_writer :retweet_count - - sig { returns(T.nilable(Integer)) } - attr_reader :view_count - - sig { params(view_count: Integer).void } - attr_writer :view_count - - # Tweet returned from search results with inline author info. - sig do - params( - id: String, - text: String, - author: - XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet::Author::OrHash, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - ).returns(T.attached_class) - end - def self.new( - id:, - text:, - author: nil, - bookmark_count: nil, - created_at: nil, - # True for Note Tweets (long-form content, up to 25,000 characters) - is_note_tweet: nil, - like_count: nil, - quote_count: nil, - reply_count: nil, - retweet_count: nil, - view_count: nil - ) - end - - sig do - override.returns( - { - id: String, - text: String, - author: - XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - ) - end - def to_hash - end - - class Author < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet::Author, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - sig do - params( - id: String, - name: String, - username: String, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new(id:, name:, username:, verified: nil) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/tweet_get_retweeters_response.rbi b/rbi/x_twitter_scraper/models/x/tweet_get_retweeters_response.rbi deleted file mode 100644 index b1974f9..0000000 --- a/rbi/x_twitter_scraper/models/x/tweet_get_retweeters_response.rbi +++ /dev/null @@ -1,179 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class TweetGetRetweetersResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetGetRetweetersResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[ - XTwitterScraper::Models::X::TweetGetRetweetersResponse::User - ] - ) - end - attr_accessor :users - - # Paginated list of user profiles with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::TweetGetRetweetersResponse::User::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, users:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::TweetGetRetweetersResponse::User - ] - } - ) - end - def to_hash - end - - class User < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetGetRetweetersResponse::User, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - sig { returns(T.nilable(String)) } - attr_reader :description - - sig { params(description: String).void } - attr_writer :description - - sig { returns(T.nilable(Integer)) } - attr_reader :followers - - sig { params(followers: Integer).void } - attr_writer :followers - - sig { returns(T.nilable(Integer)) } - attr_reader :following - - sig { params(following: Integer).void } - attr_writer :following - - sig { returns(T.nilable(String)) } - attr_reader :location - - sig { params(location: String).void } - attr_writer :location - - sig { returns(T.nilable(String)) } - attr_reader :profile_picture - - sig { params(profile_picture: String).void } - attr_writer :profile_picture - - sig { returns(T.nilable(Integer)) } - attr_reader :statuses_count - - sig { params(statuses_count: Integer).void } - attr_writer :statuses_count - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - # X user profile with bio, follower counts, and verification status. - sig do - params( - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new( - id:, - name:, - username:, - created_at: nil, - description: nil, - followers: nil, - following: nil, - location: nil, - profile_picture: nil, - statuses_count: nil, - verified: nil - ) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/tweet_get_thread_response.rbi b/rbi/x_twitter_scraper/models/x/tweet_get_thread_response.rbi deleted file mode 100644 index b9eb24c..0000000 --- a/rbi/x_twitter_scraper/models/x/tweet_get_thread_response.rbi +++ /dev/null @@ -1,244 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class TweetGetThreadResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetGetThreadResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet] - ) - end - attr_accessor :tweets - - # Paginated list of tweets with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, tweets:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet - ] - } - ) - end - def to_hash - end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :text - - sig do - returns( - T.nilable( - XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet::Author - ) - ) - end - attr_reader :author - - sig do - params( - author: - XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet::Author::OrHash - ).void - end - attr_writer :author - - sig { returns(T.nilable(Integer)) } - attr_reader :bookmark_count - - sig { params(bookmark_count: Integer).void } - attr_writer :bookmark_count - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - # True for Note Tweets (long-form content, up to 25,000 characters) - sig { returns(T.nilable(T::Boolean)) } - attr_reader :is_note_tweet - - sig { params(is_note_tweet: T::Boolean).void } - attr_writer :is_note_tweet - - sig { returns(T.nilable(Integer)) } - attr_reader :like_count - - sig { params(like_count: Integer).void } - attr_writer :like_count - - sig { returns(T.nilable(Integer)) } - attr_reader :quote_count - - sig { params(quote_count: Integer).void } - attr_writer :quote_count - - sig { returns(T.nilable(Integer)) } - attr_reader :reply_count - - sig { params(reply_count: Integer).void } - attr_writer :reply_count - - sig { returns(T.nilable(Integer)) } - attr_reader :retweet_count - - sig { params(retweet_count: Integer).void } - attr_writer :retweet_count - - sig { returns(T.nilable(Integer)) } - attr_reader :view_count - - sig { params(view_count: Integer).void } - attr_writer :view_count - - # Tweet returned from search results with inline author info. - sig do - params( - id: String, - text: String, - author: - XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet::Author::OrHash, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - ).returns(T.attached_class) - end - def self.new( - id:, - text:, - author: nil, - bookmark_count: nil, - created_at: nil, - # True for Note Tweets (long-form content, up to 25,000 characters) - is_note_tweet: nil, - like_count: nil, - quote_count: nil, - reply_count: nil, - retweet_count: nil, - view_count: nil - ) - end - - sig do - override.returns( - { - id: String, - text: String, - author: - XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - ) - end - def to_hash - end - - class Author < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet::Author, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - sig do - params( - id: String, - name: String, - username: String, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new(id:, name:, username:, verified: nil) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/tweet_list_response.rbi b/rbi/x_twitter_scraper/models/x/tweet_list_response.rbi deleted file mode 100644 index 9a22d3b..0000000 --- a/rbi/x_twitter_scraper/models/x/tweet_list_response.rbi +++ /dev/null @@ -1,242 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class TweetListResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetListResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[XTwitterScraper::Models::X::TweetListResponse::Tweet] - ) - end - attr_accessor :tweets - - # Paginated list of tweets with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::TweetListResponse::Tweet::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, tweets:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[XTwitterScraper::Models::X::TweetListResponse::Tweet] - } - ) - end - def to_hash - end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetListResponse::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :text - - sig do - returns( - T.nilable( - XTwitterScraper::Models::X::TweetListResponse::Tweet::Author - ) - ) - end - attr_reader :author - - sig do - params( - author: - XTwitterScraper::Models::X::TweetListResponse::Tweet::Author::OrHash - ).void - end - attr_writer :author - - sig { returns(T.nilable(Integer)) } - attr_reader :bookmark_count - - sig { params(bookmark_count: Integer).void } - attr_writer :bookmark_count - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - # True for Note Tweets (long-form content, up to 25,000 characters) - sig { returns(T.nilable(T::Boolean)) } - attr_reader :is_note_tweet - - sig { params(is_note_tweet: T::Boolean).void } - attr_writer :is_note_tweet - - sig { returns(T.nilable(Integer)) } - attr_reader :like_count - - sig { params(like_count: Integer).void } - attr_writer :like_count - - sig { returns(T.nilable(Integer)) } - attr_reader :quote_count - - sig { params(quote_count: Integer).void } - attr_writer :quote_count - - sig { returns(T.nilable(Integer)) } - attr_reader :reply_count - - sig { params(reply_count: Integer).void } - attr_writer :reply_count - - sig { returns(T.nilable(Integer)) } - attr_reader :retweet_count - - sig { params(retweet_count: Integer).void } - attr_writer :retweet_count - - sig { returns(T.nilable(Integer)) } - attr_reader :view_count - - sig { params(view_count: Integer).void } - attr_writer :view_count - - # Tweet returned from search results with inline author info. - sig do - params( - id: String, - text: String, - author: - XTwitterScraper::Models::X::TweetListResponse::Tweet::Author::OrHash, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - ).returns(T.attached_class) - end - def self.new( - id:, - text:, - author: nil, - bookmark_count: nil, - created_at: nil, - # True for Note Tweets (long-form content, up to 25,000 characters) - is_note_tweet: nil, - like_count: nil, - quote_count: nil, - reply_count: nil, - retweet_count: nil, - view_count: nil - ) - end - - sig do - override.returns( - { - id: String, - text: String, - author: - XTwitterScraper::Models::X::TweetListResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - ) - end - def to_hash - end - - class Author < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetListResponse::Tweet::Author, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - sig do - params( - id: String, - name: String, - username: String, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new(id:, name:, username:, verified: nil) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/tweet_retrieve_params.rbi b/rbi/x_twitter_scraper/models/x/tweet_retrieve_params.rbi new file mode 100644 index 0000000..6db414d --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/tweet_retrieve_params.rbi @@ -0,0 +1,40 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + class TweetRetrieveParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + XTwitterScraper::X::TweetRetrieveParams, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig do + params( + id: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(id:, request_options: {}) + end + + sig do + override.returns( + { id: String, request_options: XTwitterScraper::RequestOptions } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/tweet_retrieve_response.rbi b/rbi/x_twitter_scraper/models/x/tweet_retrieve_response.rbi new file mode 100644 index 0000000..c906d98 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/tweet_retrieve_response.rbi @@ -0,0 +1,56 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + class TweetRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::TweetRetrieveResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + # Full tweet with text, engagement metrics, media, and metadata. + sig { returns(XTwitterScraper::X::TweetDetail) } + attr_reader :tweet + + sig { params(tweet: XTwitterScraper::X::TweetDetail::OrHash).void } + attr_writer :tweet + + # Author of a tweet with follower count and verification status. + sig { returns(T.nilable(XTwitterScraper::X::TweetAuthor)) } + attr_reader :author + + sig { params(author: XTwitterScraper::X::TweetAuthor::OrHash).void } + attr_writer :author + + sig do + params( + tweet: XTwitterScraper::X::TweetDetail::OrHash, + author: XTwitterScraper::X::TweetAuthor::OrHash + ).returns(T.attached_class) + end + def self.new( + # Full tweet with text, engagement metrics, media, and metadata. + tweet:, + # Author of a tweet with follower count and verification status. + author: nil + ) + end + + sig do + override.returns( + { + tweet: XTwitterScraper::X::TweetDetail, + author: XTwitterScraper::X::TweetAuthor + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/tweet_search_response.rbi b/rbi/x_twitter_scraper/models/x/tweet_search_response.rbi deleted file mode 100644 index 79575fd..0000000 --- a/rbi/x_twitter_scraper/models/x/tweet_search_response.rbi +++ /dev/null @@ -1,242 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class TweetSearchResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetSearchResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[XTwitterScraper::Models::X::TweetSearchResponse::Tweet] - ) - end - attr_accessor :tweets - - # Paginated list of tweets with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::TweetSearchResponse::Tweet::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, tweets:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[XTwitterScraper::Models::X::TweetSearchResponse::Tweet] - } - ) - end - def to_hash - end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetSearchResponse::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :text - - sig do - returns( - T.nilable( - XTwitterScraper::Models::X::TweetSearchResponse::Tweet::Author - ) - ) - end - attr_reader :author - - sig do - params( - author: - XTwitterScraper::Models::X::TweetSearchResponse::Tweet::Author::OrHash - ).void - end - attr_writer :author - - sig { returns(T.nilable(Integer)) } - attr_reader :bookmark_count - - sig { params(bookmark_count: Integer).void } - attr_writer :bookmark_count - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - # True for Note Tweets (long-form content, up to 25,000 characters) - sig { returns(T.nilable(T::Boolean)) } - attr_reader :is_note_tweet - - sig { params(is_note_tweet: T::Boolean).void } - attr_writer :is_note_tweet - - sig { returns(T.nilable(Integer)) } - attr_reader :like_count - - sig { params(like_count: Integer).void } - attr_writer :like_count - - sig { returns(T.nilable(Integer)) } - attr_reader :quote_count - - sig { params(quote_count: Integer).void } - attr_writer :quote_count - - sig { returns(T.nilable(Integer)) } - attr_reader :reply_count - - sig { params(reply_count: Integer).void } - attr_writer :reply_count - - sig { returns(T.nilable(Integer)) } - attr_reader :retweet_count - - sig { params(retweet_count: Integer).void } - attr_writer :retweet_count - - sig { returns(T.nilable(Integer)) } - attr_reader :view_count - - sig { params(view_count: Integer).void } - attr_writer :view_count - - # Tweet returned from search results with inline author info. - sig do - params( - id: String, - text: String, - author: - XTwitterScraper::Models::X::TweetSearchResponse::Tweet::Author::OrHash, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - ).returns(T.attached_class) - end - def self.new( - id:, - text:, - author: nil, - bookmark_count: nil, - created_at: nil, - # True for Note Tweets (long-form content, up to 25,000 characters) - is_note_tweet: nil, - like_count: nil, - quote_count: nil, - reply_count: nil, - retweet_count: nil, - view_count: nil - ) - end - - sig do - override.returns( - { - id: String, - text: String, - author: - XTwitterScraper::Models::X::TweetSearchResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - ) - end - def to_hash - end - - class Author < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::TweetSearchResponse::Tweet::Author, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - sig do - params( - id: String, - name: String, - username: String, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new(id:, name:, username:, verified: nil) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/tweets/like_create_params.rbi b/rbi/x_twitter_scraper/models/x/tweets/like_create_params.rbi new file mode 100644 index 0000000..09fd369 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/tweets/like_create_params.rbi @@ -0,0 +1,56 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + module Tweets + class LikeCreateParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + XTwitterScraper::X::Tweets::LikeCreateParams, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + # X account identifier (@username or account ID) + sig { returns(String) } + attr_accessor :account + + sig do + params( + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + id:, + # X account identifier (@username or account ID) + account:, + request_options: {} + ) + end + + sig do + override.returns( + { + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/tweets/like_create_response.rbi b/rbi/x_twitter_scraper/models/x/tweets/like_create_response.rbi new file mode 100644 index 0000000..f656885 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/tweets/like_create_response.rbi @@ -0,0 +1,30 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + module Tweets + class LikeCreateResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::Tweets::LikeCreateResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(T::Boolean) } + attr_accessor :success + + sig { params(success: T::Boolean).returns(T.attached_class) } + def self.new(success: true) + end + + sig { override.returns({ success: T::Boolean }) } + def to_hash + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/tweets/like_delete_params.rbi b/rbi/x_twitter_scraper/models/x/tweets/like_delete_params.rbi new file mode 100644 index 0000000..393b775 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/tweets/like_delete_params.rbi @@ -0,0 +1,56 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + module Tweets + class LikeDeleteParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + XTwitterScraper::X::Tweets::LikeDeleteParams, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + # X account identifier (@username or account ID) + sig { returns(String) } + attr_accessor :account + + sig do + params( + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + id:, + # X account identifier (@username or account ID) + account:, + request_options: {} + ) + end + + sig do + override.returns( + { + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/tweets/like_delete_response.rbi b/rbi/x_twitter_scraper/models/x/tweets/like_delete_response.rbi new file mode 100644 index 0000000..0c22e81 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/tweets/like_delete_response.rbi @@ -0,0 +1,30 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + module Tweets + class LikeDeleteResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::Tweets::LikeDeleteResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(T::Boolean) } + attr_accessor :success + + sig { params(success: T::Boolean).returns(T.attached_class) } + def self.new(success: true) + end + + sig { override.returns({ success: T::Boolean }) } + def to_hash + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/tweets/retweet_create_params.rbi b/rbi/x_twitter_scraper/models/x/tweets/retweet_create_params.rbi new file mode 100644 index 0000000..0e04b76 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/tweets/retweet_create_params.rbi @@ -0,0 +1,56 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + module Tweets + class RetweetCreateParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + XTwitterScraper::X::Tweets::RetweetCreateParams, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + # X account identifier (@username or account ID) + sig { returns(String) } + attr_accessor :account + + sig do + params( + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + id:, + # X account identifier (@username or account ID) + account:, + request_options: {} + ) + end + + sig do + override.returns( + { + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/tweets/retweet_create_response.rbi b/rbi/x_twitter_scraper/models/x/tweets/retweet_create_response.rbi new file mode 100644 index 0000000..ac68181 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/tweets/retweet_create_response.rbi @@ -0,0 +1,30 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + module Tweets + class RetweetCreateResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::Tweets::RetweetCreateResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(T::Boolean) } + attr_accessor :success + + sig { params(success: T::Boolean).returns(T.attached_class) } + def self.new(success: true) + end + + sig { override.returns({ success: T::Boolean }) } + def to_hash + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbi b/rbi/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbi new file mode 100644 index 0000000..255a298 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbi @@ -0,0 +1,56 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + module Tweets + class RetweetDeleteParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + XTwitterScraper::X::Tweets::RetweetDeleteParams, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + # X account identifier (@username or account ID) + sig { returns(String) } + attr_accessor :account + + sig do + params( + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + id:, + # X account identifier (@username or account ID) + account:, + request_options: {} + ) + end + + sig do + override.returns( + { + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbi b/rbi/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbi new file mode 100644 index 0000000..7f84a36 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbi @@ -0,0 +1,30 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + module Tweets + class RetweetDeleteResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::Tweets::RetweetDeleteResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(T::Boolean) } + attr_accessor :success + + sig { params(success: T::Boolean).returns(T.attached_class) } + def self.new(success: true) + end + + sig { override.returns({ success: T::Boolean }) } + def to_hash + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_batch_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_batch_response.rbi deleted file mode 100644 index 0bd921c..0000000 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_batch_response.rbi +++ /dev/null @@ -1,179 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class UserRetrieveBatchResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveBatchResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[ - XTwitterScraper::Models::X::UserRetrieveBatchResponse::User - ] - ) - end - attr_accessor :users - - # Paginated list of user profiles with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::UserRetrieveBatchResponse::User::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, users:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::UserRetrieveBatchResponse::User - ] - } - ) - end - def to_hash - end - - class User < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveBatchResponse::User, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - sig { returns(T.nilable(String)) } - attr_reader :description - - sig { params(description: String).void } - attr_writer :description - - sig { returns(T.nilable(Integer)) } - attr_reader :followers - - sig { params(followers: Integer).void } - attr_writer :followers - - sig { returns(T.nilable(Integer)) } - attr_reader :following - - sig { params(following: Integer).void } - attr_writer :following - - sig { returns(T.nilable(String)) } - attr_reader :location - - sig { params(location: String).void } - attr_writer :location - - sig { returns(T.nilable(String)) } - attr_reader :profile_picture - - sig { params(profile_picture: String).void } - attr_writer :profile_picture - - sig { returns(T.nilable(Integer)) } - attr_reader :statuses_count - - sig { params(statuses_count: Integer).void } - attr_writer :statuses_count - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - # X user profile with bio, follower counts, and verification status. - sig do - params( - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new( - id:, - name:, - username:, - created_at: nil, - description: nil, - followers: nil, - following: nil, - location: nil, - profile_picture: nil, - statuses_count: nil, - verified: nil - ) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_followers_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_followers_response.rbi deleted file mode 100644 index 8299cc8..0000000 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_followers_response.rbi +++ /dev/null @@ -1,179 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class UserRetrieveFollowersResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveFollowersResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[ - XTwitterScraper::Models::X::UserRetrieveFollowersResponse::User - ] - ) - end - attr_accessor :users - - # Paginated list of user profiles with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::UserRetrieveFollowersResponse::User::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, users:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::UserRetrieveFollowersResponse::User - ] - } - ) - end - def to_hash - end - - class User < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveFollowersResponse::User, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - sig { returns(T.nilable(String)) } - attr_reader :description - - sig { params(description: String).void } - attr_writer :description - - sig { returns(T.nilable(Integer)) } - attr_reader :followers - - sig { params(followers: Integer).void } - attr_writer :followers - - sig { returns(T.nilable(Integer)) } - attr_reader :following - - sig { params(following: Integer).void } - attr_writer :following - - sig { returns(T.nilable(String)) } - attr_reader :location - - sig { params(location: String).void } - attr_writer :location - - sig { returns(T.nilable(String)) } - attr_reader :profile_picture - - sig { params(profile_picture: String).void } - attr_writer :profile_picture - - sig { returns(T.nilable(Integer)) } - attr_reader :statuses_count - - sig { params(statuses_count: Integer).void } - attr_writer :statuses_count - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - # X user profile with bio, follower counts, and verification status. - sig do - params( - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new( - id:, - name:, - username:, - created_at: nil, - description: nil, - followers: nil, - following: nil, - location: nil, - profile_picture: nil, - statuses_count: nil, - verified: nil - ) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_followers_you_know_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_followers_you_know_response.rbi deleted file mode 100644 index fb31c46..0000000 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_followers_you_know_response.rbi +++ /dev/null @@ -1,179 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class UserRetrieveFollowersYouKnowResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveFollowersYouKnowResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[ - XTwitterScraper::Models::X::UserRetrieveFollowersYouKnowResponse::User - ] - ) - end - attr_accessor :users - - # Paginated list of user profiles with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::UserRetrieveFollowersYouKnowResponse::User::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, users:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::UserRetrieveFollowersYouKnowResponse::User - ] - } - ) - end - def to_hash - end - - class User < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveFollowersYouKnowResponse::User, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - sig { returns(T.nilable(String)) } - attr_reader :description - - sig { params(description: String).void } - attr_writer :description - - sig { returns(T.nilable(Integer)) } - attr_reader :followers - - sig { params(followers: Integer).void } - attr_writer :followers - - sig { returns(T.nilable(Integer)) } - attr_reader :following - - sig { params(following: Integer).void } - attr_writer :following - - sig { returns(T.nilable(String)) } - attr_reader :location - - sig { params(location: String).void } - attr_writer :location - - sig { returns(T.nilable(String)) } - attr_reader :profile_picture - - sig { params(profile_picture: String).void } - attr_writer :profile_picture - - sig { returns(T.nilable(Integer)) } - attr_reader :statuses_count - - sig { params(statuses_count: Integer).void } - attr_writer :statuses_count - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - # X user profile with bio, follower counts, and verification status. - sig do - params( - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new( - id:, - name:, - username:, - created_at: nil, - description: nil, - followers: nil, - following: nil, - location: nil, - profile_picture: nil, - statuses_count: nil, - verified: nil - ) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_following_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_following_response.rbi deleted file mode 100644 index 6098294..0000000 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_following_response.rbi +++ /dev/null @@ -1,179 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class UserRetrieveFollowingResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveFollowingResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[ - XTwitterScraper::Models::X::UserRetrieveFollowingResponse::User - ] - ) - end - attr_accessor :users - - # Paginated list of user profiles with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::UserRetrieveFollowingResponse::User::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, users:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::UserRetrieveFollowingResponse::User - ] - } - ) - end - def to_hash - end - - class User < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveFollowingResponse::User, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - sig { returns(T.nilable(String)) } - attr_reader :description - - sig { params(description: String).void } - attr_writer :description - - sig { returns(T.nilable(Integer)) } - attr_reader :followers - - sig { params(followers: Integer).void } - attr_writer :followers - - sig { returns(T.nilable(Integer)) } - attr_reader :following - - sig { params(following: Integer).void } - attr_writer :following - - sig { returns(T.nilable(String)) } - attr_reader :location - - sig { params(location: String).void } - attr_writer :location - - sig { returns(T.nilable(String)) } - attr_reader :profile_picture - - sig { params(profile_picture: String).void } - attr_writer :profile_picture - - sig { returns(T.nilable(Integer)) } - attr_reader :statuses_count - - sig { params(statuses_count: Integer).void } - attr_writer :statuses_count - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - # X user profile with bio, follower counts, and verification status. - sig do - params( - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new( - id:, - name:, - username:, - created_at: nil, - description: nil, - followers: nil, - following: nil, - location: nil, - profile_picture: nil, - statuses_count: nil, - verified: nil - ) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_likes_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_likes_response.rbi deleted file mode 100644 index 8735a2f..0000000 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_likes_response.rbi +++ /dev/null @@ -1,246 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class UserRetrieveLikesResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveLikesResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[ - XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet - ] - ) - end - attr_accessor :tweets - - # Paginated list of tweets with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, tweets:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet - ] - } - ) - end - def to_hash - end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :text - - sig do - returns( - T.nilable( - XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet::Author - ) - ) - end - attr_reader :author - - sig do - params( - author: - XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet::Author::OrHash - ).void - end - attr_writer :author - - sig { returns(T.nilable(Integer)) } - attr_reader :bookmark_count - - sig { params(bookmark_count: Integer).void } - attr_writer :bookmark_count - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - # True for Note Tweets (long-form content, up to 25,000 characters) - sig { returns(T.nilable(T::Boolean)) } - attr_reader :is_note_tweet - - sig { params(is_note_tweet: T::Boolean).void } - attr_writer :is_note_tweet - - sig { returns(T.nilable(Integer)) } - attr_reader :like_count - - sig { params(like_count: Integer).void } - attr_writer :like_count - - sig { returns(T.nilable(Integer)) } - attr_reader :quote_count - - sig { params(quote_count: Integer).void } - attr_writer :quote_count - - sig { returns(T.nilable(Integer)) } - attr_reader :reply_count - - sig { params(reply_count: Integer).void } - attr_writer :reply_count - - sig { returns(T.nilable(Integer)) } - attr_reader :retweet_count - - sig { params(retweet_count: Integer).void } - attr_writer :retweet_count - - sig { returns(T.nilable(Integer)) } - attr_reader :view_count - - sig { params(view_count: Integer).void } - attr_writer :view_count - - # Tweet returned from search results with inline author info. - sig do - params( - id: String, - text: String, - author: - XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet::Author::OrHash, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - ).returns(T.attached_class) - end - def self.new( - id:, - text:, - author: nil, - bookmark_count: nil, - created_at: nil, - # True for Note Tweets (long-form content, up to 25,000 characters) - is_note_tweet: nil, - like_count: nil, - quote_count: nil, - reply_count: nil, - retweet_count: nil, - view_count: nil - ) - end - - sig do - override.returns( - { - id: String, - text: String, - author: - XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - ) - end - def to_hash - end - - class Author < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet::Author, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - sig do - params( - id: String, - name: String, - username: String, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new(id:, name:, username:, verified: nil) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_media_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_media_response.rbi deleted file mode 100644 index 716efb9..0000000 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_media_response.rbi +++ /dev/null @@ -1,246 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class UserRetrieveMediaResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveMediaResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[ - XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet - ] - ) - end - attr_accessor :tweets - - # Paginated list of tweets with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, tweets:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet - ] - } - ) - end - def to_hash - end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :text - - sig do - returns( - T.nilable( - XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet::Author - ) - ) - end - attr_reader :author - - sig do - params( - author: - XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet::Author::OrHash - ).void - end - attr_writer :author - - sig { returns(T.nilable(Integer)) } - attr_reader :bookmark_count - - sig { params(bookmark_count: Integer).void } - attr_writer :bookmark_count - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - # True for Note Tweets (long-form content, up to 25,000 characters) - sig { returns(T.nilable(T::Boolean)) } - attr_reader :is_note_tweet - - sig { params(is_note_tweet: T::Boolean).void } - attr_writer :is_note_tweet - - sig { returns(T.nilable(Integer)) } - attr_reader :like_count - - sig { params(like_count: Integer).void } - attr_writer :like_count - - sig { returns(T.nilable(Integer)) } - attr_reader :quote_count - - sig { params(quote_count: Integer).void } - attr_writer :quote_count - - sig { returns(T.nilable(Integer)) } - attr_reader :reply_count - - sig { params(reply_count: Integer).void } - attr_writer :reply_count - - sig { returns(T.nilable(Integer)) } - attr_reader :retweet_count - - sig { params(retweet_count: Integer).void } - attr_writer :retweet_count - - sig { returns(T.nilable(Integer)) } - attr_reader :view_count - - sig { params(view_count: Integer).void } - attr_writer :view_count - - # Tweet returned from search results with inline author info. - sig do - params( - id: String, - text: String, - author: - XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet::Author::OrHash, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - ).returns(T.attached_class) - end - def self.new( - id:, - text:, - author: nil, - bookmark_count: nil, - created_at: nil, - # True for Note Tweets (long-form content, up to 25,000 characters) - is_note_tweet: nil, - like_count: nil, - quote_count: nil, - reply_count: nil, - retweet_count: nil, - view_count: nil - ) - end - - sig do - override.returns( - { - id: String, - text: String, - author: - XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - ) - end - def to_hash - end - - class Author < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet::Author, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - sig do - params( - id: String, - name: String, - username: String, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new(id:, name:, username:, verified: nil) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_mentions_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_mentions_response.rbi deleted file mode 100644 index 5dcfe20..0000000 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_mentions_response.rbi +++ /dev/null @@ -1,246 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class UserRetrieveMentionsResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveMentionsResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[ - XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet - ] - ) - end - attr_accessor :tweets - - # Paginated list of tweets with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, tweets:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet - ] - } - ) - end - def to_hash - end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :text - - sig do - returns( - T.nilable( - XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author - ) - ) - end - attr_reader :author - - sig do - params( - author: - XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author::OrHash - ).void - end - attr_writer :author - - sig { returns(T.nilable(Integer)) } - attr_reader :bookmark_count - - sig { params(bookmark_count: Integer).void } - attr_writer :bookmark_count - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - # True for Note Tweets (long-form content, up to 25,000 characters) - sig { returns(T.nilable(T::Boolean)) } - attr_reader :is_note_tweet - - sig { params(is_note_tweet: T::Boolean).void } - attr_writer :is_note_tweet - - sig { returns(T.nilable(Integer)) } - attr_reader :like_count - - sig { params(like_count: Integer).void } - attr_writer :like_count - - sig { returns(T.nilable(Integer)) } - attr_reader :quote_count - - sig { params(quote_count: Integer).void } - attr_writer :quote_count - - sig { returns(T.nilable(Integer)) } - attr_reader :reply_count - - sig { params(reply_count: Integer).void } - attr_writer :reply_count - - sig { returns(T.nilable(Integer)) } - attr_reader :retweet_count - - sig { params(retweet_count: Integer).void } - attr_writer :retweet_count - - sig { returns(T.nilable(Integer)) } - attr_reader :view_count - - sig { params(view_count: Integer).void } - attr_writer :view_count - - # Tweet returned from search results with inline author info. - sig do - params( - id: String, - text: String, - author: - XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author::OrHash, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - ).returns(T.attached_class) - end - def self.new( - id:, - text:, - author: nil, - bookmark_count: nil, - created_at: nil, - # True for Note Tweets (long-form content, up to 25,000 characters) - is_note_tweet: nil, - like_count: nil, - quote_count: nil, - reply_count: nil, - retweet_count: nil, - view_count: nil - ) - end - - sig do - override.returns( - { - id: String, - text: String, - author: - XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - ) - end - def to_hash - end - - class Author < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - sig do - params( - id: String, - name: String, - username: String, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new(id:, name:, username:, verified: nil) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_params.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_params.rbi new file mode 100644 index 0000000..38f3240 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/user_retrieve_params.rbi @@ -0,0 +1,40 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + class UserRetrieveParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + XTwitterScraper::X::UserRetrieveParams, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig do + params( + id: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(id:, request_options: {}) + end + + sig do + override.returns( + { id: String, request_options: XTwitterScraper::RequestOptions } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_search_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_search_response.rbi deleted file mode 100644 index 2ac0978..0000000 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_search_response.rbi +++ /dev/null @@ -1,179 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class UserRetrieveSearchResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveSearchResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[ - XTwitterScraper::Models::X::UserRetrieveSearchResponse::User - ] - ) - end - attr_accessor :users - - # Paginated list of user profiles with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::UserRetrieveSearchResponse::User::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, users:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::UserRetrieveSearchResponse::User - ] - } - ) - end - def to_hash - end - - class User < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveSearchResponse::User, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - sig { returns(T.nilable(String)) } - attr_reader :description - - sig { params(description: String).void } - attr_writer :description - - sig { returns(T.nilable(Integer)) } - attr_reader :followers - - sig { params(followers: Integer).void } - attr_writer :followers - - sig { returns(T.nilable(Integer)) } - attr_reader :following - - sig { params(following: Integer).void } - attr_writer :following - - sig { returns(T.nilable(String)) } - attr_reader :location - - sig { params(location: String).void } - attr_writer :location - - sig { returns(T.nilable(String)) } - attr_reader :profile_picture - - sig { params(profile_picture: String).void } - attr_writer :profile_picture - - sig { returns(T.nilable(Integer)) } - attr_reader :statuses_count - - sig { params(statuses_count: Integer).void } - attr_writer :statuses_count - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - # X user profile with bio, follower counts, and verification status. - sig do - params( - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new( - id:, - name:, - username:, - created_at: nil, - description: nil, - followers: nil, - following: nil, - location: nil, - profile_picture: nil, - statuses_count: nil, - verified: nil - ) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_response.rbi deleted file mode 100644 index 829758b..0000000 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_response.rbi +++ /dev/null @@ -1,246 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class UserRetrieveTweetsResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveTweetsResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[ - XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet - ] - ) - end - attr_accessor :tweets - - # Paginated list of tweets with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, tweets:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet - ] - } - ) - end - def to_hash - end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :text - - sig do - returns( - T.nilable( - XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet::Author - ) - ) - end - attr_reader :author - - sig do - params( - author: - XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet::Author::OrHash - ).void - end - attr_writer :author - - sig { returns(T.nilable(Integer)) } - attr_reader :bookmark_count - - sig { params(bookmark_count: Integer).void } - attr_writer :bookmark_count - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - # True for Note Tweets (long-form content, up to 25,000 characters) - sig { returns(T.nilable(T::Boolean)) } - attr_reader :is_note_tweet - - sig { params(is_note_tweet: T::Boolean).void } - attr_writer :is_note_tweet - - sig { returns(T.nilable(Integer)) } - attr_reader :like_count - - sig { params(like_count: Integer).void } - attr_writer :like_count - - sig { returns(T.nilable(Integer)) } - attr_reader :quote_count - - sig { params(quote_count: Integer).void } - attr_writer :quote_count - - sig { returns(T.nilable(Integer)) } - attr_reader :reply_count - - sig { params(reply_count: Integer).void } - attr_writer :reply_count - - sig { returns(T.nilable(Integer)) } - attr_reader :retweet_count - - sig { params(retweet_count: Integer).void } - attr_writer :retweet_count - - sig { returns(T.nilable(Integer)) } - attr_reader :view_count - - sig { params(view_count: Integer).void } - attr_writer :view_count - - # Tweet returned from search results with inline author info. - sig do - params( - id: String, - text: String, - author: - XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet::Author::OrHash, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - ).returns(T.attached_class) - end - def self.new( - id:, - text:, - author: nil, - bookmark_count: nil, - created_at: nil, - # True for Note Tweets (long-form content, up to 25,000 characters) - is_note_tweet: nil, - like_count: nil, - quote_count: nil, - reply_count: nil, - retweet_count: nil, - view_count: nil - ) - end - - sig do - override.returns( - { - id: String, - text: String, - author: - XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - ) - end - def to_hash - end - - class Author < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet::Author, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - sig do - params( - id: String, - name: String, - username: String, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new(id:, name:, username:, verified: nil) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rbi b/rbi/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rbi deleted file mode 100644 index b693f88..0000000 --- a/rbi/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rbi +++ /dev/null @@ -1,179 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - module X - class UserRetrieveVerifiedFollowersResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[ - XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse::User - ] - ) - end - attr_accessor :users - - # Paginated list of user profiles with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse::User::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, users:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - users: - T::Array[ - XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse::User - ] - } - ) - end - def to_hash - end - - class User < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse::User, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - sig { returns(T.nilable(String)) } - attr_reader :description - - sig { params(description: String).void } - attr_writer :description - - sig { returns(T.nilable(Integer)) } - attr_reader :followers - - sig { params(followers: Integer).void } - attr_writer :followers - - sig { returns(T.nilable(Integer)) } - attr_reader :following - - sig { params(following: Integer).void } - attr_writer :following - - sig { returns(T.nilable(String)) } - attr_reader :location - - sig { params(location: String).void } - attr_writer :location - - sig { returns(T.nilable(String)) } - attr_reader :profile_picture - - sig { params(profile_picture: String).void } - attr_writer :profile_picture - - sig { returns(T.nilable(Integer)) } - attr_reader :statuses_count - - sig { params(statuses_count: Integer).void } - attr_writer :statuses_count - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - # X user profile with bio, follower counts, and verification status. - sig do - params( - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new( - id:, - name:, - username:, - created_at: nil, - description: nil, - followers: nil, - following: nil, - location: nil, - profile_picture: nil, - statuses_count: nil, - verified: nil - ) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/models/x/users/follow_create_params.rbi b/rbi/x_twitter_scraper/models/x/users/follow_create_params.rbi new file mode 100644 index 0000000..9afc6ae --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/users/follow_create_params.rbi @@ -0,0 +1,56 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + module Users + class FollowCreateParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + XTwitterScraper::X::Users::FollowCreateParams, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + # X account identifier (@username or account ID) + sig { returns(String) } + attr_accessor :account + + sig do + params( + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + id:, + # X account identifier (@username or account ID) + account:, + request_options: {} + ) + end + + sig do + override.returns( + { + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/users/follow_create_response.rbi b/rbi/x_twitter_scraper/models/x/users/follow_create_response.rbi new file mode 100644 index 0000000..30b0870 --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/users/follow_create_response.rbi @@ -0,0 +1,30 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + module Users + class FollowCreateResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::Users::FollowCreateResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(T::Boolean) } + attr_accessor :success + + sig { params(success: T::Boolean).returns(T.attached_class) } + def self.new(success: true) + end + + sig { override.returns({ success: T::Boolean }) } + def to_hash + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/users/follow_delete_all_params.rbi b/rbi/x_twitter_scraper/models/x/users/follow_delete_all_params.rbi new file mode 100644 index 0000000..a68fc3f --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/users/follow_delete_all_params.rbi @@ -0,0 +1,56 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + module Users + class FollowDeleteAllParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + XTwitterScraper::X::Users::FollowDeleteAllParams, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + # X account identifier (@username or account ID) + sig { returns(String) } + attr_accessor :account + + sig do + params( + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + id:, + # X account identifier (@username or account ID) + account:, + request_options: {} + ) + end + + sig do + override.returns( + { + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x/users/follow_delete_all_response.rbi b/rbi/x_twitter_scraper/models/x/users/follow_delete_all_response.rbi new file mode 100644 index 0000000..b4ba98c --- /dev/null +++ b/rbi/x_twitter_scraper/models/x/users/follow_delete_all_response.rbi @@ -0,0 +1,30 @@ +# typed: strong + +module XTwitterScraper + module Models + module X + module Users + class FollowDeleteAllResponse < XTwitterScraper::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + XTwitterScraper::Models::X::Users::FollowDeleteAllResponse, + XTwitterScraper::Internal::AnyHash + ) + end + + sig { returns(T::Boolean) } + attr_accessor :success + + sig { params(success: T::Boolean).returns(T.attached_class) } + def self.new(success: true) + end + + sig { override.returns({ success: T::Boolean }) } + def to_hash + end + end + end + end + end +end diff --git a/rbi/x_twitter_scraper/models/x_get_article_response.rbi b/rbi/x_twitter_scraper/models/x_get_article_response.rbi index 626c9a6..5601add 100644 --- a/rbi/x_twitter_scraper/models/x_get_article_response.rbi +++ b/rbi/x_twitter_scraper/models/x_get_article_response.rbi @@ -22,23 +22,17 @@ module XTwitterScraper attr_writer :article # Author of a tweet with follower count and verification status. - sig do - returns(T.nilable(XTwitterScraper::Models::XGetArticleResponse::Author)) - end + sig { returns(T.nilable(XTwitterScraper::X::TweetAuthor)) } attr_reader :author - sig do - params( - author: XTwitterScraper::Models::XGetArticleResponse::Author::OrHash - ).void - end + sig { params(author: XTwitterScraper::X::TweetAuthor::OrHash).void } attr_writer :author sig do params( article: XTwitterScraper::Models::XGetArticleResponse::Article::OrHash, - author: XTwitterScraper::Models::XGetArticleResponse::Author::OrHash + author: XTwitterScraper::X::TweetAuthor::OrHash ).returns(T.attached_class) end def self.new( @@ -52,7 +46,7 @@ module XTwitterScraper override.returns( { article: XTwitterScraper::Models::XGetArticleResponse::Article, - author: XTwitterScraper::Models::XGetArticleResponse::Author + author: XTwitterScraper::X::TweetAuthor } ) end @@ -265,67 +259,6 @@ module XTwitterScraper end end end - - class Author < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::XGetArticleResponse::Author, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(Integer) } - attr_accessor :followers - - sig { returns(String) } - attr_accessor :username - - sig { returns(T::Boolean) } - attr_accessor :verified - - sig { returns(T.nilable(String)) } - attr_reader :profile_picture - - sig { params(profile_picture: String).void } - attr_writer :profile_picture - - # Author of a tweet with follower count and verification status. - sig do - params( - id: String, - followers: Integer, - username: String, - verified: T::Boolean, - profile_picture: String - ).returns(T.attached_class) - end - def self.new( - id:, - followers:, - username:, - verified:, - profile_picture: nil - ) - end - - sig do - override.returns( - { - id: String, - followers: Integer, - username: String, - verified: T::Boolean, - profile_picture: String - } - ) - end - def to_hash - end - end end end end diff --git a/rbi/x_twitter_scraper/models/x_get_home_timeline_response.rbi b/rbi/x_twitter_scraper/models/x_get_home_timeline_response.rbi deleted file mode 100644 index 35a1b84..0000000 --- a/rbi/x_twitter_scraper/models/x_get_home_timeline_response.rbi +++ /dev/null @@ -1,240 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Models - class XGetHomeTimelineResponse < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::XGetHomeTimelineResponse, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - sig { returns(String) } - attr_accessor :next_cursor - - sig do - returns( - T::Array[XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet] - ) - end - attr_accessor :tweets - - # Paginated list of tweets with cursor-based navigation. - sig do - params( - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[ - XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet::OrHash - ] - ).returns(T.attached_class) - end - def self.new(has_next_page:, next_cursor:, tweets:) - end - - sig do - override.returns( - { - has_next_page: T::Boolean, - next_cursor: String, - tweets: - T::Array[XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet] - } - ) - end - def to_hash - end - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :text - - sig do - returns( - T.nilable( - XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet::Author - ) - ) - end - attr_reader :author - - sig do - params( - author: - XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet::Author::OrHash - ).void - end - attr_writer :author - - sig { returns(T.nilable(Integer)) } - attr_reader :bookmark_count - - sig { params(bookmark_count: Integer).void } - attr_writer :bookmark_count - - sig { returns(T.nilable(String)) } - attr_reader :created_at - - sig { params(created_at: String).void } - attr_writer :created_at - - # True for Note Tweets (long-form content, up to 25,000 characters) - sig { returns(T.nilable(T::Boolean)) } - attr_reader :is_note_tweet - - sig { params(is_note_tweet: T::Boolean).void } - attr_writer :is_note_tweet - - sig { returns(T.nilable(Integer)) } - attr_reader :like_count - - sig { params(like_count: Integer).void } - attr_writer :like_count - - sig { returns(T.nilable(Integer)) } - attr_reader :quote_count - - sig { params(quote_count: Integer).void } - attr_writer :quote_count - - sig { returns(T.nilable(Integer)) } - attr_reader :reply_count - - sig { params(reply_count: Integer).void } - attr_writer :reply_count - - sig { returns(T.nilable(Integer)) } - attr_reader :retweet_count - - sig { params(retweet_count: Integer).void } - attr_writer :retweet_count - - sig { returns(T.nilable(Integer)) } - attr_reader :view_count - - sig { params(view_count: Integer).void } - attr_writer :view_count - - # Tweet returned from search results with inline author info. - sig do - params( - id: String, - text: String, - author: - XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet::Author::OrHash, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - ).returns(T.attached_class) - end - def self.new( - id:, - text:, - author: nil, - bookmark_count: nil, - created_at: nil, - # True for Note Tweets (long-form content, up to 25,000 characters) - is_note_tweet: nil, - like_count: nil, - quote_count: nil, - reply_count: nil, - retweet_count: nil, - view_count: nil - ) - end - - sig do - override.returns( - { - id: String, - text: String, - author: - XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: T::Boolean, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - ) - end - def to_hash - end - - class Author < XTwitterScraper::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet::Author, - XTwitterScraper::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :id - - sig { returns(String) } - attr_accessor :name - - sig { returns(String) } - attr_accessor :username - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :verified - - sig { params(verified: T::Boolean).void } - attr_writer :verified - - sig do - params( - id: String, - name: String, - username: String, - verified: T::Boolean - ).returns(T.attached_class) - end - def self.new(id:, name:, username:, verified: nil) - end - - sig do - override.returns( - { - id: String, - name: String, - username: String, - verified: T::Boolean - } - ) - end - def to_hash - end - end - end - end - end -end diff --git a/rbi/x_twitter_scraper/resources/drafts.rbi b/rbi/x_twitter_scraper/resources/drafts.rbi index 71647b1..0f13656 100644 --- a/rbi/x_twitter_scraper/resources/drafts.rbi +++ b/rbi/x_twitter_scraper/resources/drafts.rbi @@ -11,7 +11,7 @@ module XTwitterScraper goal: XTwitterScraper::DraftCreateParams::Goal::OrSymbol, topic: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::DraftCreateResponse) + ).returns(XTwitterScraper::DraftDetail) end def create(text:, goal: nil, topic: nil, request_options: {}) end @@ -21,7 +21,7 @@ module XTwitterScraper params( id: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::DraftRetrieveResponse) + ).returns(XTwitterScraper::DraftDetail) end def retrieve( # Resource ID (stringified bigint) diff --git a/rbi/x_twitter_scraper/resources/events.rbi b/rbi/x_twitter_scraper/resources/events.rbi index 42ceeec..559e4fa 100644 --- a/rbi/x_twitter_scraper/resources/events.rbi +++ b/rbi/x_twitter_scraper/resources/events.rbi @@ -9,7 +9,7 @@ module XTwitterScraper params( id: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::EventRetrieveResponse) + ).returns(XTwitterScraper::EventDetail) end def retrieve( # Resource ID (stringified bigint) @@ -22,7 +22,7 @@ module XTwitterScraper sig do params( after: String, - event_type: XTwitterScraper::EventListParams::EventType::OrSymbol, + event_type: XTwitterScraper::EventType::OrSymbol, limit: Integer, monitor_id: String, request_options: XTwitterScraper::RequestOptions::OrHash diff --git a/rbi/x_twitter_scraper/resources/integrations.rbi b/rbi/x_twitter_scraper/resources/integrations.rbi index 41fa205..5bc5155 100644 --- a/rbi/x_twitter_scraper/resources/integrations.rbi +++ b/rbi/x_twitter_scraper/resources/integrations.rbi @@ -8,14 +8,11 @@ module XTwitterScraper sig do params( config: XTwitterScraper::IntegrationCreateParams::Config::OrHash, - event_types: - T::Array[ - XTwitterScraper::IntegrationCreateParams::EventType::OrSymbol - ], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], name: String, type: XTwitterScraper::IntegrationCreateParams::Type::OrSymbol, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::IntegrationCreateResponse) + ).returns(XTwitterScraper::Integration) end def create( # Integration config (e.g. Telegram chatId) @@ -33,7 +30,7 @@ module XTwitterScraper params( id: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::IntegrationRetrieveResponse) + ).returns(XTwitterScraper::Integration) end def retrieve( # Resource ID (stringified bigint) @@ -46,10 +43,7 @@ module XTwitterScraper sig do params( id: String, - event_types: - T::Array[ - XTwitterScraper::IntegrationUpdateParams::EventType::OrSymbol - ], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], filters: T::Hash[Symbol, T.anything], is_active: T::Boolean, message_template: T::Hash[Symbol, T.anything], @@ -57,7 +51,7 @@ module XTwitterScraper scope_all_monitors: T::Boolean, silent_push: T::Boolean, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::IntegrationUpdateResponse) + ).returns(XTwitterScraper::Integration) end def update( # Resource ID (stringified bigint) diff --git a/rbi/x_twitter_scraper/resources/monitors.rbi b/rbi/x_twitter_scraper/resources/monitors.rbi index 5105648..2351361 100644 --- a/rbi/x_twitter_scraper/resources/monitors.rbi +++ b/rbi/x_twitter_scraper/resources/monitors.rbi @@ -7,8 +7,7 @@ module XTwitterScraper # Create monitor sig do params( - event_types: - T::Array[XTwitterScraper::MonitorCreateParams::EventType::OrSymbol], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], username: String, request_options: XTwitterScraper::RequestOptions::OrHash ).returns(XTwitterScraper::Models::MonitorCreateResponse) @@ -27,7 +26,7 @@ module XTwitterScraper params( id: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::MonitorRetrieveResponse) + ).returns(XTwitterScraper::Monitor) end def retrieve( # Resource ID (stringified bigint) @@ -40,11 +39,10 @@ module XTwitterScraper sig do params( id: String, - event_types: - T::Array[XTwitterScraper::MonitorUpdateParams::EventType::OrSymbol], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], is_active: T::Boolean, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::MonitorUpdateResponse) + ).returns(XTwitterScraper::Monitor) end def update( # Resource ID (stringified bigint) diff --git a/rbi/x_twitter_scraper/resources/styles.rbi b/rbi/x_twitter_scraper/resources/styles.rbi index 81f3951..8767545 100644 --- a/rbi/x_twitter_scraper/resources/styles.rbi +++ b/rbi/x_twitter_scraper/resources/styles.rbi @@ -4,6 +4,40 @@ module XTwitterScraper module Resources # Tweet composition, drafts, writing styles & radar class Styles + # Get cached style profile + sig do + params( + id: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(XTwitterScraper::StyleProfile) + end + def retrieve( + # Style profile ID or X username + id, + request_options: {} + ) + end + + # Save style profile with custom tweets + sig do + params( + id: String, + label: String, + tweets: T::Array[XTwitterScraper::StyleUpdateParams::Tweet::OrHash], + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(XTwitterScraper::StyleProfile) + end + def update( + # Style profile ID or X username + id, + # Display label for the style + label:, + # Array of tweet objects + tweets:, + request_options: {} + ) + end + # List cached style profiles sig do params( @@ -13,12 +47,26 @@ module XTwitterScraper def list(request_options: {}) end + # Delete a style profile + sig do + params( + id: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).void + end + def delete( + # Style profile ID or X username + id, + request_options: {} + ) + end + # Analyze writing style from recent tweets sig do params( username: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::StyleAnalyzeResponse) + ).returns(XTwitterScraper::StyleProfile) end def analyze( # X username to analyze @@ -44,6 +92,20 @@ module XTwitterScraper ) end + # Get engagement metrics for style tweets + sig do + params( + id: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(XTwitterScraper::Models::StyleGetPerformanceResponse) + end + def get_performance( + # Style profile ID or X username + id, + request_options: {} + ) + end + # @api private sig { params(client: XTwitterScraper::Client).returns(T.attached_class) } def self.new(client:) diff --git a/rbi/x_twitter_scraper/resources/webhooks.rbi b/rbi/x_twitter_scraper/resources/webhooks.rbi index c3117d6..b3ef6e0 100644 --- a/rbi/x_twitter_scraper/resources/webhooks.rbi +++ b/rbi/x_twitter_scraper/resources/webhooks.rbi @@ -7,8 +7,7 @@ module XTwitterScraper # Create webhook sig do params( - event_types: - T::Array[XTwitterScraper::WebhookCreateParams::EventType::OrSymbol], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], url: String, request_options: XTwitterScraper::RequestOptions::OrHash ).returns(XTwitterScraper::Models::WebhookCreateResponse) @@ -26,12 +25,11 @@ module XTwitterScraper sig do params( id: String, - event_types: - T::Array[XTwitterScraper::WebhookUpdateParams::EventType::OrSymbol], + event_types: T::Array[XTwitterScraper::EventType::OrSymbol], is_active: T::Boolean, url: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::WebhookUpdateResponse) + ).returns(XTwitterScraper::Webhook) end def update( # Resource ID (stringified bigint) diff --git a/rbi/x_twitter_scraper/resources/x.rbi b/rbi/x_twitter_scraper/resources/x.rbi index 6390d23..f1421af 100644 --- a/rbi/x_twitter_scraper/resources/x.rbi +++ b/rbi/x_twitter_scraper/resources/x.rbi @@ -61,7 +61,7 @@ module XTwitterScraper cursor: String, seen_tweet_ids: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::XGetHomeTimelineResponse) + ).returns(XTwitterScraper::PaginatedTweets) end def get_home_timeline( # Pagination cursor for timeline diff --git a/rbi/x_twitter_scraper/resources/x/accounts.rbi b/rbi/x_twitter_scraper/resources/x/accounts.rbi index 20895d5..188ff21 100644 --- a/rbi/x_twitter_scraper/resources/x/accounts.rbi +++ b/rbi/x_twitter_scraper/resources/x/accounts.rbi @@ -36,7 +36,7 @@ module XTwitterScraper params( id: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::AccountRetrieveResponse) + ).returns(XTwitterScraper::X::XAccountDetail) end def retrieve( # Resource ID (stringified bigint) @@ -68,6 +68,16 @@ module XTwitterScraper ) end + # Clears loginFailedAt and loginFailureReason for all accounts with transient or + # automated failure reasons, making them eligible for retry on next use. + sig do + params( + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(XTwitterScraper::Models::X::AccountBulkRetryResponse) + end + def bulk_retry(request_options: {}) + end + # Re-authenticate X account sig do params( diff --git a/rbi/x_twitter_scraper/resources/x/bookmarks.rbi b/rbi/x_twitter_scraper/resources/x/bookmarks.rbi index 50ee90b..c0b0ceb 100644 --- a/rbi/x_twitter_scraper/resources/x/bookmarks.rbi +++ b/rbi/x_twitter_scraper/resources/x/bookmarks.rbi @@ -11,7 +11,11 @@ module XTwitterScraper cursor: String, folder_id: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::BookmarkListResponse) + ).returns( + XTwitterScraper::Internal::CursorPage[ + XTwitterScraper::PaginatedTweets + ] + ) end def list( # Pagination cursor for bookmarks diff --git a/rbi/x_twitter_scraper/resources/x/communities.rbi b/rbi/x_twitter_scraper/resources/x/communities.rbi index 6377ad9..964279f 100644 --- a/rbi/x_twitter_scraper/resources/x/communities.rbi +++ b/rbi/x_twitter_scraper/resources/x/communities.rbi @@ -72,9 +72,7 @@ module XTwitterScraper id: String, cursor: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns( - XTwitterScraper::Models::X::CommunityRetrieveMembersResponse - ) + ).returns(XTwitterScraper::PaginatedUsers) end def retrieve_members( # Community ID for member lookup @@ -91,9 +89,7 @@ module XTwitterScraper id: String, cursor: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns( - XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse - ) + ).returns(XTwitterScraper::PaginatedUsers) end def retrieve_moderators( # Community ID for moderator lookup @@ -111,7 +107,7 @@ module XTwitterScraper cursor: String, query_type: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::CommunityRetrieveSearchResponse) + ).returns(XTwitterScraper::PaginatedTweets) end def retrieve_search( # Search query diff --git a/rbi/x_twitter_scraper/resources/x/communities/join.rbi b/rbi/x_twitter_scraper/resources/x/communities/join.rbi index 0b48e52..b0a4137 100644 --- a/rbi/x_twitter_scraper/resources/x/communities/join.rbi +++ b/rbi/x_twitter_scraper/resources/x/communities/join.rbi @@ -12,9 +12,7 @@ module XTwitterScraper id: String, account: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns( - XTwitterScraper::Models::X::Communities::JoinCreateResponse - ) + ).returns(XTwitterScraper::X::CommunityActionResult) end def create( # Resource ID (stringified bigint) @@ -31,9 +29,7 @@ module XTwitterScraper id: String, account: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns( - XTwitterScraper::Models::X::Communities::JoinDeleteAllResponse - ) + ).returns(XTwitterScraper::X::CommunityActionResult) end def delete_all( # Resource ID (stringified bigint) diff --git a/rbi/x_twitter_scraper/resources/x/communities/tweets.rbi b/rbi/x_twitter_scraper/resources/x/communities/tweets.rbi index 349d004..ee67a4b 100644 --- a/rbi/x_twitter_scraper/resources/x/communities/tweets.rbi +++ b/rbi/x_twitter_scraper/resources/x/communities/tweets.rbi @@ -14,7 +14,9 @@ module XTwitterScraper query_type: String, request_options: XTwitterScraper::RequestOptions::OrHash ).returns( - XTwitterScraper::Models::X::Communities::TweetListResponse + XTwitterScraper::Internal::CursorPage[ + XTwitterScraper::PaginatedTweets + ] ) end def list( @@ -28,6 +30,27 @@ module XTwitterScraper ) end + # Get community tweets + sig do + params( + id: String, + cursor: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns( + XTwitterScraper::Internal::CursorPage[ + XTwitterScraper::PaginatedTweets + ] + ) + end + def list_by_community( + # Community ID for tweet lookup + id, + # Pagination cursor for community tweets + cursor: nil, + request_options: {} + ) + end + # @api private sig do params(client: XTwitterScraper::Client).returns(T.attached_class) diff --git a/rbi/x_twitter_scraper/resources/x/lists.rbi b/rbi/x_twitter_scraper/resources/x/lists.rbi index 98c7e38..1d75770 100644 --- a/rbi/x_twitter_scraper/resources/x/lists.rbi +++ b/rbi/x_twitter_scraper/resources/x/lists.rbi @@ -11,7 +11,7 @@ module XTwitterScraper id: String, cursor: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::ListRetrieveFollowersResponse) + ).returns(XTwitterScraper::PaginatedUsers) end def retrieve_followers( # List ID @@ -28,7 +28,7 @@ module XTwitterScraper id: String, cursor: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::ListRetrieveMembersResponse) + ).returns(XTwitterScraper::PaginatedUsers) end def retrieve_members( # List ID for member lookup @@ -48,7 +48,7 @@ module XTwitterScraper since_time: String, until_time: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::ListRetrieveTweetsResponse) + ).returns(XTwitterScraper::PaginatedTweets) end def retrieve_tweets( # List ID for tweet lookup diff --git a/rbi/x_twitter_scraper/resources/x/tweets.rbi b/rbi/x_twitter_scraper/resources/x/tweets.rbi index 4f83e5d..916265c 100644 --- a/rbi/x_twitter_scraper/resources/x/tweets.rbi +++ b/rbi/x_twitter_scraper/resources/x/tweets.rbi @@ -4,9 +4,11 @@ module XTwitterScraper module Resources class X class Tweets + # X write actions (tweets, likes, follows, DMs) sig { returns(XTwitterScraper::Resources::X::Tweets::Like) } attr_reader :like + # X write actions (tweets, likes, follows, DMs) sig { returns(XTwitterScraper::Resources::X::Tweets::Retweet) } attr_reader :retweet @@ -36,12 +38,26 @@ module XTwitterScraper ) end + # Look up tweet + sig do + params( + id: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(XTwitterScraper::Models::X::TweetRetrieveResponse) + end + def retrieve( + # Tweet ID + id, + request_options: {} + ) + end + # Get multiple tweets by IDs sig do params( ids: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::TweetListResponse) + ).returns(XTwitterScraper::PaginatedTweets) end def list( # Comma-separated tweet IDs (max 100) @@ -50,13 +66,30 @@ module XTwitterScraper ) end + # Delete tweet + sig do + params( + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(XTwitterScraper::Models::X::TweetDeleteResponse) + end + def delete( + # Tweet ID to delete + id, + # X account identifier (@username or account ID) + account:, + request_options: {} + ) + end + # Get users who liked a tweet sig do params( id: String, cursor: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::TweetGetFavoritersResponse) + ).returns(XTwitterScraper::PaginatedUsers) end def get_favoriters( # Tweet ID to get favoriters @@ -76,7 +109,7 @@ module XTwitterScraper since_time: String, until_time: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::TweetGetQuotesResponse) + ).returns(XTwitterScraper::PaginatedTweets) end def get_quotes( # Tweet ID to get quotes @@ -101,7 +134,7 @@ module XTwitterScraper since_time: String, until_time: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::TweetGetRepliesResponse) + ).returns(XTwitterScraper::PaginatedTweets) end def get_replies( # Tweet ID to get replies @@ -122,7 +155,7 @@ module XTwitterScraper id: String, cursor: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::TweetGetRetweetersResponse) + ).returns(XTwitterScraper::PaginatedUsers) end def get_retweeters( # Tweet ID to get retweeters @@ -139,7 +172,7 @@ module XTwitterScraper id: String, cursor: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::TweetGetThreadResponse) + ).returns(XTwitterScraper::PaginatedTweets) end def get_thread( # Tweet ID to get thread context @@ -161,7 +194,7 @@ module XTwitterScraper since_time: String, until_time: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::TweetSearchResponse) + ).returns(XTwitterScraper::PaginatedTweets) end def search( # Search query (keywords, diff --git a/rbi/x_twitter_scraper/resources/x/tweets/like.rbi b/rbi/x_twitter_scraper/resources/x/tweets/like.rbi index 9c17e6e..3f59156 100644 --- a/rbi/x_twitter_scraper/resources/x/tweets/like.rbi +++ b/rbi/x_twitter_scraper/resources/x/tweets/like.rbi @@ -4,7 +4,42 @@ module XTwitterScraper module Resources class X class Tweets + # X write actions (tweets, likes, follows, DMs) class Like + # Like tweet + sig do + params( + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(XTwitterScraper::Models::X::Tweets::LikeCreateResponse) + end + def create( + # Tweet ID to like + id, + # X account identifier (@username or account ID) + account:, + request_options: {} + ) + end + + # Unlike tweet + sig do + params( + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(XTwitterScraper::Models::X::Tweets::LikeDeleteResponse) + end + def delete( + # Tweet ID to unlike + id, + # X account identifier (@username or account ID) + account:, + request_options: {} + ) + end + # @api private sig do params(client: XTwitterScraper::Client).returns(T.attached_class) diff --git a/rbi/x_twitter_scraper/resources/x/tweets/retweet.rbi b/rbi/x_twitter_scraper/resources/x/tweets/retweet.rbi index f85e1a3..a828256 100644 --- a/rbi/x_twitter_scraper/resources/x/tweets/retweet.rbi +++ b/rbi/x_twitter_scraper/resources/x/tweets/retweet.rbi @@ -4,7 +4,42 @@ module XTwitterScraper module Resources class X class Tweets + # X write actions (tweets, likes, follows, DMs) class Retweet + # Retweet + sig do + params( + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(XTwitterScraper::Models::X::Tweets::RetweetCreateResponse) + end + def create( + # Tweet ID to retweet + id, + # X account identifier (@username or account ID) + account:, + request_options: {} + ) + end + + # Unretweet + sig do + params( + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(XTwitterScraper::Models::X::Tweets::RetweetDeleteResponse) + end + def delete( + # Tweet ID to unretweet + id, + # X account identifier (@username or account ID) + account:, + request_options: {} + ) + end + # @api private sig do params(client: XTwitterScraper::Client).returns(T.attached_class) diff --git a/rbi/x_twitter_scraper/resources/x/users.rbi b/rbi/x_twitter_scraper/resources/x/users.rbi index c23ffec..b87ad0b 100644 --- a/rbi/x_twitter_scraper/resources/x/users.rbi +++ b/rbi/x_twitter_scraper/resources/x/users.rbi @@ -5,15 +5,30 @@ module XTwitterScraper class X # X data lookups (subscription required) class Users + # X write actions (tweets, likes, follows, DMs) sig { returns(XTwitterScraper::Resources::X::Users::Follow) } attr_reader :follow + # Look up X user + sig do + params( + id: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(XTwitterScraper::X::UserProfile) + end + def retrieve( + # X username (without @) or user ID + id, + request_options: {} + ) + end + # Get multiple users by IDs sig do params( ids: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::UserRetrieveBatchResponse) + ).returns(XTwitterScraper::PaginatedUsers) end def retrieve_batch( # Comma-separated user IDs (max 100) @@ -29,7 +44,7 @@ module XTwitterScraper cursor: String, page_size: Integer, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::UserRetrieveFollowersResponse) + ).returns(XTwitterScraper::PaginatedUsers) end def retrieve_followers( # User ID or username @@ -48,9 +63,7 @@ module XTwitterScraper id: String, cursor: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns( - XTwitterScraper::Models::X::UserRetrieveFollowersYouKnowResponse - ) + ).returns(XTwitterScraper::PaginatedUsers) end def retrieve_followers_you_know( # User ID for followers-you-know lookup @@ -68,7 +81,7 @@ module XTwitterScraper cursor: String, page_size: Integer, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::UserRetrieveFollowingResponse) + ).returns(XTwitterScraper::PaginatedUsers) end def retrieve_following( # User ID or username for following lookup @@ -87,7 +100,7 @@ module XTwitterScraper id: String, cursor: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::UserRetrieveLikesResponse) + ).returns(XTwitterScraper::PaginatedTweets) end def retrieve_likes( # User ID @@ -104,7 +117,7 @@ module XTwitterScraper id: String, cursor: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::UserRetrieveMediaResponse) + ).returns(XTwitterScraper::PaginatedTweets) end def retrieve_media( # User ID for media lookup @@ -123,7 +136,7 @@ module XTwitterScraper since_time: String, until_time: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::UserRetrieveMentionsResponse) + ).returns(XTwitterScraper::PaginatedTweets) end def retrieve_mentions( # User ID or username for mentions lookup @@ -144,7 +157,7 @@ module XTwitterScraper q: String, cursor: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::UserRetrieveSearchResponse) + ).returns(XTwitterScraper::PaginatedUsers) end def retrieve_search( # User search query @@ -163,7 +176,7 @@ module XTwitterScraper include_parent_tweet: T::Boolean, include_replies: T::Boolean, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns(XTwitterScraper::Models::X::UserRetrieveTweetsResponse) + ).returns(XTwitterScraper::PaginatedTweets) end def retrieve_tweets( # X user ID or username @@ -184,9 +197,7 @@ module XTwitterScraper id: String, cursor: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns( - XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse - ) + ).returns(XTwitterScraper::PaginatedUsers) end def retrieve_verified_followers( # User ID or username for verified followers diff --git a/rbi/x_twitter_scraper/resources/x/users/follow.rbi b/rbi/x_twitter_scraper/resources/x/users/follow.rbi index b89730a..35626ff 100644 --- a/rbi/x_twitter_scraper/resources/x/users/follow.rbi +++ b/rbi/x_twitter_scraper/resources/x/users/follow.rbi @@ -4,7 +4,44 @@ module XTwitterScraper module Resources class X class Users + # X write actions (tweets, likes, follows, DMs) class Follow + # Follow user + sig do + params( + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns(XTwitterScraper::Models::X::Users::FollowCreateResponse) + end + def create( + # User ID to follow + id, + # X account identifier (@username or account ID) + account:, + request_options: {} + ) + end + + # Unfollow user + sig do + params( + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions::OrHash + ).returns( + XTwitterScraper::Models::X::Users::FollowDeleteAllResponse + ) + end + def delete_all( + # User ID to unfollow + id, + # X account identifier (@username or account ID) + account:, + request_options: {} + ) + end + # @api private sig do params(client: XTwitterScraper::Client).returns(T.attached_class) diff --git a/release-please-config.json b/release-please-config.json deleted file mode 100644 index 8278dc1..0000000 --- a/release-please-config.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "packages": { - ".": {} - }, - "$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json", - "include-v-in-tag": true, - "include-component-in-tag": false, - "versioning": "prerelease", - "prerelease": true, - "bump-minor-pre-major": true, - "bump-patch-for-minor-pre-major": false, - "pull-request-header": "Automated Release PR", - "pull-request-title-pattern": "release: ${version}", - "changelog-sections": [ - { - "type": "feat", - "section": "Features" - }, - { - "type": "fix", - "section": "Bug Fixes" - }, - { - "type": "perf", - "section": "Performance Improvements" - }, - { - "type": "revert", - "section": "Reverts" - }, - { - "type": "chore", - "section": "Chores" - }, - { - "type": "docs", - "section": "Documentation" - }, - { - "type": "style", - "section": "Styles" - }, - { - "type": "refactor", - "section": "Refactors" - }, - { - "type": "test", - "section": "Tests", - "hidden": true - }, - { - "type": "build", - "section": "Build System" - }, - { - "type": "ci", - "section": "Continuous Integration", - "hidden": true - } - ], - "release-type": "ruby", - "version-file": "lib/x_twitter_scraper/version.rb", - "extra-files": [ - { - "type": "ruby-readme", - "path": "README.md" - } - ] -} \ No newline at end of file diff --git a/sig/x_twitter_scraper/internal/cursor_page.rbs b/sig/x_twitter_scraper/internal/cursor_page.rbs new file mode 100644 index 0000000..7c216d0 --- /dev/null +++ b/sig/x_twitter_scraper/internal/cursor_page.rbs @@ -0,0 +1,13 @@ +module XTwitterScraper + module Internal + class CursorPage[Elem] + include XTwitterScraper::Internal::Type::BasePage[Elem] + + attr_accessor next_cursor: String? + + attr_accessor has_next_page: bool + + def inspect: -> String + end + end +end diff --git a/sig/x_twitter_scraper/models.rbs b/sig/x_twitter_scraper/models.rbs index 525b54e..843876a 100644 --- a/sig/x_twitter_scraper/models.rbs +++ b/sig/x_twitter_scraper/models.rbs @@ -111,12 +111,20 @@ module XTwitterScraper class StyleCompareParams = XTwitterScraper::Models::StyleCompareParams + class StyleDeleteParams = XTwitterScraper::Models::StyleDeleteParams + + class StyleGetPerformanceParams = XTwitterScraper::Models::StyleGetPerformanceParams + class StyleListParams = XTwitterScraper::Models::StyleListParams class StyleProfile = XTwitterScraper::Models::StyleProfile class StyleProfileSummary = XTwitterScraper::Models::StyleProfileSummary + class StyleRetrieveParams = XTwitterScraper::Models::StyleRetrieveParams + + class StyleUpdateParams = XTwitterScraper::Models::StyleUpdateParams + class SubscribeCreateParams = XTwitterScraper::Models::SubscribeCreateParams module Support = XTwitterScraper::Models::Support diff --git a/sig/x_twitter_scraper/models/api_key_list_response.rbs b/sig/x_twitter_scraper/models/api_key_list_response.rbs index 96ac9be..106f4ec 100644 --- a/sig/x_twitter_scraper/models/api_key_list_response.rbs +++ b/sig/x_twitter_scraper/models/api_key_list_response.rbs @@ -1,62 +1,13 @@ module XTwitterScraper module Models - type api_key_list_response = - { keys: ::Array[XTwitterScraper::Models::APIKeyListResponse::Key] } + type api_key_list_response = { keys: ::Array[XTwitterScraper::APIKey] } class APIKeyListResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor keys: ::Array[XTwitterScraper::Models::APIKeyListResponse::Key] + attr_accessor keys: ::Array[XTwitterScraper::APIKey] - def initialize: ( - keys: ::Array[XTwitterScraper::Models::APIKeyListResponse::Key] - ) -> void + def initialize: (keys: ::Array[XTwitterScraper::APIKey]) -> void - def to_hash: -> { - keys: ::Array[XTwitterScraper::Models::APIKeyListResponse::Key] - } - - type key = - { - id: String, - created_at: Time, - is_active: bool, - name: String, - prefix: String, - last_used_at: Time - } - - class Key < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor created_at: Time - - attr_accessor is_active: bool - - attr_accessor name: String - - attr_accessor prefix: String - - attr_reader last_used_at: Time? - - def last_used_at=: (Time) -> Time - - def initialize: ( - id: String, - created_at: Time, - is_active: bool, - name: String, - prefix: String, - ?last_used_at: Time - ) -> void - - def to_hash: -> { - id: String, - created_at: Time, - is_active: bool, - name: String, - prefix: String, - last_used_at: Time - } - end + def to_hash: -> { keys: ::Array[XTwitterScraper::APIKey] } end end end diff --git a/sig/x_twitter_scraper/models/draft_create_response.rbs b/sig/x_twitter_scraper/models/draft_create_response.rbs deleted file mode 100644 index 98ad6b5..0000000 --- a/sig/x_twitter_scraper/models/draft_create_response.rbs +++ /dev/null @@ -1,49 +0,0 @@ -module XTwitterScraper - module Models - type draft_create_response = - { - id: String, - created_at: Time, - text: String, - updated_at: Time, - goal: String, - topic: String - } - - class DraftCreateResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor created_at: Time - - attr_accessor text: String - - attr_accessor updated_at: Time - - attr_reader goal: String? - - def goal=: (String) -> String - - attr_reader topic: String? - - def topic=: (String) -> String - - def initialize: ( - id: String, - created_at: Time, - text: String, - updated_at: Time, - ?goal: String, - ?topic: String - ) -> void - - def to_hash: -> { - id: String, - created_at: Time, - text: String, - updated_at: Time, - goal: String, - topic: String - } - end - end -end diff --git a/sig/x_twitter_scraper/models/draft_list_response.rbs b/sig/x_twitter_scraper/models/draft_list_response.rbs index 8d6e43b..1a91595 100644 --- a/sig/x_twitter_scraper/models/draft_list_response.rbs +++ b/sig/x_twitter_scraper/models/draft_list_response.rbs @@ -2,13 +2,13 @@ module XTwitterScraper module Models type draft_list_response = { - drafts: ::Array[XTwitterScraper::Models::DraftListResponse::Draft], + drafts: ::Array[XTwitterScraper::Draft], has_more: bool, next_cursor: String } class DraftListResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor drafts: ::Array[XTwitterScraper::Models::DraftListResponse::Draft] + attr_accessor drafts: ::Array[XTwitterScraper::Draft] attr_accessor has_more: bool @@ -17,57 +17,16 @@ module XTwitterScraper def next_cursor=: (String) -> String def initialize: ( - drafts: ::Array[XTwitterScraper::Models::DraftListResponse::Draft], + drafts: ::Array[XTwitterScraper::Draft], has_more: bool, ?next_cursor: String ) -> void def to_hash: -> { - drafts: ::Array[XTwitterScraper::Models::DraftListResponse::Draft], + drafts: ::Array[XTwitterScraper::Draft], has_more: bool, next_cursor: String } - - type draft = - { - id: String, - created_at: Time, - text: String, - goal: String, - topic: String - } - - class Draft < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor created_at: Time - - attr_accessor text: String - - attr_reader goal: String? - - def goal=: (String) -> String - - attr_reader topic: String? - - def topic=: (String) -> String - - def initialize: ( - id: String, - created_at: Time, - text: String, - ?goal: String, - ?topic: String - ) -> void - - def to_hash: -> { - id: String, - created_at: Time, - text: String, - goal: String, - topic: String - } - end end end end diff --git a/sig/x_twitter_scraper/models/draft_retrieve_response.rbs b/sig/x_twitter_scraper/models/draft_retrieve_response.rbs deleted file mode 100644 index c181aa7..0000000 --- a/sig/x_twitter_scraper/models/draft_retrieve_response.rbs +++ /dev/null @@ -1,49 +0,0 @@ -module XTwitterScraper - module Models - type draft_retrieve_response = - { - id: String, - created_at: Time, - text: String, - updated_at: Time, - goal: String, - topic: String - } - - class DraftRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor created_at: Time - - attr_accessor text: String - - attr_accessor updated_at: Time - - attr_reader goal: String? - - def goal=: (String) -> String - - attr_reader topic: String? - - def topic=: (String) -> String - - def initialize: ( - id: String, - created_at: Time, - text: String, - updated_at: Time, - ?goal: String, - ?topic: String - ) -> void - - def to_hash: -> { - id: String, - created_at: Time, - text: String, - updated_at: Time, - goal: String, - topic: String - } - end - end -end diff --git a/sig/x_twitter_scraper/models/draw_list_response.rbs b/sig/x_twitter_scraper/models/draw_list_response.rbs index 9a05123..61dc58e 100644 --- a/sig/x_twitter_scraper/models/draw_list_response.rbs +++ b/sig/x_twitter_scraper/models/draw_list_response.rbs @@ -2,13 +2,13 @@ module XTwitterScraper module Models type draw_list_response = { - draws: ::Array[XTwitterScraper::Models::DrawListResponse::Draw], + draws: ::Array[XTwitterScraper::DrawListItem], has_more: bool, next_cursor: String } class DrawListResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor draws: ::Array[XTwitterScraper::Models::DrawListResponse::Draw] + attr_accessor draws: ::Array[XTwitterScraper::DrawListItem] attr_accessor has_more: bool @@ -17,65 +17,16 @@ module XTwitterScraper def next_cursor=: (String) -> String def initialize: ( - draws: ::Array[XTwitterScraper::Models::DrawListResponse::Draw], + draws: ::Array[XTwitterScraper::DrawListItem], has_more: bool, ?next_cursor: String ) -> void def to_hash: -> { - draws: ::Array[XTwitterScraper::Models::DrawListResponse::Draw], + draws: ::Array[XTwitterScraper::DrawListItem], has_more: bool, next_cursor: String } - - type draw = - { - id: String, - created_at: Time, - status: String, - total_entries: Integer, - tweet_url: String, - valid_entries: Integer, - drawn_at: Time - } - - class Draw < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor created_at: Time - - attr_accessor status: String - - attr_accessor total_entries: Integer - - attr_accessor tweet_url: String - - attr_accessor valid_entries: Integer - - attr_reader drawn_at: Time? - - def drawn_at=: (Time) -> Time - - def initialize: ( - id: String, - created_at: Time, - status: String, - total_entries: Integer, - tweet_url: String, - valid_entries: Integer, - ?drawn_at: Time - ) -> void - - def to_hash: -> { - id: String, - created_at: Time, - status: String, - total_entries: Integer, - tweet_url: String, - valid_entries: Integer, - drawn_at: Time - } - end end end end diff --git a/sig/x_twitter_scraper/models/draw_retrieve_response.rbs b/sig/x_twitter_scraper/models/draw_retrieve_response.rbs index 96cf540..9c61f8c 100644 --- a/sig/x_twitter_scraper/models/draw_retrieve_response.rbs +++ b/sig/x_twitter_scraper/models/draw_retrieve_response.rbs @@ -2,140 +2,24 @@ module XTwitterScraper module Models type draw_retrieve_response = { - draw: XTwitterScraper::Models::DrawRetrieveResponse::Draw, - winners: ::Array[XTwitterScraper::Models::DrawRetrieveResponse::Winner] + draw: XTwitterScraper::DrawDetail, + winners: ::Array[XTwitterScraper::Winner] } class DrawRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor draw: XTwitterScraper::Models::DrawRetrieveResponse::Draw + attr_accessor draw: XTwitterScraper::DrawDetail - attr_accessor winners: ::Array[XTwitterScraper::Models::DrawRetrieveResponse::Winner] + attr_accessor winners: ::Array[XTwitterScraper::Winner] def initialize: ( - draw: XTwitterScraper::Models::DrawRetrieveResponse::Draw, - winners: ::Array[XTwitterScraper::Models::DrawRetrieveResponse::Winner] + draw: XTwitterScraper::DrawDetail, + winners: ::Array[XTwitterScraper::Winner] ) -> void def to_hash: -> { - draw: XTwitterScraper::Models::DrawRetrieveResponse::Draw, - winners: ::Array[XTwitterScraper::Models::DrawRetrieveResponse::Winner] + draw: XTwitterScraper::DrawDetail, + winners: ::Array[XTwitterScraper::Winner] } - - type draw = - { - id: String, - created_at: Time, - status: String, - total_entries: Integer, - tweet_author_username: String, - tweet_id: String, - tweet_like_count: Integer, - tweet_quote_count: Integer, - tweet_reply_count: Integer, - tweet_retweet_count: Integer, - tweet_text: String, - tweet_url: String, - valid_entries: Integer, - drawn_at: Time - } - - class Draw < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor created_at: Time - - attr_accessor status: String - - attr_accessor total_entries: Integer - - attr_accessor tweet_author_username: String - - attr_accessor tweet_id: String - - attr_accessor tweet_like_count: Integer - - attr_accessor tweet_quote_count: Integer - - attr_accessor tweet_reply_count: Integer - - attr_accessor tweet_retweet_count: Integer - - attr_accessor tweet_text: String - - attr_accessor tweet_url: String - - attr_accessor valid_entries: Integer - - attr_reader drawn_at: Time? - - def drawn_at=: (Time) -> Time - - def initialize: ( - id: String, - created_at: Time, - status: String, - total_entries: Integer, - tweet_author_username: String, - tweet_id: String, - tweet_like_count: Integer, - tweet_quote_count: Integer, - tweet_reply_count: Integer, - tweet_retweet_count: Integer, - tweet_text: String, - tweet_url: String, - valid_entries: Integer, - ?drawn_at: Time - ) -> void - - def to_hash: -> { - id: String, - created_at: Time, - status: String, - total_entries: Integer, - tweet_author_username: String, - tweet_id: String, - tweet_like_count: Integer, - tweet_quote_count: Integer, - tweet_reply_count: Integer, - tweet_retweet_count: Integer, - tweet_text: String, - tweet_url: String, - valid_entries: Integer, - drawn_at: Time - } - end - - type winner = - { - author_username: String, - is_backup: bool, - position: Integer, - tweet_id: String - } - - class Winner < XTwitterScraper::Internal::Type::BaseModel - attr_accessor author_username: String - - attr_accessor is_backup: bool - - attr_accessor position: Integer - - attr_accessor tweet_id: String - - def initialize: ( - author_username: String, - is_backup: bool, - position: Integer, - tweet_id: String - ) -> void - - def to_hash: -> { - author_username: String, - is_backup: bool, - position: Integer, - tweet_id: String - } - end end end end diff --git a/sig/x_twitter_scraper/models/draw_run_response.rbs b/sig/x_twitter_scraper/models/draw_run_response.rbs index 4637404..a3d20a9 100644 --- a/sig/x_twitter_scraper/models/draw_run_response.rbs +++ b/sig/x_twitter_scraper/models/draw_run_response.rbs @@ -6,7 +6,7 @@ module XTwitterScraper total_entries: Integer, tweet_id: String, valid_entries: Integer, - winners: ::Array[XTwitterScraper::Models::DrawRunResponse::Winner] + winners: ::Array[XTwitterScraper::Winner] } class DrawRunResponse < XTwitterScraper::Internal::Type::BaseModel @@ -18,14 +18,14 @@ module XTwitterScraper attr_accessor valid_entries: Integer - attr_accessor winners: ::Array[XTwitterScraper::Models::DrawRunResponse::Winner] + attr_accessor winners: ::Array[XTwitterScraper::Winner] def initialize: ( id: String, total_entries: Integer, tweet_id: String, valid_entries: Integer, - winners: ::Array[XTwitterScraper::Models::DrawRunResponse::Winner] + winners: ::Array[XTwitterScraper::Winner] ) -> void def to_hash: -> { @@ -33,40 +33,8 @@ module XTwitterScraper total_entries: Integer, tweet_id: String, valid_entries: Integer, - winners: ::Array[XTwitterScraper::Models::DrawRunResponse::Winner] + winners: ::Array[XTwitterScraper::Winner] } - - type winner = - { - author_username: String, - is_backup: bool, - position: Integer, - tweet_id: String - } - - class Winner < XTwitterScraper::Internal::Type::BaseModel - attr_accessor author_username: String - - attr_accessor is_backup: bool - - attr_accessor position: Integer - - attr_accessor tweet_id: String - - def initialize: ( - author_username: String, - is_backup: bool, - position: Integer, - tweet_id: String - ) -> void - - def to_hash: -> { - author_username: String, - is_backup: bool, - position: Integer, - tweet_id: String - } - end end end end diff --git a/sig/x_twitter_scraper/models/event.rbs b/sig/x_twitter_scraper/models/event.rbs index b3f4b79..846a758 100644 --- a/sig/x_twitter_scraper/models/event.rbs +++ b/sig/x_twitter_scraper/models/event.rbs @@ -6,7 +6,7 @@ module XTwitterScraper data: ::Hash[Symbol, top], monitor_id: String, occurred_at: Time, - type: XTwitterScraper::Models::Event::type_, + type: XTwitterScraper::Models::event_type, username: String } @@ -19,7 +19,7 @@ module XTwitterScraper attr_accessor occurred_at: Time - attr_accessor type: XTwitterScraper::Models::Event::type_ + attr_accessor type: XTwitterScraper::Models::event_type attr_accessor username: String @@ -28,7 +28,7 @@ module XTwitterScraper data: ::Hash[Symbol, top], monitor_id: String, occurred_at: Time, - type: XTwitterScraper::Models::Event::type_, + type: XTwitterScraper::Models::event_type, username: String ) -> void @@ -37,30 +37,9 @@ module XTwitterScraper data: ::Hash[Symbol, top], monitor_id: String, occurred_at: Time, - type: XTwitterScraper::Models::Event::type_, + type: XTwitterScraper::Models::event_type, username: String } - - type type_ = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module Type - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::Event::type_] - end end end end diff --git a/sig/x_twitter_scraper/models/event_detail.rbs b/sig/x_twitter_scraper/models/event_detail.rbs index c67a1a7..fd7a97a 100644 --- a/sig/x_twitter_scraper/models/event_detail.rbs +++ b/sig/x_twitter_scraper/models/event_detail.rbs @@ -6,7 +6,7 @@ module XTwitterScraper data: ::Hash[Symbol, top], monitor_id: String, occurred_at: Time, - type: XTwitterScraper::Models::EventDetail::type_, + type: XTwitterScraper::Models::event_type, username: String, x_event_id: String } @@ -20,7 +20,7 @@ module XTwitterScraper attr_accessor occurred_at: Time - attr_accessor type: XTwitterScraper::Models::EventDetail::type_ + attr_accessor type: XTwitterScraper::Models::event_type attr_accessor username: String @@ -33,7 +33,7 @@ module XTwitterScraper data: ::Hash[Symbol, top], monitor_id: String, occurred_at: Time, - type: XTwitterScraper::Models::EventDetail::type_, + type: XTwitterScraper::Models::event_type, username: String, ?x_event_id: String ) -> void @@ -43,31 +43,10 @@ module XTwitterScraper data: ::Hash[Symbol, top], monitor_id: String, occurred_at: Time, - type: XTwitterScraper::Models::EventDetail::type_, + type: XTwitterScraper::Models::event_type, username: String, x_event_id: String } - - type type_ = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module Type - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::EventDetail::type_] - end end end end diff --git a/sig/x_twitter_scraper/models/event_list_params.rbs b/sig/x_twitter_scraper/models/event_list_params.rbs index bc319d9..af33e9d 100644 --- a/sig/x_twitter_scraper/models/event_list_params.rbs +++ b/sig/x_twitter_scraper/models/event_list_params.rbs @@ -3,7 +3,7 @@ module XTwitterScraper type event_list_params = { after: String, - event_type: XTwitterScraper::Models::EventListParams::event_type, + event_type: XTwitterScraper::Models::event_type, limit: Integer, monitor_id: String } @@ -17,11 +17,11 @@ module XTwitterScraper def after=: (String) -> String - attr_reader event_type: XTwitterScraper::Models::EventListParams::event_type? + attr_reader event_type: XTwitterScraper::Models::event_type? def event_type=: ( - XTwitterScraper::Models::EventListParams::event_type - ) -> XTwitterScraper::Models::EventListParams::event_type + XTwitterScraper::Models::event_type + ) -> XTwitterScraper::Models::event_type attr_reader limit: Integer? @@ -33,7 +33,7 @@ module XTwitterScraper def initialize: ( ?after: String, - ?event_type: XTwitterScraper::Models::EventListParams::event_type, + ?event_type: XTwitterScraper::Models::event_type, ?limit: Integer, ?monitor_id: String, ?request_options: XTwitterScraper::request_opts @@ -41,32 +41,11 @@ module XTwitterScraper def to_hash: -> { after: String, - event_type: XTwitterScraper::Models::EventListParams::event_type, + event_type: XTwitterScraper::Models::event_type, limit: Integer, monitor_id: String, request_options: XTwitterScraper::RequestOptions } - - type event_type = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::EventListParams::event_type] - end end end end diff --git a/sig/x_twitter_scraper/models/event_list_response.rbs b/sig/x_twitter_scraper/models/event_list_response.rbs index 4677f38..d21c287 100644 --- a/sig/x_twitter_scraper/models/event_list_response.rbs +++ b/sig/x_twitter_scraper/models/event_list_response.rbs @@ -2,13 +2,13 @@ module XTwitterScraper module Models type event_list_response = { - events: ::Array[XTwitterScraper::Models::EventListResponse::Event], + events: ::Array[XTwitterScraper::Event], has_more: bool, next_cursor: String } class EventListResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor events: ::Array[XTwitterScraper::Models::EventListResponse::Event] + attr_accessor events: ::Array[XTwitterScraper::Event] attr_accessor has_more: bool @@ -17,79 +17,16 @@ module XTwitterScraper def next_cursor=: (String) -> String def initialize: ( - events: ::Array[XTwitterScraper::Models::EventListResponse::Event], + events: ::Array[XTwitterScraper::Event], has_more: bool, ?next_cursor: String ) -> void def to_hash: -> { - events: ::Array[XTwitterScraper::Models::EventListResponse::Event], + events: ::Array[XTwitterScraper::Event], has_more: bool, next_cursor: String } - - type event = - { - id: String, - data: ::Hash[Symbol, top], - monitor_id: String, - occurred_at: Time, - type: XTwitterScraper::Models::EventListResponse::Event::type_, - username: String - } - - class Event < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor data: ::Hash[Symbol, top] - - attr_accessor monitor_id: String - - attr_accessor occurred_at: Time - - attr_accessor type: XTwitterScraper::Models::EventListResponse::Event::type_ - - attr_accessor username: String - - def initialize: ( - id: String, - data: ::Hash[Symbol, top], - monitor_id: String, - occurred_at: Time, - type: XTwitterScraper::Models::EventListResponse::Event::type_, - username: String - ) -> void - - def to_hash: -> { - id: String, - data: ::Hash[Symbol, top], - monitor_id: String, - occurred_at: Time, - type: XTwitterScraper::Models::EventListResponse::Event::type_, - username: String - } - - type type_ = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module Type - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::EventListResponse::Event::type_] - end - end end end end diff --git a/sig/x_twitter_scraper/models/event_retrieve_response.rbs b/sig/x_twitter_scraper/models/event_retrieve_response.rbs deleted file mode 100644 index 5d41b7b..0000000 --- a/sig/x_twitter_scraper/models/event_retrieve_response.rbs +++ /dev/null @@ -1,73 +0,0 @@ -module XTwitterScraper - module Models - type event_retrieve_response = - { - id: String, - data: ::Hash[Symbol, top], - monitor_id: String, - occurred_at: Time, - type: XTwitterScraper::Models::EventRetrieveResponse::type_, - username: String, - x_event_id: String - } - - class EventRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor data: ::Hash[Symbol, top] - - attr_accessor monitor_id: String - - attr_accessor occurred_at: Time - - attr_accessor type: XTwitterScraper::Models::EventRetrieveResponse::type_ - - attr_accessor username: String - - attr_reader x_event_id: String? - - def x_event_id=: (String) -> String - - def initialize: ( - id: String, - data: ::Hash[Symbol, top], - monitor_id: String, - occurred_at: Time, - type: XTwitterScraper::Models::EventRetrieveResponse::type_, - username: String, - ?x_event_id: String - ) -> void - - def to_hash: -> { - id: String, - data: ::Hash[Symbol, top], - monitor_id: String, - occurred_at: Time, - type: XTwitterScraper::Models::EventRetrieveResponse::type_, - username: String, - x_event_id: String - } - - type type_ = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module Type - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::EventRetrieveResponse::type_] - end - end - end -end diff --git a/sig/x_twitter_scraper/models/extraction_list_response.rbs b/sig/x_twitter_scraper/models/extraction_list_response.rbs index 76ced3e..3a7bf61 100644 --- a/sig/x_twitter_scraper/models/extraction_list_response.rbs +++ b/sig/x_twitter_scraper/models/extraction_list_response.rbs @@ -2,13 +2,13 @@ module XTwitterScraper module Models type extraction_list_response = { - extractions: ::Array[XTwitterScraper::Models::ExtractionListResponse::Extraction], + extractions: ::Array[XTwitterScraper::ExtractionJob], has_more: bool, next_cursor: String } class ExtractionListResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor extractions: ::Array[XTwitterScraper::Models::ExtractionListResponse::Extraction] + attr_accessor extractions: ::Array[XTwitterScraper::ExtractionJob] attr_accessor has_more: bool @@ -17,121 +17,16 @@ module XTwitterScraper def next_cursor=: (String) -> String def initialize: ( - extractions: ::Array[XTwitterScraper::Models::ExtractionListResponse::Extraction], + extractions: ::Array[XTwitterScraper::ExtractionJob], has_more: bool, ?next_cursor: String ) -> void def to_hash: -> { - extractions: ::Array[XTwitterScraper::Models::ExtractionListResponse::Extraction], + extractions: ::Array[XTwitterScraper::ExtractionJob], has_more: bool, next_cursor: String } - - type extraction = - { - id: String, - created_at: Time, - status: XTwitterScraper::Models::ExtractionListResponse::Extraction::status, - tool_type: XTwitterScraper::Models::ExtractionListResponse::Extraction::tool_type, - total_results: Integer, - completed_at: Time - } - - class Extraction < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor created_at: Time - - attr_accessor status: XTwitterScraper::Models::ExtractionListResponse::Extraction::status - - attr_accessor tool_type: XTwitterScraper::Models::ExtractionListResponse::Extraction::tool_type - - attr_accessor total_results: Integer - - attr_reader completed_at: Time? - - def completed_at=: (Time) -> Time - - def initialize: ( - id: String, - created_at: Time, - status: XTwitterScraper::Models::ExtractionListResponse::Extraction::status, - tool_type: XTwitterScraper::Models::ExtractionListResponse::Extraction::tool_type, - total_results: Integer, - ?completed_at: Time - ) -> void - - def to_hash: -> { - id: String, - created_at: Time, - status: XTwitterScraper::Models::ExtractionListResponse::Extraction::status, - tool_type: XTwitterScraper::Models::ExtractionListResponse::Extraction::tool_type, - total_results: Integer, - completed_at: Time - } - - type status = :running | :completed | :failed - - module Status - extend XTwitterScraper::Internal::Type::Enum - - RUNNING: :running - COMPLETED: :completed - FAILED: :failed - - def self?.values: -> ::Array[XTwitterScraper::Models::ExtractionListResponse::Extraction::status] - end - - type tool_type = - :article_extractor - | :community_extractor - | :community_moderator_explorer - | :community_post_extractor - | :community_search - | :follower_explorer - | :following_explorer - | :list_follower_explorer - | :list_member_extractor - | :list_post_extractor - | :mention_extractor - | :people_search - | :post_extractor - | :quote_extractor - | :reply_extractor - | :repost_extractor - | :space_explorer - | :thread_extractor - | :tweet_search_extractor - | :verified_follower_explorer - - module ToolType - extend XTwitterScraper::Internal::Type::Enum - - ARTICLE_EXTRACTOR: :article_extractor - COMMUNITY_EXTRACTOR: :community_extractor - COMMUNITY_MODERATOR_EXPLORER: :community_moderator_explorer - COMMUNITY_POST_EXTRACTOR: :community_post_extractor - COMMUNITY_SEARCH: :community_search - FOLLOWER_EXPLORER: :follower_explorer - FOLLOWING_EXPLORER: :following_explorer - LIST_FOLLOWER_EXPLORER: :list_follower_explorer - LIST_MEMBER_EXTRACTOR: :list_member_extractor - LIST_POST_EXTRACTOR: :list_post_extractor - MENTION_EXTRACTOR: :mention_extractor - PEOPLE_SEARCH: :people_search - POST_EXTRACTOR: :post_extractor - QUOTE_EXTRACTOR: :quote_extractor - REPLY_EXTRACTOR: :reply_extractor - REPOST_EXTRACTOR: :repost_extractor - SPACE_EXPLORER: :space_explorer - THREAD_EXTRACTOR: :thread_extractor - TWEET_SEARCH_EXTRACTOR: :tweet_search_extractor - VERIFIED_FOLLOWER_EXPLORER: :verified_follower_explorer - - def self?.values: -> ::Array[XTwitterScraper::Models::ExtractionListResponse::Extraction::tool_type] - end - end end end end diff --git a/sig/x_twitter_scraper/models/integration.rbs b/sig/x_twitter_scraper/models/integration.rbs index b9315f1..7c8dbfa 100644 --- a/sig/x_twitter_scraper/models/integration.rbs +++ b/sig/x_twitter_scraper/models/integration.rbs @@ -5,7 +5,7 @@ module XTwitterScraper id: String, config: ::Hash[Symbol, top], created_at: Time, - event_types: ::Array[XTwitterScraper::Models::Integration::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], is_active: bool, name: String, type: XTwitterScraper::Models::Integration::type_, @@ -22,7 +22,7 @@ module XTwitterScraper attr_accessor created_at: Time - attr_accessor event_types: ::Array[XTwitterScraper::Models::Integration::event_type] + attr_accessor event_types: ::Array[XTwitterScraper::Models::event_type] attr_accessor is_active: bool @@ -50,7 +50,7 @@ module XTwitterScraper id: String, config: ::Hash[Symbol, top], created_at: Time, - event_types: ::Array[XTwitterScraper::Models::Integration::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], is_active: bool, name: String, type: XTwitterScraper::Models::Integration::type_, @@ -64,7 +64,7 @@ module XTwitterScraper id: String, config: ::Hash[Symbol, top], created_at: Time, - event_types: ::Array[XTwitterScraper::Models::Integration::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], is_active: bool, name: String, type: XTwitterScraper::Models::Integration::type_, @@ -74,27 +74,6 @@ module XTwitterScraper silent_push: bool } - type event_type = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::Integration::event_type] - end - type type_ = :telegram module Type diff --git a/sig/x_twitter_scraper/models/integration_create_params.rbs b/sig/x_twitter_scraper/models/integration_create_params.rbs index fc80c05..1f48044 100644 --- a/sig/x_twitter_scraper/models/integration_create_params.rbs +++ b/sig/x_twitter_scraper/models/integration_create_params.rbs @@ -3,7 +3,7 @@ module XTwitterScraper type integration_create_params = { config: XTwitterScraper::IntegrationCreateParams::Config, - event_types: ::Array[XTwitterScraper::Models::IntegrationCreateParams::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], name: String, type: XTwitterScraper::Models::IntegrationCreateParams::type_ } @@ -15,7 +15,7 @@ module XTwitterScraper attr_accessor config: XTwitterScraper::IntegrationCreateParams::Config - attr_accessor event_types: ::Array[XTwitterScraper::Models::IntegrationCreateParams::event_type] + attr_accessor event_types: ::Array[XTwitterScraper::Models::event_type] attr_accessor name: String @@ -23,7 +23,7 @@ module XTwitterScraper def initialize: ( config: XTwitterScraper::IntegrationCreateParams::Config, - event_types: ::Array[XTwitterScraper::Models::IntegrationCreateParams::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], name: String, type: XTwitterScraper::Models::IntegrationCreateParams::type_, ?request_options: XTwitterScraper::request_opts @@ -31,7 +31,7 @@ module XTwitterScraper def to_hash: -> { config: XTwitterScraper::IntegrationCreateParams::Config, - event_types: ::Array[XTwitterScraper::Models::IntegrationCreateParams::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], name: String, type: XTwitterScraper::Models::IntegrationCreateParams::type_, request_options: XTwitterScraper::RequestOptions @@ -47,27 +47,6 @@ module XTwitterScraper def to_hash: -> { chat_id: String } end - type event_type = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::IntegrationCreateParams::event_type] - end - type type_ = :telegram module Type diff --git a/sig/x_twitter_scraper/models/integration_create_response.rbs b/sig/x_twitter_scraper/models/integration_create_response.rbs deleted file mode 100644 index 7dcdd8e..0000000 --- a/sig/x_twitter_scraper/models/integration_create_response.rbs +++ /dev/null @@ -1,109 +0,0 @@ -module XTwitterScraper - module Models - type integration_create_response = - { - id: String, - config: ::Hash[Symbol, top], - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::IntegrationCreateResponse::event_type], - is_active: bool, - name: String, - type: XTwitterScraper::Models::IntegrationCreateResponse::type_, - filters: ::Hash[Symbol, top], - message_template: String, - scope_all_monitors: bool, - silent_push: bool - } - - class IntegrationCreateResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor config: ::Hash[Symbol, top] - - attr_accessor created_at: Time - - attr_accessor event_types: ::Array[XTwitterScraper::Models::IntegrationCreateResponse::event_type] - - attr_accessor is_active: bool - - attr_accessor name: String - - attr_accessor type: XTwitterScraper::Models::IntegrationCreateResponse::type_ - - attr_reader filters: ::Hash[Symbol, top]? - - def filters=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top] - - attr_reader message_template: String? - - def message_template=: (String) -> String - - attr_reader scope_all_monitors: bool? - - def scope_all_monitors=: (bool) -> bool - - attr_reader silent_push: bool? - - def silent_push=: (bool) -> bool - - def initialize: ( - id: String, - config: ::Hash[Symbol, top], - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::IntegrationCreateResponse::event_type], - is_active: bool, - name: String, - type: XTwitterScraper::Models::IntegrationCreateResponse::type_, - ?filters: ::Hash[Symbol, top], - ?message_template: String, - ?scope_all_monitors: bool, - ?silent_push: bool - ) -> void - - def to_hash: -> { - id: String, - config: ::Hash[Symbol, top], - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::IntegrationCreateResponse::event_type], - is_active: bool, - name: String, - type: XTwitterScraper::Models::IntegrationCreateResponse::type_, - filters: ::Hash[Symbol, top], - message_template: String, - scope_all_monitors: bool, - silent_push: bool - } - - type event_type = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::IntegrationCreateResponse::event_type] - end - - type type_ = :telegram - - module Type - extend XTwitterScraper::Internal::Type::Enum - - TELEGRAM: :telegram - - def self?.values: -> ::Array[XTwitterScraper::Models::IntegrationCreateResponse::type_] - end - end - end -end diff --git a/sig/x_twitter_scraper/models/integration_list_deliveries_response.rbs b/sig/x_twitter_scraper/models/integration_list_deliveries_response.rbs index b78648b..4582d45 100644 --- a/sig/x_twitter_scraper/models/integration_list_deliveries_response.rbs +++ b/sig/x_twitter_scraper/models/integration_list_deliveries_response.rbs @@ -1,92 +1,18 @@ module XTwitterScraper module Models type integration_list_deliveries_response = - { - deliveries: ::Array[XTwitterScraper::Models::IntegrationListDeliveriesResponse::Delivery] - } + { deliveries: ::Array[XTwitterScraper::IntegrationDelivery] } class IntegrationListDeliveriesResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor deliveries: ::Array[XTwitterScraper::Models::IntegrationListDeliveriesResponse::Delivery] + attr_accessor deliveries: ::Array[XTwitterScraper::IntegrationDelivery] def initialize: ( - deliveries: ::Array[XTwitterScraper::Models::IntegrationListDeliveriesResponse::Delivery] + deliveries: ::Array[XTwitterScraper::IntegrationDelivery] ) -> void def to_hash: -> { - deliveries: ::Array[XTwitterScraper::Models::IntegrationListDeliveriesResponse::Delivery] + deliveries: ::Array[XTwitterScraper::IntegrationDelivery] } - - type delivery = - { - id: String, - attempts: Integer, - created_at: Time, - event_type: String, - status: String, - delivered_at: Time, - last_error: String, - last_status_code: Integer, - source_id: String, - source_type: String - } - - class Delivery < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor attempts: Integer - - attr_accessor created_at: Time - - attr_accessor event_type: String - - attr_accessor status: String - - attr_reader delivered_at: Time? - - def delivered_at=: (Time) -> Time - - attr_reader last_error: String? - - def last_error=: (String) -> String - - attr_reader last_status_code: Integer? - - def last_status_code=: (Integer) -> Integer - - attr_reader source_id: String? - - def source_id=: (String) -> String - - attr_reader source_type: String? - - def source_type=: (String) -> String - - def initialize: ( - id: String, - attempts: Integer, - created_at: Time, - event_type: String, - status: String, - ?delivered_at: Time, - ?last_error: String, - ?last_status_code: Integer, - ?source_id: String, - ?source_type: String - ) -> void - - def to_hash: -> { - id: String, - attempts: Integer, - created_at: Time, - event_type: String, - status: String, - delivered_at: Time, - last_error: String, - last_status_code: Integer, - source_id: String, - source_type: String - } - end end end end diff --git a/sig/x_twitter_scraper/models/integration_list_response.rbs b/sig/x_twitter_scraper/models/integration_list_response.rbs index a58f8c8..2d64d13 100644 --- a/sig/x_twitter_scraper/models/integration_list_response.rbs +++ b/sig/x_twitter_scraper/models/integration_list_response.rbs @@ -1,126 +1,16 @@ module XTwitterScraper module Models type integration_list_response = - { - integrations: ::Array[XTwitterScraper::Models::IntegrationListResponse::Integration] - } + { integrations: ::Array[XTwitterScraper::Integration] } class IntegrationListResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor integrations: ::Array[XTwitterScraper::Models::IntegrationListResponse::Integration] + attr_accessor integrations: ::Array[XTwitterScraper::Integration] def initialize: ( - integrations: ::Array[XTwitterScraper::Models::IntegrationListResponse::Integration] + integrations: ::Array[XTwitterScraper::Integration] ) -> void - def to_hash: -> { - integrations: ::Array[XTwitterScraper::Models::IntegrationListResponse::Integration] - } - - type integration = - { - id: String, - config: ::Hash[Symbol, top], - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::IntegrationListResponse::Integration::event_type], - is_active: bool, - name: String, - type: XTwitterScraper::Models::IntegrationListResponse::Integration::type_, - filters: ::Hash[Symbol, top], - message_template: String, - scope_all_monitors: bool, - silent_push: bool - } - - class Integration < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor config: ::Hash[Symbol, top] - - attr_accessor created_at: Time - - attr_accessor event_types: ::Array[XTwitterScraper::Models::IntegrationListResponse::Integration::event_type] - - attr_accessor is_active: bool - - attr_accessor name: String - - attr_accessor type: XTwitterScraper::Models::IntegrationListResponse::Integration::type_ - - attr_reader filters: ::Hash[Symbol, top]? - - def filters=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top] - - attr_reader message_template: String? - - def message_template=: (String) -> String - - attr_reader scope_all_monitors: bool? - - def scope_all_monitors=: (bool) -> bool - - attr_reader silent_push: bool? - - def silent_push=: (bool) -> bool - - def initialize: ( - id: String, - config: ::Hash[Symbol, top], - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::IntegrationListResponse::Integration::event_type], - is_active: bool, - name: String, - type: XTwitterScraper::Models::IntegrationListResponse::Integration::type_, - ?filters: ::Hash[Symbol, top], - ?message_template: String, - ?scope_all_monitors: bool, - ?silent_push: bool - ) -> void - - def to_hash: -> { - id: String, - config: ::Hash[Symbol, top], - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::IntegrationListResponse::Integration::event_type], - is_active: bool, - name: String, - type: XTwitterScraper::Models::IntegrationListResponse::Integration::type_, - filters: ::Hash[Symbol, top], - message_template: String, - scope_all_monitors: bool, - silent_push: bool - } - - type event_type = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::IntegrationListResponse::Integration::event_type] - end - - type type_ = :telegram - - module Type - extend XTwitterScraper::Internal::Type::Enum - - TELEGRAM: :telegram - - def self?.values: -> ::Array[XTwitterScraper::Models::IntegrationListResponse::Integration::type_] - end - end + def to_hash: -> { integrations: ::Array[XTwitterScraper::Integration] } end end end diff --git a/sig/x_twitter_scraper/models/integration_retrieve_response.rbs b/sig/x_twitter_scraper/models/integration_retrieve_response.rbs deleted file mode 100644 index e9f804b..0000000 --- a/sig/x_twitter_scraper/models/integration_retrieve_response.rbs +++ /dev/null @@ -1,109 +0,0 @@ -module XTwitterScraper - module Models - type integration_retrieve_response = - { - id: String, - config: ::Hash[Symbol, top], - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::IntegrationRetrieveResponse::event_type], - is_active: bool, - name: String, - type: XTwitterScraper::Models::IntegrationRetrieveResponse::type_, - filters: ::Hash[Symbol, top], - message_template: String, - scope_all_monitors: bool, - silent_push: bool - } - - class IntegrationRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor config: ::Hash[Symbol, top] - - attr_accessor created_at: Time - - attr_accessor event_types: ::Array[XTwitterScraper::Models::IntegrationRetrieveResponse::event_type] - - attr_accessor is_active: bool - - attr_accessor name: String - - attr_accessor type: XTwitterScraper::Models::IntegrationRetrieveResponse::type_ - - attr_reader filters: ::Hash[Symbol, top]? - - def filters=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top] - - attr_reader message_template: String? - - def message_template=: (String) -> String - - attr_reader scope_all_monitors: bool? - - def scope_all_monitors=: (bool) -> bool - - attr_reader silent_push: bool? - - def silent_push=: (bool) -> bool - - def initialize: ( - id: String, - config: ::Hash[Symbol, top], - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::IntegrationRetrieveResponse::event_type], - is_active: bool, - name: String, - type: XTwitterScraper::Models::IntegrationRetrieveResponse::type_, - ?filters: ::Hash[Symbol, top], - ?message_template: String, - ?scope_all_monitors: bool, - ?silent_push: bool - ) -> void - - def to_hash: -> { - id: String, - config: ::Hash[Symbol, top], - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::IntegrationRetrieveResponse::event_type], - is_active: bool, - name: String, - type: XTwitterScraper::Models::IntegrationRetrieveResponse::type_, - filters: ::Hash[Symbol, top], - message_template: String, - scope_all_monitors: bool, - silent_push: bool - } - - type event_type = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::IntegrationRetrieveResponse::event_type] - end - - type type_ = :telegram - - module Type - extend XTwitterScraper::Internal::Type::Enum - - TELEGRAM: :telegram - - def self?.values: -> ::Array[XTwitterScraper::Models::IntegrationRetrieveResponse::type_] - end - end - end -end diff --git a/sig/x_twitter_scraper/models/integration_update_params.rbs b/sig/x_twitter_scraper/models/integration_update_params.rbs index ebbf94d..ad04555 100644 --- a/sig/x_twitter_scraper/models/integration_update_params.rbs +++ b/sig/x_twitter_scraper/models/integration_update_params.rbs @@ -3,7 +3,7 @@ module XTwitterScraper type integration_update_params = { id: String, - event_types: ::Array[XTwitterScraper::Models::IntegrationUpdateParams::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], filters: ::Hash[Symbol, top], is_active: bool, message_template: ::Hash[Symbol, top], @@ -19,11 +19,11 @@ module XTwitterScraper attr_accessor id: String - attr_reader event_types: ::Array[XTwitterScraper::Models::IntegrationUpdateParams::event_type]? + attr_reader event_types: ::Array[XTwitterScraper::Models::event_type]? def event_types=: ( - ::Array[XTwitterScraper::Models::IntegrationUpdateParams::event_type] - ) -> ::Array[XTwitterScraper::Models::IntegrationUpdateParams::event_type] + ::Array[XTwitterScraper::Models::event_type] + ) -> ::Array[XTwitterScraper::Models::event_type] attr_reader filters: ::Hash[Symbol, top]? @@ -51,7 +51,7 @@ module XTwitterScraper def initialize: ( id: String, - ?event_types: ::Array[XTwitterScraper::Models::IntegrationUpdateParams::event_type], + ?event_types: ::Array[XTwitterScraper::Models::event_type], ?filters: ::Hash[Symbol, top], ?is_active: bool, ?message_template: ::Hash[Symbol, top], @@ -63,7 +63,7 @@ module XTwitterScraper def to_hash: -> { id: String, - event_types: ::Array[XTwitterScraper::Models::IntegrationUpdateParams::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], filters: ::Hash[Symbol, top], is_active: bool, message_template: ::Hash[Symbol, top], @@ -72,27 +72,6 @@ module XTwitterScraper silent_push: bool, request_options: XTwitterScraper::RequestOptions } - - type event_type = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::IntegrationUpdateParams::event_type] - end end end end diff --git a/sig/x_twitter_scraper/models/integration_update_response.rbs b/sig/x_twitter_scraper/models/integration_update_response.rbs deleted file mode 100644 index 3e6a191..0000000 --- a/sig/x_twitter_scraper/models/integration_update_response.rbs +++ /dev/null @@ -1,109 +0,0 @@ -module XTwitterScraper - module Models - type integration_update_response = - { - id: String, - config: ::Hash[Symbol, top], - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::IntegrationUpdateResponse::event_type], - is_active: bool, - name: String, - type: XTwitterScraper::Models::IntegrationUpdateResponse::type_, - filters: ::Hash[Symbol, top], - message_template: String, - scope_all_monitors: bool, - silent_push: bool - } - - class IntegrationUpdateResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor config: ::Hash[Symbol, top] - - attr_accessor created_at: Time - - attr_accessor event_types: ::Array[XTwitterScraper::Models::IntegrationUpdateResponse::event_type] - - attr_accessor is_active: bool - - attr_accessor name: String - - attr_accessor type: XTwitterScraper::Models::IntegrationUpdateResponse::type_ - - attr_reader filters: ::Hash[Symbol, top]? - - def filters=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top] - - attr_reader message_template: String? - - def message_template=: (String) -> String - - attr_reader scope_all_monitors: bool? - - def scope_all_monitors=: (bool) -> bool - - attr_reader silent_push: bool? - - def silent_push=: (bool) -> bool - - def initialize: ( - id: String, - config: ::Hash[Symbol, top], - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::IntegrationUpdateResponse::event_type], - is_active: bool, - name: String, - type: XTwitterScraper::Models::IntegrationUpdateResponse::type_, - ?filters: ::Hash[Symbol, top], - ?message_template: String, - ?scope_all_monitors: bool, - ?silent_push: bool - ) -> void - - def to_hash: -> { - id: String, - config: ::Hash[Symbol, top], - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::IntegrationUpdateResponse::event_type], - is_active: bool, - name: String, - type: XTwitterScraper::Models::IntegrationUpdateResponse::type_, - filters: ::Hash[Symbol, top], - message_template: String, - scope_all_monitors: bool, - silent_push: bool - } - - type event_type = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::IntegrationUpdateResponse::event_type] - end - - type type_ = :telegram - - module Type - extend XTwitterScraper::Internal::Type::Enum - - TELEGRAM: :telegram - - def self?.values: -> ::Array[XTwitterScraper::Models::IntegrationUpdateResponse::type_] - end - end - end -end diff --git a/sig/x_twitter_scraper/models/monitor.rbs b/sig/x_twitter_scraper/models/monitor.rbs index bc05dae..630bad5 100644 --- a/sig/x_twitter_scraper/models/monitor.rbs +++ b/sig/x_twitter_scraper/models/monitor.rbs @@ -4,7 +4,7 @@ module XTwitterScraper { id: String, created_at: Time, - event_types: ::Array[XTwitterScraper::Models::Monitor::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], is_active: bool, username: String, x_user_id: String @@ -15,7 +15,7 @@ module XTwitterScraper attr_accessor created_at: Time - attr_accessor event_types: ::Array[XTwitterScraper::Models::Monitor::event_type] + attr_accessor event_types: ::Array[XTwitterScraper::Models::event_type] attr_accessor is_active: bool @@ -26,7 +26,7 @@ module XTwitterScraper def initialize: ( id: String, created_at: Time, - event_types: ::Array[XTwitterScraper::Models::Monitor::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], is_active: bool, username: String, x_user_id: String @@ -35,32 +35,11 @@ module XTwitterScraper def to_hash: -> { id: String, created_at: Time, - event_types: ::Array[XTwitterScraper::Models::Monitor::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], is_active: bool, username: String, x_user_id: String } - - type event_type = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::Monitor::event_type] - end end end end diff --git a/sig/x_twitter_scraper/models/monitor_create_params.rbs b/sig/x_twitter_scraper/models/monitor_create_params.rbs index 285814d..ad27098 100644 --- a/sig/x_twitter_scraper/models/monitor_create_params.rbs +++ b/sig/x_twitter_scraper/models/monitor_create_params.rbs @@ -2,7 +2,7 @@ module XTwitterScraper module Models type monitor_create_params = { - event_types: ::Array[XTwitterScraper::Models::MonitorCreateParams::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], username: String } & XTwitterScraper::Internal::Type::request_parameters @@ -11,42 +11,21 @@ module XTwitterScraper extend XTwitterScraper::Internal::Type::RequestParameters::Converter include XTwitterScraper::Internal::Type::RequestParameters - attr_accessor event_types: ::Array[XTwitterScraper::Models::MonitorCreateParams::event_type] + attr_accessor event_types: ::Array[XTwitterScraper::Models::event_type] attr_accessor username: String def initialize: ( - event_types: ::Array[XTwitterScraper::Models::MonitorCreateParams::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], username: String, ?request_options: XTwitterScraper::request_opts ) -> void def to_hash: -> { - event_types: ::Array[XTwitterScraper::Models::MonitorCreateParams::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], username: String, request_options: XTwitterScraper::RequestOptions } - - type event_type = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::MonitorCreateParams::event_type] - end end end end diff --git a/sig/x_twitter_scraper/models/monitor_create_response.rbs b/sig/x_twitter_scraper/models/monitor_create_response.rbs index f715e38..c6a9155 100644 --- a/sig/x_twitter_scraper/models/monitor_create_response.rbs +++ b/sig/x_twitter_scraper/models/monitor_create_response.rbs @@ -4,7 +4,7 @@ module XTwitterScraper { id: String, created_at: Time, - event_types: ::Array[XTwitterScraper::Models::MonitorCreateResponse::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], username: String, x_user_id: String } @@ -14,7 +14,7 @@ module XTwitterScraper attr_accessor created_at: Time - attr_accessor event_types: ::Array[XTwitterScraper::Models::MonitorCreateResponse::event_type] + attr_accessor event_types: ::Array[XTwitterScraper::Models::event_type] attr_accessor username: String @@ -23,7 +23,7 @@ module XTwitterScraper def initialize: ( id: String, created_at: Time, - event_types: ::Array[XTwitterScraper::Models::MonitorCreateResponse::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], username: String, x_user_id: String ) -> void @@ -31,31 +31,10 @@ module XTwitterScraper def to_hash: -> { id: String, created_at: Time, - event_types: ::Array[XTwitterScraper::Models::MonitorCreateResponse::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], username: String, x_user_id: String } - - type event_type = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::MonitorCreateResponse::event_type] - end end end end diff --git a/sig/x_twitter_scraper/models/monitor_list_response.rbs b/sig/x_twitter_scraper/models/monitor_list_response.rbs index 05c86cd..171240a 100644 --- a/sig/x_twitter_scraper/models/monitor_list_response.rbs +++ b/sig/x_twitter_scraper/models/monitor_list_response.rbs @@ -1,88 +1,22 @@ module XTwitterScraper module Models type monitor_list_response = - { - monitors: ::Array[XTwitterScraper::Models::MonitorListResponse::Monitor], - total: Integer - } + { monitors: ::Array[XTwitterScraper::Monitor], total: Integer } class MonitorListResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor monitors: ::Array[XTwitterScraper::Models::MonitorListResponse::Monitor] + attr_accessor monitors: ::Array[XTwitterScraper::Monitor] attr_accessor total: Integer def initialize: ( - monitors: ::Array[XTwitterScraper::Models::MonitorListResponse::Monitor], + monitors: ::Array[XTwitterScraper::Monitor], total: Integer ) -> void def to_hash: -> { - monitors: ::Array[XTwitterScraper::Models::MonitorListResponse::Monitor], + monitors: ::Array[XTwitterScraper::Monitor], total: Integer } - - type monitor = - { - id: String, - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::MonitorListResponse::Monitor::event_type], - is_active: bool, - username: String, - x_user_id: String - } - - class Monitor < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor created_at: Time - - attr_accessor event_types: ::Array[XTwitterScraper::Models::MonitorListResponse::Monitor::event_type] - - attr_accessor is_active: bool - - attr_accessor username: String - - attr_accessor x_user_id: String - - def initialize: ( - id: String, - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::MonitorListResponse::Monitor::event_type], - is_active: bool, - username: String, - x_user_id: String - ) -> void - - def to_hash: -> { - id: String, - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::MonitorListResponse::Monitor::event_type], - is_active: bool, - username: String, - x_user_id: String - } - - type event_type = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::MonitorListResponse::Monitor::event_type] - end - end end end end diff --git a/sig/x_twitter_scraper/models/monitor_retrieve_response.rbs b/sig/x_twitter_scraper/models/monitor_retrieve_response.rbs deleted file mode 100644 index 0372384..0000000 --- a/sig/x_twitter_scraper/models/monitor_retrieve_response.rbs +++ /dev/null @@ -1,66 +0,0 @@ -module XTwitterScraper - module Models - type monitor_retrieve_response = - { - id: String, - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::MonitorRetrieveResponse::event_type], - is_active: bool, - username: String, - x_user_id: String - } - - class MonitorRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor created_at: Time - - attr_accessor event_types: ::Array[XTwitterScraper::Models::MonitorRetrieveResponse::event_type] - - attr_accessor is_active: bool - - attr_accessor username: String - - attr_accessor x_user_id: String - - def initialize: ( - id: String, - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::MonitorRetrieveResponse::event_type], - is_active: bool, - username: String, - x_user_id: String - ) -> void - - def to_hash: -> { - id: String, - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::MonitorRetrieveResponse::event_type], - is_active: bool, - username: String, - x_user_id: String - } - - type event_type = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::MonitorRetrieveResponse::event_type] - end - end - end -end diff --git a/sig/x_twitter_scraper/models/monitor_update_params.rbs b/sig/x_twitter_scraper/models/monitor_update_params.rbs index 2db66d7..1a2beb7 100644 --- a/sig/x_twitter_scraper/models/monitor_update_params.rbs +++ b/sig/x_twitter_scraper/models/monitor_update_params.rbs @@ -3,7 +3,7 @@ module XTwitterScraper type monitor_update_params = { id: String, - event_types: ::Array[XTwitterScraper::Models::MonitorUpdateParams::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], is_active: bool } & XTwitterScraper::Internal::Type::request_parameters @@ -14,11 +14,11 @@ module XTwitterScraper attr_accessor id: String - attr_reader event_types: ::Array[XTwitterScraper::Models::MonitorUpdateParams::event_type]? + attr_reader event_types: ::Array[XTwitterScraper::Models::event_type]? def event_types=: ( - ::Array[XTwitterScraper::Models::MonitorUpdateParams::event_type] - ) -> ::Array[XTwitterScraper::Models::MonitorUpdateParams::event_type] + ::Array[XTwitterScraper::Models::event_type] + ) -> ::Array[XTwitterScraper::Models::event_type] attr_reader is_active: bool? @@ -26,38 +26,17 @@ module XTwitterScraper def initialize: ( id: String, - ?event_types: ::Array[XTwitterScraper::Models::MonitorUpdateParams::event_type], + ?event_types: ::Array[XTwitterScraper::Models::event_type], ?is_active: bool, ?request_options: XTwitterScraper::request_opts ) -> void def to_hash: -> { id: String, - event_types: ::Array[XTwitterScraper::Models::MonitorUpdateParams::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], is_active: bool, request_options: XTwitterScraper::RequestOptions } - - type event_type = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::MonitorUpdateParams::event_type] - end end end end diff --git a/sig/x_twitter_scraper/models/monitor_update_response.rbs b/sig/x_twitter_scraper/models/monitor_update_response.rbs deleted file mode 100644 index dbd8927..0000000 --- a/sig/x_twitter_scraper/models/monitor_update_response.rbs +++ /dev/null @@ -1,66 +0,0 @@ -module XTwitterScraper - module Models - type monitor_update_response = - { - id: String, - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::MonitorUpdateResponse::event_type], - is_active: bool, - username: String, - x_user_id: String - } - - class MonitorUpdateResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor created_at: Time - - attr_accessor event_types: ::Array[XTwitterScraper::Models::MonitorUpdateResponse::event_type] - - attr_accessor is_active: bool - - attr_accessor username: String - - attr_accessor x_user_id: String - - def initialize: ( - id: String, - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::MonitorUpdateResponse::event_type], - is_active: bool, - username: String, - x_user_id: String - ) -> void - - def to_hash: -> { - id: String, - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::MonitorUpdateResponse::event_type], - is_active: bool, - username: String, - x_user_id: String - } - - type event_type = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::MonitorUpdateResponse::event_type] - end - end - end -end diff --git a/sig/x_twitter_scraper/models/paginated_tweets.rbs b/sig/x_twitter_scraper/models/paginated_tweets.rbs index 43507e2..65af5e0 100644 --- a/sig/x_twitter_scraper/models/paginated_tweets.rbs +++ b/sig/x_twitter_scraper/models/paginated_tweets.rbs @@ -4,7 +4,7 @@ module XTwitterScraper { has_next_page: bool, next_cursor: String, - tweets: ::Array[XTwitterScraper::PaginatedTweets::Tweet] + tweets: ::Array[XTwitterScraper::X::SearchTweet] } class PaginatedTweets < XTwitterScraper::Internal::Type::BaseModel @@ -12,135 +12,19 @@ module XTwitterScraper attr_accessor next_cursor: String - attr_accessor tweets: ::Array[XTwitterScraper::PaginatedTweets::Tweet] + attr_accessor tweets: ::Array[XTwitterScraper::X::SearchTweet] def initialize: ( has_next_page: bool, next_cursor: String, - tweets: ::Array[XTwitterScraper::PaginatedTweets::Tweet] + tweets: ::Array[XTwitterScraper::X::SearchTweet] ) -> void def to_hash: -> { has_next_page: bool, next_cursor: String, - tweets: ::Array[XTwitterScraper::PaginatedTweets::Tweet] + tweets: ::Array[XTwitterScraper::X::SearchTweet] } - - type tweet = - { - id: String, - text: String, - author: XTwitterScraper::PaginatedTweets::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor text: String - - attr_reader author: XTwitterScraper::PaginatedTweets::Tweet::Author? - - def author=: ( - XTwitterScraper::PaginatedTweets::Tweet::Author - ) -> XTwitterScraper::PaginatedTweets::Tweet::Author - - attr_reader bookmark_count: Integer? - - def bookmark_count=: (Integer) -> Integer - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader is_note_tweet: bool? - - def is_note_tweet=: (bool) -> bool - - attr_reader like_count: Integer? - - def like_count=: (Integer) -> Integer - - attr_reader quote_count: Integer? - - def quote_count=: (Integer) -> Integer - - attr_reader reply_count: Integer? - - def reply_count=: (Integer) -> Integer - - attr_reader retweet_count: Integer? - - def retweet_count=: (Integer) -> Integer - - attr_reader view_count: Integer? - - def view_count=: (Integer) -> Integer - - def initialize: ( - id: String, - text: String, - ?author: XTwitterScraper::PaginatedTweets::Tweet::Author, - ?bookmark_count: Integer, - ?created_at: String, - ?is_note_tweet: bool, - ?like_count: Integer, - ?quote_count: Integer, - ?reply_count: Integer, - ?retweet_count: Integer, - ?view_count: Integer - ) -> void - - def to_hash: -> { - id: String, - text: String, - author: XTwitterScraper::PaginatedTweets::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - type author = - { id: String, name: String, username: String, verified: bool } - - class Author < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - verified: bool - } - end - end end end end diff --git a/sig/x_twitter_scraper/models/paginated_users.rbs b/sig/x_twitter_scraper/models/paginated_users.rbs index 10688a6..f139b41 100644 --- a/sig/x_twitter_scraper/models/paginated_users.rbs +++ b/sig/x_twitter_scraper/models/paginated_users.rbs @@ -4,7 +4,7 @@ module XTwitterScraper { has_next_page: bool, next_cursor: String, - users: ::Array[XTwitterScraper::PaginatedUsers::User] + users: ::Array[XTwitterScraper::X::UserProfile] } class PaginatedUsers < XTwitterScraper::Internal::Type::BaseModel @@ -12,102 +12,19 @@ module XTwitterScraper attr_accessor next_cursor: String - attr_accessor users: ::Array[XTwitterScraper::PaginatedUsers::User] + attr_accessor users: ::Array[XTwitterScraper::X::UserProfile] def initialize: ( has_next_page: bool, next_cursor: String, - users: ::Array[XTwitterScraper::PaginatedUsers::User] + users: ::Array[XTwitterScraper::X::UserProfile] ) -> void def to_hash: -> { has_next_page: bool, next_cursor: String, - users: ::Array[XTwitterScraper::PaginatedUsers::User] + users: ::Array[XTwitterScraper::X::UserProfile] } - - type user = - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - - class User < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader description: String? - - def description=: (String) -> String - - attr_reader followers: Integer? - - def followers=: (Integer) -> Integer - - attr_reader following: Integer? - - def following=: (Integer) -> Integer - - attr_reader location: String? - - def location=: (String) -> String - - attr_reader profile_picture: String? - - def profile_picture=: (String) -> String - - attr_reader statuses_count: Integer? - - def statuses_count=: (Integer) -> Integer - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?created_at: String, - ?description: String, - ?followers: Integer, - ?following: Integer, - ?location: String, - ?profile_picture: String, - ?statuses_count: Integer, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - end end end end diff --git a/sig/x_twitter_scraper/models/radar_retrieve_trending_topics_response.rbs b/sig/x_twitter_scraper/models/radar_retrieve_trending_topics_response.rbs index 9d524d4..5348b2c 100644 --- a/sig/x_twitter_scraper/models/radar_retrieve_trending_topics_response.rbs +++ b/sig/x_twitter_scraper/models/radar_retrieve_trending_topics_response.rbs @@ -1,88 +1,22 @@ module XTwitterScraper module Models type radar_retrieve_trending_topics_response = - { - items: ::Array[XTwitterScraper::Models::RadarRetrieveTrendingTopicsResponse::Item], - total: Integer - } + { items: ::Array[XTwitterScraper::RadarItem], total: Integer } class RadarRetrieveTrendingTopicsResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor items: ::Array[XTwitterScraper::Models::RadarRetrieveTrendingTopicsResponse::Item] + attr_accessor items: ::Array[XTwitterScraper::RadarItem] attr_accessor total: Integer def initialize: ( - items: ::Array[XTwitterScraper::Models::RadarRetrieveTrendingTopicsResponse::Item], + items: ::Array[XTwitterScraper::RadarItem], total: Integer ) -> void def to_hash: -> { - items: ::Array[XTwitterScraper::Models::RadarRetrieveTrendingTopicsResponse::Item], + items: ::Array[XTwitterScraper::RadarItem], total: Integer } - - type item = - { - category: String, - published_at: Time, - region: String, - score: Float, - source: String, - title: String, - description: String, - image_url: String, - url: String - } - - class Item < XTwitterScraper::Internal::Type::BaseModel - attr_accessor category: String - - attr_accessor published_at: Time - - attr_accessor region: String - - attr_accessor score: Float - - attr_accessor source: String - - attr_accessor title: String - - attr_reader description: String? - - def description=: (String) -> String - - attr_reader image_url: String? - - def image_url=: (String) -> String - - attr_reader url: String? - - def url=: (String) -> String - - def initialize: ( - category: String, - published_at: Time, - region: String, - score: Float, - source: String, - title: String, - ?description: String, - ?image_url: String, - ?url: String - ) -> void - - def to_hash: -> { - category: String, - published_at: Time, - region: String, - score: Float, - source: String, - title: String, - description: String, - image_url: String, - url: String - } - end end end end diff --git a/sig/x_twitter_scraper/models/style_analyze_response.rbs b/sig/x_twitter_scraper/models/style_analyze_response.rbs deleted file mode 100644 index 7b05848..0000000 --- a/sig/x_twitter_scraper/models/style_analyze_response.rbs +++ /dev/null @@ -1,76 +0,0 @@ -module XTwitterScraper - module Models - type style_analyze_response = - { - fetched_at: Time, - is_own_account: bool, - tweet_count: Integer, - tweets: ::Array[XTwitterScraper::Models::StyleAnalyzeResponse::Tweet], - x_username: String - } - - class StyleAnalyzeResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor fetched_at: Time - - attr_accessor is_own_account: bool - - attr_accessor tweet_count: Integer - - attr_accessor tweets: ::Array[XTwitterScraper::Models::StyleAnalyzeResponse::Tweet] - - attr_accessor x_username: String - - def initialize: ( - fetched_at: Time, - is_own_account: bool, - tweet_count: Integer, - tweets: ::Array[XTwitterScraper::Models::StyleAnalyzeResponse::Tweet], - x_username: String - ) -> void - - def to_hash: -> { - fetched_at: Time, - is_own_account: bool, - tweet_count: Integer, - tweets: ::Array[XTwitterScraper::Models::StyleAnalyzeResponse::Tweet], - x_username: String - } - - type tweet = - { - id: String, - text: String, - author_username: String, - created_at: String - } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor text: String - - attr_reader author_username: String? - - def author_username=: (String) -> String - - attr_reader created_at: String? - - def created_at=: (String) -> String - - def initialize: ( - id: String, - text: String, - ?author_username: String, - ?created_at: String - ) -> void - - def to_hash: -> { - id: String, - text: String, - author_username: String, - created_at: String - } - end - end - end -end diff --git a/sig/x_twitter_scraper/models/style_compare_response.rbs b/sig/x_twitter_scraper/models/style_compare_response.rbs index d4d312c..e755343 100644 --- a/sig/x_twitter_scraper/models/style_compare_response.rbs +++ b/sig/x_twitter_scraper/models/style_compare_response.rbs @@ -2,170 +2,24 @@ module XTwitterScraper module Models type style_compare_response = { - :style1 => XTwitterScraper::Models::StyleCompareResponse::Style1, - :style2 => XTwitterScraper::Models::StyleCompareResponse::Style2 + :style1 => XTwitterScraper::StyleProfile, + :style2 => XTwitterScraper::StyleProfile } class StyleCompareResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor style1: XTwitterScraper::Models::StyleCompareResponse::Style1 + attr_accessor style1: XTwitterScraper::StyleProfile - attr_accessor style2: XTwitterScraper::Models::StyleCompareResponse::Style2 + attr_accessor style2: XTwitterScraper::StyleProfile def initialize: ( - style1: XTwitterScraper::Models::StyleCompareResponse::Style1, - style2: XTwitterScraper::Models::StyleCompareResponse::Style2 + style1: XTwitterScraper::StyleProfile, + style2: XTwitterScraper::StyleProfile ) -> void def to_hash: -> { - :style1 => XTwitterScraper::Models::StyleCompareResponse::Style1, - :style2 => XTwitterScraper::Models::StyleCompareResponse::Style2 + :style1 => XTwitterScraper::StyleProfile, + :style2 => XTwitterScraper::StyleProfile } - - type style1 = - { - fetched_at: Time, - is_own_account: bool, - tweet_count: Integer, - tweets: ::Array[XTwitterScraper::Models::StyleCompareResponse::Style1::Tweet], - x_username: String - } - - class Style1 < XTwitterScraper::Internal::Type::BaseModel - attr_accessor fetched_at: Time - - attr_accessor is_own_account: bool - - attr_accessor tweet_count: Integer - - attr_accessor tweets: ::Array[XTwitterScraper::Models::StyleCompareResponse::Style1::Tweet] - - attr_accessor x_username: String - - def initialize: ( - fetched_at: Time, - is_own_account: bool, - tweet_count: Integer, - tweets: ::Array[XTwitterScraper::Models::StyleCompareResponse::Style1::Tweet], - x_username: String - ) -> void - - def to_hash: -> { - fetched_at: Time, - is_own_account: bool, - tweet_count: Integer, - tweets: ::Array[XTwitterScraper::Models::StyleCompareResponse::Style1::Tweet], - x_username: String - } - - type tweet = - { - id: String, - text: String, - author_username: String, - created_at: String - } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor text: String - - attr_reader author_username: String? - - def author_username=: (String) -> String - - attr_reader created_at: String? - - def created_at=: (String) -> String - - def initialize: ( - id: String, - text: String, - ?author_username: String, - ?created_at: String - ) -> void - - def to_hash: -> { - id: String, - text: String, - author_username: String, - created_at: String - } - end - end - - type style2 = - { - fetched_at: Time, - is_own_account: bool, - tweet_count: Integer, - tweets: ::Array[XTwitterScraper::Models::StyleCompareResponse::Style2::Tweet], - x_username: String - } - - class Style2 < XTwitterScraper::Internal::Type::BaseModel - attr_accessor fetched_at: Time - - attr_accessor is_own_account: bool - - attr_accessor tweet_count: Integer - - attr_accessor tweets: ::Array[XTwitterScraper::Models::StyleCompareResponse::Style2::Tweet] - - attr_accessor x_username: String - - def initialize: ( - fetched_at: Time, - is_own_account: bool, - tweet_count: Integer, - tweets: ::Array[XTwitterScraper::Models::StyleCompareResponse::Style2::Tweet], - x_username: String - ) -> void - - def to_hash: -> { - fetched_at: Time, - is_own_account: bool, - tweet_count: Integer, - tweets: ::Array[XTwitterScraper::Models::StyleCompareResponse::Style2::Tweet], - x_username: String - } - - type tweet = - { - id: String, - text: String, - author_username: String, - created_at: String - } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor text: String - - attr_reader author_username: String? - - def author_username=: (String) -> String - - attr_reader created_at: String? - - def created_at=: (String) -> String - - def initialize: ( - id: String, - text: String, - ?author_username: String, - ?created_at: String - ) -> void - - def to_hash: -> { - id: String, - text: String, - author_username: String, - created_at: String - } - end - end end end end diff --git a/sig/x_twitter_scraper/models/style_delete_params.rbs b/sig/x_twitter_scraper/models/style_delete_params.rbs new file mode 100644 index 0000000..dd439a4 --- /dev/null +++ b/sig/x_twitter_scraper/models/style_delete_params.rbs @@ -0,0 +1,23 @@ +module XTwitterScraper + module Models + type style_delete_params = + { id: String } & XTwitterScraper::Internal::Type::request_parameters + + class StyleDeleteParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + attr_accessor id: String + + def initialize: ( + id: String, + ?request_options: XTwitterScraper::request_opts + ) -> void + + def to_hash: -> { + id: String, + request_options: XTwitterScraper::RequestOptions + } + end + end +end diff --git a/sig/x_twitter_scraper/models/style_get_performance_params.rbs b/sig/x_twitter_scraper/models/style_get_performance_params.rbs new file mode 100644 index 0000000..a8c78db --- /dev/null +++ b/sig/x_twitter_scraper/models/style_get_performance_params.rbs @@ -0,0 +1,23 @@ +module XTwitterScraper + module Models + type style_get_performance_params = + { id: String } & XTwitterScraper::Internal::Type::request_parameters + + class StyleGetPerformanceParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + attr_accessor id: String + + def initialize: ( + id: String, + ?request_options: XTwitterScraper::request_opts + ) -> void + + def to_hash: -> { + id: String, + request_options: XTwitterScraper::RequestOptions + } + end + end +end diff --git a/sig/x_twitter_scraper/models/style_get_performance_response.rbs b/sig/x_twitter_scraper/models/style_get_performance_response.rbs new file mode 100644 index 0000000..e9b49ef --- /dev/null +++ b/sig/x_twitter_scraper/models/style_get_performance_response.rbs @@ -0,0 +1,87 @@ +module XTwitterScraper + module Models + type style_get_performance_response = + { + tweet_count: Integer, + tweets: ::Array[XTwitterScraper::Models::StyleGetPerformanceResponse::Tweet], + x_username: String + } + + class StyleGetPerformanceResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor tweet_count: Integer + + attr_accessor tweets: ::Array[XTwitterScraper::Models::StyleGetPerformanceResponse::Tweet] + + attr_accessor x_username: String + + def initialize: ( + tweet_count: Integer, + tweets: ::Array[XTwitterScraper::Models::StyleGetPerformanceResponse::Tweet], + x_username: String + ) -> void + + def to_hash: -> { + tweet_count: Integer, + tweets: ::Array[XTwitterScraper::Models::StyleGetPerformanceResponse::Tweet], + x_username: String + } + + type tweet = + { + id: String, + text: String, + created_at: String, + like_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + } + + class Tweet < XTwitterScraper::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor text: String + + attr_reader created_at: String? + + def created_at=: (String) -> String + + attr_reader like_count: Integer? + + def like_count=: (Integer) -> Integer + + attr_reader reply_count: Integer? + + def reply_count=: (Integer) -> Integer + + attr_reader retweet_count: Integer? + + def retweet_count=: (Integer) -> Integer + + attr_reader view_count: Integer? + + def view_count=: (Integer) -> Integer + + def initialize: ( + id: String, + text: String, + ?created_at: String, + ?like_count: Integer, + ?reply_count: Integer, + ?retweet_count: Integer, + ?view_count: Integer + ) -> void + + def to_hash: -> { + id: String, + text: String, + created_at: String, + like_count: Integer, + reply_count: Integer, + retweet_count: Integer, + view_count: Integer + } + end + end + end +end diff --git a/sig/x_twitter_scraper/models/style_list_response.rbs b/sig/x_twitter_scraper/models/style_list_response.rbs index 8fa461a..1fb1595 100644 --- a/sig/x_twitter_scraper/models/style_list_response.rbs +++ b/sig/x_twitter_scraper/models/style_list_response.rbs @@ -1,50 +1,16 @@ module XTwitterScraper module Models type style_list_response = - { styles: ::Array[XTwitterScraper::Models::StyleListResponse::Style] } + { styles: ::Array[XTwitterScraper::StyleProfileSummary] } class StyleListResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor styles: ::Array[XTwitterScraper::Models::StyleListResponse::Style] + attr_accessor styles: ::Array[XTwitterScraper::StyleProfileSummary] def initialize: ( - styles: ::Array[XTwitterScraper::Models::StyleListResponse::Style] + styles: ::Array[XTwitterScraper::StyleProfileSummary] ) -> void - def to_hash: -> { - styles: ::Array[XTwitterScraper::Models::StyleListResponse::Style] - } - - type style = - { - fetched_at: Time, - is_own_account: bool, - tweet_count: Integer, - x_username: String - } - - class Style < XTwitterScraper::Internal::Type::BaseModel - attr_accessor fetched_at: Time - - attr_accessor is_own_account: bool - - attr_accessor tweet_count: Integer - - attr_accessor x_username: String - - def initialize: ( - fetched_at: Time, - is_own_account: bool, - tweet_count: Integer, - x_username: String - ) -> void - - def to_hash: -> { - fetched_at: Time, - is_own_account: bool, - tweet_count: Integer, - x_username: String - } - end + def to_hash: -> { styles: ::Array[XTwitterScraper::StyleProfileSummary] } end end end diff --git a/sig/x_twitter_scraper/models/style_retrieve_params.rbs b/sig/x_twitter_scraper/models/style_retrieve_params.rbs new file mode 100644 index 0000000..54bdc28 --- /dev/null +++ b/sig/x_twitter_scraper/models/style_retrieve_params.rbs @@ -0,0 +1,23 @@ +module XTwitterScraper + module Models + type style_retrieve_params = + { id: String } & XTwitterScraper::Internal::Type::request_parameters + + class StyleRetrieveParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + attr_accessor id: String + + def initialize: ( + id: String, + ?request_options: XTwitterScraper::request_opts + ) -> void + + def to_hash: -> { + id: String, + request_options: XTwitterScraper::RequestOptions + } + end + end +end diff --git a/sig/x_twitter_scraper/models/style_update_params.rbs b/sig/x_twitter_scraper/models/style_update_params.rbs new file mode 100644 index 0000000..a3115cb --- /dev/null +++ b/sig/x_twitter_scraper/models/style_update_params.rbs @@ -0,0 +1,46 @@ +module XTwitterScraper + module Models + type style_update_params = + { + id: String, + label: String, + tweets: ::Array[XTwitterScraper::StyleUpdateParams::Tweet] + } + & XTwitterScraper::Internal::Type::request_parameters + + class StyleUpdateParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + attr_accessor id: String + + attr_accessor label: String + + attr_accessor tweets: ::Array[XTwitterScraper::StyleUpdateParams::Tweet] + + def initialize: ( + id: String, + label: String, + tweets: ::Array[XTwitterScraper::StyleUpdateParams::Tweet], + ?request_options: XTwitterScraper::request_opts + ) -> void + + def to_hash: -> { + id: String, + label: String, + tweets: ::Array[XTwitterScraper::StyleUpdateParams::Tweet], + request_options: XTwitterScraper::RequestOptions + } + + type tweet = { text: String } + + class Tweet < XTwitterScraper::Internal::Type::BaseModel + attr_accessor text: String + + def initialize: (text: String) -> void + + def to_hash: -> { text: String } + end + end + end +end diff --git a/sig/x_twitter_scraper/models/webhook.rbs b/sig/x_twitter_scraper/models/webhook.rbs index 8b688e0..fa648e5 100644 --- a/sig/x_twitter_scraper/models/webhook.rbs +++ b/sig/x_twitter_scraper/models/webhook.rbs @@ -4,7 +4,7 @@ module XTwitterScraper { id: String, created_at: Time, - event_types: ::Array[XTwitterScraper::Models::Webhook::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], is_active: bool, url: String } @@ -14,7 +14,7 @@ module XTwitterScraper attr_accessor created_at: Time - attr_accessor event_types: ::Array[XTwitterScraper::Models::Webhook::event_type] + attr_accessor event_types: ::Array[XTwitterScraper::Models::event_type] attr_accessor is_active: bool @@ -23,7 +23,7 @@ module XTwitterScraper def initialize: ( id: String, created_at: Time, - event_types: ::Array[XTwitterScraper::Models::Webhook::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], is_active: bool, url: String ) -> void @@ -31,31 +31,10 @@ module XTwitterScraper def to_hash: -> { id: String, created_at: Time, - event_types: ::Array[XTwitterScraper::Models::Webhook::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], is_active: bool, url: String } - - type event_type = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::Webhook::event_type] - end end end end diff --git a/sig/x_twitter_scraper/models/webhook_create_params.rbs b/sig/x_twitter_scraper/models/webhook_create_params.rbs index 9aa80d4..847d05e 100644 --- a/sig/x_twitter_scraper/models/webhook_create_params.rbs +++ b/sig/x_twitter_scraper/models/webhook_create_params.rbs @@ -1,52 +1,28 @@ module XTwitterScraper module Models type webhook_create_params = - { - event_types: ::Array[XTwitterScraper::Models::WebhookCreateParams::event_type], - url: String - } + { event_types: ::Array[XTwitterScraper::Models::event_type], url: String } & XTwitterScraper::Internal::Type::request_parameters class WebhookCreateParams < XTwitterScraper::Internal::Type::BaseModel extend XTwitterScraper::Internal::Type::RequestParameters::Converter include XTwitterScraper::Internal::Type::RequestParameters - attr_accessor event_types: ::Array[XTwitterScraper::Models::WebhookCreateParams::event_type] + attr_accessor event_types: ::Array[XTwitterScraper::Models::event_type] attr_accessor url: String def initialize: ( - event_types: ::Array[XTwitterScraper::Models::WebhookCreateParams::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], url: String, ?request_options: XTwitterScraper::request_opts ) -> void def to_hash: -> { - event_types: ::Array[XTwitterScraper::Models::WebhookCreateParams::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], url: String, request_options: XTwitterScraper::RequestOptions } - - type event_type = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::WebhookCreateParams::event_type] - end end end end diff --git a/sig/x_twitter_scraper/models/webhook_create_response.rbs b/sig/x_twitter_scraper/models/webhook_create_response.rbs index 2bb74c6..0dc610b 100644 --- a/sig/x_twitter_scraper/models/webhook_create_response.rbs +++ b/sig/x_twitter_scraper/models/webhook_create_response.rbs @@ -4,7 +4,7 @@ module XTwitterScraper { id: String, created_at: Time, - event_types: ::Array[XTwitterScraper::Models::WebhookCreateResponse::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], secret: String, url: String } @@ -14,7 +14,7 @@ module XTwitterScraper attr_accessor created_at: Time - attr_accessor event_types: ::Array[XTwitterScraper::Models::WebhookCreateResponse::event_type] + attr_accessor event_types: ::Array[XTwitterScraper::Models::event_type] attr_accessor secret: String @@ -23,7 +23,7 @@ module XTwitterScraper def initialize: ( id: String, created_at: Time, - event_types: ::Array[XTwitterScraper::Models::WebhookCreateResponse::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], secret: String, url: String ) -> void @@ -31,31 +31,10 @@ module XTwitterScraper def to_hash: -> { id: String, created_at: Time, - event_types: ::Array[XTwitterScraper::Models::WebhookCreateResponse::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], secret: String, url: String } - - type event_type = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::WebhookCreateResponse::event_type] - end end end end diff --git a/sig/x_twitter_scraper/models/webhook_list_deliveries_response.rbs b/sig/x_twitter_scraper/models/webhook_list_deliveries_response.rbs index 213923f..f0ffde0 100644 --- a/sig/x_twitter_scraper/models/webhook_list_deliveries_response.rbs +++ b/sig/x_twitter_scraper/models/webhook_list_deliveries_response.rbs @@ -1,78 +1,14 @@ module XTwitterScraper module Models type webhook_list_deliveries_response = - { - deliveries: ::Array[XTwitterScraper::Models::WebhookListDeliveriesResponse::Delivery] - } + { deliveries: ::Array[XTwitterScraper::Delivery] } class WebhookListDeliveriesResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor deliveries: ::Array[XTwitterScraper::Models::WebhookListDeliveriesResponse::Delivery] + attr_accessor deliveries: ::Array[XTwitterScraper::Delivery] - def initialize: ( - deliveries: ::Array[XTwitterScraper::Models::WebhookListDeliveriesResponse::Delivery] - ) -> void + def initialize: (deliveries: ::Array[XTwitterScraper::Delivery]) -> void - def to_hash: -> { - deliveries: ::Array[XTwitterScraper::Models::WebhookListDeliveriesResponse::Delivery] - } - - type delivery = - { - id: String, - attempts: Integer, - created_at: Time, - status: String, - stream_event_id: String, - delivered_at: Time, - last_error: String, - last_status_code: Integer - } - - class Delivery < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor attempts: Integer - - attr_accessor created_at: Time - - attr_accessor status: String - - attr_accessor stream_event_id: String - - attr_reader delivered_at: Time? - - def delivered_at=: (Time) -> Time - - attr_reader last_error: String? - - def last_error=: (String) -> String - - attr_reader last_status_code: Integer? - - def last_status_code=: (Integer) -> Integer - - def initialize: ( - id: String, - attempts: Integer, - created_at: Time, - status: String, - stream_event_id: String, - ?delivered_at: Time, - ?last_error: String, - ?last_status_code: Integer - ) -> void - - def to_hash: -> { - id: String, - attempts: Integer, - created_at: Time, - status: String, - stream_event_id: String, - delivered_at: Time, - last_error: String, - last_status_code: Integer - } - end + def to_hash: -> { deliveries: ::Array[XTwitterScraper::Delivery] } end end end diff --git a/sig/x_twitter_scraper/models/webhook_list_response.rbs b/sig/x_twitter_scraper/models/webhook_list_response.rbs index 9fc55f8..62fba30 100644 --- a/sig/x_twitter_scraper/models/webhook_list_response.rbs +++ b/sig/x_twitter_scraper/models/webhook_list_response.rbs @@ -1,78 +1,13 @@ module XTwitterScraper module Models - type webhook_list_response = - { - webhooks: ::Array[XTwitterScraper::Models::WebhookListResponse::Webhook] - } + type webhook_list_response = { webhooks: ::Array[XTwitterScraper::Webhook] } class WebhookListResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor webhooks: ::Array[XTwitterScraper::Models::WebhookListResponse::Webhook] + attr_accessor webhooks: ::Array[XTwitterScraper::Webhook] - def initialize: ( - webhooks: ::Array[XTwitterScraper::Models::WebhookListResponse::Webhook] - ) -> void + def initialize: (webhooks: ::Array[XTwitterScraper::Webhook]) -> void - def to_hash: -> { - webhooks: ::Array[XTwitterScraper::Models::WebhookListResponse::Webhook] - } - - type webhook = - { - id: String, - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::WebhookListResponse::Webhook::event_type], - is_active: bool, - url: String - } - - class Webhook < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor created_at: Time - - attr_accessor event_types: ::Array[XTwitterScraper::Models::WebhookListResponse::Webhook::event_type] - - attr_accessor is_active: bool - - attr_accessor url: String - - def initialize: ( - id: String, - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::WebhookListResponse::Webhook::event_type], - is_active: bool, - url: String - ) -> void - - def to_hash: -> { - id: String, - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::WebhookListResponse::Webhook::event_type], - is_active: bool, - url: String - } - - type event_type = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::WebhookListResponse::Webhook::event_type] - end - end + def to_hash: -> { webhooks: ::Array[XTwitterScraper::Webhook] } end end end diff --git a/sig/x_twitter_scraper/models/webhook_update_params.rbs b/sig/x_twitter_scraper/models/webhook_update_params.rbs index ac87d80..90d4dd7 100644 --- a/sig/x_twitter_scraper/models/webhook_update_params.rbs +++ b/sig/x_twitter_scraper/models/webhook_update_params.rbs @@ -3,7 +3,7 @@ module XTwitterScraper type webhook_update_params = { id: String, - event_types: ::Array[XTwitterScraper::Models::WebhookUpdateParams::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], is_active: bool, url: String } @@ -15,11 +15,11 @@ module XTwitterScraper attr_accessor id: String - attr_reader event_types: ::Array[XTwitterScraper::Models::WebhookUpdateParams::event_type]? + attr_reader event_types: ::Array[XTwitterScraper::Models::event_type]? def event_types=: ( - ::Array[XTwitterScraper::Models::WebhookUpdateParams::event_type] - ) -> ::Array[XTwitterScraper::Models::WebhookUpdateParams::event_type] + ::Array[XTwitterScraper::Models::event_type] + ) -> ::Array[XTwitterScraper::Models::event_type] attr_reader is_active: bool? @@ -31,7 +31,7 @@ module XTwitterScraper def initialize: ( id: String, - ?event_types: ::Array[XTwitterScraper::Models::WebhookUpdateParams::event_type], + ?event_types: ::Array[XTwitterScraper::Models::event_type], ?is_active: bool, ?url: String, ?request_options: XTwitterScraper::request_opts @@ -39,32 +39,11 @@ module XTwitterScraper def to_hash: -> { id: String, - event_types: ::Array[XTwitterScraper::Models::WebhookUpdateParams::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], is_active: bool, url: String, request_options: XTwitterScraper::RequestOptions } - - type event_type = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::WebhookUpdateParams::event_type] - end end end end diff --git a/sig/x_twitter_scraper/models/webhook_update_response.rbs b/sig/x_twitter_scraper/models/webhook_update_response.rbs deleted file mode 100644 index 8cae585..0000000 --- a/sig/x_twitter_scraper/models/webhook_update_response.rbs +++ /dev/null @@ -1,61 +0,0 @@ -module XTwitterScraper - module Models - type webhook_update_response = - { - id: String, - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::WebhookUpdateResponse::event_type], - is_active: bool, - url: String - } - - class WebhookUpdateResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor created_at: Time - - attr_accessor event_types: ::Array[XTwitterScraper::Models::WebhookUpdateResponse::event_type] - - attr_accessor is_active: bool - - attr_accessor url: String - - def initialize: ( - id: String, - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::WebhookUpdateResponse::event_type], - is_active: bool, - url: String - ) -> void - - def to_hash: -> { - id: String, - created_at: Time, - event_types: ::Array[XTwitterScraper::Models::WebhookUpdateResponse::event_type], - is_active: bool, - url: String - } - - type event_type = - :"tweet.new" - | :"tweet.reply" - | :"tweet.retweet" - | :"tweet.quote" - | :"follower.gained" - | :"follower.lost" - - module EventType - extend XTwitterScraper::Internal::Type::Enum - - TWEET_NEW: :"tweet.new" - TWEET_REPLY: :"tweet.reply" - TWEET_RETWEET: :"tweet.retweet" - TWEET_QUOTE: :"tweet.quote" - FOLLOWER_GAINED: :"follower.gained" - FOLLOWER_LOST: :"follower.lost" - - def self?.values: -> ::Array[XTwitterScraper::Models::WebhookUpdateResponse::event_type] - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/account_bulk_retry_params.rbs b/sig/x_twitter_scraper/models/x/account_bulk_retry_params.rbs new file mode 100644 index 0000000..b90bcff --- /dev/null +++ b/sig/x_twitter_scraper/models/x/account_bulk_retry_params.rbs @@ -0,0 +1,19 @@ +module XTwitterScraper + module Models + module X + type account_bulk_retry_params = + { } & XTwitterScraper::Internal::Type::request_parameters + + class AccountBulkRetryParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + def initialize: ( + ?request_options: XTwitterScraper::request_opts + ) -> void + + def to_hash: -> { request_options: XTwitterScraper::RequestOptions } + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/account_bulk_retry_response.rbs b/sig/x_twitter_scraper/models/x/account_bulk_retry_response.rbs new file mode 100644 index 0000000..b51e79f --- /dev/null +++ b/sig/x_twitter_scraper/models/x/account_bulk_retry_response.rbs @@ -0,0 +1,15 @@ +module XTwitterScraper + module Models + module X + type account_bulk_retry_response = { cleared: Integer } + + class AccountBulkRetryResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor cleared: Integer + + def initialize: (cleared: Integer) -> void + + def to_hash: -> { cleared: Integer } + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/account_list_response.rbs b/sig/x_twitter_scraper/models/x/account_list_response.rbs index 1de25e5..a42b0a1 100644 --- a/sig/x_twitter_scraper/models/x/account_list_response.rbs +++ b/sig/x_twitter_scraper/models/x/account_list_response.rbs @@ -2,57 +2,16 @@ module XTwitterScraper module Models module X type account_list_response = - { - accounts: ::Array[XTwitterScraper::Models::X::AccountListResponse::Account] - } + { accounts: ::Array[XTwitterScraper::X::XAccount] } class AccountListResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor accounts: ::Array[XTwitterScraper::Models::X::AccountListResponse::Account] + attr_accessor accounts: ::Array[XTwitterScraper::X::XAccount] def initialize: ( - accounts: ::Array[XTwitterScraper::Models::X::AccountListResponse::Account] + accounts: ::Array[XTwitterScraper::X::XAccount] ) -> void - def to_hash: -> { - accounts: ::Array[XTwitterScraper::Models::X::AccountListResponse::Account] - } - - type account = - { - id: String, - created_at: Time, - status: String, - x_user_id: String, - x_username: String - } - - class Account < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor created_at: Time - - attr_accessor status: String - - attr_accessor x_user_id: String - - attr_accessor x_username: String - - def initialize: ( - id: String, - created_at: Time, - status: String, - x_user_id: String, - x_username: String - ) -> void - - def to_hash: -> { - id: String, - created_at: Time, - status: String, - x_user_id: String, - x_username: String - } - end + def to_hash: -> { accounts: ::Array[XTwitterScraper::X::XAccount] } end end end diff --git a/sig/x_twitter_scraper/models/x/account_retrieve_response.rbs b/sig/x_twitter_scraper/models/x/account_retrieve_response.rbs deleted file mode 100644 index bad4ab9..0000000 --- a/sig/x_twitter_scraper/models/x/account_retrieve_response.rbs +++ /dev/null @@ -1,63 +0,0 @@ -module XTwitterScraper - module Models - module X - type account_retrieve_response = - { - id: String, - created_at: Time, - status: String, - x_user_id: String, - x_username: String, - cookies_obtained_at: Time, - proxy_country: String, - updated_at: Time - } - - class AccountRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor created_at: Time - - attr_accessor status: String - - attr_accessor x_user_id: String - - attr_accessor x_username: String - - attr_reader cookies_obtained_at: Time? - - def cookies_obtained_at=: (Time) -> Time - - attr_reader proxy_country: String? - - def proxy_country=: (String) -> String - - attr_reader updated_at: Time? - - def updated_at=: (Time) -> Time - - def initialize: ( - id: String, - created_at: Time, - status: String, - x_user_id: String, - x_username: String, - ?cookies_obtained_at: Time, - ?proxy_country: String, - ?updated_at: Time - ) -> void - - def to_hash: -> { - id: String, - created_at: Time, - status: String, - x_user_id: String, - x_username: String, - cookies_obtained_at: Time, - proxy_country: String, - updated_at: Time - } - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/bookmark_list_response.rbs b/sig/x_twitter_scraper/models/x/bookmark_list_response.rbs deleted file mode 100644 index 4fc5a12..0000000 --- a/sig/x_twitter_scraper/models/x/bookmark_list_response.rbs +++ /dev/null @@ -1,148 +0,0 @@ -module XTwitterScraper - module Models - module X - type bookmark_list_response = - { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::BookmarkListResponse::Tweet] - } - - class BookmarkListResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor tweets: ::Array[XTwitterScraper::Models::X::BookmarkListResponse::Tweet] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::BookmarkListResponse::Tweet] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::BookmarkListResponse::Tweet] - } - - type tweet = - { - id: String, - text: String, - author: XTwitterScraper::Models::X::BookmarkListResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor text: String - - attr_reader author: XTwitterScraper::Models::X::BookmarkListResponse::Tweet::Author? - - def author=: ( - XTwitterScraper::Models::X::BookmarkListResponse::Tweet::Author - ) -> XTwitterScraper::Models::X::BookmarkListResponse::Tweet::Author - - attr_reader bookmark_count: Integer? - - def bookmark_count=: (Integer) -> Integer - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader is_note_tweet: bool? - - def is_note_tweet=: (bool) -> bool - - attr_reader like_count: Integer? - - def like_count=: (Integer) -> Integer - - attr_reader quote_count: Integer? - - def quote_count=: (Integer) -> Integer - - attr_reader reply_count: Integer? - - def reply_count=: (Integer) -> Integer - - attr_reader retweet_count: Integer? - - def retweet_count=: (Integer) -> Integer - - attr_reader view_count: Integer? - - def view_count=: (Integer) -> Integer - - def initialize: ( - id: String, - text: String, - ?author: XTwitterScraper::Models::X::BookmarkListResponse::Tweet::Author, - ?bookmark_count: Integer, - ?created_at: String, - ?is_note_tweet: bool, - ?like_count: Integer, - ?quote_count: Integer, - ?reply_count: Integer, - ?retweet_count: Integer, - ?view_count: Integer - ) -> void - - def to_hash: -> { - id: String, - text: String, - author: XTwitterScraper::Models::X::BookmarkListResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - type author = - { id: String, name: String, username: String, verified: bool } - - class Author < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - verified: bool - } - end - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/communities/join_create_response.rbs b/sig/x_twitter_scraper/models/x/communities/join_create_response.rbs deleted file mode 100644 index c07e63d..0000000 --- a/sig/x_twitter_scraper/models/x/communities/join_create_response.rbs +++ /dev/null @@ -1,30 +0,0 @@ -module XTwitterScraper - module Models - module X - module Communities - type join_create_response = - { community_id: String, community_name: String, success: true } - - class JoinCreateResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor community_id: String - - attr_accessor community_name: String - - attr_accessor success: true - - def initialize: ( - community_id: String, - community_name: String, - ?success: true - ) -> void - - def to_hash: -> { - community_id: String, - community_name: String, - success: true - } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/communities/join_delete_all_response.rbs b/sig/x_twitter_scraper/models/x/communities/join_delete_all_response.rbs deleted file mode 100644 index c3cf4df..0000000 --- a/sig/x_twitter_scraper/models/x/communities/join_delete_all_response.rbs +++ /dev/null @@ -1,30 +0,0 @@ -module XTwitterScraper - module Models - module X - module Communities - type join_delete_all_response = - { community_id: String, community_name: String, success: true } - - class JoinDeleteAllResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor community_id: String - - attr_accessor community_name: String - - attr_accessor success: true - - def initialize: ( - community_id: String, - community_name: String, - ?success: true - ) -> void - - def to_hash: -> { - community_id: String, - community_name: String, - success: true - } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rbs b/sig/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rbs new file mode 100644 index 0000000..5bab1eb --- /dev/null +++ b/sig/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rbs @@ -0,0 +1,34 @@ +module XTwitterScraper + module Models + module X + module Communities + type tweet_list_by_community_params = + { id: String, cursor: String } + & XTwitterScraper::Internal::Type::request_parameters + + class TweetListByCommunityParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + attr_accessor id: String + + attr_reader cursor: String? + + def cursor=: (String) -> String + + def initialize: ( + id: String, + ?cursor: String, + ?request_options: XTwitterScraper::request_opts + ) -> void + + def to_hash: -> { + id: String, + cursor: String, + request_options: XTwitterScraper::RequestOptions + } + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/communities/tweet_list_response.rbs b/sig/x_twitter_scraper/models/x/communities/tweet_list_response.rbs deleted file mode 100644 index 845f5d9..0000000 --- a/sig/x_twitter_scraper/models/x/communities/tweet_list_response.rbs +++ /dev/null @@ -1,150 +0,0 @@ -module XTwitterScraper - module Models - module X - module Communities - type tweet_list_response = - { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet] - } - - class TweetListResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor tweets: ::Array[XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet] - } - - type tweet = - { - id: String, - text: String, - author: XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor text: String - - attr_reader author: XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author? - - def author=: ( - XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author - ) -> XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author - - attr_reader bookmark_count: Integer? - - def bookmark_count=: (Integer) -> Integer - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader is_note_tweet: bool? - - def is_note_tweet=: (bool) -> bool - - attr_reader like_count: Integer? - - def like_count=: (Integer) -> Integer - - attr_reader quote_count: Integer? - - def quote_count=: (Integer) -> Integer - - attr_reader reply_count: Integer? - - def reply_count=: (Integer) -> Integer - - attr_reader retweet_count: Integer? - - def retweet_count=: (Integer) -> Integer - - attr_reader view_count: Integer? - - def view_count=: (Integer) -> Integer - - def initialize: ( - id: String, - text: String, - ?author: XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author, - ?bookmark_count: Integer, - ?created_at: String, - ?is_note_tweet: bool, - ?like_count: Integer, - ?quote_count: Integer, - ?reply_count: Integer, - ?retweet_count: Integer, - ?view_count: Integer - ) -> void - - def to_hash: -> { - id: String, - text: String, - author: XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - type author = - { id: String, name: String, username: String, verified: bool } - - class Author < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - verified: bool - } - end - end - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/community_retrieve_members_response.rbs b/sig/x_twitter_scraper/models/x/community_retrieve_members_response.rbs deleted file mode 100644 index 21dbac6..0000000 --- a/sig/x_twitter_scraper/models/x/community_retrieve_members_response.rbs +++ /dev/null @@ -1,115 +0,0 @@ -module XTwitterScraper - module Models - module X - type community_retrieve_members_response = - { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::CommunityRetrieveMembersResponse::User] - } - - class CommunityRetrieveMembersResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor users: ::Array[XTwitterScraper::Models::X::CommunityRetrieveMembersResponse::User] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::CommunityRetrieveMembersResponse::User] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::CommunityRetrieveMembersResponse::User] - } - - type user = - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - - class User < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader description: String? - - def description=: (String) -> String - - attr_reader followers: Integer? - - def followers=: (Integer) -> Integer - - attr_reader following: Integer? - - def following=: (Integer) -> Integer - - attr_reader location: String? - - def location=: (String) -> String - - attr_reader profile_picture: String? - - def profile_picture=: (String) -> String - - attr_reader statuses_count: Integer? - - def statuses_count=: (Integer) -> Integer - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?created_at: String, - ?description: String, - ?followers: Integer, - ?following: Integer, - ?location: String, - ?profile_picture: String, - ?statuses_count: Integer, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/community_retrieve_moderators_response.rbs b/sig/x_twitter_scraper/models/x/community_retrieve_moderators_response.rbs deleted file mode 100644 index fe0468e..0000000 --- a/sig/x_twitter_scraper/models/x/community_retrieve_moderators_response.rbs +++ /dev/null @@ -1,115 +0,0 @@ -module XTwitterScraper - module Models - module X - type community_retrieve_moderators_response = - { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse::User] - } - - class CommunityRetrieveModeratorsResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor users: ::Array[XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse::User] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse::User] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse::User] - } - - type user = - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - - class User < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader description: String? - - def description=: (String) -> String - - attr_reader followers: Integer? - - def followers=: (Integer) -> Integer - - attr_reader following: Integer? - - def following=: (Integer) -> Integer - - attr_reader location: String? - - def location=: (String) -> String - - attr_reader profile_picture: String? - - def profile_picture=: (String) -> String - - attr_reader statuses_count: Integer? - - def statuses_count=: (Integer) -> Integer - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?created_at: String, - ?description: String, - ?followers: Integer, - ?following: Integer, - ?location: String, - ?profile_picture: String, - ?statuses_count: Integer, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/community_retrieve_search_response.rbs b/sig/x_twitter_scraper/models/x/community_retrieve_search_response.rbs deleted file mode 100644 index 2e77ec4..0000000 --- a/sig/x_twitter_scraper/models/x/community_retrieve_search_response.rbs +++ /dev/null @@ -1,148 +0,0 @@ -module XTwitterScraper - module Models - module X - type community_retrieve_search_response = - { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet] - } - - class CommunityRetrieveSearchResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor tweets: ::Array[XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet] - } - - type tweet = - { - id: String, - text: String, - author: XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor text: String - - attr_reader author: XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author? - - def author=: ( - XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author - ) -> XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author - - attr_reader bookmark_count: Integer? - - def bookmark_count=: (Integer) -> Integer - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader is_note_tweet: bool? - - def is_note_tweet=: (bool) -> bool - - attr_reader like_count: Integer? - - def like_count=: (Integer) -> Integer - - attr_reader quote_count: Integer? - - def quote_count=: (Integer) -> Integer - - attr_reader reply_count: Integer? - - def reply_count=: (Integer) -> Integer - - attr_reader retweet_count: Integer? - - def retweet_count=: (Integer) -> Integer - - attr_reader view_count: Integer? - - def view_count=: (Integer) -> Integer - - def initialize: ( - id: String, - text: String, - ?author: XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author, - ?bookmark_count: Integer, - ?created_at: String, - ?is_note_tweet: bool, - ?like_count: Integer, - ?quote_count: Integer, - ?reply_count: Integer, - ?retweet_count: Integer, - ?view_count: Integer - ) -> void - - def to_hash: -> { - id: String, - text: String, - author: XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - type author = - { id: String, name: String, username: String, verified: bool } - - class Author < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - verified: bool - } - end - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/list_retrieve_followers_response.rbs b/sig/x_twitter_scraper/models/x/list_retrieve_followers_response.rbs deleted file mode 100644 index 3f6dd28..0000000 --- a/sig/x_twitter_scraper/models/x/list_retrieve_followers_response.rbs +++ /dev/null @@ -1,115 +0,0 @@ -module XTwitterScraper - module Models - module X - type list_retrieve_followers_response = - { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::ListRetrieveFollowersResponse::User] - } - - class ListRetrieveFollowersResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor users: ::Array[XTwitterScraper::Models::X::ListRetrieveFollowersResponse::User] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::ListRetrieveFollowersResponse::User] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::ListRetrieveFollowersResponse::User] - } - - type user = - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - - class User < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader description: String? - - def description=: (String) -> String - - attr_reader followers: Integer? - - def followers=: (Integer) -> Integer - - attr_reader following: Integer? - - def following=: (Integer) -> Integer - - attr_reader location: String? - - def location=: (String) -> String - - attr_reader profile_picture: String? - - def profile_picture=: (String) -> String - - attr_reader statuses_count: Integer? - - def statuses_count=: (Integer) -> Integer - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?created_at: String, - ?description: String, - ?followers: Integer, - ?following: Integer, - ?location: String, - ?profile_picture: String, - ?statuses_count: Integer, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/list_retrieve_members_response.rbs b/sig/x_twitter_scraper/models/x/list_retrieve_members_response.rbs deleted file mode 100644 index bf339a0..0000000 --- a/sig/x_twitter_scraper/models/x/list_retrieve_members_response.rbs +++ /dev/null @@ -1,115 +0,0 @@ -module XTwitterScraper - module Models - module X - type list_retrieve_members_response = - { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::ListRetrieveMembersResponse::User] - } - - class ListRetrieveMembersResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor users: ::Array[XTwitterScraper::Models::X::ListRetrieveMembersResponse::User] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::ListRetrieveMembersResponse::User] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::ListRetrieveMembersResponse::User] - } - - type user = - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - - class User < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader description: String? - - def description=: (String) -> String - - attr_reader followers: Integer? - - def followers=: (Integer) -> Integer - - attr_reader following: Integer? - - def following=: (Integer) -> Integer - - attr_reader location: String? - - def location=: (String) -> String - - attr_reader profile_picture: String? - - def profile_picture=: (String) -> String - - attr_reader statuses_count: Integer? - - def statuses_count=: (Integer) -> Integer - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?created_at: String, - ?description: String, - ?followers: Integer, - ?following: Integer, - ?location: String, - ?profile_picture: String, - ?statuses_count: Integer, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/list_retrieve_tweets_response.rbs b/sig/x_twitter_scraper/models/x/list_retrieve_tweets_response.rbs deleted file mode 100644 index d7eec1a..0000000 --- a/sig/x_twitter_scraper/models/x/list_retrieve_tweets_response.rbs +++ /dev/null @@ -1,148 +0,0 @@ -module XTwitterScraper - module Models - module X - type list_retrieve_tweets_response = - { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet] - } - - class ListRetrieveTweetsResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor tweets: ::Array[XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet] - } - - type tweet = - { - id: String, - text: String, - author: XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor text: String - - attr_reader author: XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author? - - def author=: ( - XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author - ) -> XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author - - attr_reader bookmark_count: Integer? - - def bookmark_count=: (Integer) -> Integer - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader is_note_tweet: bool? - - def is_note_tweet=: (bool) -> bool - - attr_reader like_count: Integer? - - def like_count=: (Integer) -> Integer - - attr_reader quote_count: Integer? - - def quote_count=: (Integer) -> Integer - - attr_reader reply_count: Integer? - - def reply_count=: (Integer) -> Integer - - attr_reader retweet_count: Integer? - - def retweet_count=: (Integer) -> Integer - - attr_reader view_count: Integer? - - def view_count=: (Integer) -> Integer - - def initialize: ( - id: String, - text: String, - ?author: XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author, - ?bookmark_count: Integer, - ?created_at: String, - ?is_note_tweet: bool, - ?like_count: Integer, - ?quote_count: Integer, - ?reply_count: Integer, - ?retweet_count: Integer, - ?view_count: Integer - ) -> void - - def to_hash: -> { - id: String, - text: String, - author: XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - type author = - { id: String, name: String, username: String, verified: bool } - - class Author < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - verified: bool - } - end - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/tweet_delete_params.rbs b/sig/x_twitter_scraper/models/x/tweet_delete_params.rbs new file mode 100644 index 0000000..a554ba3 --- /dev/null +++ b/sig/x_twitter_scraper/models/x/tweet_delete_params.rbs @@ -0,0 +1,30 @@ +module XTwitterScraper + module Models + module X + type tweet_delete_params = + { id: String, account: String } + & XTwitterScraper::Internal::Type::request_parameters + + class TweetDeleteParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + attr_accessor id: String + + attr_accessor account: String + + def initialize: ( + id: String, + account: String, + ?request_options: XTwitterScraper::request_opts + ) -> void + + def to_hash: -> { + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions + } + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/tweet_delete_response.rbs b/sig/x_twitter_scraper/models/x/tweet_delete_response.rbs new file mode 100644 index 0000000..c7435a1 --- /dev/null +++ b/sig/x_twitter_scraper/models/x/tweet_delete_response.rbs @@ -0,0 +1,15 @@ +module XTwitterScraper + module Models + module X + type tweet_delete_response = { success: true } + + class TweetDeleteResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor success: true + + def initialize: (?success: true) -> void + + def to_hash: -> { success: true } + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/tweet_get_favoriters_response.rbs b/sig/x_twitter_scraper/models/x/tweet_get_favoriters_response.rbs deleted file mode 100644 index 2c33db9..0000000 --- a/sig/x_twitter_scraper/models/x/tweet_get_favoriters_response.rbs +++ /dev/null @@ -1,115 +0,0 @@ -module XTwitterScraper - module Models - module X - type tweet_get_favoriters_response = - { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::TweetGetFavoritersResponse::User] - } - - class TweetGetFavoritersResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor users: ::Array[XTwitterScraper::Models::X::TweetGetFavoritersResponse::User] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::TweetGetFavoritersResponse::User] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::TweetGetFavoritersResponse::User] - } - - type user = - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - - class User < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader description: String? - - def description=: (String) -> String - - attr_reader followers: Integer? - - def followers=: (Integer) -> Integer - - attr_reader following: Integer? - - def following=: (Integer) -> Integer - - attr_reader location: String? - - def location=: (String) -> String - - attr_reader profile_picture: String? - - def profile_picture=: (String) -> String - - attr_reader statuses_count: Integer? - - def statuses_count=: (Integer) -> Integer - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?created_at: String, - ?description: String, - ?followers: Integer, - ?following: Integer, - ?location: String, - ?profile_picture: String, - ?statuses_count: Integer, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/tweet_get_quotes_response.rbs b/sig/x_twitter_scraper/models/x/tweet_get_quotes_response.rbs deleted file mode 100644 index 7d2bca0..0000000 --- a/sig/x_twitter_scraper/models/x/tweet_get_quotes_response.rbs +++ /dev/null @@ -1,148 +0,0 @@ -module XTwitterScraper - module Models - module X - type tweet_get_quotes_response = - { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet] - } - - class TweetGetQuotesResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor tweets: ::Array[XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet] - } - - type tweet = - { - id: String, - text: String, - author: XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor text: String - - attr_reader author: XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet::Author? - - def author=: ( - XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet::Author - ) -> XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet::Author - - attr_reader bookmark_count: Integer? - - def bookmark_count=: (Integer) -> Integer - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader is_note_tweet: bool? - - def is_note_tweet=: (bool) -> bool - - attr_reader like_count: Integer? - - def like_count=: (Integer) -> Integer - - attr_reader quote_count: Integer? - - def quote_count=: (Integer) -> Integer - - attr_reader reply_count: Integer? - - def reply_count=: (Integer) -> Integer - - attr_reader retweet_count: Integer? - - def retweet_count=: (Integer) -> Integer - - attr_reader view_count: Integer? - - def view_count=: (Integer) -> Integer - - def initialize: ( - id: String, - text: String, - ?author: XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet::Author, - ?bookmark_count: Integer, - ?created_at: String, - ?is_note_tweet: bool, - ?like_count: Integer, - ?quote_count: Integer, - ?reply_count: Integer, - ?retweet_count: Integer, - ?view_count: Integer - ) -> void - - def to_hash: -> { - id: String, - text: String, - author: XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - type author = - { id: String, name: String, username: String, verified: bool } - - class Author < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - verified: bool - } - end - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/tweet_get_replies_response.rbs b/sig/x_twitter_scraper/models/x/tweet_get_replies_response.rbs deleted file mode 100644 index 1c168aa..0000000 --- a/sig/x_twitter_scraper/models/x/tweet_get_replies_response.rbs +++ /dev/null @@ -1,148 +0,0 @@ -module XTwitterScraper - module Models - module X - type tweet_get_replies_response = - { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet] - } - - class TweetGetRepliesResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor tweets: ::Array[XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet] - } - - type tweet = - { - id: String, - text: String, - author: XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor text: String - - attr_reader author: XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet::Author? - - def author=: ( - XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet::Author - ) -> XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet::Author - - attr_reader bookmark_count: Integer? - - def bookmark_count=: (Integer) -> Integer - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader is_note_tweet: bool? - - def is_note_tweet=: (bool) -> bool - - attr_reader like_count: Integer? - - def like_count=: (Integer) -> Integer - - attr_reader quote_count: Integer? - - def quote_count=: (Integer) -> Integer - - attr_reader reply_count: Integer? - - def reply_count=: (Integer) -> Integer - - attr_reader retweet_count: Integer? - - def retweet_count=: (Integer) -> Integer - - attr_reader view_count: Integer? - - def view_count=: (Integer) -> Integer - - def initialize: ( - id: String, - text: String, - ?author: XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet::Author, - ?bookmark_count: Integer, - ?created_at: String, - ?is_note_tweet: bool, - ?like_count: Integer, - ?quote_count: Integer, - ?reply_count: Integer, - ?retweet_count: Integer, - ?view_count: Integer - ) -> void - - def to_hash: -> { - id: String, - text: String, - author: XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - type author = - { id: String, name: String, username: String, verified: bool } - - class Author < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - verified: bool - } - end - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/tweet_get_retweeters_response.rbs b/sig/x_twitter_scraper/models/x/tweet_get_retweeters_response.rbs deleted file mode 100644 index 5c01f9a..0000000 --- a/sig/x_twitter_scraper/models/x/tweet_get_retweeters_response.rbs +++ /dev/null @@ -1,115 +0,0 @@ -module XTwitterScraper - module Models - module X - type tweet_get_retweeters_response = - { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::TweetGetRetweetersResponse::User] - } - - class TweetGetRetweetersResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor users: ::Array[XTwitterScraper::Models::X::TweetGetRetweetersResponse::User] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::TweetGetRetweetersResponse::User] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::TweetGetRetweetersResponse::User] - } - - type user = - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - - class User < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader description: String? - - def description=: (String) -> String - - attr_reader followers: Integer? - - def followers=: (Integer) -> Integer - - attr_reader following: Integer? - - def following=: (Integer) -> Integer - - attr_reader location: String? - - def location=: (String) -> String - - attr_reader profile_picture: String? - - def profile_picture=: (String) -> String - - attr_reader statuses_count: Integer? - - def statuses_count=: (Integer) -> Integer - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?created_at: String, - ?description: String, - ?followers: Integer, - ?following: Integer, - ?location: String, - ?profile_picture: String, - ?statuses_count: Integer, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/tweet_get_thread_response.rbs b/sig/x_twitter_scraper/models/x/tweet_get_thread_response.rbs deleted file mode 100644 index 1dfff68..0000000 --- a/sig/x_twitter_scraper/models/x/tweet_get_thread_response.rbs +++ /dev/null @@ -1,148 +0,0 @@ -module XTwitterScraper - module Models - module X - type tweet_get_thread_response = - { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet] - } - - class TweetGetThreadResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor tweets: ::Array[XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet] - } - - type tweet = - { - id: String, - text: String, - author: XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor text: String - - attr_reader author: XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet::Author? - - def author=: ( - XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet::Author - ) -> XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet::Author - - attr_reader bookmark_count: Integer? - - def bookmark_count=: (Integer) -> Integer - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader is_note_tweet: bool? - - def is_note_tweet=: (bool) -> bool - - attr_reader like_count: Integer? - - def like_count=: (Integer) -> Integer - - attr_reader quote_count: Integer? - - def quote_count=: (Integer) -> Integer - - attr_reader reply_count: Integer? - - def reply_count=: (Integer) -> Integer - - attr_reader retweet_count: Integer? - - def retweet_count=: (Integer) -> Integer - - attr_reader view_count: Integer? - - def view_count=: (Integer) -> Integer - - def initialize: ( - id: String, - text: String, - ?author: XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet::Author, - ?bookmark_count: Integer, - ?created_at: String, - ?is_note_tweet: bool, - ?like_count: Integer, - ?quote_count: Integer, - ?reply_count: Integer, - ?retweet_count: Integer, - ?view_count: Integer - ) -> void - - def to_hash: -> { - id: String, - text: String, - author: XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - type author = - { id: String, name: String, username: String, verified: bool } - - class Author < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - verified: bool - } - end - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/tweet_list_response.rbs b/sig/x_twitter_scraper/models/x/tweet_list_response.rbs deleted file mode 100644 index 1b0c49f..0000000 --- a/sig/x_twitter_scraper/models/x/tweet_list_response.rbs +++ /dev/null @@ -1,148 +0,0 @@ -module XTwitterScraper - module Models - module X - type tweet_list_response = - { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::TweetListResponse::Tweet] - } - - class TweetListResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor tweets: ::Array[XTwitterScraper::Models::X::TweetListResponse::Tweet] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::TweetListResponse::Tweet] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::TweetListResponse::Tweet] - } - - type tweet = - { - id: String, - text: String, - author: XTwitterScraper::Models::X::TweetListResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor text: String - - attr_reader author: XTwitterScraper::Models::X::TweetListResponse::Tweet::Author? - - def author=: ( - XTwitterScraper::Models::X::TweetListResponse::Tweet::Author - ) -> XTwitterScraper::Models::X::TweetListResponse::Tweet::Author - - attr_reader bookmark_count: Integer? - - def bookmark_count=: (Integer) -> Integer - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader is_note_tweet: bool? - - def is_note_tweet=: (bool) -> bool - - attr_reader like_count: Integer? - - def like_count=: (Integer) -> Integer - - attr_reader quote_count: Integer? - - def quote_count=: (Integer) -> Integer - - attr_reader reply_count: Integer? - - def reply_count=: (Integer) -> Integer - - attr_reader retweet_count: Integer? - - def retweet_count=: (Integer) -> Integer - - attr_reader view_count: Integer? - - def view_count=: (Integer) -> Integer - - def initialize: ( - id: String, - text: String, - ?author: XTwitterScraper::Models::X::TweetListResponse::Tweet::Author, - ?bookmark_count: Integer, - ?created_at: String, - ?is_note_tweet: bool, - ?like_count: Integer, - ?quote_count: Integer, - ?reply_count: Integer, - ?retweet_count: Integer, - ?view_count: Integer - ) -> void - - def to_hash: -> { - id: String, - text: String, - author: XTwitterScraper::Models::X::TweetListResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - type author = - { id: String, name: String, username: String, verified: bool } - - class Author < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - verified: bool - } - end - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/tweet_retrieve_params.rbs b/sig/x_twitter_scraper/models/x/tweet_retrieve_params.rbs new file mode 100644 index 0000000..1e4972e --- /dev/null +++ b/sig/x_twitter_scraper/models/x/tweet_retrieve_params.rbs @@ -0,0 +1,25 @@ +module XTwitterScraper + module Models + module X + type tweet_retrieve_params = + { id: String } & XTwitterScraper::Internal::Type::request_parameters + + class TweetRetrieveParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + attr_accessor id: String + + def initialize: ( + id: String, + ?request_options: XTwitterScraper::request_opts + ) -> void + + def to_hash: -> { + id: String, + request_options: XTwitterScraper::RequestOptions + } + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/tweet_retrieve_response.rbs b/sig/x_twitter_scraper/models/x/tweet_retrieve_response.rbs new file mode 100644 index 0000000..78fd37b --- /dev/null +++ b/sig/x_twitter_scraper/models/x/tweet_retrieve_response.rbs @@ -0,0 +1,31 @@ +module XTwitterScraper + module Models + module X + type tweet_retrieve_response = + { + tweet: XTwitterScraper::X::TweetDetail, + author: XTwitterScraper::X::TweetAuthor + } + + class TweetRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor tweet: XTwitterScraper::X::TweetDetail + + attr_reader author: XTwitterScraper::X::TweetAuthor? + + def author=: ( + XTwitterScraper::X::TweetAuthor + ) -> XTwitterScraper::X::TweetAuthor + + def initialize: ( + tweet: XTwitterScraper::X::TweetDetail, + ?author: XTwitterScraper::X::TweetAuthor + ) -> void + + def to_hash: -> { + tweet: XTwitterScraper::X::TweetDetail, + author: XTwitterScraper::X::TweetAuthor + } + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/tweet_search_response.rbs b/sig/x_twitter_scraper/models/x/tweet_search_response.rbs deleted file mode 100644 index 07b3edd..0000000 --- a/sig/x_twitter_scraper/models/x/tweet_search_response.rbs +++ /dev/null @@ -1,148 +0,0 @@ -module XTwitterScraper - module Models - module X - type tweet_search_response = - { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::TweetSearchResponse::Tweet] - } - - class TweetSearchResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor tweets: ::Array[XTwitterScraper::Models::X::TweetSearchResponse::Tweet] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::TweetSearchResponse::Tweet] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::TweetSearchResponse::Tweet] - } - - type tweet = - { - id: String, - text: String, - author: XTwitterScraper::Models::X::TweetSearchResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor text: String - - attr_reader author: XTwitterScraper::Models::X::TweetSearchResponse::Tweet::Author? - - def author=: ( - XTwitterScraper::Models::X::TweetSearchResponse::Tweet::Author - ) -> XTwitterScraper::Models::X::TweetSearchResponse::Tweet::Author - - attr_reader bookmark_count: Integer? - - def bookmark_count=: (Integer) -> Integer - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader is_note_tweet: bool? - - def is_note_tweet=: (bool) -> bool - - attr_reader like_count: Integer? - - def like_count=: (Integer) -> Integer - - attr_reader quote_count: Integer? - - def quote_count=: (Integer) -> Integer - - attr_reader reply_count: Integer? - - def reply_count=: (Integer) -> Integer - - attr_reader retweet_count: Integer? - - def retweet_count=: (Integer) -> Integer - - attr_reader view_count: Integer? - - def view_count=: (Integer) -> Integer - - def initialize: ( - id: String, - text: String, - ?author: XTwitterScraper::Models::X::TweetSearchResponse::Tweet::Author, - ?bookmark_count: Integer, - ?created_at: String, - ?is_note_tweet: bool, - ?like_count: Integer, - ?quote_count: Integer, - ?reply_count: Integer, - ?retweet_count: Integer, - ?view_count: Integer - ) -> void - - def to_hash: -> { - id: String, - text: String, - author: XTwitterScraper::Models::X::TweetSearchResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - type author = - { id: String, name: String, username: String, verified: bool } - - class Author < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - verified: bool - } - end - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/tweets/like_create_params.rbs b/sig/x_twitter_scraper/models/x/tweets/like_create_params.rbs new file mode 100644 index 0000000..dcc4656 --- /dev/null +++ b/sig/x_twitter_scraper/models/x/tweets/like_create_params.rbs @@ -0,0 +1,32 @@ +module XTwitterScraper + module Models + module X + module Tweets + type like_create_params = + { id: String, account: String } + & XTwitterScraper::Internal::Type::request_parameters + + class LikeCreateParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + attr_accessor id: String + + attr_accessor account: String + + def initialize: ( + id: String, + account: String, + ?request_options: XTwitterScraper::request_opts + ) -> void + + def to_hash: -> { + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions + } + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/tweets/like_create_response.rbs b/sig/x_twitter_scraper/models/x/tweets/like_create_response.rbs new file mode 100644 index 0000000..f15fd18 --- /dev/null +++ b/sig/x_twitter_scraper/models/x/tweets/like_create_response.rbs @@ -0,0 +1,17 @@ +module XTwitterScraper + module Models + module X + module Tweets + type like_create_response = { success: true } + + class LikeCreateResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor success: true + + def initialize: (?success: true) -> void + + def to_hash: -> { success: true } + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/tweets/like_delete_params.rbs b/sig/x_twitter_scraper/models/x/tweets/like_delete_params.rbs new file mode 100644 index 0000000..cb8e849 --- /dev/null +++ b/sig/x_twitter_scraper/models/x/tweets/like_delete_params.rbs @@ -0,0 +1,32 @@ +module XTwitterScraper + module Models + module X + module Tweets + type like_delete_params = + { id: String, account: String } + & XTwitterScraper::Internal::Type::request_parameters + + class LikeDeleteParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + attr_accessor id: String + + attr_accessor account: String + + def initialize: ( + id: String, + account: String, + ?request_options: XTwitterScraper::request_opts + ) -> void + + def to_hash: -> { + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions + } + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/tweets/like_delete_response.rbs b/sig/x_twitter_scraper/models/x/tweets/like_delete_response.rbs new file mode 100644 index 0000000..b14d73c --- /dev/null +++ b/sig/x_twitter_scraper/models/x/tweets/like_delete_response.rbs @@ -0,0 +1,17 @@ +module XTwitterScraper + module Models + module X + module Tweets + type like_delete_response = { success: true } + + class LikeDeleteResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor success: true + + def initialize: (?success: true) -> void + + def to_hash: -> { success: true } + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/tweets/retweet_create_params.rbs b/sig/x_twitter_scraper/models/x/tweets/retweet_create_params.rbs new file mode 100644 index 0000000..b3f1a82 --- /dev/null +++ b/sig/x_twitter_scraper/models/x/tweets/retweet_create_params.rbs @@ -0,0 +1,32 @@ +module XTwitterScraper + module Models + module X + module Tweets + type retweet_create_params = + { id: String, account: String } + & XTwitterScraper::Internal::Type::request_parameters + + class RetweetCreateParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + attr_accessor id: String + + attr_accessor account: String + + def initialize: ( + id: String, + account: String, + ?request_options: XTwitterScraper::request_opts + ) -> void + + def to_hash: -> { + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions + } + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/tweets/retweet_create_response.rbs b/sig/x_twitter_scraper/models/x/tweets/retweet_create_response.rbs new file mode 100644 index 0000000..f9e9ab5 --- /dev/null +++ b/sig/x_twitter_scraper/models/x/tweets/retweet_create_response.rbs @@ -0,0 +1,17 @@ +module XTwitterScraper + module Models + module X + module Tweets + type retweet_create_response = { success: true } + + class RetweetCreateResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor success: true + + def initialize: (?success: true) -> void + + def to_hash: -> { success: true } + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbs b/sig/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbs new file mode 100644 index 0000000..6a5ff4e --- /dev/null +++ b/sig/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbs @@ -0,0 +1,32 @@ +module XTwitterScraper + module Models + module X + module Tweets + type retweet_delete_params = + { id: String, account: String } + & XTwitterScraper::Internal::Type::request_parameters + + class RetweetDeleteParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + attr_accessor id: String + + attr_accessor account: String + + def initialize: ( + id: String, + account: String, + ?request_options: XTwitterScraper::request_opts + ) -> void + + def to_hash: -> { + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions + } + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbs b/sig/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbs new file mode 100644 index 0000000..e6da7b0 --- /dev/null +++ b/sig/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbs @@ -0,0 +1,17 @@ +module XTwitterScraper + module Models + module X + module Tweets + type retweet_delete_response = { success: true } + + class RetweetDeleteResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor success: true + + def initialize: (?success: true) -> void + + def to_hash: -> { success: true } + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/user_retrieve_batch_response.rbs b/sig/x_twitter_scraper/models/x/user_retrieve_batch_response.rbs deleted file mode 100644 index fde5aa7..0000000 --- a/sig/x_twitter_scraper/models/x/user_retrieve_batch_response.rbs +++ /dev/null @@ -1,115 +0,0 @@ -module XTwitterScraper - module Models - module X - type user_retrieve_batch_response = - { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::UserRetrieveBatchResponse::User] - } - - class UserRetrieveBatchResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor users: ::Array[XTwitterScraper::Models::X::UserRetrieveBatchResponse::User] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::UserRetrieveBatchResponse::User] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::UserRetrieveBatchResponse::User] - } - - type user = - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - - class User < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader description: String? - - def description=: (String) -> String - - attr_reader followers: Integer? - - def followers=: (Integer) -> Integer - - attr_reader following: Integer? - - def following=: (Integer) -> Integer - - attr_reader location: String? - - def location=: (String) -> String - - attr_reader profile_picture: String? - - def profile_picture=: (String) -> String - - attr_reader statuses_count: Integer? - - def statuses_count=: (Integer) -> Integer - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?created_at: String, - ?description: String, - ?followers: Integer, - ?following: Integer, - ?location: String, - ?profile_picture: String, - ?statuses_count: Integer, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/user_retrieve_followers_response.rbs b/sig/x_twitter_scraper/models/x/user_retrieve_followers_response.rbs deleted file mode 100644 index e4dc0c2..0000000 --- a/sig/x_twitter_scraper/models/x/user_retrieve_followers_response.rbs +++ /dev/null @@ -1,115 +0,0 @@ -module XTwitterScraper - module Models - module X - type user_retrieve_followers_response = - { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::UserRetrieveFollowersResponse::User] - } - - class UserRetrieveFollowersResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor users: ::Array[XTwitterScraper::Models::X::UserRetrieveFollowersResponse::User] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::UserRetrieveFollowersResponse::User] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::UserRetrieveFollowersResponse::User] - } - - type user = - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - - class User < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader description: String? - - def description=: (String) -> String - - attr_reader followers: Integer? - - def followers=: (Integer) -> Integer - - attr_reader following: Integer? - - def following=: (Integer) -> Integer - - attr_reader location: String? - - def location=: (String) -> String - - attr_reader profile_picture: String? - - def profile_picture=: (String) -> String - - attr_reader statuses_count: Integer? - - def statuses_count=: (Integer) -> Integer - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?created_at: String, - ?description: String, - ?followers: Integer, - ?following: Integer, - ?location: String, - ?profile_picture: String, - ?statuses_count: Integer, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/user_retrieve_followers_you_know_response.rbs b/sig/x_twitter_scraper/models/x/user_retrieve_followers_you_know_response.rbs deleted file mode 100644 index 44624c2..0000000 --- a/sig/x_twitter_scraper/models/x/user_retrieve_followers_you_know_response.rbs +++ /dev/null @@ -1,115 +0,0 @@ -module XTwitterScraper - module Models - module X - type user_retrieve_followers_you_know_response = - { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::UserRetrieveFollowersYouKnowResponse::User] - } - - class UserRetrieveFollowersYouKnowResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor users: ::Array[XTwitterScraper::Models::X::UserRetrieveFollowersYouKnowResponse::User] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::UserRetrieveFollowersYouKnowResponse::User] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::UserRetrieveFollowersYouKnowResponse::User] - } - - type user = - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - - class User < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader description: String? - - def description=: (String) -> String - - attr_reader followers: Integer? - - def followers=: (Integer) -> Integer - - attr_reader following: Integer? - - def following=: (Integer) -> Integer - - attr_reader location: String? - - def location=: (String) -> String - - attr_reader profile_picture: String? - - def profile_picture=: (String) -> String - - attr_reader statuses_count: Integer? - - def statuses_count=: (Integer) -> Integer - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?created_at: String, - ?description: String, - ?followers: Integer, - ?following: Integer, - ?location: String, - ?profile_picture: String, - ?statuses_count: Integer, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/user_retrieve_following_response.rbs b/sig/x_twitter_scraper/models/x/user_retrieve_following_response.rbs deleted file mode 100644 index 1d0ea0e..0000000 --- a/sig/x_twitter_scraper/models/x/user_retrieve_following_response.rbs +++ /dev/null @@ -1,115 +0,0 @@ -module XTwitterScraper - module Models - module X - type user_retrieve_following_response = - { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::UserRetrieveFollowingResponse::User] - } - - class UserRetrieveFollowingResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor users: ::Array[XTwitterScraper::Models::X::UserRetrieveFollowingResponse::User] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::UserRetrieveFollowingResponse::User] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::UserRetrieveFollowingResponse::User] - } - - type user = - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - - class User < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader description: String? - - def description=: (String) -> String - - attr_reader followers: Integer? - - def followers=: (Integer) -> Integer - - attr_reader following: Integer? - - def following=: (Integer) -> Integer - - attr_reader location: String? - - def location=: (String) -> String - - attr_reader profile_picture: String? - - def profile_picture=: (String) -> String - - attr_reader statuses_count: Integer? - - def statuses_count=: (Integer) -> Integer - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?created_at: String, - ?description: String, - ?followers: Integer, - ?following: Integer, - ?location: String, - ?profile_picture: String, - ?statuses_count: Integer, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/user_retrieve_likes_response.rbs b/sig/x_twitter_scraper/models/x/user_retrieve_likes_response.rbs deleted file mode 100644 index 666d502..0000000 --- a/sig/x_twitter_scraper/models/x/user_retrieve_likes_response.rbs +++ /dev/null @@ -1,148 +0,0 @@ -module XTwitterScraper - module Models - module X - type user_retrieve_likes_response = - { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet] - } - - class UserRetrieveLikesResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor tweets: ::Array[XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet] - } - - type tweet = - { - id: String, - text: String, - author: XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor text: String - - attr_reader author: XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet::Author? - - def author=: ( - XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet::Author - ) -> XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet::Author - - attr_reader bookmark_count: Integer? - - def bookmark_count=: (Integer) -> Integer - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader is_note_tweet: bool? - - def is_note_tweet=: (bool) -> bool - - attr_reader like_count: Integer? - - def like_count=: (Integer) -> Integer - - attr_reader quote_count: Integer? - - def quote_count=: (Integer) -> Integer - - attr_reader reply_count: Integer? - - def reply_count=: (Integer) -> Integer - - attr_reader retweet_count: Integer? - - def retweet_count=: (Integer) -> Integer - - attr_reader view_count: Integer? - - def view_count=: (Integer) -> Integer - - def initialize: ( - id: String, - text: String, - ?author: XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet::Author, - ?bookmark_count: Integer, - ?created_at: String, - ?is_note_tweet: bool, - ?like_count: Integer, - ?quote_count: Integer, - ?reply_count: Integer, - ?retweet_count: Integer, - ?view_count: Integer - ) -> void - - def to_hash: -> { - id: String, - text: String, - author: XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - type author = - { id: String, name: String, username: String, verified: bool } - - class Author < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - verified: bool - } - end - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/user_retrieve_media_response.rbs b/sig/x_twitter_scraper/models/x/user_retrieve_media_response.rbs deleted file mode 100644 index dadef21..0000000 --- a/sig/x_twitter_scraper/models/x/user_retrieve_media_response.rbs +++ /dev/null @@ -1,148 +0,0 @@ -module XTwitterScraper - module Models - module X - type user_retrieve_media_response = - { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet] - } - - class UserRetrieveMediaResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor tweets: ::Array[XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet] - } - - type tweet = - { - id: String, - text: String, - author: XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor text: String - - attr_reader author: XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet::Author? - - def author=: ( - XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet::Author - ) -> XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet::Author - - attr_reader bookmark_count: Integer? - - def bookmark_count=: (Integer) -> Integer - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader is_note_tweet: bool? - - def is_note_tweet=: (bool) -> bool - - attr_reader like_count: Integer? - - def like_count=: (Integer) -> Integer - - attr_reader quote_count: Integer? - - def quote_count=: (Integer) -> Integer - - attr_reader reply_count: Integer? - - def reply_count=: (Integer) -> Integer - - attr_reader retweet_count: Integer? - - def retweet_count=: (Integer) -> Integer - - attr_reader view_count: Integer? - - def view_count=: (Integer) -> Integer - - def initialize: ( - id: String, - text: String, - ?author: XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet::Author, - ?bookmark_count: Integer, - ?created_at: String, - ?is_note_tweet: bool, - ?like_count: Integer, - ?quote_count: Integer, - ?reply_count: Integer, - ?retweet_count: Integer, - ?view_count: Integer - ) -> void - - def to_hash: -> { - id: String, - text: String, - author: XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - type author = - { id: String, name: String, username: String, verified: bool } - - class Author < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - verified: bool - } - end - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/user_retrieve_mentions_response.rbs b/sig/x_twitter_scraper/models/x/user_retrieve_mentions_response.rbs deleted file mode 100644 index 35b90bb..0000000 --- a/sig/x_twitter_scraper/models/x/user_retrieve_mentions_response.rbs +++ /dev/null @@ -1,148 +0,0 @@ -module XTwitterScraper - module Models - module X - type user_retrieve_mentions_response = - { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet] - } - - class UserRetrieveMentionsResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor tweets: ::Array[XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet] - } - - type tweet = - { - id: String, - text: String, - author: XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor text: String - - attr_reader author: XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author? - - def author=: ( - XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author - ) -> XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author - - attr_reader bookmark_count: Integer? - - def bookmark_count=: (Integer) -> Integer - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader is_note_tweet: bool? - - def is_note_tweet=: (bool) -> bool - - attr_reader like_count: Integer? - - def like_count=: (Integer) -> Integer - - attr_reader quote_count: Integer? - - def quote_count=: (Integer) -> Integer - - attr_reader reply_count: Integer? - - def reply_count=: (Integer) -> Integer - - attr_reader retweet_count: Integer? - - def retweet_count=: (Integer) -> Integer - - attr_reader view_count: Integer? - - def view_count=: (Integer) -> Integer - - def initialize: ( - id: String, - text: String, - ?author: XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author, - ?bookmark_count: Integer, - ?created_at: String, - ?is_note_tweet: bool, - ?like_count: Integer, - ?quote_count: Integer, - ?reply_count: Integer, - ?retweet_count: Integer, - ?view_count: Integer - ) -> void - - def to_hash: -> { - id: String, - text: String, - author: XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - type author = - { id: String, name: String, username: String, verified: bool } - - class Author < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - verified: bool - } - end - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/user_retrieve_params.rbs b/sig/x_twitter_scraper/models/x/user_retrieve_params.rbs new file mode 100644 index 0000000..744f86f --- /dev/null +++ b/sig/x_twitter_scraper/models/x/user_retrieve_params.rbs @@ -0,0 +1,25 @@ +module XTwitterScraper + module Models + module X + type user_retrieve_params = + { id: String } & XTwitterScraper::Internal::Type::request_parameters + + class UserRetrieveParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + attr_accessor id: String + + def initialize: ( + id: String, + ?request_options: XTwitterScraper::request_opts + ) -> void + + def to_hash: -> { + id: String, + request_options: XTwitterScraper::RequestOptions + } + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/user_retrieve_search_response.rbs b/sig/x_twitter_scraper/models/x/user_retrieve_search_response.rbs deleted file mode 100644 index ca01e88..0000000 --- a/sig/x_twitter_scraper/models/x/user_retrieve_search_response.rbs +++ /dev/null @@ -1,115 +0,0 @@ -module XTwitterScraper - module Models - module X - type user_retrieve_search_response = - { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::UserRetrieveSearchResponse::User] - } - - class UserRetrieveSearchResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor users: ::Array[XTwitterScraper::Models::X::UserRetrieveSearchResponse::User] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::UserRetrieveSearchResponse::User] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::UserRetrieveSearchResponse::User] - } - - type user = - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - - class User < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader description: String? - - def description=: (String) -> String - - attr_reader followers: Integer? - - def followers=: (Integer) -> Integer - - attr_reader following: Integer? - - def following=: (Integer) -> Integer - - attr_reader location: String? - - def location=: (String) -> String - - attr_reader profile_picture: String? - - def profile_picture=: (String) -> String - - attr_reader statuses_count: Integer? - - def statuses_count=: (Integer) -> Integer - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?created_at: String, - ?description: String, - ?followers: Integer, - ?following: Integer, - ?location: String, - ?profile_picture: String, - ?statuses_count: Integer, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/user_retrieve_tweets_response.rbs b/sig/x_twitter_scraper/models/x/user_retrieve_tweets_response.rbs deleted file mode 100644 index 01f8177..0000000 --- a/sig/x_twitter_scraper/models/x/user_retrieve_tweets_response.rbs +++ /dev/null @@ -1,148 +0,0 @@ -module XTwitterScraper - module Models - module X - type user_retrieve_tweets_response = - { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet] - } - - class UserRetrieveTweetsResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor tweets: ::Array[XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet] - } - - type tweet = - { - id: String, - text: String, - author: XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor text: String - - attr_reader author: XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet::Author? - - def author=: ( - XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet::Author - ) -> XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet::Author - - attr_reader bookmark_count: Integer? - - def bookmark_count=: (Integer) -> Integer - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader is_note_tweet: bool? - - def is_note_tweet=: (bool) -> bool - - attr_reader like_count: Integer? - - def like_count=: (Integer) -> Integer - - attr_reader quote_count: Integer? - - def quote_count=: (Integer) -> Integer - - attr_reader reply_count: Integer? - - def reply_count=: (Integer) -> Integer - - attr_reader retweet_count: Integer? - - def retweet_count=: (Integer) -> Integer - - attr_reader view_count: Integer? - - def view_count=: (Integer) -> Integer - - def initialize: ( - id: String, - text: String, - ?author: XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet::Author, - ?bookmark_count: Integer, - ?created_at: String, - ?is_note_tweet: bool, - ?like_count: Integer, - ?quote_count: Integer, - ?reply_count: Integer, - ?retweet_count: Integer, - ?view_count: Integer - ) -> void - - def to_hash: -> { - id: String, - text: String, - author: XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - type author = - { id: String, name: String, username: String, verified: bool } - - class Author < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - verified: bool - } - end - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rbs b/sig/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rbs deleted file mode 100644 index f6d6854..0000000 --- a/sig/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rbs +++ /dev/null @@ -1,115 +0,0 @@ -module XTwitterScraper - module Models - module X - type user_retrieve_verified_followers_response = - { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse::User] - } - - class UserRetrieveVerifiedFollowersResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor users: ::Array[XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse::User] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse::User] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - users: ::Array[XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse::User] - } - - type user = - { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - - class User < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader description: String? - - def description=: (String) -> String - - attr_reader followers: Integer? - - def followers=: (Integer) -> Integer - - attr_reader following: Integer? - - def following=: (Integer) -> Integer - - attr_reader location: String? - - def location=: (String) -> String - - attr_reader profile_picture: String? - - def profile_picture=: (String) -> String - - attr_reader statuses_count: Integer? - - def statuses_count=: (Integer) -> Integer - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?created_at: String, - ?description: String, - ?followers: Integer, - ?following: Integer, - ?location: String, - ?profile_picture: String, - ?statuses_count: Integer, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - created_at: String, - description: String, - followers: Integer, - following: Integer, - location: String, - profile_picture: String, - statuses_count: Integer, - verified: bool - } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/models/x/users/follow_create_params.rbs b/sig/x_twitter_scraper/models/x/users/follow_create_params.rbs new file mode 100644 index 0000000..433972b --- /dev/null +++ b/sig/x_twitter_scraper/models/x/users/follow_create_params.rbs @@ -0,0 +1,32 @@ +module XTwitterScraper + module Models + module X + module Users + type follow_create_params = + { id: String, account: String } + & XTwitterScraper::Internal::Type::request_parameters + + class FollowCreateParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + attr_accessor id: String + + attr_accessor account: String + + def initialize: ( + id: String, + account: String, + ?request_options: XTwitterScraper::request_opts + ) -> void + + def to_hash: -> { + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions + } + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/users/follow_create_response.rbs b/sig/x_twitter_scraper/models/x/users/follow_create_response.rbs new file mode 100644 index 0000000..d5bd743 --- /dev/null +++ b/sig/x_twitter_scraper/models/x/users/follow_create_response.rbs @@ -0,0 +1,17 @@ +module XTwitterScraper + module Models + module X + module Users + type follow_create_response = { success: true } + + class FollowCreateResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor success: true + + def initialize: (?success: true) -> void + + def to_hash: -> { success: true } + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/users/follow_delete_all_params.rbs b/sig/x_twitter_scraper/models/x/users/follow_delete_all_params.rbs new file mode 100644 index 0000000..4b479c7 --- /dev/null +++ b/sig/x_twitter_scraper/models/x/users/follow_delete_all_params.rbs @@ -0,0 +1,32 @@ +module XTwitterScraper + module Models + module X + module Users + type follow_delete_all_params = + { id: String, account: String } + & XTwitterScraper::Internal::Type::request_parameters + + class FollowDeleteAllParams < XTwitterScraper::Internal::Type::BaseModel + extend XTwitterScraper::Internal::Type::RequestParameters::Converter + include XTwitterScraper::Internal::Type::RequestParameters + + attr_accessor id: String + + attr_accessor account: String + + def initialize: ( + id: String, + account: String, + ?request_options: XTwitterScraper::request_opts + ) -> void + + def to_hash: -> { + id: String, + account: String, + request_options: XTwitterScraper::RequestOptions + } + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x/users/follow_delete_all_response.rbs b/sig/x_twitter_scraper/models/x/users/follow_delete_all_response.rbs new file mode 100644 index 0000000..e773c2a --- /dev/null +++ b/sig/x_twitter_scraper/models/x/users/follow_delete_all_response.rbs @@ -0,0 +1,17 @@ +module XTwitterScraper + module Models + module X + module Users + type follow_delete_all_response = { success: true } + + class FollowDeleteAllResponse < XTwitterScraper::Internal::Type::BaseModel + attr_accessor success: true + + def initialize: (?success: true) -> void + + def to_hash: -> { success: true } + end + end + end + end +end diff --git a/sig/x_twitter_scraper/models/x_get_article_response.rbs b/sig/x_twitter_scraper/models/x_get_article_response.rbs index 3f2d0d8..7114e4d 100644 --- a/sig/x_twitter_scraper/models/x_get_article_response.rbs +++ b/sig/x_twitter_scraper/models/x_get_article_response.rbs @@ -3,26 +3,26 @@ module XTwitterScraper type x_get_article_response = { article: XTwitterScraper::Models::XGetArticleResponse::Article, - author: XTwitterScraper::Models::XGetArticleResponse::Author + author: XTwitterScraper::X::TweetAuthor } class XGetArticleResponse < XTwitterScraper::Internal::Type::BaseModel attr_accessor article: XTwitterScraper::Models::XGetArticleResponse::Article - attr_reader author: XTwitterScraper::Models::XGetArticleResponse::Author? + attr_reader author: XTwitterScraper::X::TweetAuthor? def author=: ( - XTwitterScraper::Models::XGetArticleResponse::Author - ) -> XTwitterScraper::Models::XGetArticleResponse::Author + XTwitterScraper::X::TweetAuthor + ) -> XTwitterScraper::X::TweetAuthor def initialize: ( article: XTwitterScraper::Models::XGetArticleResponse::Article, - ?author: XTwitterScraper::Models::XGetArticleResponse::Author + ?author: XTwitterScraper::X::TweetAuthor ) -> void def to_hash: -> { article: XTwitterScraper::Models::XGetArticleResponse::Article, - author: XTwitterScraper::Models::XGetArticleResponse::Author + author: XTwitterScraper::X::TweetAuthor } type article = @@ -148,45 +148,6 @@ module XTwitterScraper } end end - - type author = - { - id: String, - followers: Integer, - username: String, - verified: bool, - profile_picture: String - } - - class Author < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor followers: Integer - - attr_accessor username: String - - attr_accessor verified: bool - - attr_reader profile_picture: String? - - def profile_picture=: (String) -> String - - def initialize: ( - id: String, - followers: Integer, - username: String, - verified: bool, - ?profile_picture: String - ) -> void - - def to_hash: -> { - id: String, - followers: Integer, - username: String, - verified: bool, - profile_picture: String - } - end end end end diff --git a/sig/x_twitter_scraper/models/x_get_home_timeline_response.rbs b/sig/x_twitter_scraper/models/x_get_home_timeline_response.rbs deleted file mode 100644 index 5db7346..0000000 --- a/sig/x_twitter_scraper/models/x_get_home_timeline_response.rbs +++ /dev/null @@ -1,146 +0,0 @@ -module XTwitterScraper - module Models - type x_get_home_timeline_response = - { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet] - } - - class XGetHomeTimelineResponse < XTwitterScraper::Internal::Type::BaseModel - attr_accessor has_next_page: bool - - attr_accessor next_cursor: String - - attr_accessor tweets: ::Array[XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet] - - def initialize: ( - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet] - ) -> void - - def to_hash: -> { - has_next_page: bool, - next_cursor: String, - tweets: ::Array[XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet] - } - - type tweet = - { - id: String, - text: String, - author: XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - class Tweet < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor text: String - - attr_reader author: XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet::Author? - - def author=: ( - XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet::Author - ) -> XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet::Author - - attr_reader bookmark_count: Integer? - - def bookmark_count=: (Integer) -> Integer - - attr_reader created_at: String? - - def created_at=: (String) -> String - - attr_reader is_note_tweet: bool? - - def is_note_tweet=: (bool) -> bool - - attr_reader like_count: Integer? - - def like_count=: (Integer) -> Integer - - attr_reader quote_count: Integer? - - def quote_count=: (Integer) -> Integer - - attr_reader reply_count: Integer? - - def reply_count=: (Integer) -> Integer - - attr_reader retweet_count: Integer? - - def retweet_count=: (Integer) -> Integer - - attr_reader view_count: Integer? - - def view_count=: (Integer) -> Integer - - def initialize: ( - id: String, - text: String, - ?author: XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet::Author, - ?bookmark_count: Integer, - ?created_at: String, - ?is_note_tweet: bool, - ?like_count: Integer, - ?quote_count: Integer, - ?reply_count: Integer, - ?retweet_count: Integer, - ?view_count: Integer - ) -> void - - def to_hash: -> { - id: String, - text: String, - author: XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet::Author, - bookmark_count: Integer, - created_at: String, - is_note_tweet: bool, - like_count: Integer, - quote_count: Integer, - reply_count: Integer, - retweet_count: Integer, - view_count: Integer - } - - type author = - { id: String, name: String, username: String, verified: bool } - - class Author < XTwitterScraper::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor name: String - - attr_accessor username: String - - attr_reader verified: bool? - - def verified=: (bool) -> bool - - def initialize: ( - id: String, - name: String, - username: String, - ?verified: bool - ) -> void - - def to_hash: -> { - id: String, - name: String, - username: String, - verified: bool - } - end - end - end - end -end diff --git a/sig/x_twitter_scraper/resources/drafts.rbs b/sig/x_twitter_scraper/resources/drafts.rbs index ef3613b..9ff337e 100644 --- a/sig/x_twitter_scraper/resources/drafts.rbs +++ b/sig/x_twitter_scraper/resources/drafts.rbs @@ -6,12 +6,12 @@ module XTwitterScraper ?goal: XTwitterScraper::Models::DraftCreateParams::goal, ?topic: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::DraftCreateResponse + ) -> XTwitterScraper::DraftDetail def retrieve: ( String id, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::DraftRetrieveResponse + ) -> XTwitterScraper::DraftDetail def list: ( ?after_cursor: String, diff --git a/sig/x_twitter_scraper/resources/events.rbs b/sig/x_twitter_scraper/resources/events.rbs index a0d0642..a9592c4 100644 --- a/sig/x_twitter_scraper/resources/events.rbs +++ b/sig/x_twitter_scraper/resources/events.rbs @@ -4,11 +4,11 @@ module XTwitterScraper def retrieve: ( String id, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::EventRetrieveResponse + ) -> XTwitterScraper::EventDetail def list: ( ?after: String, - ?event_type: XTwitterScraper::Models::EventListParams::event_type, + ?event_type: XTwitterScraper::Models::event_type, ?limit: Integer, ?monitor_id: String, ?request_options: XTwitterScraper::request_opts diff --git a/sig/x_twitter_scraper/resources/integrations.rbs b/sig/x_twitter_scraper/resources/integrations.rbs index f35733a..080e671 100644 --- a/sig/x_twitter_scraper/resources/integrations.rbs +++ b/sig/x_twitter_scraper/resources/integrations.rbs @@ -3,20 +3,20 @@ module XTwitterScraper class Integrations def create: ( config: XTwitterScraper::IntegrationCreateParams::Config, - event_types: ::Array[XTwitterScraper::Models::IntegrationCreateParams::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], name: String, type: XTwitterScraper::Models::IntegrationCreateParams::type_, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::IntegrationCreateResponse + ) -> XTwitterScraper::Integration def retrieve: ( String id, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::IntegrationRetrieveResponse + ) -> XTwitterScraper::Integration def update: ( String id, - ?event_types: ::Array[XTwitterScraper::Models::IntegrationUpdateParams::event_type], + ?event_types: ::Array[XTwitterScraper::Models::event_type], ?filters: ::Hash[Symbol, top], ?is_active: bool, ?message_template: ::Hash[Symbol, top], @@ -24,7 +24,7 @@ module XTwitterScraper ?scope_all_monitors: bool, ?silent_push: bool, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::IntegrationUpdateResponse + ) -> XTwitterScraper::Integration def list: ( ?request_options: XTwitterScraper::request_opts diff --git a/sig/x_twitter_scraper/resources/monitors.rbs b/sig/x_twitter_scraper/resources/monitors.rbs index 3cbcac0..3a2abf5 100644 --- a/sig/x_twitter_scraper/resources/monitors.rbs +++ b/sig/x_twitter_scraper/resources/monitors.rbs @@ -2,7 +2,7 @@ module XTwitterScraper module Resources class Monitors def create: ( - event_types: ::Array[XTwitterScraper::Models::MonitorCreateParams::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], username: String, ?request_options: XTwitterScraper::request_opts ) -> XTwitterScraper::Models::MonitorCreateResponse @@ -10,14 +10,14 @@ module XTwitterScraper def retrieve: ( String id, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::MonitorRetrieveResponse + ) -> XTwitterScraper::Monitor def update: ( String id, - ?event_types: ::Array[XTwitterScraper::Models::MonitorUpdateParams::event_type], + ?event_types: ::Array[XTwitterScraper::Models::event_type], ?is_active: bool, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::MonitorUpdateResponse + ) -> XTwitterScraper::Monitor def list: ( ?request_options: XTwitterScraper::request_opts diff --git a/sig/x_twitter_scraper/resources/styles.rbs b/sig/x_twitter_scraper/resources/styles.rbs index 0864ba5..c36eb7d 100644 --- a/sig/x_twitter_scraper/resources/styles.rbs +++ b/sig/x_twitter_scraper/resources/styles.rbs @@ -1,14 +1,31 @@ module XTwitterScraper module Resources class Styles + def retrieve: ( + String id, + ?request_options: XTwitterScraper::request_opts + ) -> XTwitterScraper::StyleProfile + + def update: ( + String id, + label: String, + tweets: ::Array[XTwitterScraper::StyleUpdateParams::Tweet], + ?request_options: XTwitterScraper::request_opts + ) -> XTwitterScraper::StyleProfile + def list: ( ?request_options: XTwitterScraper::request_opts ) -> XTwitterScraper::Models::StyleListResponse + def delete: ( + String id, + ?request_options: XTwitterScraper::request_opts + ) -> nil + def analyze: ( username: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::StyleAnalyzeResponse + ) -> XTwitterScraper::StyleProfile def compare: ( username1: String, @@ -16,6 +33,11 @@ module XTwitterScraper ?request_options: XTwitterScraper::request_opts ) -> XTwitterScraper::Models::StyleCompareResponse + def get_performance: ( + String id, + ?request_options: XTwitterScraper::request_opts + ) -> XTwitterScraper::Models::StyleGetPerformanceResponse + def initialize: (client: XTwitterScraper::Client) -> void end end diff --git a/sig/x_twitter_scraper/resources/webhooks.rbs b/sig/x_twitter_scraper/resources/webhooks.rbs index ca4f5af..d3fee34 100644 --- a/sig/x_twitter_scraper/resources/webhooks.rbs +++ b/sig/x_twitter_scraper/resources/webhooks.rbs @@ -2,18 +2,18 @@ module XTwitterScraper module Resources class Webhooks def create: ( - event_types: ::Array[XTwitterScraper::Models::WebhookCreateParams::event_type], + event_types: ::Array[XTwitterScraper::Models::event_type], url: String, ?request_options: XTwitterScraper::request_opts ) -> XTwitterScraper::Models::WebhookCreateResponse def update: ( String id, - ?event_types: ::Array[XTwitterScraper::Models::WebhookUpdateParams::event_type], + ?event_types: ::Array[XTwitterScraper::Models::event_type], ?is_active: bool, ?url: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::WebhookUpdateResponse + ) -> XTwitterScraper::Webhook def list: ( ?request_options: XTwitterScraper::request_opts diff --git a/sig/x_twitter_scraper/resources/x.rbs b/sig/x_twitter_scraper/resources/x.rbs index 8cc31ed..0051829 100644 --- a/sig/x_twitter_scraper/resources/x.rbs +++ b/sig/x_twitter_scraper/resources/x.rbs @@ -30,7 +30,7 @@ module XTwitterScraper ?cursor: String, ?seen_tweet_ids: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::XGetHomeTimelineResponse + ) -> XTwitterScraper::PaginatedTweets def get_notifications: ( ?cursor: String, diff --git a/sig/x_twitter_scraper/resources/x/accounts.rbs b/sig/x_twitter_scraper/resources/x/accounts.rbs index 345aa03..715f3c1 100644 --- a/sig/x_twitter_scraper/resources/x/accounts.rbs +++ b/sig/x_twitter_scraper/resources/x/accounts.rbs @@ -14,7 +14,7 @@ module XTwitterScraper def retrieve: ( String id, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::AccountRetrieveResponse + ) -> XTwitterScraper::X::XAccountDetail def list: ( ?request_options: XTwitterScraper::request_opts @@ -25,6 +25,10 @@ module XTwitterScraper ?request_options: XTwitterScraper::request_opts ) -> XTwitterScraper::Models::X::AccountDeleteResponse + def bulk_retry: ( + ?request_options: XTwitterScraper::request_opts + ) -> XTwitterScraper::Models::X::AccountBulkRetryResponse + def reauth: ( String id, password: String, diff --git a/sig/x_twitter_scraper/resources/x/bookmarks.rbs b/sig/x_twitter_scraper/resources/x/bookmarks.rbs index 69439ff..829d9db 100644 --- a/sig/x_twitter_scraper/resources/x/bookmarks.rbs +++ b/sig/x_twitter_scraper/resources/x/bookmarks.rbs @@ -6,7 +6,7 @@ module XTwitterScraper ?cursor: String, ?folder_id: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::BookmarkListResponse + ) -> XTwitterScraper::Internal::CursorPage[XTwitterScraper::PaginatedTweets] def retrieve_folders: ( ?request_options: XTwitterScraper::request_opts diff --git a/sig/x_twitter_scraper/resources/x/communities.rbs b/sig/x_twitter_scraper/resources/x/communities.rbs index dcb90e8..df450c4 100644 --- a/sig/x_twitter_scraper/resources/x/communities.rbs +++ b/sig/x_twitter_scraper/resources/x/communities.rbs @@ -29,20 +29,20 @@ module XTwitterScraper String id, ?cursor: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::CommunityRetrieveMembersResponse + ) -> XTwitterScraper::PaginatedUsers def retrieve_moderators: ( String id, ?cursor: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse + ) -> XTwitterScraper::PaginatedUsers def retrieve_search: ( q: String, ?cursor: String, ?query_type: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::CommunityRetrieveSearchResponse + ) -> XTwitterScraper::PaginatedTweets def initialize: (client: XTwitterScraper::Client) -> void end diff --git a/sig/x_twitter_scraper/resources/x/communities/join.rbs b/sig/x_twitter_scraper/resources/x/communities/join.rbs index 924aea3..2d352fe 100644 --- a/sig/x_twitter_scraper/resources/x/communities/join.rbs +++ b/sig/x_twitter_scraper/resources/x/communities/join.rbs @@ -7,13 +7,13 @@ module XTwitterScraper String id, account: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::Communities::JoinCreateResponse + ) -> XTwitterScraper::X::CommunityActionResult def delete_all: ( String id, account: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::Communities::JoinDeleteAllResponse + ) -> XTwitterScraper::X::CommunityActionResult def initialize: (client: XTwitterScraper::Client) -> void end diff --git a/sig/x_twitter_scraper/resources/x/communities/tweets.rbs b/sig/x_twitter_scraper/resources/x/communities/tweets.rbs index 5a68ef3..13f1d15 100644 --- a/sig/x_twitter_scraper/resources/x/communities/tweets.rbs +++ b/sig/x_twitter_scraper/resources/x/communities/tweets.rbs @@ -8,7 +8,13 @@ module XTwitterScraper ?cursor: String, ?query_type: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::Communities::TweetListResponse + ) -> XTwitterScraper::Internal::CursorPage[XTwitterScraper::PaginatedTweets] + + def list_by_community: ( + String id, + ?cursor: String, + ?request_options: XTwitterScraper::request_opts + ) -> XTwitterScraper::Internal::CursorPage[XTwitterScraper::PaginatedTweets] def initialize: (client: XTwitterScraper::Client) -> void end diff --git a/sig/x_twitter_scraper/resources/x/lists.rbs b/sig/x_twitter_scraper/resources/x/lists.rbs index 045212c..732d1ae 100644 --- a/sig/x_twitter_scraper/resources/x/lists.rbs +++ b/sig/x_twitter_scraper/resources/x/lists.rbs @@ -6,13 +6,13 @@ module XTwitterScraper String id, ?cursor: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::ListRetrieveFollowersResponse + ) -> XTwitterScraper::PaginatedUsers def retrieve_members: ( String id, ?cursor: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::ListRetrieveMembersResponse + ) -> XTwitterScraper::PaginatedUsers def retrieve_tweets: ( String id, @@ -21,7 +21,7 @@ module XTwitterScraper ?since_time: String, ?until_time: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::ListRetrieveTweetsResponse + ) -> XTwitterScraper::PaginatedTweets def initialize: (client: XTwitterScraper::Client) -> void end diff --git a/sig/x_twitter_scraper/resources/x/tweets.rbs b/sig/x_twitter_scraper/resources/x/tweets.rbs index 9667b9a..c121db1 100644 --- a/sig/x_twitter_scraper/resources/x/tweets.rbs +++ b/sig/x_twitter_scraper/resources/x/tweets.rbs @@ -17,16 +17,27 @@ module XTwitterScraper ?request_options: XTwitterScraper::request_opts ) -> XTwitterScraper::Models::X::TweetCreateResponse + def retrieve: ( + String id, + ?request_options: XTwitterScraper::request_opts + ) -> XTwitterScraper::Models::X::TweetRetrieveResponse + def list: ( ids: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::TweetListResponse + ) -> XTwitterScraper::PaginatedTweets + + def delete: ( + String id, + account: String, + ?request_options: XTwitterScraper::request_opts + ) -> XTwitterScraper::Models::X::TweetDeleteResponse def get_favoriters: ( String id, ?cursor: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::TweetGetFavoritersResponse + ) -> XTwitterScraper::PaginatedUsers def get_quotes: ( String id, @@ -35,7 +46,7 @@ module XTwitterScraper ?since_time: String, ?until_time: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::TweetGetQuotesResponse + ) -> XTwitterScraper::PaginatedTweets def get_replies: ( String id, @@ -43,19 +54,19 @@ module XTwitterScraper ?since_time: String, ?until_time: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::TweetGetRepliesResponse + ) -> XTwitterScraper::PaginatedTweets def get_retweeters: ( String id, ?cursor: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::TweetGetRetweetersResponse + ) -> XTwitterScraper::PaginatedUsers def get_thread: ( String id, ?cursor: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::TweetGetThreadResponse + ) -> XTwitterScraper::PaginatedTweets def search: ( q: String, @@ -65,7 +76,7 @@ module XTwitterScraper ?since_time: String, ?until_time: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::TweetSearchResponse + ) -> XTwitterScraper::PaginatedTweets def initialize: (client: XTwitterScraper::Client) -> void end diff --git a/sig/x_twitter_scraper/resources/x/tweets/like.rbs b/sig/x_twitter_scraper/resources/x/tweets/like.rbs index e017b38..386eba2 100644 --- a/sig/x_twitter_scraper/resources/x/tweets/like.rbs +++ b/sig/x_twitter_scraper/resources/x/tweets/like.rbs @@ -3,6 +3,18 @@ module XTwitterScraper class X class Tweets class Like + def create: ( + String id, + account: String, + ?request_options: XTwitterScraper::request_opts + ) -> XTwitterScraper::Models::X::Tweets::LikeCreateResponse + + def delete: ( + String id, + account: String, + ?request_options: XTwitterScraper::request_opts + ) -> XTwitterScraper::Models::X::Tweets::LikeDeleteResponse + def initialize: (client: XTwitterScraper::Client) -> void end end diff --git a/sig/x_twitter_scraper/resources/x/tweets/retweet.rbs b/sig/x_twitter_scraper/resources/x/tweets/retweet.rbs index aac9657..a6023e2 100644 --- a/sig/x_twitter_scraper/resources/x/tweets/retweet.rbs +++ b/sig/x_twitter_scraper/resources/x/tweets/retweet.rbs @@ -3,6 +3,18 @@ module XTwitterScraper class X class Tweets class Retweet + def create: ( + String id, + account: String, + ?request_options: XTwitterScraper::request_opts + ) -> XTwitterScraper::Models::X::Tweets::RetweetCreateResponse + + def delete: ( + String id, + account: String, + ?request_options: XTwitterScraper::request_opts + ) -> XTwitterScraper::Models::X::Tweets::RetweetDeleteResponse + def initialize: (client: XTwitterScraper::Client) -> void end end diff --git a/sig/x_twitter_scraper/resources/x/users.rbs b/sig/x_twitter_scraper/resources/x/users.rbs index 65b8f2c..9598320 100644 --- a/sig/x_twitter_scraper/resources/x/users.rbs +++ b/sig/x_twitter_scraper/resources/x/users.rbs @@ -4,42 +4,47 @@ module XTwitterScraper class Users attr_reader follow: XTwitterScraper::Resources::X::Users::Follow + def retrieve: ( + String id, + ?request_options: XTwitterScraper::request_opts + ) -> XTwitterScraper::X::UserProfile + def retrieve_batch: ( ids: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::UserRetrieveBatchResponse + ) -> XTwitterScraper::PaginatedUsers def retrieve_followers: ( String id, ?cursor: String, ?page_size: Integer, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::UserRetrieveFollowersResponse + ) -> XTwitterScraper::PaginatedUsers def retrieve_followers_you_know: ( String id, ?cursor: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::UserRetrieveFollowersYouKnowResponse + ) -> XTwitterScraper::PaginatedUsers def retrieve_following: ( String id, ?cursor: String, ?page_size: Integer, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::UserRetrieveFollowingResponse + ) -> XTwitterScraper::PaginatedUsers def retrieve_likes: ( String id, ?cursor: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::UserRetrieveLikesResponse + ) -> XTwitterScraper::PaginatedTweets def retrieve_media: ( String id, ?cursor: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::UserRetrieveMediaResponse + ) -> XTwitterScraper::PaginatedTweets def retrieve_mentions: ( String id, @@ -47,13 +52,13 @@ module XTwitterScraper ?since_time: String, ?until_time: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::UserRetrieveMentionsResponse + ) -> XTwitterScraper::PaginatedTweets def retrieve_search: ( q: String, ?cursor: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::UserRetrieveSearchResponse + ) -> XTwitterScraper::PaginatedUsers def retrieve_tweets: ( String id, @@ -61,13 +66,13 @@ module XTwitterScraper ?include_parent_tweet: bool, ?include_replies: bool, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::UserRetrieveTweetsResponse + ) -> XTwitterScraper::PaginatedTweets def retrieve_verified_followers: ( String id, ?cursor: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse + ) -> XTwitterScraper::PaginatedUsers def initialize: (client: XTwitterScraper::Client) -> void end diff --git a/sig/x_twitter_scraper/resources/x/users/follow.rbs b/sig/x_twitter_scraper/resources/x/users/follow.rbs index 7ed075d..02b26cf 100644 --- a/sig/x_twitter_scraper/resources/x/users/follow.rbs +++ b/sig/x_twitter_scraper/resources/x/users/follow.rbs @@ -3,6 +3,18 @@ module XTwitterScraper class X class Users class Follow + def create: ( + String id, + account: String, + ?request_options: XTwitterScraper::request_opts + ) -> XTwitterScraper::Models::X::Users::FollowCreateResponse + + def delete_all: ( + String id, + account: String, + ?request_options: XTwitterScraper::request_opts + ) -> XTwitterScraper::Models::X::Users::FollowDeleteAllResponse + def initialize: (client: XTwitterScraper::Client) -> void end end diff --git a/test/x_twitter_scraper/resources/api_keys_test.rb b/test/x_twitter_scraper/resources/api_keys_test.rb index 9dc2c42..c983ead 100644 --- a/test/x_twitter_scraper/resources/api_keys_test.rb +++ b/test/x_twitter_scraper/resources/api_keys_test.rb @@ -34,7 +34,7 @@ def test_list assert_pattern do response => { - keys: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::APIKeyListResponse::Key]) + keys: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::APIKey]) } end end diff --git a/test/x_twitter_scraper/resources/drafts_test.rb b/test/x_twitter_scraper/resources/drafts_test.rb index 73821b5..d6a6a75 100644 --- a/test/x_twitter_scraper/resources/drafts_test.rb +++ b/test/x_twitter_scraper/resources/drafts_test.rb @@ -9,7 +9,7 @@ def test_create_required_params response = @x_twitter_scraper.drafts.create(text: "AI is the future of productivity") assert_pattern do - response => XTwitterScraper::Models::DraftCreateResponse + response => XTwitterScraper::DraftDetail end assert_pattern do @@ -30,7 +30,7 @@ def test_retrieve response = @x_twitter_scraper.drafts.retrieve("id") assert_pattern do - response => XTwitterScraper::Models::DraftRetrieveResponse + response => XTwitterScraper::DraftDetail end assert_pattern do @@ -56,7 +56,7 @@ def test_list assert_pattern do response => { - drafts: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::DraftListResponse::Draft]), + drafts: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Draft]), has_more: XTwitterScraper::Internal::Type::Boolean, next_cursor: String | nil } diff --git a/test/x_twitter_scraper/resources/draws_test.rb b/test/x_twitter_scraper/resources/draws_test.rb index a5c81fa..8fa2c40 100644 --- a/test/x_twitter_scraper/resources/draws_test.rb +++ b/test/x_twitter_scraper/resources/draws_test.rb @@ -14,8 +14,8 @@ def test_retrieve assert_pattern do response => { - draw: XTwitterScraper::Models::DrawRetrieveResponse::Draw, - winners: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::DrawRetrieveResponse::Winner]) + draw: XTwitterScraper::DrawDetail, + winners: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Winner]) } end end @@ -31,7 +31,7 @@ def test_list assert_pattern do response => { - draws: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::DrawListResponse::Draw]), + draws: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::DrawListItem]), has_more: XTwitterScraper::Internal::Type::Boolean, next_cursor: String | nil } @@ -63,7 +63,7 @@ def test_run_required_params total_entries: Integer, tweet_id: String, valid_entries: Integer, - winners: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::DrawRunResponse::Winner]) + winners: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Winner]) } end end diff --git a/test/x_twitter_scraper/resources/events_test.rb b/test/x_twitter_scraper/resources/events_test.rb index d12df52..34eebc8 100644 --- a/test/x_twitter_scraper/resources/events_test.rb +++ b/test/x_twitter_scraper/resources/events_test.rb @@ -9,7 +9,7 @@ def test_retrieve response = @x_twitter_scraper.events.retrieve("id") assert_pattern do - response => XTwitterScraper::Models::EventRetrieveResponse + response => XTwitterScraper::EventDetail end assert_pattern do @@ -18,7 +18,7 @@ def test_retrieve data: ^(XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown]), monitor_id: String, occurred_at: Time, - type: XTwitterScraper::Models::EventRetrieveResponse::Type, + type: XTwitterScraper::EventType, username: String, x_event_id: String | nil } @@ -36,7 +36,7 @@ def test_list assert_pattern do response => { - events: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::EventListResponse::Event]), + events: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Event]), has_more: XTwitterScraper::Internal::Type::Boolean, next_cursor: String | nil } diff --git a/test/x_twitter_scraper/resources/extractions_test.rb b/test/x_twitter_scraper/resources/extractions_test.rb index 32ba91b..5ab7f36 100644 --- a/test/x_twitter_scraper/resources/extractions_test.rb +++ b/test/x_twitter_scraper/resources/extractions_test.rb @@ -33,7 +33,7 @@ def test_list assert_pattern do response => { - extractions: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::ExtractionListResponse::Extraction]), + extractions: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::ExtractionJob]), has_more: XTwitterScraper::Internal::Type::Boolean, next_cursor: String | nil } diff --git a/test/x_twitter_scraper/resources/integrations_test.rb b/test/x_twitter_scraper/resources/integrations_test.rb index a2383a0..6ca87c7 100644 --- a/test/x_twitter_scraper/resources/integrations_test.rb +++ b/test/x_twitter_scraper/resources/integrations_test.rb @@ -15,7 +15,7 @@ def test_create_required_params ) assert_pattern do - response => XTwitterScraper::Models::IntegrationCreateResponse + response => XTwitterScraper::Integration end assert_pattern do @@ -23,10 +23,10 @@ def test_create_required_params id: String, config: ^(XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown]), created_at: Time, - event_types: ^(XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::Models::IntegrationCreateResponse::EventType]), + event_types: ^(XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType]), is_active: XTwitterScraper::Internal::Type::Boolean, name: String, - type: XTwitterScraper::Models::IntegrationCreateResponse::Type, + type: XTwitterScraper::Integration::Type, filters: ^(XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown]) | nil, message_template: String | nil, scope_all_monitors: XTwitterScraper::Internal::Type::Boolean | nil, @@ -41,7 +41,7 @@ def test_retrieve response = @x_twitter_scraper.integrations.retrieve("id") assert_pattern do - response => XTwitterScraper::Models::IntegrationRetrieveResponse + response => XTwitterScraper::Integration end assert_pattern do @@ -49,10 +49,10 @@ def test_retrieve id: String, config: ^(XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown]), created_at: Time, - event_types: ^(XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::Models::IntegrationRetrieveResponse::EventType]), + event_types: ^(XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType]), is_active: XTwitterScraper::Internal::Type::Boolean, name: String, - type: XTwitterScraper::Models::IntegrationRetrieveResponse::Type, + type: XTwitterScraper::Integration::Type, filters: ^(XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown]) | nil, message_template: String | nil, scope_all_monitors: XTwitterScraper::Internal::Type::Boolean | nil, @@ -67,7 +67,7 @@ def test_update response = @x_twitter_scraper.integrations.update("id") assert_pattern do - response => XTwitterScraper::Models::IntegrationUpdateResponse + response => XTwitterScraper::Integration end assert_pattern do @@ -75,10 +75,10 @@ def test_update id: String, config: ^(XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown]), created_at: Time, - event_types: ^(XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::Models::IntegrationUpdateResponse::EventType]), + event_types: ^(XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType]), is_active: XTwitterScraper::Internal::Type::Boolean, name: String, - type: XTwitterScraper::Models::IntegrationUpdateResponse::Type, + type: XTwitterScraper::Integration::Type, filters: ^(XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown]) | nil, message_template: String | nil, scope_all_monitors: XTwitterScraper::Internal::Type::Boolean | nil, @@ -98,7 +98,7 @@ def test_list assert_pattern do response => { - integrations: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::IntegrationListResponse::Integration]) + integrations: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Integration]) } end end @@ -130,7 +130,7 @@ def test_list_deliveries assert_pattern do response => { - deliveries: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::IntegrationListDeliveriesResponse::Delivery]) + deliveries: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::IntegrationDelivery]) } end end diff --git a/test/x_twitter_scraper/resources/monitors_test.rb b/test/x_twitter_scraper/resources/monitors_test.rb index 102d35f..1b1f0d4 100644 --- a/test/x_twitter_scraper/resources/monitors_test.rb +++ b/test/x_twitter_scraper/resources/monitors_test.rb @@ -20,7 +20,7 @@ def test_create_required_params response => { id: String, created_at: Time, - event_types: ^(XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::Models::MonitorCreateResponse::EventType]), + event_types: ^(XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType]), username: String, x_user_id: String } @@ -33,14 +33,14 @@ def test_retrieve response = @x_twitter_scraper.monitors.retrieve("id") assert_pattern do - response => XTwitterScraper::Models::MonitorRetrieveResponse + response => XTwitterScraper::Monitor end assert_pattern do response => { id: String, created_at: Time, - event_types: ^(XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::Models::MonitorRetrieveResponse::EventType]), + event_types: ^(XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType]), is_active: XTwitterScraper::Internal::Type::Boolean, username: String, x_user_id: String @@ -54,14 +54,14 @@ def test_update response = @x_twitter_scraper.monitors.update("id") assert_pattern do - response => XTwitterScraper::Models::MonitorUpdateResponse + response => XTwitterScraper::Monitor end assert_pattern do response => { id: String, created_at: Time, - event_types: ^(XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::Models::MonitorUpdateResponse::EventType]), + event_types: ^(XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType]), is_active: XTwitterScraper::Internal::Type::Boolean, username: String, x_user_id: String @@ -80,7 +80,7 @@ def test_list assert_pattern do response => { - monitors: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::MonitorListResponse::Monitor]), + monitors: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Monitor]), total: Integer } end diff --git a/test/x_twitter_scraper/resources/radar_test.rb b/test/x_twitter_scraper/resources/radar_test.rb index de9811a..9de3944 100644 --- a/test/x_twitter_scraper/resources/radar_test.rb +++ b/test/x_twitter_scraper/resources/radar_test.rb @@ -14,7 +14,7 @@ def test_retrieve_trending_topics assert_pattern do response => { - items: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::RadarRetrieveTrendingTopicsResponse::Item]), + items: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::RadarItem]), total: Integer } end diff --git a/test/x_twitter_scraper/resources/styles_test.rb b/test/x_twitter_scraper/resources/styles_test.rb index cceb208..db12dfb 100644 --- a/test/x_twitter_scraper/resources/styles_test.rb +++ b/test/x_twitter_scraper/resources/styles_test.rb @@ -3,6 +3,51 @@ require_relative "../test_helper" class XTwitterScraper::Test::Resources::StylesTest < XTwitterScraper::Test::ResourceTest + def test_retrieve + skip("Mock server tests are disabled") + + response = @x_twitter_scraper.styles.retrieve("id") + + assert_pattern do + response => XTwitterScraper::StyleProfile + end + + assert_pattern do + response => { + fetched_at: Time, + is_own_account: XTwitterScraper::Internal::Type::Boolean, + tweet_count: Integer, + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::StyleProfile::Tweet]), + x_username: String + } + end + end + + def test_update_required_params + skip("Mock server tests are disabled") + + response = + @x_twitter_scraper.styles.update( + "id", + label: "Professional Voice", + tweets: [{text: "Excited to share our latest research findings."}] + ) + + assert_pattern do + response => XTwitterScraper::StyleProfile + end + + assert_pattern do + response => { + fetched_at: Time, + is_own_account: XTwitterScraper::Internal::Type::Boolean, + tweet_count: Integer, + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::StyleProfile::Tweet]), + x_username: String + } + end + end + def test_list skip("Mock server tests are disabled") @@ -14,18 +59,28 @@ def test_list assert_pattern do response => { - styles: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::StyleListResponse::Style]) + styles: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::StyleProfileSummary]) } end end + def test_delete + skip("Mock server tests are disabled") + + response = @x_twitter_scraper.styles.delete("id") + + assert_pattern do + response => nil + end + end + def test_analyze_required_params skip("Mock server tests are disabled") response = @x_twitter_scraper.styles.analyze(username: "elonmusk") assert_pattern do - response => XTwitterScraper::Models::StyleAnalyzeResponse + response => XTwitterScraper::StyleProfile end assert_pattern do @@ -33,7 +88,7 @@ def test_analyze_required_params fetched_at: Time, is_own_account: XTwitterScraper::Internal::Type::Boolean, tweet_count: Integer, - tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::StyleAnalyzeResponse::Tweet]), + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::StyleProfile::Tweet]), x_username: String } end @@ -50,8 +105,26 @@ def test_compare_required_params assert_pattern do response => { - style1: XTwitterScraper::Models::StyleCompareResponse::Style1, - style2: XTwitterScraper::Models::StyleCompareResponse::Style2 + style1: XTwitterScraper::StyleProfile, + style2: XTwitterScraper::StyleProfile + } + end + end + + def test_get_performance + skip("Mock server tests are disabled") + + response = @x_twitter_scraper.styles.get_performance("id") + + assert_pattern do + response => XTwitterScraper::Models::StyleGetPerformanceResponse + end + + assert_pattern do + response => { + tweet_count: Integer, + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::StyleGetPerformanceResponse::Tweet]), + x_username: String } end end diff --git a/test/x_twitter_scraper/resources/webhooks_test.rb b/test/x_twitter_scraper/resources/webhooks_test.rb index a7c787f..9c9653a 100644 --- a/test/x_twitter_scraper/resources/webhooks_test.rb +++ b/test/x_twitter_scraper/resources/webhooks_test.rb @@ -20,7 +20,7 @@ def test_create_required_params response => { id: String, created_at: Time, - event_types: ^(XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::Models::WebhookCreateResponse::EventType]), + event_types: ^(XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType]), secret: String, url: String } @@ -33,14 +33,14 @@ def test_update response = @x_twitter_scraper.webhooks.update("id") assert_pattern do - response => XTwitterScraper::Models::WebhookUpdateResponse + response => XTwitterScraper::Webhook end assert_pattern do response => { id: String, created_at: Time, - event_types: ^(XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::Models::WebhookUpdateResponse::EventType]), + event_types: ^(XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType]), is_active: XTwitterScraper::Internal::Type::Boolean, url: String } @@ -58,7 +58,7 @@ def test_list assert_pattern do response => { - webhooks: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::WebhookListResponse::Webhook]) + webhooks: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Webhook]) } end end @@ -90,7 +90,7 @@ def test_list_deliveries assert_pattern do response => { - deliveries: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::WebhookListDeliveriesResponse::Delivery]) + deliveries: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Delivery]) } end end diff --git a/test/x_twitter_scraper/resources/x/accounts_test.rb b/test/x_twitter_scraper/resources/x/accounts_test.rb index bfe788d..820e1b7 100644 --- a/test/x_twitter_scraper/resources/x/accounts_test.rb +++ b/test/x_twitter_scraper/resources/x/accounts_test.rb @@ -33,7 +33,7 @@ def test_retrieve response = @x_twitter_scraper.x.accounts.retrieve("id") assert_pattern do - response => XTwitterScraper::Models::X::AccountRetrieveResponse + response => XTwitterScraper::X::XAccountDetail end assert_pattern do @@ -61,7 +61,7 @@ def test_list assert_pattern do response => { - accounts: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::AccountListResponse::Account]) + accounts: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::XAccount]) } end end @@ -82,6 +82,22 @@ def test_delete end end + def test_bulk_retry + skip("Mock server tests are disabled") + + response = @x_twitter_scraper.x.accounts.bulk_retry + + assert_pattern do + response => XTwitterScraper::Models::X::AccountBulkRetryResponse + end + + assert_pattern do + response => { + cleared: Integer + } + end + end + def test_reauth_required_params skip("Mock server tests are disabled") diff --git a/test/x_twitter_scraper/resources/x/bookmarks_test.rb b/test/x_twitter_scraper/resources/x/bookmarks_test.rb index 1d3f8fe..5142018 100644 --- a/test/x_twitter_scraper/resources/x/bookmarks_test.rb +++ b/test/x_twitter_scraper/resources/x/bookmarks_test.rb @@ -9,14 +9,21 @@ def test_list response = @x_twitter_scraper.x.bookmarks.list assert_pattern do - response => XTwitterScraper::Models::X::BookmarkListResponse + response => XTwitterScraper::Internal::CursorPage end + row = response.to_enum.first + return if row.nil? + assert_pattern do - response => { + row => XTwitterScraper::PaginatedTweets + end + + assert_pattern do + row => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::BookmarkListResponse::Tweet]) + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::SearchTweet]) } end end diff --git a/test/x_twitter_scraper/resources/x/communities/join_test.rb b/test/x_twitter_scraper/resources/x/communities/join_test.rb index 437db2b..9079ef1 100644 --- a/test/x_twitter_scraper/resources/x/communities/join_test.rb +++ b/test/x_twitter_scraper/resources/x/communities/join_test.rb @@ -9,7 +9,7 @@ def test_create_required_params response = @x_twitter_scraper.x.communities.join.create("id", account: "@elonmusk") assert_pattern do - response => XTwitterScraper::Models::X::Communities::JoinCreateResponse + response => XTwitterScraper::X::CommunityActionResult end assert_pattern do @@ -27,7 +27,7 @@ def test_delete_all_required_params response = @x_twitter_scraper.x.communities.join.delete_all("id", account: "@elonmusk") assert_pattern do - response => XTwitterScraper::Models::X::Communities::JoinDeleteAllResponse + response => XTwitterScraper::X::CommunityActionResult end assert_pattern do diff --git a/test/x_twitter_scraper/resources/x/communities/tweets_test.rb b/test/x_twitter_scraper/resources/x/communities/tweets_test.rb index cbd2a16..3bee51b 100644 --- a/test/x_twitter_scraper/resources/x/communities/tweets_test.rb +++ b/test/x_twitter_scraper/resources/x/communities/tweets_test.rb @@ -9,14 +9,46 @@ def test_list_required_params response = @x_twitter_scraper.x.communities.tweets.list(q: "q") assert_pattern do - response => XTwitterScraper::Models::X::Communities::TweetListResponse + response => XTwitterScraper::Internal::CursorPage + end + + row = response.to_enum.first + return if row.nil? + + assert_pattern do + row => XTwitterScraper::PaginatedTweets + end + + assert_pattern do + row => { + has_next_page: XTwitterScraper::Internal::Type::Boolean, + next_cursor: String, + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::SearchTweet]) + } + end + end + + def test_list_by_community + skip("Mock server tests are disabled") + + response = @x_twitter_scraper.x.communities.tweets.list_by_community("id") + + assert_pattern do + response => XTwitterScraper::Internal::CursorPage + end + + row = response.to_enum.first + return if row.nil? + + assert_pattern do + row => XTwitterScraper::PaginatedTweets end assert_pattern do - response => { + row => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::Communities::TweetListResponse::Tweet]) + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::SearchTweet]) } end end diff --git a/test/x_twitter_scraper/resources/x/communities_test.rb b/test/x_twitter_scraper/resources/x/communities_test.rb index 2dcecbb..781deb5 100644 --- a/test/x_twitter_scraper/resources/x/communities_test.rb +++ b/test/x_twitter_scraper/resources/x/communities_test.rb @@ -60,14 +60,14 @@ def test_retrieve_members response = @x_twitter_scraper.x.communities.retrieve_members("id") assert_pattern do - response => XTwitterScraper::Models::X::CommunityRetrieveMembersResponse + response => XTwitterScraper::PaginatedUsers end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::CommunityRetrieveMembersResponse::User]) + users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::UserProfile]) } end end @@ -78,14 +78,14 @@ def test_retrieve_moderators response = @x_twitter_scraper.x.communities.retrieve_moderators("id") assert_pattern do - response => XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse + response => XTwitterScraper::PaginatedUsers end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::CommunityRetrieveModeratorsResponse::User]) + users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::UserProfile]) } end end @@ -96,14 +96,14 @@ def test_retrieve_search_required_params response = @x_twitter_scraper.x.communities.retrieve_search(q: "q") assert_pattern do - response => XTwitterScraper::Models::X::CommunityRetrieveSearchResponse + response => XTwitterScraper::PaginatedTweets end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::CommunityRetrieveSearchResponse::Tweet]) + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::SearchTweet]) } end end diff --git a/test/x_twitter_scraper/resources/x/lists_test.rb b/test/x_twitter_scraper/resources/x/lists_test.rb index 3c934d5..d3fe4b2 100644 --- a/test/x_twitter_scraper/resources/x/lists_test.rb +++ b/test/x_twitter_scraper/resources/x/lists_test.rb @@ -9,14 +9,14 @@ def test_retrieve_followers response = @x_twitter_scraper.x.lists.retrieve_followers("id") assert_pattern do - response => XTwitterScraper::Models::X::ListRetrieveFollowersResponse + response => XTwitterScraper::PaginatedUsers end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::ListRetrieveFollowersResponse::User]) + users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::UserProfile]) } end end @@ -27,14 +27,14 @@ def test_retrieve_members response = @x_twitter_scraper.x.lists.retrieve_members("id") assert_pattern do - response => XTwitterScraper::Models::X::ListRetrieveMembersResponse + response => XTwitterScraper::PaginatedUsers end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::ListRetrieveMembersResponse::User]) + users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::UserProfile]) } end end @@ -45,14 +45,14 @@ def test_retrieve_tweets response = @x_twitter_scraper.x.lists.retrieve_tweets("id") assert_pattern do - response => XTwitterScraper::Models::X::ListRetrieveTweetsResponse + response => XTwitterScraper::PaginatedTweets end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::ListRetrieveTweetsResponse::Tweet]) + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::SearchTweet]) } end end diff --git a/test/x_twitter_scraper/resources/x/tweets/like_test.rb b/test/x_twitter_scraper/resources/x/tweets/like_test.rb index 3c85b0c..4a72bb0 100644 --- a/test/x_twitter_scraper/resources/x/tweets/like_test.rb +++ b/test/x_twitter_scraper/resources/x/tweets/like_test.rb @@ -3,4 +3,35 @@ require_relative "../../../test_helper" class XTwitterScraper::Test::Resources::X::Tweets::LikeTest < XTwitterScraper::Test::ResourceTest + def test_create_required_params + skip("Mock server tests are disabled") + + response = @x_twitter_scraper.x.tweets.like.create("id", account: "@elonmusk") + + assert_pattern do + response => XTwitterScraper::Models::X::Tweets::LikeCreateResponse + end + + assert_pattern do + response => { + success: true | false + } + end + end + + def test_delete_required_params + skip("Mock server tests are disabled") + + response = @x_twitter_scraper.x.tweets.like.delete("id", account: "@elonmusk") + + assert_pattern do + response => XTwitterScraper::Models::X::Tweets::LikeDeleteResponse + end + + assert_pattern do + response => { + success: true | false + } + end + end end diff --git a/test/x_twitter_scraper/resources/x/tweets/retweet_test.rb b/test/x_twitter_scraper/resources/x/tweets/retweet_test.rb index 247a93f..a88e098 100644 --- a/test/x_twitter_scraper/resources/x/tweets/retweet_test.rb +++ b/test/x_twitter_scraper/resources/x/tweets/retweet_test.rb @@ -3,4 +3,35 @@ require_relative "../../../test_helper" class XTwitterScraper::Test::Resources::X::Tweets::RetweetTest < XTwitterScraper::Test::ResourceTest + def test_create_required_params + skip("Mock server tests are disabled") + + response = @x_twitter_scraper.x.tweets.retweet.create("id", account: "@elonmusk") + + assert_pattern do + response => XTwitterScraper::Models::X::Tweets::RetweetCreateResponse + end + + assert_pattern do + response => { + success: true | false + } + end + end + + def test_delete_required_params + skip("Mock server tests are disabled") + + response = @x_twitter_scraper.x.tweets.retweet.delete("id", account: "@elonmusk") + + assert_pattern do + response => XTwitterScraper::Models::X::Tweets::RetweetDeleteResponse + end + + assert_pattern do + response => { + success: true | false + } + end + end end diff --git a/test/x_twitter_scraper/resources/x/tweets_test.rb b/test/x_twitter_scraper/resources/x/tweets_test.rb index 0370b64..ec69d9e 100644 --- a/test/x_twitter_scraper/resources/x/tweets_test.rb +++ b/test/x_twitter_scraper/resources/x/tweets_test.rb @@ -21,20 +21,53 @@ def test_create_required_params end end + def test_retrieve + skip("Mock server tests are disabled") + + response = @x_twitter_scraper.x.tweets.retrieve("id") + + assert_pattern do + response => XTwitterScraper::Models::X::TweetRetrieveResponse + end + + assert_pattern do + response => { + tweet: XTwitterScraper::X::TweetDetail, + author: XTwitterScraper::X::TweetAuthor | nil + } + end + end + def test_list_required_params skip("Mock server tests are disabled") response = @x_twitter_scraper.x.tweets.list(ids: "ids") assert_pattern do - response => XTwitterScraper::Models::X::TweetListResponse + response => XTwitterScraper::PaginatedTweets end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetListResponse::Tweet]) + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::SearchTweet]) + } + end + end + + def test_delete_required_params + skip("Mock server tests are disabled") + + response = @x_twitter_scraper.x.tweets.delete("id", account: "@elonmusk") + + assert_pattern do + response => XTwitterScraper::Models::X::TweetDeleteResponse + end + + assert_pattern do + response => { + success: true | false } end end @@ -45,14 +78,14 @@ def test_get_favoriters response = @x_twitter_scraper.x.tweets.get_favoriters("id") assert_pattern do - response => XTwitterScraper::Models::X::TweetGetFavoritersResponse + response => XTwitterScraper::PaginatedUsers end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetGetFavoritersResponse::User]) + users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::UserProfile]) } end end @@ -63,14 +96,14 @@ def test_get_quotes response = @x_twitter_scraper.x.tweets.get_quotes("id") assert_pattern do - response => XTwitterScraper::Models::X::TweetGetQuotesResponse + response => XTwitterScraper::PaginatedTweets end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetGetQuotesResponse::Tweet]) + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::SearchTweet]) } end end @@ -81,14 +114,14 @@ def test_get_replies response = @x_twitter_scraper.x.tweets.get_replies("id") assert_pattern do - response => XTwitterScraper::Models::X::TweetGetRepliesResponse + response => XTwitterScraper::PaginatedTweets end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetGetRepliesResponse::Tweet]) + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::SearchTweet]) } end end @@ -99,14 +132,14 @@ def test_get_retweeters response = @x_twitter_scraper.x.tweets.get_retweeters("id") assert_pattern do - response => XTwitterScraper::Models::X::TweetGetRetweetersResponse + response => XTwitterScraper::PaginatedUsers end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetGetRetweetersResponse::User]) + users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::UserProfile]) } end end @@ -117,14 +150,14 @@ def test_get_thread response = @x_twitter_scraper.x.tweets.get_thread("id") assert_pattern do - response => XTwitterScraper::Models::X::TweetGetThreadResponse + response => XTwitterScraper::PaginatedTweets end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetGetThreadResponse::Tweet]) + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::SearchTweet]) } end end @@ -135,14 +168,14 @@ def test_search_required_params response = @x_twitter_scraper.x.tweets.search(q: "q") assert_pattern do - response => XTwitterScraper::Models::X::TweetSearchResponse + response => XTwitterScraper::PaginatedTweets end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::TweetSearchResponse::Tweet]) + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::SearchTweet]) } end end diff --git a/test/x_twitter_scraper/resources/x/users/follow_test.rb b/test/x_twitter_scraper/resources/x/users/follow_test.rb index 7fc114e..455457d 100644 --- a/test/x_twitter_scraper/resources/x/users/follow_test.rb +++ b/test/x_twitter_scraper/resources/x/users/follow_test.rb @@ -3,4 +3,35 @@ require_relative "../../../test_helper" class XTwitterScraper::Test::Resources::X::Users::FollowTest < XTwitterScraper::Test::ResourceTest + def test_create_required_params + skip("Mock server tests are disabled") + + response = @x_twitter_scraper.x.users.follow.create("id", account: "@elonmusk") + + assert_pattern do + response => XTwitterScraper::Models::X::Users::FollowCreateResponse + end + + assert_pattern do + response => { + success: true | false + } + end + end + + def test_delete_all_required_params + skip("Mock server tests are disabled") + + response = @x_twitter_scraper.x.users.follow.delete_all("id", account: "@elonmusk") + + assert_pattern do + response => XTwitterScraper::Models::X::Users::FollowDeleteAllResponse + end + + assert_pattern do + response => { + success: true | false + } + end + end end diff --git a/test/x_twitter_scraper/resources/x/users_test.rb b/test/x_twitter_scraper/resources/x/users_test.rb index 2e6e327..9dcf152 100644 --- a/test/x_twitter_scraper/resources/x/users_test.rb +++ b/test/x_twitter_scraper/resources/x/users_test.rb @@ -3,20 +3,46 @@ require_relative "../../test_helper" class XTwitterScraper::Test::Resources::X::UsersTest < XTwitterScraper::Test::ResourceTest + def test_retrieve + skip("Mock server tests are disabled") + + response = @x_twitter_scraper.x.users.retrieve("id") + + assert_pattern do + response => XTwitterScraper::X::UserProfile + end + + assert_pattern do + response => { + id: String, + name: String, + username: String, + created_at: String | nil, + description: String | nil, + followers: Integer | nil, + following: Integer | nil, + location: String | nil, + profile_picture: String | nil, + statuses_count: Integer | nil, + verified: XTwitterScraper::Internal::Type::Boolean | nil + } + end + end + def test_retrieve_batch_required_params skip("Mock server tests are disabled") response = @x_twitter_scraper.x.users.retrieve_batch(ids: "ids") assert_pattern do - response => XTwitterScraper::Models::X::UserRetrieveBatchResponse + response => XTwitterScraper::PaginatedUsers end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveBatchResponse::User]) + users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::UserProfile]) } end end @@ -27,14 +53,14 @@ def test_retrieve_followers response = @x_twitter_scraper.x.users.retrieve_followers("id") assert_pattern do - response => XTwitterScraper::Models::X::UserRetrieveFollowersResponse + response => XTwitterScraper::PaginatedUsers end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveFollowersResponse::User]) + users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::UserProfile]) } end end @@ -45,14 +71,14 @@ def test_retrieve_followers_you_know response = @x_twitter_scraper.x.users.retrieve_followers_you_know("id") assert_pattern do - response => XTwitterScraper::Models::X::UserRetrieveFollowersYouKnowResponse + response => XTwitterScraper::PaginatedUsers end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveFollowersYouKnowResponse::User]) + users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::UserProfile]) } end end @@ -63,14 +89,14 @@ def test_retrieve_following response = @x_twitter_scraper.x.users.retrieve_following("id") assert_pattern do - response => XTwitterScraper::Models::X::UserRetrieveFollowingResponse + response => XTwitterScraper::PaginatedUsers end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveFollowingResponse::User]) + users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::UserProfile]) } end end @@ -81,14 +107,14 @@ def test_retrieve_likes response = @x_twitter_scraper.x.users.retrieve_likes("id") assert_pattern do - response => XTwitterScraper::Models::X::UserRetrieveLikesResponse + response => XTwitterScraper::PaginatedTweets end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveLikesResponse::Tweet]) + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::SearchTweet]) } end end @@ -99,14 +125,14 @@ def test_retrieve_media response = @x_twitter_scraper.x.users.retrieve_media("id") assert_pattern do - response => XTwitterScraper::Models::X::UserRetrieveMediaResponse + response => XTwitterScraper::PaginatedTweets end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveMediaResponse::Tweet]) + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::SearchTweet]) } end end @@ -117,14 +143,14 @@ def test_retrieve_mentions response = @x_twitter_scraper.x.users.retrieve_mentions("id") assert_pattern do - response => XTwitterScraper::Models::X::UserRetrieveMentionsResponse + response => XTwitterScraper::PaginatedTweets end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveMentionsResponse::Tweet]) + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::SearchTweet]) } end end @@ -135,14 +161,14 @@ def test_retrieve_search_required_params response = @x_twitter_scraper.x.users.retrieve_search(q: "q") assert_pattern do - response => XTwitterScraper::Models::X::UserRetrieveSearchResponse + response => XTwitterScraper::PaginatedUsers end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveSearchResponse::User]) + users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::UserProfile]) } end end @@ -153,14 +179,14 @@ def test_retrieve_tweets response = @x_twitter_scraper.x.users.retrieve_tweets("id") assert_pattern do - response => XTwitterScraper::Models::X::UserRetrieveTweetsResponse + response => XTwitterScraper::PaginatedTweets end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveTweetsResponse::Tweet]) + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::SearchTweet]) } end end @@ -171,14 +197,14 @@ def test_retrieve_verified_followers response = @x_twitter_scraper.x.users.retrieve_verified_followers("id") assert_pattern do - response => XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse + response => XTwitterScraper::PaginatedUsers end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::X::UserRetrieveVerifiedFollowersResponse::User]) + users: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::UserProfile]) } end end diff --git a/test/x_twitter_scraper/resources/x_test.rb b/test/x_twitter_scraper/resources/x_test.rb index 574dc1e..95b739a 100644 --- a/test/x_twitter_scraper/resources/x_test.rb +++ b/test/x_twitter_scraper/resources/x_test.rb @@ -15,7 +15,7 @@ def test_get_article assert_pattern do response => { article: XTwitterScraper::Models::XGetArticleResponse::Article, - author: XTwitterScraper::Models::XGetArticleResponse::Author | nil + author: XTwitterScraper::X::TweetAuthor | nil } end end @@ -26,14 +26,14 @@ def test_get_home_timeline response = @x_twitter_scraper.x.get_home_timeline assert_pattern do - response => XTwitterScraper::Models::XGetHomeTimelineResponse + response => XTwitterScraper::PaginatedTweets end assert_pattern do response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, - tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::XGetHomeTimelineResponse::Tweet]) + tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::SearchTweet]) } end end From 21e1e0f3791b791ab09f8982edaae123ba8d45a1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 21:08:08 +0000 Subject: [PATCH 08/27] feat(api): api update --- .stats.yml | 2 +- README.md | 28 ------- lib/x_twitter_scraper.rb | 1 - lib/x_twitter_scraper/internal/cursor_page.rb | 84 ------------------- .../resources/x/bookmarks.rb | 3 +- .../resources/x/communities/tweets.rb | 6 +- .../internal/cursor_page.rbi | 22 ----- .../resources/x/bookmarks.rbi | 6 +- .../resources/x/communities/tweets.rbi | 12 +-- .../internal/cursor_page.rbs | 13 --- .../resources/x/bookmarks.rbs | 2 +- .../resources/x/communities/tweets.rbs | 4 +- .../resources/x/bookmarks_test.rb | 11 +-- .../resources/x/communities/tweets_test.rb | 22 +---- 14 files changed, 16 insertions(+), 200 deletions(-) delete mode 100644 lib/x_twitter_scraper/internal/cursor_page.rb delete mode 100644 rbi/x_twitter_scraper/internal/cursor_page.rbi delete mode 100644 sig/x_twitter_scraper/internal/cursor_page.rbs diff --git a/.stats.yml b/.stats.yml index eec6e85..0bd0660 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 117 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-3a272e3207cc0ecbfc3850635c5608190a5f4fab77368b72074d99617376b5a8.yml openapi_spec_hash: c5aae119b546e3d97bb2be0cc7688a43 -config_hash: 68f04119c2d782a0125b03e31c3d8369 +config_hash: 911c2f86777f1fa01b0b28ff75adf849 diff --git a/README.md b/README.md index cd55ac6..effd189 100644 --- a/README.md +++ b/README.md @@ -33,34 +33,6 @@ paginated_tweets = x_twitter_scraper.x.tweets.search(q: "from:elonmusk", limit: puts(paginated_tweets.has_next_page) ``` -### Pagination - -List methods in the X Twitter Scraper API are paginated. - -This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually: - -```ruby -page = x_twitter_scraper.x.communities.tweets.list - -# Fetch single item from page. -tweet = page[0] -puts(tweet.has_next_page) - -# Automatically fetches more pages as needed. -page.auto_paging_each do |tweet| - puts(tweet.has_next_page) -end -``` - -Alternatively, you can use the `#next_page?` and `#next_page` methods for more granular control working with pages. - -```ruby -if page.next_page? - new_page = page.next_page - puts(new_page[0].has_next_page) -end -``` - ### File uploads Request parameters that correspond to file uploads can be passed as raw contents, a [`Pathname`](https://rubyapi.org/3.2/o/pathname) instance, [`StringIO`](https://rubyapi.org/3.2/o/stringio), or more. diff --git a/lib/x_twitter_scraper.rb b/lib/x_twitter_scraper.rb index 767c1d5..3c185bf 100644 --- a/lib/x_twitter_scraper.rb +++ b/lib/x_twitter_scraper.rb @@ -52,7 +52,6 @@ require_relative "x_twitter_scraper/internal/transport/base_client" require_relative "x_twitter_scraper/internal/transport/pooled_net_requester" require_relative "x_twitter_scraper/client" -require_relative "x_twitter_scraper/internal/cursor_page" require_relative "x_twitter_scraper/models/account_retrieve_params" require_relative "x_twitter_scraper/models/account_retrieve_response" require_relative "x_twitter_scraper/models/account_set_x_username_params" diff --git a/lib/x_twitter_scraper/internal/cursor_page.rb b/lib/x_twitter_scraper/internal/cursor_page.rb deleted file mode 100644 index 14e0159..0000000 --- a/lib/x_twitter_scraper/internal/cursor_page.rb +++ /dev/null @@ -1,84 +0,0 @@ -# frozen_string_literal: true - -module XTwitterScraper - module Internal - # @generic Elem - # - # @example - # if cursor_page.has_next? - # cursor_page = cursor_page.next_page - # end - # - # @example - # cursor_page.auto_paging_each do |tweet| - # puts(tweet) - # end - class CursorPage - include XTwitterScraper::Internal::Type::BasePage - - # @return [String, nil] - attr_accessor :next_cursor - - # @return [Boolean] - attr_accessor :has_next_page - - # @return [Boolean] - def next_page? - !empty? && !next_cursor.to_s.empty? - end - - # @raise [XTwitterScraper::HTTP::Error] - # @return [self] - def next_page - unless next_page? - message = "No more pages available. Please check #next_page? before calling ##{__method__}" - raise RuntimeError.new(message) - end - - req = XTwitterScraper::Internal::Util.deep_merge(@req, {query: {cursor: next_cursor}}) - @client.request(req) - end - - # @param blk [Proc] - # - # @yieldparam [generic] - def auto_paging_each(&blk) - unless block_given? - raise ArgumentError.new("A block must be given to ##{__method__}") - end - - page = self - loop do - page.each(&blk) - - break unless page.next_page? - page = page.next_page - end - end - - # @api private - # - # @param client [XTwitterScraper::Internal::Transport::BaseClient] - # @param req [Hash{Symbol=>Object}] - # @param headers [Hash{String=>String}] - # @param page_data [Hash{Symbol=>Object}] - def initialize(client:, req:, headers:, page_data:) - super - - @next_cursor = page_data[:next_cursor] - @has_next_page = page_data[:has_next_page] - end - - # @api private - # - # @return [String] - def inspect - # rubocop:disable Layout/LineLength - model = XTwitterScraper::Internal::Type::Converter.inspect(@model, depth: 1) - - "#<#{self.class}[#{model}]:0x#{object_id.to_s(16)} next_cursor=#{next_cursor.inspect} has_next_page=#{has_next_page.inspect}>" - # rubocop:enable Layout/LineLength - end - end - end -end diff --git a/lib/x_twitter_scraper/resources/x/bookmarks.rb b/lib/x_twitter_scraper/resources/x/bookmarks.rb index edf53ff..f46ff83 100644 --- a/lib/x_twitter_scraper/resources/x/bookmarks.rb +++ b/lib/x_twitter_scraper/resources/x/bookmarks.rb @@ -15,7 +15,7 @@ class Bookmarks # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Internal::CursorPage] + # @return [XTwitterScraper::Models::PaginatedTweets] # # @see XTwitterScraper::Models::X::BookmarkListParams def list(params = {}) @@ -25,7 +25,6 @@ def list(params = {}) method: :get, path: "x/bookmarks", query: query.transform_keys(folder_id: "folderId"), - page: XTwitterScraper::Internal::CursorPage, model: XTwitterScraper::PaginatedTweets, options: options ) diff --git a/lib/x_twitter_scraper/resources/x/communities/tweets.rb b/lib/x_twitter_scraper/resources/x/communities/tweets.rb index 468b313..615b6de 100644 --- a/lib/x_twitter_scraper/resources/x/communities/tweets.rb +++ b/lib/x_twitter_scraper/resources/x/communities/tweets.rb @@ -18,7 +18,7 @@ class Tweets # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Internal::CursorPage] + # @return [XTwitterScraper::Models::PaginatedTweets] # # @see XTwitterScraper::Models::X::Communities::TweetListParams def list(params) @@ -28,7 +28,6 @@ def list(params) method: :get, path: "x/communities/tweets", query: query.transform_keys(query_type: "queryType"), - page: XTwitterScraper::Internal::CursorPage, model: XTwitterScraper::PaginatedTweets, options: options ) @@ -44,7 +43,7 @@ def list(params) # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [XTwitterScraper::Internal::CursorPage] + # @return [XTwitterScraper::Models::PaginatedTweets] # # @see XTwitterScraper::Models::X::Communities::TweetListByCommunityParams def list_by_community(id, params = {}) @@ -54,7 +53,6 @@ def list_by_community(id, params = {}) method: :get, path: ["x/communities/%1$s/tweets", id], query: query, - page: XTwitterScraper::Internal::CursorPage, model: XTwitterScraper::PaginatedTweets, options: options ) diff --git a/rbi/x_twitter_scraper/internal/cursor_page.rbi b/rbi/x_twitter_scraper/internal/cursor_page.rbi deleted file mode 100644 index 33a3c9a..0000000 --- a/rbi/x_twitter_scraper/internal/cursor_page.rbi +++ /dev/null @@ -1,22 +0,0 @@ -# typed: strong - -module XTwitterScraper - module Internal - class CursorPage - include XTwitterScraper::Internal::Type::BasePage - - Elem = type_member - - sig { returns(T.nilable(String)) } - attr_accessor :next_cursor - - sig { returns(T::Boolean) } - attr_accessor :has_next_page - - # @api private - sig { returns(String) } - def inspect - end - end - end -end diff --git a/rbi/x_twitter_scraper/resources/x/bookmarks.rbi b/rbi/x_twitter_scraper/resources/x/bookmarks.rbi index c0b0ceb..3146b8e 100644 --- a/rbi/x_twitter_scraper/resources/x/bookmarks.rbi +++ b/rbi/x_twitter_scraper/resources/x/bookmarks.rbi @@ -11,11 +11,7 @@ module XTwitterScraper cursor: String, folder_id: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns( - XTwitterScraper::Internal::CursorPage[ - XTwitterScraper::PaginatedTweets - ] - ) + ).returns(XTwitterScraper::PaginatedTweets) end def list( # Pagination cursor for bookmarks diff --git a/rbi/x_twitter_scraper/resources/x/communities/tweets.rbi b/rbi/x_twitter_scraper/resources/x/communities/tweets.rbi index ee67a4b..6aa94f9 100644 --- a/rbi/x_twitter_scraper/resources/x/communities/tweets.rbi +++ b/rbi/x_twitter_scraper/resources/x/communities/tweets.rbi @@ -13,11 +13,7 @@ module XTwitterScraper cursor: String, query_type: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns( - XTwitterScraper::Internal::CursorPage[ - XTwitterScraper::PaginatedTweets - ] - ) + ).returns(XTwitterScraper::PaginatedTweets) end def list( # Search query for cross-community tweets @@ -36,11 +32,7 @@ module XTwitterScraper id: String, cursor: String, request_options: XTwitterScraper::RequestOptions::OrHash - ).returns( - XTwitterScraper::Internal::CursorPage[ - XTwitterScraper::PaginatedTweets - ] - ) + ).returns(XTwitterScraper::PaginatedTweets) end def list_by_community( # Community ID for tweet lookup diff --git a/sig/x_twitter_scraper/internal/cursor_page.rbs b/sig/x_twitter_scraper/internal/cursor_page.rbs deleted file mode 100644 index 7c216d0..0000000 --- a/sig/x_twitter_scraper/internal/cursor_page.rbs +++ /dev/null @@ -1,13 +0,0 @@ -module XTwitterScraper - module Internal - class CursorPage[Elem] - include XTwitterScraper::Internal::Type::BasePage[Elem] - - attr_accessor next_cursor: String? - - attr_accessor has_next_page: bool - - def inspect: -> String - end - end -end diff --git a/sig/x_twitter_scraper/resources/x/bookmarks.rbs b/sig/x_twitter_scraper/resources/x/bookmarks.rbs index 829d9db..c149e6b 100644 --- a/sig/x_twitter_scraper/resources/x/bookmarks.rbs +++ b/sig/x_twitter_scraper/resources/x/bookmarks.rbs @@ -6,7 +6,7 @@ module XTwitterScraper ?cursor: String, ?folder_id: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Internal::CursorPage[XTwitterScraper::PaginatedTweets] + ) -> XTwitterScraper::PaginatedTweets def retrieve_folders: ( ?request_options: XTwitterScraper::request_opts diff --git a/sig/x_twitter_scraper/resources/x/communities/tweets.rbs b/sig/x_twitter_scraper/resources/x/communities/tweets.rbs index 13f1d15..a733ccd 100644 --- a/sig/x_twitter_scraper/resources/x/communities/tweets.rbs +++ b/sig/x_twitter_scraper/resources/x/communities/tweets.rbs @@ -8,13 +8,13 @@ module XTwitterScraper ?cursor: String, ?query_type: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Internal::CursorPage[XTwitterScraper::PaginatedTweets] + ) -> XTwitterScraper::PaginatedTweets def list_by_community: ( String id, ?cursor: String, ?request_options: XTwitterScraper::request_opts - ) -> XTwitterScraper::Internal::CursorPage[XTwitterScraper::PaginatedTweets] + ) -> XTwitterScraper::PaginatedTweets def initialize: (client: XTwitterScraper::Client) -> void end diff --git a/test/x_twitter_scraper/resources/x/bookmarks_test.rb b/test/x_twitter_scraper/resources/x/bookmarks_test.rb index 5142018..007889d 100644 --- a/test/x_twitter_scraper/resources/x/bookmarks_test.rb +++ b/test/x_twitter_scraper/resources/x/bookmarks_test.rb @@ -9,18 +9,11 @@ def test_list response = @x_twitter_scraper.x.bookmarks.list assert_pattern do - response => XTwitterScraper::Internal::CursorPage + response => XTwitterScraper::PaginatedTweets end - row = response.to_enum.first - return if row.nil? - assert_pattern do - row => XTwitterScraper::PaginatedTweets - end - - assert_pattern do - row => { + response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::SearchTweet]) diff --git a/test/x_twitter_scraper/resources/x/communities/tweets_test.rb b/test/x_twitter_scraper/resources/x/communities/tweets_test.rb index 3bee51b..2f4119f 100644 --- a/test/x_twitter_scraper/resources/x/communities/tweets_test.rb +++ b/test/x_twitter_scraper/resources/x/communities/tweets_test.rb @@ -9,18 +9,11 @@ def test_list_required_params response = @x_twitter_scraper.x.communities.tweets.list(q: "q") assert_pattern do - response => XTwitterScraper::Internal::CursorPage - end - - row = response.to_enum.first - return if row.nil? - - assert_pattern do - row => XTwitterScraper::PaginatedTweets + response => XTwitterScraper::PaginatedTweets end assert_pattern do - row => { + response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::SearchTweet]) @@ -34,18 +27,11 @@ def test_list_by_community response = @x_twitter_scraper.x.communities.tweets.list_by_community("id") assert_pattern do - response => XTwitterScraper::Internal::CursorPage - end - - row = response.to_enum.first - return if row.nil? - - assert_pattern do - row => XTwitterScraper::PaginatedTweets + response => XTwitterScraper::PaginatedTweets end assert_pattern do - row => { + response => { has_next_page: XTwitterScraper::Internal::Type::Boolean, next_cursor: String, tweets: ^(XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::X::SearchTweet]) From 57ca5deef4ab9b670bc0e143c00639a8c3da1258 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 21:12:47 +0000 Subject: [PATCH 09/27] feat(api): api update --- .stats.yml | 4 +- .../models/extraction_run_response.rb | 20 ++------ lib/x_twitter_scraper/models/integration.rb | 20 ++------ .../models/integration_create_params.rb | 17 ++----- .../resources/integrations.rb | 4 +- .../models/extraction_run_response.rbi | 47 +++---------------- rbi/x_twitter_scraper/models/integration.rbi | 31 +++--------- .../models/integration_create_params.rbi | 34 ++------------ .../resources/integrations.rbi | 4 +- .../models/extraction_run_response.rbs | 20 ++------ sig/x_twitter_scraper/models/integration.rbs | 20 ++------ .../models/integration_create_params.rbs | 18 ++----- .../resources/integrations.rbs | 2 +- .../resources/extractions_test.rb | 2 +- .../resources/integrations_test.rb | 6 +-- 15 files changed, 55 insertions(+), 194 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0bd0660..34bb698 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 117 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-3a272e3207cc0ecbfc3850635c5608190a5f4fab77368b72074d99617376b5a8.yml -openapi_spec_hash: c5aae119b546e3d97bb2be0cc7688a43 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-d40c57a05527faf060d21c0e013729f371d88017b10680cea7c8fd6780ffaef5.yml +openapi_spec_hash: 597ebc460cf86740b9f6f7c95478dece config_hash: 911c2f86777f1fa01b0b28ff75adf849 diff --git a/lib/x_twitter_scraper/models/extraction_run_response.rb b/lib/x_twitter_scraper/models/extraction_run_response.rb index d8e1dd2..c5b10c6 100644 --- a/lib/x_twitter_scraper/models/extraction_run_response.rb +++ b/lib/x_twitter_scraper/models/extraction_run_response.rb @@ -11,8 +11,8 @@ class ExtractionRunResponse < XTwitterScraper::Internal::Type::BaseModel # @!attribute status # - # @return [Symbol, XTwitterScraper::Models::ExtractionRunResponse::Status] - required :status, enum: -> { XTwitterScraper::Models::ExtractionRunResponse::Status } + # @return [Symbol, :running] + required :status, const: :running # @!attribute tool_type # Identifier for the extraction tool used to run a job. @@ -22,22 +22,12 @@ class ExtractionRunResponse < XTwitterScraper::Internal::Type::BaseModel enum: -> { XTwitterScraper::Models::ExtractionRunResponse::ToolType }, api_name: :toolType - # @!method initialize(id:, status:, tool_type:) + # @!method initialize(id:, tool_type:, status: :running) # @param id [String] # - # @param status [Symbol, XTwitterScraper::Models::ExtractionRunResponse::Status] - # # @param tool_type [Symbol, XTwitterScraper::Models::ExtractionRunResponse::ToolType] Identifier for the extraction tool used to run a job. - - # @see XTwitterScraper::Models::ExtractionRunResponse#status - module Status - extend XTwitterScraper::Internal::Type::Enum - - RUNNING = :running - - # @!method self.values - # @return [Array] - end + # + # @param status [Symbol, :running] # Identifier for the extraction tool used to run a job. # diff --git a/lib/x_twitter_scraper/models/integration.rb b/lib/x_twitter_scraper/models/integration.rb index 21dcf10..d85d985 100644 --- a/lib/x_twitter_scraper/models/integration.rb +++ b/lib/x_twitter_scraper/models/integration.rb @@ -40,8 +40,8 @@ class Integration < XTwitterScraper::Internal::Type::BaseModel # @!attribute type # - # @return [Symbol, XTwitterScraper::Models::Integration::Type] - required :type, enum: -> { XTwitterScraper::Integration::Type } + # @return [Symbol, :telegram] + required :type, const: :telegram # @!attribute filters # Event filter rules (JSON) @@ -64,7 +64,7 @@ class Integration < XTwitterScraper::Internal::Type::BaseModel # @return [Boolean, nil] optional :silent_push, XTwitterScraper::Internal::Type::Boolean, api_name: :silentPush - # @!method initialize(id:, config:, created_at:, event_types:, is_active:, name:, type:, filters: nil, message_template: nil, scope_all_monitors: nil, silent_push: nil) + # @!method initialize(id:, config:, created_at:, event_types:, is_active:, name:, filters: nil, message_template: nil, scope_all_monitors: nil, silent_push: nil, type: :telegram) # Third-party integration (e.g. Telegram) subscribed to monitor events. # # @param id [String] @@ -79,8 +79,6 @@ class Integration < XTwitterScraper::Internal::Type::BaseModel # # @param name [String] # - # @param type [Symbol, XTwitterScraper::Models::Integration::Type] - # # @param filters [Hash{Symbol=>Object}] Event filter rules (JSON) # # @param message_template [String] @@ -88,16 +86,8 @@ class Integration < XTwitterScraper::Internal::Type::BaseModel # @param scope_all_monitors [Boolean] # # @param silent_push [Boolean] - - # @see XTwitterScraper::Models::Integration#type - module Type - extend XTwitterScraper::Internal::Type::Enum - - TELEGRAM = :telegram - - # @!method self.values - # @return [Array] - end + # + # @param type [Symbol, :telegram] end end end diff --git a/lib/x_twitter_scraper/models/integration_create_params.rb b/lib/x_twitter_scraper/models/integration_create_params.rb index e71f002..514dbd2 100644 --- a/lib/x_twitter_scraper/models/integration_create_params.rb +++ b/lib/x_twitter_scraper/models/integration_create_params.rb @@ -28,17 +28,17 @@ class IntegrationCreateParams < XTwitterScraper::Internal::Type::BaseModel # @!attribute type # - # @return [Symbol, XTwitterScraper::Models::IntegrationCreateParams::Type] - required :type, enum: -> { XTwitterScraper::IntegrationCreateParams::Type } + # @return [Symbol, :telegram] + required :type, const: :telegram - # @!method initialize(config:, event_types:, name:, type:, request_options: {}) + # @!method initialize(config:, event_types:, name:, type: :telegram, request_options: {}) # @param config [XTwitterScraper::Models::IntegrationCreateParams::Config] Integration config (e.g. Telegram chatId) # # @param event_types [Array] Array of event types to subscribe to. # # @param name [String] # - # @param type [Symbol, XTwitterScraper::Models::IntegrationCreateParams::Type] + # @param type [Symbol, :telegram] # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}] @@ -53,15 +53,6 @@ class Config < XTwitterScraper::Internal::Type::BaseModel # # @param chat_id [String] end - - module Type - extend XTwitterScraper::Internal::Type::Enum - - TELEGRAM = :telegram - - # @!method self.values - # @return [Array] - end end end end diff --git a/lib/x_twitter_scraper/resources/integrations.rb b/lib/x_twitter_scraper/resources/integrations.rb index ac2ef99..286abbe 100644 --- a/lib/x_twitter_scraper/resources/integrations.rb +++ b/lib/x_twitter_scraper/resources/integrations.rb @@ -6,7 +6,7 @@ module Resources class Integrations # Create integration # - # @overload create(config:, event_types:, name:, type:, request_options: {}) + # @overload create(config:, event_types:, name:, type: :telegram, request_options: {}) # # @param config [XTwitterScraper::Models::IntegrationCreateParams::Config] Integration config (e.g. Telegram chatId) # @@ -14,7 +14,7 @@ class Integrations # # @param name [String] # - # @param type [Symbol, XTwitterScraper::Models::IntegrationCreateParams::Type] + # @param type [Symbol, :telegram] # # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/rbi/x_twitter_scraper/models/extraction_run_response.rbi b/rbi/x_twitter_scraper/models/extraction_run_response.rbi index f5699aa..2b74df7 100644 --- a/rbi/x_twitter_scraper/models/extraction_run_response.rbi +++ b/rbi/x_twitter_scraper/models/extraction_run_response.rbi @@ -14,11 +14,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :id - sig do - returns( - XTwitterScraper::Models::ExtractionRunResponse::Status::TaggedSymbol - ) - end + sig { returns(Symbol) } attr_accessor :status # Identifier for the extraction tool used to run a job. @@ -32,17 +28,16 @@ module XTwitterScraper sig do params( id: String, - status: - XTwitterScraper::Models::ExtractionRunResponse::Status::OrSymbol, tool_type: - XTwitterScraper::Models::ExtractionRunResponse::ToolType::OrSymbol + XTwitterScraper::Models::ExtractionRunResponse::ToolType::OrSymbol, + status: Symbol ).returns(T.attached_class) end def self.new( id:, - status:, # Identifier for the extraction tool used to run a job. - tool_type: + tool_type:, + status: :running ) end @@ -50,8 +45,7 @@ module XTwitterScraper override.returns( { id: String, - status: - XTwitterScraper::Models::ExtractionRunResponse::Status::TaggedSymbol, + status: Symbol, tool_type: XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol } @@ -60,35 +54,6 @@ module XTwitterScraper def to_hash end - module Status - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - XTwitterScraper::Models::ExtractionRunResponse::Status - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - RUNNING = - T.let( - :running, - XTwitterScraper::Models::ExtractionRunResponse::Status::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::Models::ExtractionRunResponse::Status::TaggedSymbol - ] - ) - end - def self.values - end - end - # Identifier for the extraction tool used to run a job. module ToolType extend XTwitterScraper::Internal::Type::Enum diff --git a/rbi/x_twitter_scraper/models/integration.rbi b/rbi/x_twitter_scraper/models/integration.rbi index b182039..c252cc5 100644 --- a/rbi/x_twitter_scraper/models/integration.rbi +++ b/rbi/x_twitter_scraper/models/integration.rbi @@ -31,7 +31,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :name - sig { returns(XTwitterScraper::Integration::Type::TaggedSymbol) } + sig { returns(Symbol) } attr_accessor :type # Event filter rules (JSON) @@ -68,11 +68,11 @@ module XTwitterScraper event_types: T::Array[XTwitterScraper::EventType::OrSymbol], is_active: T::Boolean, name: String, - type: XTwitterScraper::Integration::Type::OrSymbol, filters: T::Hash[Symbol, T.anything], message_template: String, scope_all_monitors: T::Boolean, - silent_push: T::Boolean + silent_push: T::Boolean, + type: Symbol ).returns(T.attached_class) end def self.new( @@ -84,12 +84,12 @@ module XTwitterScraper event_types:, is_active:, name:, - type:, # Event filter rules (JSON) filters: nil, message_template: nil, scope_all_monitors: nil, - silent_push: nil + silent_push: nil, + type: :telegram ) end @@ -102,7 +102,7 @@ module XTwitterScraper event_types: T::Array[XTwitterScraper::EventType::TaggedSymbol], is_active: T::Boolean, name: String, - type: XTwitterScraper::Integration::Type::TaggedSymbol, + type: Symbol, filters: T::Hash[Symbol, T.anything], message_template: String, scope_all_monitors: T::Boolean, @@ -112,25 +112,6 @@ module XTwitterScraper end def to_hash end - - module Type - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias { T.all(Symbol, XTwitterScraper::Integration::Type) } - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TELEGRAM = - T.let(:telegram, XTwitterScraper::Integration::Type::TaggedSymbol) - - sig do - override.returns( - T::Array[XTwitterScraper::Integration::Type::TaggedSymbol] - ) - end - def self.values - end - end end end end diff --git a/rbi/x_twitter_scraper/models/integration_create_params.rbi b/rbi/x_twitter_scraper/models/integration_create_params.rbi index dd254ef..4711f28 100644 --- a/rbi/x_twitter_scraper/models/integration_create_params.rbi +++ b/rbi/x_twitter_scraper/models/integration_create_params.rbi @@ -32,7 +32,7 @@ module XTwitterScraper sig { returns(String) } attr_accessor :name - sig { returns(XTwitterScraper::IntegrationCreateParams::Type::OrSymbol) } + sig { returns(Symbol) } attr_accessor :type sig do @@ -40,7 +40,7 @@ module XTwitterScraper config: XTwitterScraper::IntegrationCreateParams::Config::OrHash, event_types: T::Array[XTwitterScraper::EventType::OrSymbol], name: String, - type: XTwitterScraper::IntegrationCreateParams::Type::OrSymbol, + type: Symbol, request_options: XTwitterScraper::RequestOptions::OrHash ).returns(T.attached_class) end @@ -50,7 +50,7 @@ module XTwitterScraper # Array of event types to subscribe to. event_types:, name:, - type:, + type: :telegram, request_options: {} ) end @@ -61,7 +61,7 @@ module XTwitterScraper config: XTwitterScraper::IntegrationCreateParams::Config, event_types: T::Array[XTwitterScraper::EventType::OrSymbol], name: String, - type: XTwitterScraper::IntegrationCreateParams::Type::OrSymbol, + type: Symbol, request_options: XTwitterScraper::RequestOptions } ) @@ -90,32 +90,6 @@ module XTwitterScraper def to_hash end end - - module Type - extend XTwitterScraper::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, XTwitterScraper::IntegrationCreateParams::Type) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - TELEGRAM = - T.let( - :telegram, - XTwitterScraper::IntegrationCreateParams::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - XTwitterScraper::IntegrationCreateParams::Type::TaggedSymbol - ] - ) - end - def self.values - end - end end end end diff --git a/rbi/x_twitter_scraper/resources/integrations.rbi b/rbi/x_twitter_scraper/resources/integrations.rbi index 5bc5155..af12a30 100644 --- a/rbi/x_twitter_scraper/resources/integrations.rbi +++ b/rbi/x_twitter_scraper/resources/integrations.rbi @@ -10,7 +10,7 @@ module XTwitterScraper config: XTwitterScraper::IntegrationCreateParams::Config::OrHash, event_types: T::Array[XTwitterScraper::EventType::OrSymbol], name: String, - type: XTwitterScraper::IntegrationCreateParams::Type::OrSymbol, + type: Symbol, request_options: XTwitterScraper::RequestOptions::OrHash ).returns(XTwitterScraper::Integration) end @@ -20,7 +20,7 @@ module XTwitterScraper # Array of event types to subscribe to. event_types:, name:, - type:, + type: :telegram, request_options: {} ) end diff --git a/sig/x_twitter_scraper/models/extraction_run_response.rbs b/sig/x_twitter_scraper/models/extraction_run_response.rbs index 77d45e0..e2dd402 100644 --- a/sig/x_twitter_scraper/models/extraction_run_response.rbs +++ b/sig/x_twitter_scraper/models/extraction_run_response.rbs @@ -3,39 +3,29 @@ module XTwitterScraper type extraction_run_response = { id: String, - status: XTwitterScraper::Models::ExtractionRunResponse::status, + status: :running, tool_type: XTwitterScraper::Models::ExtractionRunResponse::tool_type } class ExtractionRunResponse < XTwitterScraper::Internal::Type::BaseModel attr_accessor id: String - attr_accessor status: XTwitterScraper::Models::ExtractionRunResponse::status + attr_accessor status: :running attr_accessor tool_type: XTwitterScraper::Models::ExtractionRunResponse::tool_type def initialize: ( id: String, - status: XTwitterScraper::Models::ExtractionRunResponse::status, - tool_type: XTwitterScraper::Models::ExtractionRunResponse::tool_type + tool_type: XTwitterScraper::Models::ExtractionRunResponse::tool_type, + ?status: :running ) -> void def to_hash: -> { id: String, - status: XTwitterScraper::Models::ExtractionRunResponse::status, + status: :running, tool_type: XTwitterScraper::Models::ExtractionRunResponse::tool_type } - type status = :running - - module Status - extend XTwitterScraper::Internal::Type::Enum - - RUNNING: :running - - def self?.values: -> ::Array[XTwitterScraper::Models::ExtractionRunResponse::status] - end - type tool_type = :article_extractor | :community_extractor diff --git a/sig/x_twitter_scraper/models/integration.rbs b/sig/x_twitter_scraper/models/integration.rbs index 7c8dbfa..56f2546 100644 --- a/sig/x_twitter_scraper/models/integration.rbs +++ b/sig/x_twitter_scraper/models/integration.rbs @@ -8,7 +8,7 @@ module XTwitterScraper event_types: ::Array[XTwitterScraper::Models::event_type], is_active: bool, name: String, - type: XTwitterScraper::Models::Integration::type_, + type: :telegram, filters: ::Hash[Symbol, top], message_template: String, scope_all_monitors: bool, @@ -28,7 +28,7 @@ module XTwitterScraper attr_accessor name: String - attr_accessor type: XTwitterScraper::Models::Integration::type_ + attr_accessor type: :telegram attr_reader filters: ::Hash[Symbol, top]? @@ -53,11 +53,11 @@ module XTwitterScraper event_types: ::Array[XTwitterScraper::Models::event_type], is_active: bool, name: String, - type: XTwitterScraper::Models::Integration::type_, ?filters: ::Hash[Symbol, top], ?message_template: String, ?scope_all_monitors: bool, - ?silent_push: bool + ?silent_push: bool, + ?type: :telegram ) -> void def to_hash: -> { @@ -67,22 +67,12 @@ module XTwitterScraper event_types: ::Array[XTwitterScraper::Models::event_type], is_active: bool, name: String, - type: XTwitterScraper::Models::Integration::type_, + type: :telegram, filters: ::Hash[Symbol, top], message_template: String, scope_all_monitors: bool, silent_push: bool } - - type type_ = :telegram - - module Type - extend XTwitterScraper::Internal::Type::Enum - - TELEGRAM: :telegram - - def self?.values: -> ::Array[XTwitterScraper::Models::Integration::type_] - end end end end diff --git a/sig/x_twitter_scraper/models/integration_create_params.rbs b/sig/x_twitter_scraper/models/integration_create_params.rbs index 1f48044..9384dc9 100644 --- a/sig/x_twitter_scraper/models/integration_create_params.rbs +++ b/sig/x_twitter_scraper/models/integration_create_params.rbs @@ -5,7 +5,7 @@ module XTwitterScraper config: XTwitterScraper::IntegrationCreateParams::Config, event_types: ::Array[XTwitterScraper::Models::event_type], name: String, - type: XTwitterScraper::Models::IntegrationCreateParams::type_ + type: :telegram } & XTwitterScraper::Internal::Type::request_parameters @@ -19,13 +19,13 @@ module XTwitterScraper attr_accessor name: String - attr_accessor type: XTwitterScraper::Models::IntegrationCreateParams::type_ + attr_accessor type: :telegram def initialize: ( config: XTwitterScraper::IntegrationCreateParams::Config, event_types: ::Array[XTwitterScraper::Models::event_type], name: String, - type: XTwitterScraper::Models::IntegrationCreateParams::type_, + ?type: :telegram, ?request_options: XTwitterScraper::request_opts ) -> void @@ -33,7 +33,7 @@ module XTwitterScraper config: XTwitterScraper::IntegrationCreateParams::Config, event_types: ::Array[XTwitterScraper::Models::event_type], name: String, - type: XTwitterScraper::Models::IntegrationCreateParams::type_, + type: :telegram, request_options: XTwitterScraper::RequestOptions } @@ -46,16 +46,6 @@ module XTwitterScraper def to_hash: -> { chat_id: String } end - - type type_ = :telegram - - module Type - extend XTwitterScraper::Internal::Type::Enum - - TELEGRAM: :telegram - - def self?.values: -> ::Array[XTwitterScraper::Models::IntegrationCreateParams::type_] - end end end end diff --git a/sig/x_twitter_scraper/resources/integrations.rbs b/sig/x_twitter_scraper/resources/integrations.rbs index 080e671..d2da60e 100644 --- a/sig/x_twitter_scraper/resources/integrations.rbs +++ b/sig/x_twitter_scraper/resources/integrations.rbs @@ -5,7 +5,7 @@ module XTwitterScraper config: XTwitterScraper::IntegrationCreateParams::Config, event_types: ::Array[XTwitterScraper::Models::event_type], name: String, - type: XTwitterScraper::Models::IntegrationCreateParams::type_, + ?type: :telegram, ?request_options: XTwitterScraper::request_opts ) -> XTwitterScraper::Integration diff --git a/test/x_twitter_scraper/resources/extractions_test.rb b/test/x_twitter_scraper/resources/extractions_test.rb index 5ab7f36..1d902d4 100644 --- a/test/x_twitter_scraper/resources/extractions_test.rb +++ b/test/x_twitter_scraper/resources/extractions_test.rb @@ -82,7 +82,7 @@ def test_run_required_params assert_pattern do response => { id: String, - status: XTwitterScraper::Models::ExtractionRunResponse::Status, + status: Symbol, tool_type: XTwitterScraper::Models::ExtractionRunResponse::ToolType } end diff --git a/test/x_twitter_scraper/resources/integrations_test.rb b/test/x_twitter_scraper/resources/integrations_test.rb index 6ca87c7..537bf30 100644 --- a/test/x_twitter_scraper/resources/integrations_test.rb +++ b/test/x_twitter_scraper/resources/integrations_test.rb @@ -26,7 +26,7 @@ def test_create_required_params event_types: ^(XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType]), is_active: XTwitterScraper::Internal::Type::Boolean, name: String, - type: XTwitterScraper::Integration::Type, + type: Symbol, filters: ^(XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown]) | nil, message_template: String | nil, scope_all_monitors: XTwitterScraper::Internal::Type::Boolean | nil, @@ -52,7 +52,7 @@ def test_retrieve event_types: ^(XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType]), is_active: XTwitterScraper::Internal::Type::Boolean, name: String, - type: XTwitterScraper::Integration::Type, + type: Symbol, filters: ^(XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown]) | nil, message_template: String | nil, scope_all_monitors: XTwitterScraper::Internal::Type::Boolean | nil, @@ -78,7 +78,7 @@ def test_update event_types: ^(XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType]), is_active: XTwitterScraper::Internal::Type::Boolean, name: String, - type: XTwitterScraper::Integration::Type, + type: Symbol, filters: ^(XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown]) | nil, message_template: String | nil, scope_all_monitors: XTwitterScraper::Internal::Type::Boolean | nil, From 534d3a3940b29e3a556d743e0fd0eaf62343666f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 22:25:41 +0000 Subject: [PATCH 10/27] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 34bb698..5743c64 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 117 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-d40c57a05527faf060d21c0e013729f371d88017b10680cea7c8fd6780ffaef5.yml openapi_spec_hash: 597ebc460cf86740b9f6f7c95478dece -config_hash: 911c2f86777f1fa01b0b28ff75adf849 +config_hash: 2cb64b17dc048ac0792bcaf791a4f8d9 From 276c6939b84e73b7921ae0d4772d28f81ae430f1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 22:26:14 +0000 Subject: [PATCH 11/27] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 5743c64..5a3e2f5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 117 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-d40c57a05527faf060d21c0e013729f371d88017b10680cea7c8fd6780ffaef5.yml openapi_spec_hash: 597ebc460cf86740b9f6f7c95478dece -config_hash: 2cb64b17dc048ac0792bcaf791a4f8d9 +config_hash: c54e559eff1557fde695094e023472f9 From 301d2a616dfaf7c4ac15798a7463ecd3ef2770eb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 21:19:43 +0000 Subject: [PATCH 12/27] chore: update SDK settings --- .github/workflows/publish-gem.yml | 11 ++--- .github/workflows/release-doctor.yml | 22 +++++++++ .stats.yml | 2 +- CONTRIBUTING.md | 4 +- README.md | 8 +++- bin/check-release-environment | 21 +++++++++ release-please-config.json | 70 ++++++++++++++++++++++++++++ 7 files changed, 126 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/release-doctor.yml create mode 100644 bin/check-release-environment create mode 100644 release-please-config.json diff --git a/.github/workflows/publish-gem.yml b/.github/workflows/publish-gem.yml index 94e9edb..3e40ec2 100644 --- a/.github/workflows/publish-gem.yml +++ b/.github/workflows/publish-gem.yml @@ -12,10 +12,6 @@ jobs: publish: name: publish runs-on: ubuntu-latest - environment: rubygems - permissions: - contents: read - id-token: write steps: - uses: actions/checkout@v6 @@ -26,9 +22,10 @@ jobs: - run: |- bundle install - - name: Configure trusted publishing credentials - uses: rubygems/configure-rubygems-credentials@v1.0.0 - - name: Publish to RubyGems.org run: | bash ./bin/publish-gem + env: + # `RUBYGEMS_HOST` is only required for private gem repositories, not https://rubygems.org + RUBYGEMS_HOST: ${{ secrets.X_TWITTER_SCRAPER_RUBYGEMS_HOST || secrets.RUBYGEMS_HOST }} + GEM_HOST_API_KEY: ${{ secrets.X_TWITTER_SCRAPER_GEM_HOST_API_KEY || secrets.GEM_HOST_API_KEY }} diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml new file mode 100644 index 0000000..75e533e --- /dev/null +++ b/.github/workflows/release-doctor.yml @@ -0,0 +1,22 @@ +name: Release Doctor +on: + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + release_doctor: + name: release doctor + runs-on: ubuntu-latest + if: github.repository == 'Xquik-dev/x-twitter-scraper-ruby' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') + + steps: + - uses: actions/checkout@v6 + + - name: Check release environment + run: | + bash ./bin/check-release-environment + env: + RUBYGEMS_HOST: ${{ secrets.X_TWITTER_SCRAPER_RUBYGEMS_HOST || secrets.RUBYGEMS_HOST }} + GEM_HOST_API_KEY: ${{ secrets.X_TWITTER_SCRAPER_GEM_HOST_API_KEY || secrets.GEM_HOST_API_KEY }} diff --git a/.stats.yml b/.stats.yml index 5a3e2f5..8392715 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 117 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-d40c57a05527faf060d21c0e013729f371d88017b10680cea7c8fd6780ffaef5.yml openapi_spec_hash: 597ebc460cf86740b9f6f7c95478dece -config_hash: c54e559eff1557fde695094e023472f9 +config_hash: 0502981547af2415cdeeb9a88e9d15bc diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 11a69b8..39a1b67 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,13 +43,13 @@ If you’d like to use the repository from source, you can either install from g To install via git in your `Gemfile`: ```ruby -gem "x-twitter-scraper", git: "https://github.com/stainless-sdks/x-twitter-scraper-ruby" +gem "x-twitter-scraper", git: "https://github.com/Xquik-dev/x-twitter-scraper-ruby" ``` Alternatively, reference local copy of the repo: ```bash -$ git clone -- 'https://github.com/stainless-sdks/x-twitter-scraper-ruby' '' +$ git clone -- 'https://github.com/Xquik-dev/x-twitter-scraper-ruby' '' ``` ```ruby diff --git a/README.md b/README.md index effd189..4b662e3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # X Twitter Scraper Ruby API library -The X Twitter Scraper Ruby library provides convenient access to the X Twitter Scraper REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/stainless-sdks/x-twitter-scraper-ruby#Sorbet) for usage with Sorbet. The standard library's `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem. +The X Twitter Scraper Ruby library provides convenient access to the X Twitter Scraper REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/Xquik-dev/x-twitter-scraper-ruby#Sorbet) for usage with Sorbet. The standard library's `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem. It is generated with [Stainless](https://www.stainless.com/). @@ -14,10 +14,14 @@ The REST API documentation can be found on [xquik.com](https://xquik.com). To use this gem, install via Bundler by adding the following to your application's `Gemfile`: + + ```ruby gem "x-twitter-scraper", "~> 0.3.0" ``` + + ## Usage ```ruby @@ -252,4 +256,4 @@ Ruby 3.2.0 or higher. ## Contributing -See [the contributing documentation](https://github.com/stainless-sdks/x-twitter-scraper-ruby/tree/main/CONTRIBUTING.md). +See [the contributing documentation](https://github.com/Xquik-dev/x-twitter-scraper-ruby/tree/main/CONTRIBUTING.md). diff --git a/bin/check-release-environment b/bin/check-release-environment new file mode 100644 index 0000000..c05436e --- /dev/null +++ b/bin/check-release-environment @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +errors=() + +if [ -z "${GEM_HOST_API_KEY}" ]; then + errors+=("The GEM_HOST_API_KEY secret has not been set. Please set it in either this repository's secrets or your organization secrets") +fi + +lenErrors=${#errors[@]} + +if [[ lenErrors -gt 0 ]]; then + echo -e "Found the following errors in the release environment:\n" + + for error in "${errors[@]}"; do + echo -e "- $error\n" + done + + exit 1 +fi + +echo "The environment is ready to push releases!" diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..8278dc1 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,70 @@ +{ + "packages": { + ".": {} + }, + "$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json", + "include-v-in-tag": true, + "include-component-in-tag": false, + "versioning": "prerelease", + "prerelease": true, + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": false, + "pull-request-header": "Automated Release PR", + "pull-request-title-pattern": "release: ${version}", + "changelog-sections": [ + { + "type": "feat", + "section": "Features" + }, + { + "type": "fix", + "section": "Bug Fixes" + }, + { + "type": "perf", + "section": "Performance Improvements" + }, + { + "type": "revert", + "section": "Reverts" + }, + { + "type": "chore", + "section": "Chores" + }, + { + "type": "docs", + "section": "Documentation" + }, + { + "type": "style", + "section": "Styles" + }, + { + "type": "refactor", + "section": "Refactors" + }, + { + "type": "test", + "section": "Tests", + "hidden": true + }, + { + "type": "build", + "section": "Build System" + }, + { + "type": "ci", + "section": "Continuous Integration", + "hidden": true + } + ], + "release-type": "ruby", + "version-file": "lib/x_twitter_scraper/version.rb", + "extra-files": [ + { + "type": "ruby-readme", + "path": "README.md" + } + ] +} \ No newline at end of file From e42745062186725433f016bc4a3d01972cb2a220 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 22:28:26 +0000 Subject: [PATCH 13/27] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8392715..cf4f644 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 117 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-d40c57a05527faf060d21c0e013729f371d88017b10680cea7c8fd6780ffaef5.yml openapi_spec_hash: 597ebc460cf86740b9f6f7c95478dece -config_hash: 0502981547af2415cdeeb9a88e9d15bc +config_hash: 2dc4b58ab2ff8874d81f9a3b60a8820f From 912b51ebe8c801b438a2d19799611e18e7d9fe64 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 22:29:38 +0000 Subject: [PATCH 14/27] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index cf4f644..0ddebab 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 117 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-d40c57a05527faf060d21c0e013729f371d88017b10680cea7c8fd6780ffaef5.yml openapi_spec_hash: 597ebc460cf86740b9f6f7c95478dece -config_hash: 2dc4b58ab2ff8874d81f9a3b60a8820f +config_hash: 6b90cee1922503e9bd207f3fa2e2080d From b2f18f8b5feb9a5e6737341878f97c6bd7653bc2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 22:30:10 +0000 Subject: [PATCH 15/27] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 0ddebab..8484806 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 117 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-d40c57a05527faf060d21c0e013729f371d88017b10680cea7c8fd6780ffaef5.yml openapi_spec_hash: 597ebc460cf86740b9f6f7c95478dece -config_hash: 6b90cee1922503e9bd207f3fa2e2080d +config_hash: 7edd3137972e87df27393a8977ba27e1 From f6662e584b189848864bbcc70dda983bc68722d5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 22:30:45 +0000 Subject: [PATCH 16/27] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8484806..7db4311 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 117 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-d40c57a05527faf060d21c0e013729f371d88017b10680cea7c8fd6780ffaef5.yml openapi_spec_hash: 597ebc460cf86740b9f6f7c95478dece -config_hash: 7edd3137972e87df27393a8977ba27e1 +config_hash: 1682d8b169494b26de4f5e9e35ff8783 From 7a888a539747ffbff138a483d6effcebcbe5dae9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 22:31:17 +0000 Subject: [PATCH 17/27] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 7db4311..e285035 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 117 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-d40c57a05527faf060d21c0e013729f371d88017b10680cea7c8fd6780ffaef5.yml openapi_spec_hash: 597ebc460cf86740b9f6f7c95478dece -config_hash: 1682d8b169494b26de4f5e9e35ff8783 +config_hash: f8876595d5174c5e94d792a5b6dc9800 From 499dcc152f2d7bd9204679c941a952edfad2599e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 22:31:56 +0000 Subject: [PATCH 18/27] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e285035..5dacb66 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 117 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-d40c57a05527faf060d21c0e013729f371d88017b10680cea7c8fd6780ffaef5.yml openapi_spec_hash: 597ebc460cf86740b9f6f7c95478dece -config_hash: f8876595d5174c5e94d792a5b6dc9800 +config_hash: 2942836fb019202301e5b92ffa6b3c0a From 035f8f75d9b5cfd99e5529317e4429d231cf372a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 22:32:30 +0000 Subject: [PATCH 19/27] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 5dacb66..2b609bf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 117 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-d40c57a05527faf060d21c0e013729f371d88017b10680cea7c8fd6780ffaef5.yml openapi_spec_hash: 597ebc460cf86740b9f6f7c95478dece -config_hash: 2942836fb019202301e5b92ffa6b3c0a +config_hash: 8521caa746275ca99eb3ba7bb3d6d90f From a64a1ea4d84d77e32e1b41227383cfa7ad66dc96 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 22:41:24 +0000 Subject: [PATCH 20/27] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 2b609bf..52b3bad 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 117 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-d40c57a05527faf060d21c0e013729f371d88017b10680cea7c8fd6780ffaef5.yml openapi_spec_hash: 597ebc460cf86740b9f6f7c95478dece -config_hash: 8521caa746275ca99eb3ba7bb3d6d90f +config_hash: 2026e2ae4b125f8b5a3c461bc321fc19 From d39a793cf9d596053a8fce450cff1ddc652797e4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 22:55:46 +0000 Subject: [PATCH 21/27] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 52b3bad..db87955 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 117 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-d40c57a05527faf060d21c0e013729f371d88017b10680cea7c8fd6780ffaef5.yml openapi_spec_hash: 597ebc460cf86740b9f6f7c95478dece -config_hash: 2026e2ae4b125f8b5a3c461bc321fc19 +config_hash: 30ce23c9cfbf8fb8be9e5dd28a2124fa From 8decd7d1a8e6d514bc32a893511a149c0015f3e4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 22:59:19 +0000 Subject: [PATCH 22/27] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index db87955..d8c6752 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 117 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-d40c57a05527faf060d21c0e013729f371d88017b10680cea7c8fd6780ffaef5.yml openapi_spec_hash: 597ebc460cf86740b9f6f7c95478dece -config_hash: 30ce23c9cfbf8fb8be9e5dd28a2124fa +config_hash: e48b11ffdd2d30680081d5436848066d From 1ab1ce5c07d11f9ded2ac3867898ab92b9fb374f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 22:59:54 +0000 Subject: [PATCH 23/27] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d8c6752..69e18b5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 117 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-d40c57a05527faf060d21c0e013729f371d88017b10680cea7c8fd6780ffaef5.yml openapi_spec_hash: 597ebc460cf86740b9f6f7c95478dece -config_hash: e48b11ffdd2d30680081d5436848066d +config_hash: 8cbd97884d5d3c1bbff50ac0a9a19595 From 8ead17997f2b3e5a3dfacdda371c592a0689b337 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 23:00:34 +0000 Subject: [PATCH 24/27] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 69e18b5..d8c6752 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 117 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-d40c57a05527faf060d21c0e013729f371d88017b10680cea7c8fd6780ffaef5.yml openapi_spec_hash: 597ebc460cf86740b9f6f7c95478dece -config_hash: 8cbd97884d5d3c1bbff50ac0a9a19595 +config_hash: e48b11ffdd2d30680081d5436848066d From 26c783debf05b6f079714b1ea61bf6248651453b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 23:01:07 +0000 Subject: [PATCH 25/27] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d8c6752..69e18b5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 117 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-d40c57a05527faf060d21c0e013729f371d88017b10680cea7c8fd6780ffaef5.yml openapi_spec_hash: 597ebc460cf86740b9f6f7c95478dece -config_hash: e48b11ffdd2d30680081d5436848066d +config_hash: 8cbd97884d5d3c1bbff50ac0a9a19595 From 4df68f8729ae8907415f4ad2c25b5e16700f7a2d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 23:01:43 +0000 Subject: [PATCH 26/27] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 69e18b5..d8c6752 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 117 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-d40c57a05527faf060d21c0e013729f371d88017b10680cea7c8fd6780ffaef5.yml openapi_spec_hash: 597ebc460cf86740b9f6f7c95478dece -config_hash: 8cbd97884d5d3c1bbff50ac0a9a19595 +config_hash: e48b11ffdd2d30680081d5436848066d From da870d6de9344f162f35a472b21f0bb6a9072e72 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 21:21:26 +0000 Subject: [PATCH 27/27] release: 0.4.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 25 +++++++++++++++++++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/x_twitter_scraper/version.rb | 2 +- 5 files changed, 29 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6b7b74c..da59f99 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.3.0" + ".": "0.4.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index c7ab913..d3dc45e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## 0.4.0 (2026-04-22) + +Full Changelog: [v0.3.0...v0.4.0](https://github.com/Xquik-dev/x-twitter-scraper-ruby/compare/v0.3.0...v0.4.0) + +### Features + +* **api:** api update ([57ca5de](https://github.com/Xquik-dev/x-twitter-scraper-ruby/commit/57ca5deef4ab9b670bc0e143c00639a8c3da1258)) +* **api:** api update ([21e1e0f](https://github.com/Xquik-dev/x-twitter-scraper-ruby/commit/21e1e0f3791b791ab09f8982edaae123ba8d45a1)) +* **api:** api update ([c053ff2](https://github.com/Xquik-dev/x-twitter-scraper-ruby/commit/c053ff2fdc9a671ff1a6d6596a97d1ebb8a33eb2)) +* **api:** api update ([f9c02a4](https://github.com/Xquik-dev/x-twitter-scraper-ruby/commit/f9c02a49240130a307fcbd1cfbcfaf999966fb06)) +* **api:** api update ([89e3ff5](https://github.com/Xquik-dev/x-twitter-scraper-ruby/commit/89e3ff5905185e6223233618819d6dc87a2e87d7)) +* **api:** api update ([dbe6467](https://github.com/Xquik-dev/x-twitter-scraper-ruby/commit/dbe6467a33987dcd3a65b78bfefca13b5123ae63)) +* **api:** api update ([279a416](https://github.com/Xquik-dev/x-twitter-scraper-ruby/commit/279a416215ad266661cac5edd02e821e2f701d60)) + + +### Bug Fixes + +* **ci:** pin rubygems/configure-rubygems-credentials to v1.0.0 ([7d2cde5](https://github.com/Xquik-dev/x-twitter-scraper-ruby/commit/7d2cde520114bba9680b2c98fbe699f75f9b5c04)) +* set homepage to docs.xquik.com, add documentation_uri to gemdocs ([0f8e806](https://github.com/Xquik-dev/x-twitter-scraper-ruby/commit/0f8e806ff20df4700054a7df0e17aa89e2da4859)) + + +### Chores + +* update SDK settings ([301d2a6](https://github.com/Xquik-dev/x-twitter-scraper-ruby/commit/301d2a616dfaf7c4ac15798a7463ecd3ef2770eb)) + ## 0.3.0 (2026-04-01) Full Changelog: [v0.2.0...v0.3.0](https://github.com/Xquik-dev/x-twitter-scraper-ruby/compare/v0.2.0...v0.3.0) diff --git a/Gemfile.lock b/Gemfile.lock index 88fc74f..1540b47 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - x-twitter-scraper (0.3.0) + x-twitter-scraper (0.4.0) cgi connection_pool diff --git a/README.md b/README.md index 4b662e3..a3783e6 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "x-twitter-scraper", "~> 0.3.0" +gem "x-twitter-scraper", "~> 0.4.0" ``` diff --git a/lib/x_twitter_scraper/version.rb b/lib/x_twitter_scraper/version.rb index ae36159..3acf7ad 100644 --- a/lib/x_twitter_scraper/version.rb +++ b/lib/x_twitter_scraper/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module XTwitterScraper - VERSION = "0.3.0" + VERSION = "0.4.0" end