Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.5.7"
".": "0.6.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 122
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik/x-twitter-scraper-26de9a1d18b92c9472fcc289877ba281ae305db846b7b14065142e26c7637d72.yml
openapi_spec_hash: f90f7016413291fdcbedb986385dc3ae
config_hash: 17c84052d27489691ee6dd861cc56e24
configured_endpoints: 123
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik/x-twitter-scraper-323137ebb1ee9824cd9cfb63a325c0839deb81f17244e42e8154d6567e7af954.yml
openapi_spec_hash: 48da9c2747c1e7c474dd514d39c28c49
config_hash: dab26921eb273c16e5570c0485c9ac2c
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.6.0 (2026-07-29)

Full Changelog: [v0.5.7...v0.6.0](https://github.com/Xquik-dev/x-twitter-scraper-ruby/compare/v0.5.7...v0.6.0)

### Features

* **api:** api update ([d172abc](https://github.com/Xquik-dev/x-twitter-scraper-ruby/commit/d172abc0808630d97fdf92e38903f60519a34ae1))
* **api:** api update ([7696e0c](https://github.com/Xquik-dev/x-twitter-scraper-ruby/commit/7696e0cb8c594b5c71fe1813dc84012100afb3fc))

## 0.5.7 (2026-07-28)

Full Changelog: [v0.5.6...v0.5.7](https://github.com/Xquik-dev/x-twitter-scraper-ruby/compare/v0.5.6...v0.5.7)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
x-twitter-scraper (0.5.7)
x-twitter-scraper (0.6.0)
base64
cgi
connection_pool
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Add the gem to your `Gemfile`:
<!-- x-release-please-start-version -->

```ruby
gem "x-twitter-scraper", "~> 0.5.7"
gem "x-twitter-scraper", "~> 0.6.0"
```

<!-- x-release-please-end -->
Expand Down
3 changes: 3 additions & 0 deletions lib/x_twitter_scraper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@
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_connection_attempt_retrieve_params"
require_relative "x_twitter_scraper/models/x/account_connection_attempt_retrieve_response"
require_relative "x_twitter_scraper/models/x/account_connection_challenge_submit_params"
require_relative "x_twitter_scraper/models/x/account_connection_challenge_submit_response"
require_relative "x_twitter_scraper/models/x/account_create_params"
Expand Down Expand Up @@ -304,6 +306,7 @@
require_relative "x_twitter_scraper/resources/trends"
require_relative "x_twitter_scraper/resources/webhooks"
require_relative "x_twitter_scraper/resources/x"
require_relative "x_twitter_scraper/resources/x/account_connection_attempts"
require_relative "x_twitter_scraper/resources/x/account_connection_challenges"
require_relative "x_twitter_scraper/resources/x/accounts"
require_relative "x_twitter_scraper/resources/x/bookmarks"
Expand Down
63 changes: 62 additions & 1 deletion lib/x_twitter_scraper/models/compose_create_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ class ComposePrepareResult < XTwitterScraper::Internal::Type::BaseModel
# @return [String]
required :next_step, String, api_name: :nextStep

# @!attribute radar_recommendations
# Sources and guidance for researching a fresh post angle.
#
# @return [Array<XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation>]
required :radar_recommendations,
-> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation] },
api_name: :radarRecommendations

# @!attribute scorer_weights
# Published signal names with unpublished weights as null.
#
Expand Down Expand Up @@ -97,7 +105,7 @@ class ComposePrepareResult < XTwitterScraper::Internal::Type::BaseModel
# @return [Array<String>, nil]
optional :style_tweets, XTwitterScraper::Internal::Type::ArrayOf[String], api_name: :styleTweets

# @!method initialize(content_rules:, engagement_multipliers:, engagement_velocity:, follow_up_questions:, intent_url:, next_step:, scorer_weights:, source:, top_penalties:, saved_styles: nil, style_note: nil, style_tweets: nil)
# @!method initialize(content_rules:, engagement_multipliers:, engagement_velocity:, follow_up_questions:, intent_url:, next_step:, radar_recommendations:, scorer_weights:, source:, top_penalties:, saved_styles: nil, style_note: nil, style_tweets: nil)
# Some parameter documentations has been truncated, see
# {XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult} for more
# details.
Expand All @@ -114,6 +122,8 @@ class ComposePrepareResult < XTwitterScraper::Internal::Type::BaseModel
#
# @param next_step [String]
#
# @param radar_recommendations [Array<XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation>] Sources and guidance for researching a fresh post angle.
#
# @param scorer_weights [Array<XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::ScorerWeight>] Published signal names with unpublished weights as null.
#
# @param source [String] Signal source and evidence limits.
Expand Down Expand Up @@ -154,6 +164,57 @@ class EngagementMultiplier < XTwitterScraper::Internal::Type::BaseModel
# @param multiplier [Symbol, :"Production weight not published by X"]
end

class RadarRecommendation < XTwitterScraper::Internal::Type::BaseModel
# @!attribute endpoint
# Radar endpoint for this source.
#
# @return [String]
required :endpoint, String

# @!attribute guidance
# Source-specific drafting guidance.
#
# @return [String]
required :guidance, String

# @!attribute source
#
# @return [Symbol, XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation::Source]
required :source,
enum: -> { XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation::Source }

# @!attribute use_for
# Current-topic research this source supports.
#
# @return [String]
required :use_for, String, api_name: :useFor

# @!method initialize(endpoint:, guidance:, source:, use_for:)
# @param endpoint [String] Radar endpoint for this source.
#
# @param guidance [String] Source-specific drafting guidance.
#
# @param source [Symbol, XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation::Source]
#
# @param use_for [String] Current-topic research this source supports.

# @see XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::RadarRecommendation#source
module Source
extend XTwitterScraper::Internal::Type::Enum

REDDIT = :reddit
GITHUB = :github
TRUSTMRR = :trustmrr
HACKER_NEWS = :hacker_news
GOOGLE_TRENDS = :google_trends
WIKIPEDIA = :wikipedia
POLYMARKET = :polymarket

# @!method self.values
# @return [Array<Symbol>]
end
end

class ScorerWeight < XTwitterScraper::Internal::Type::BaseModel
# @!attribute context
# Signal direction and publication limit.
Expand Down
151 changes: 144 additions & 7 deletions lib/x_twitter_scraper/models/radar_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,42 @@ class RadarItem < XTwitterScraper::Internal::Type::BaseModel
required :created_at, Time, api_name: :createdAt

# @!attribute language
# BCP-47 language code. und means the source did not identify a language.
#
# @return [String]
required :language, String

# @!attribute metadata
# Source-specific fields. Shape varies per source:
#
# - reddit: { subreddit: string, author: string }
# - reddit: { author, authorId?, subreddit, subredditId?, subredditSubscribers?,
# sourceFormat, score?, upvoteRatio?, estimatedUpvotes?, estimatedDownvotes?,
# numberComments?, numberCrossposts?, selftext?, contentUrl?, domain?,
# postHint?, linkFlairText?, distinguished?, totalAwardsReceived?, viewCount?,
# editedAt?, galleryImageUrls?, redditVideo?, archived?, contestMode?,
# isCrosspostable?, isMeta?, isNsfw?, isOriginalContent?, isRobotIndexable?,
# isSelf?, isSpoiler?, isVideo?, locked?, stickied? }. `score` is Reddit's
# public net score. Exact public upvote and downvote counts are not available.
# Estimated counts derive from the public score and upvote ratio, which Reddit
# may fuzz. Comment bodies are not included. Current items combine public
# listing discovery with server-rendered post data and use `sourceFormat: html`;
# `json` and `rss` remain for legacy rows.
# - github: { starsToday: number }
# - hacker_news: { points: number, numberComments: number }
# - google_trends: { approxTraffic: number }
# - polymarket: { volume24hr: number }
# - wikipedia: { views: number }
# - trustmrr: { mrr, growthPercent, last30Days, total, customers,
# activeSubscriptions, onSale, xHandle?, category?, askingPrice?, country?,
# growthMrrPercent?, multiple?, paymentProvider?, rank? }
# foundedDate?, googleSearchImpressionsLast30Days?, growthMrrPercent?,
# multiple?, paymentProvider?, profitMarginLast30Days?, rank?,
# revenuePerVisitor?, targetAudience?, visitorsLast30Days? } For the startup
# growth source, xHandle is the founder's X username without @. The rank field
# is the source's revenue rank. Result order represents reported 30-day
# revenue-growth rank.
#
# @return [Hash{Symbol=>Object}]
required :metadata, XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown]
# @return [XTwitterScraper::Models::RadarItem::Metadata]
required :metadata, -> { XTwitterScraper::RadarItem::Metadata }

# @!attribute published_at
#
Expand Down Expand Up @@ -81,6 +98,7 @@ class RadarItem < XTwitterScraper::Internal::Type::BaseModel
optional :description, String

# @!attribute image_url
# Source image. Startup growth items return the logo here.
#
# @return [String, nil]
optional :image_url, String, api_name: :imageUrl
Expand All @@ -103,9 +121,9 @@ class RadarItem < XTwitterScraper::Internal::Type::BaseModel
#
# @param created_at [Time]
#
# @param language [String]
# @param language [String] BCP-47 language code. und means the source did not identify a language.
#
# @param metadata [Hash{Symbol=>Object}] Source-specific fields. Shape varies per source:
# @param metadata [XTwitterScraper::Models::RadarItem::Metadata] Source-specific fields. Shape varies per source:
#
# @param published_at [Time]
#
Expand All @@ -121,7 +139,7 @@ class RadarItem < XTwitterScraper::Internal::Type::BaseModel
#
# @param description [String]
#
# @param image_url [String]
# @param image_url [String] Source image. Startup growth items return the logo here.
#
# @param url [String]

Expand All @@ -142,6 +160,125 @@ module Category
# @return [Array<Symbol>]
end

# @see XTwitterScraper::Models::RadarItem#metadata
class Metadata < XTwitterScraper::Internal::Type::BaseModel
# @!attribute author
#
# @return [String, nil]
optional :author, String

# @!attribute content_url
#
# @return [String, nil]
optional :content_url, String, api_name: :contentUrl

# @!attribute estimated_downvotes
#
# @return [Integer, nil]
optional :estimated_downvotes, Integer, api_name: :estimatedDownvotes

# @!attribute estimated_upvotes
#
# @return [Integer, nil]
optional :estimated_upvotes, Integer, api_name: :estimatedUpvotes

# @!attribute number_comments
#
# @return [Integer, nil]
optional :number_comments, Integer, api_name: :numberComments

# @!attribute score
#
# @return [Integer, nil]
optional :score, Integer

# @!attribute selftext
#
# @return [String, nil]
optional :selftext, String

# @!attribute source_format
# Current items use html. json and rss are retained for legacy rows.
#
# @return [Symbol, XTwitterScraper::Models::RadarItem::Metadata::SourceFormat, nil]
optional :source_format,
enum: -> { XTwitterScraper::RadarItem::Metadata::SourceFormat },
api_name: :sourceFormat

# @!attribute subreddit
#
# @return [String, nil]
optional :subreddit, String

# @!attribute upvote_ratio
#
# @return [Float, nil]
optional :upvote_ratio, Float, api_name: :upvoteRatio

# @!method initialize(author: nil, content_url: nil, estimated_downvotes: nil, estimated_upvotes: nil, number_comments: nil, score: nil, selftext: nil, source_format: nil, subreddit: nil, upvote_ratio: nil)
# Source-specific fields. Shape varies per source:
#
# - reddit: { author, authorId?, subreddit, subredditId?, subredditSubscribers?,
# sourceFormat, score?, upvoteRatio?, estimatedUpvotes?, estimatedDownvotes?,
# numberComments?, numberCrossposts?, selftext?, contentUrl?, domain?,
# postHint?, linkFlairText?, distinguished?, totalAwardsReceived?, viewCount?,
# editedAt?, galleryImageUrls?, redditVideo?, archived?, contestMode?,
# isCrosspostable?, isMeta?, isNsfw?, isOriginalContent?, isRobotIndexable?,
# isSelf?, isSpoiler?, isVideo?, locked?, stickied? }. `score` is Reddit's
# public net score. Exact public upvote and downvote counts are not available.
# Estimated counts derive from the public score and upvote ratio, which Reddit
# may fuzz. Comment bodies are not included. Current items combine public
# listing discovery with server-rendered post data and use `sourceFormat: html`;
# `json` and `rss` remain for legacy rows.
# - github: { starsToday: number }
# - hacker_news: { points: number, numberComments: number }
# - google_trends: { approxTraffic: number }
# - polymarket: { volume24hr: number }
# - wikipedia: { views: number }
# - trustmrr: { mrr, growthPercent, last30Days, total, customers,
# activeSubscriptions, onSale, xHandle?, category?, askingPrice?, country?,
# foundedDate?, googleSearchImpressionsLast30Days?, growthMrrPercent?,
# multiple?, paymentProvider?, profitMarginLast30Days?, rank?,
# revenuePerVisitor?, targetAudience?, visitorsLast30Days? } For the startup
# growth source, xHandle is the founder's X username without @. The rank field
# is the source's revenue rank. Result order represents reported 30-day
# revenue-growth rank.
#
# @param author [String]
#
# @param content_url [String]
#
# @param estimated_downvotes [Integer]
#
# @param estimated_upvotes [Integer]
#
# @param number_comments [Integer]
#
# @param score [Integer]
#
# @param selftext [String]
#
# @param source_format [Symbol, XTwitterScraper::Models::RadarItem::Metadata::SourceFormat] Current items use html. json and rss are retained for legacy rows.
#
# @param subreddit [String]
#
# @param upvote_ratio [Float]

# Current items use html. json and rss are retained for legacy rows.
#
# @see XTwitterScraper::Models::RadarItem::Metadata#source_format
module SourceFormat
extend XTwitterScraper::Internal::Type::Enum

HTML = :html
JSON = :json
RSS = :rss

# @!method self.values
# @return [Array<Symbol>]
end
end

# @see XTwitterScraper::Models::RadarItem#source
module Source
extend XTwitterScraper::Internal::Type::Enum
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# frozen_string_literal: true

module XTwitterScraper
module Models
module X
# @see XTwitterScraper::Resources::X::AccountConnectionAttempts#retrieve
class AccountConnectionAttemptRetrieveParams < 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
Loading