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.8.0"
".": "0.9.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 124
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik/x-twitter-scraper-7bcac1557175956021a62532c55ce29b8822b5a41d0d59ae67787a6326c0ef8a.yml
openapi_spec_hash: 04e28f19097d9b59119101492100c4ab
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik/x-twitter-scraper-f688ec225c65653bb6ba3f51fe643fc69e329fa93cdc13117060d56de13823cc.yml
openapi_spec_hash: 4ad185ef874409f7cd359beed23f448f
config_hash: 217d68ca6999ad03cfc4922e9658297e
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.9.0 (2026-08-11)

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

### Features

* **api:** api update ([2647a56](https://github.com/Xquik-dev/x-twitter-scraper-ruby/commit/2647a56dbde8e668cc71e0fb233b1b86857c1e0f))

## 0.8.0 (2026-08-11)

Full Changelog: [v0.7.3...v0.8.0](https://github.com/Xquik-dev/x-twitter-scraper-ruby/compare/v0.7.3...v0.8.0)
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.8.0)
x-twitter-scraper (0.9.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.8.0"
gem "x-twitter-scraper", "~> 0.9.0"
```

<!-- x-release-please-end -->
Expand Down
10 changes: 5 additions & 5 deletions lib/x_twitter_scraper/models/credit_topup_balance_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ module Models
# @see XTwitterScraper::Resources::Credits#topup_balance
class CreditTopupBalanceResponse < XTwitterScraper::Internal::Type::BaseModel
# @!attribute redirect_url
# Stable first-party Xquik redirect URL for the active Stripe Checkout session.
# Stable Xquik redirect URL for the active checkout.
#
# @return [String]
required :redirect_url, String

# @!attribute url
# Same stable first-party Xquik redirect URL as redirect_url. The response never
# exposes a raw Stripe Checkout URL.
# Same stable Xquik redirect URL as redirect_url. The response never exposes the
# hosted checkout URL.
#
# @return [String]
required :url, String
Expand All @@ -25,9 +25,9 @@ class CreditTopupBalanceResponse < XTwitterScraper::Internal::Type::BaseModel
# Some parameter documentations has been truncated, see
# {XTwitterScraper::Models::CreditTopupBalanceResponse} for more details.
#
# @param redirect_url [String] Stable first-party Xquik redirect URL for the active Stripe Checkout session.
# @param redirect_url [String] Stable Xquik redirect URL for the active checkout.
#
# @param url [String] Same stable first-party Xquik redirect URL as redirect_url. The response never e
# @param url [String] Same stable Xquik redirect URL as redirect_url. The response never exposes the h
end
end
end
16 changes: 8 additions & 8 deletions lib/x_twitter_scraper/models/guest_wallet_create_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class GuestWalletCreateResponse < XTwitterScraper::Internal::Type::BaseModel
required :authorization, -> { XTwitterScraper::Models::GuestWalletCreateResponse::Authorization }

# @!attribute checkout_url
# Raw Stripe-hosted checkout URL for user interaction.
# Hosted checkout URL for user interaction.
#
# @return [String]
required :checkout_url, String
Expand All @@ -56,10 +56,10 @@ class GuestWalletCreateResponse < XTwitterScraper::Internal::Type::BaseModel
required :expires_at, Time

# @!attribute instructions
# Hosted checkout and status polling instructions.
#
# @return [Symbol, :"Give checkout_url to the user. They must complete payment on Stripe. Never submit payment for them. After payment, poll status_url every poll_after_seconds until latest_purchase.status is no longer pending."]
required :instructions,
const: :"Give checkout_url to the user. They must complete payment on Stripe. Never submit payment for them. After payment, poll status_url every poll_after_seconds until latest_purchase.status is no longer pending."
# @return [String]
required :instructions, String

# @!attribute poll_after_seconds
# Wait at least this long before polling status_url.
Expand Down Expand Up @@ -92,7 +92,7 @@ class GuestWalletCreateResponse < XTwitterScraper::Internal::Type::BaseModel
# @return [String]
required :wallet_id, String

# @!method initialize(amount:, api_key:, authorization:, checkout_url:, credits:, expires_at:, purchase_id:, status:, wallet_id:, account_required: false, credential_notice: :"Store api_key and the Idempotency-Key securely before sharing checkout_url. No email recovery is available.", instructions: :"Give checkout_url to the user. They must complete payment on Stripe. Never submit payment for them. After payment, poll status_url every poll_after_seconds until latest_purchase.status is no longer pending.", poll_after_seconds: 2, requires_user_interaction: true, status_url: :"https://xquik.com/api/v1/guest-wallets/status")
# @!method initialize(amount:, api_key:, authorization:, checkout_url:, credits:, expires_at:, instructions:, purchase_id:, status:, wallet_id:, account_required: false, credential_notice: :"Store api_key and the Idempotency-Key securely before sharing checkout_url. No email recovery is available.", poll_after_seconds: 2, requires_user_interaction: true, status_url: :"https://xquik.com/api/v1/guest-wallets/status")
# Some parameter documentations has been truncated, see
# {XTwitterScraper::Models::GuestWalletCreateResponse} for more details.
#
Expand All @@ -104,12 +104,14 @@ class GuestWalletCreateResponse < XTwitterScraper::Internal::Type::BaseModel
#
# @param authorization [XTwitterScraper::Models::GuestWalletCreateResponse::Authorization]
#
# @param checkout_url [String] Raw Stripe-hosted checkout URL for user interaction.
# @param checkout_url [String] Hosted checkout URL for user interaction.
#
# @param credits [String] Credits granted after verified payment.
#
# @param expires_at [Time] Time when the pending checkout expires.
#
# @param instructions [String] Hosted checkout and status polling instructions.
#
# @param purchase_id [String]
#
# @param status [Symbol, XTwitterScraper::Models::GuestWalletCreateResponse::Status]
Expand All @@ -120,8 +122,6 @@ class GuestWalletCreateResponse < XTwitterScraper::Internal::Type::BaseModel
#
# @param credential_notice [Symbol, :"Store api_key and the Idempotency-Key securely before sharing checkout_url. No email recovery is available."]
#
# @param instructions [Symbol, :"Give checkout_url to the user. They must complete payment on Stripe. Never submit payment for them. After payment, poll status_url every poll_after_seconds until latest_purchase.status is no longer pending."]
#
# @param poll_after_seconds [Integer, 2] Wait at least this long before polling status_url.
#
# @param requires_user_interaction [Boolean, true]
Expand Down
18 changes: 9 additions & 9 deletions lib/x_twitter_scraper/models/guest_wallet_topup_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class GuestWalletTopupResponse < XTwitterScraper::Internal::Type::BaseModel
required :amount, -> { XTwitterScraper::GuestWalletAmount }

# @!attribute checkout_url
# Raw Stripe-hosted checkout URL for user interaction.
# Hosted checkout URL for user interaction.
#
# @return [String]
required :checkout_url, String
Expand All @@ -38,10 +38,10 @@ class GuestWalletTopupResponse < XTwitterScraper::Internal::Type::BaseModel
required :expires_at, Time

# @!attribute instructions
# Hosted checkout and status polling instructions.
#
# @return [Symbol, :"Give checkout_url to the user. They must complete payment on Stripe. Never submit payment for them. After payment, poll status_url every poll_after_seconds until latest_purchase.status is no longer pending."]
required :instructions,
const: :"Give checkout_url to the user. They must complete payment on Stripe. Never submit payment for them. After payment, poll status_url every poll_after_seconds until latest_purchase.status is no longer pending."
# @return [String]
required :instructions, String

# @!attribute poll_after_seconds
# Wait at least this long before polling status_url.
Expand Down Expand Up @@ -92,20 +92,22 @@ class GuestWalletTopupResponse < XTwitterScraper::Internal::Type::BaseModel
optional :credential_notice,
enum: -> { XTwitterScraper::Models::GuestWalletTopupResponse::CredentialNotice }

# @!method initialize(amount:, checkout_url:, credits:, expires_at:, purchase_id:, status:, wallet_id:, api_key: nil, authorization: nil, credential_notice: nil, account_required: false, instructions: :"Give checkout_url to the user. They must complete payment on Stripe. Never submit payment for them. After payment, poll status_url every poll_after_seconds until latest_purchase.status is no longer pending.", poll_after_seconds: 2, requires_user_interaction: true, status_url: :"https://xquik.com/api/v1/guest-wallets/status")
# @!method initialize(amount:, checkout_url:, credits:, expires_at:, instructions:, purchase_id:, status:, wallet_id:, api_key: nil, authorization: nil, credential_notice: nil, account_required: false, poll_after_seconds: 2, requires_user_interaction: true, status_url: :"https://xquik.com/api/v1/guest-wallets/status")
# Some parameter documentations has been truncated, see
# {XTwitterScraper::Models::GuestWalletTopupResponse} for more details.
#
# Pending Stripe checkout and guest wallet purchase details.
# Pending hosted checkout and guest wallet purchase details.
#
# @param amount [XTwitterScraper::Models::GuestWalletAmount] Confirmed USD amount for a guest wallet purchase.
#
# @param checkout_url [String] Raw Stripe-hosted checkout URL for user interaction.
# @param checkout_url [String] Hosted checkout URL for user interaction.
#
# @param credits [String] Credits granted after verified payment.
#
# @param expires_at [Time] Time when the pending checkout expires.
#
# @param instructions [String] Hosted checkout and status polling instructions.
#
# @param purchase_id [String]
#
# @param status [Symbol, XTwitterScraper::Models::GuestWalletTopupResponse::Status]
Expand All @@ -120,8 +122,6 @@ class GuestWalletTopupResponse < XTwitterScraper::Internal::Type::BaseModel
#
# @param account_required [Boolean, false]
#
# @param instructions [Symbol, :"Give checkout_url to the user. They must complete payment on Stripe. Never submit payment for them. After payment, poll status_url every poll_after_seconds until latest_purchase.status is no longer pending."]
#
# @param poll_after_seconds [Integer, 2] Wait at least this long before polling status_url.
#
# @param requires_user_interaction [Boolean, true]
Expand Down
4 changes: 2 additions & 2 deletions lib/x_twitter_scraper/resources/credits.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ def retrieve_topup_status(params)
)
end

# Create a Stripe Checkout session only after the user confirms. The request never
# completes payment or adds credits by itself.
# Create a hosted checkout only after the user confirms. The request never
# completes payment or adds credits.
#
# @overload topup_balance(dollars:, locale: nil, request_options: {})
#
Expand Down
22 changes: 9 additions & 13 deletions lib/x_twitter_scraper/resources/guest_wallets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ class GuestWallets
# Some parameter documentations has been truncated, see
# {XTwitterScraper::Models::GuestWalletCreateParams} for more details.
#
# Create a one-use Stripe-hosted checkout after the user explicitly confirms a
# $10-$250 USD amount. This request creates no charge by itself. The user opens
# checkout_url on Stripe. This endpoint returns the paid-read API key without
# requiring an Xquik account, email, dashboard, or Xquik web page. An idempotent
# replay returns the same key.
# Create a one-use hosted checkout after the user confirms $10-$250 USD. The
# request creates no charge. It returns a paid-read API key without an Xquik
# account. Replays return the same key.
#
# @overload create(amount_minor:, idempotency_key:, currency: :usd, request_options: {})
#
Expand Down Expand Up @@ -44,10 +42,9 @@ def create(params)
)
end

# Poll after Stripe payment. Use usable to decide whether paid reads can run. An
# active wallet can remain usable while a top-up is pending. A new wallet becomes
# usable only after verified webhook fulfillment. Send the guest key as
# Authorization: Bearer.
# Poll after payment. Use usable to decide whether paid reads can run. An active
# wallet can remain usable while a top-up is pending. A new wallet becomes usable
# only after payment is verified. Send the guest key as Authorization: Bearer.
#
# @overload retrieve_status(request_options: {})
#
Expand All @@ -69,10 +66,9 @@ def retrieve_status(params = {})
# Some parameter documentations has been truncated, see
# {XTwitterScraper::Models::GuestWalletTopupParams} for more details.
#
# Create a one-use Stripe-hosted checkout for an existing paid-read guest key
# after the user explicitly confirms a $10-$250 USD amount. The key remains the
# same. This request creates no charge by itself and never redirects through an
# Xquik web page.
# Create a one-use hosted checkout after the user confirms a $10-$250 USD amount
# for an existing paid-read guest key. The key remains the same. This request
# creates no charge and never redirects through Xquik.
#
# @overload topup(amount_minor:, idempotency_key:, currency: :usd, request_options: {})
#
Expand Down
2 changes: 1 addition & 1 deletion lib/x_twitter_scraper/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
# frozen_string_literal: true

module XTwitterScraper
VERSION = "0.8.0"
VERSION = "0.9.0"
end
12 changes: 6 additions & 6 deletions rbi/x_twitter_scraper/models/credit_topup_balance_response.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ module XTwitterScraper
)
end

# Stable first-party Xquik redirect URL for the active Stripe Checkout session.
# Stable Xquik redirect URL for the active checkout.
sig { returns(String) }
attr_accessor :redirect_url

# Same stable first-party Xquik redirect URL as redirect_url. The response never
# exposes a raw Stripe Checkout URL.
# Same stable Xquik redirect URL as redirect_url. The response never exposes the
# hosted checkout URL.
sig { returns(String) }
attr_accessor :url

sig do
params(redirect_url: String, url: String).returns(T.attached_class)
end
def self.new(
# Stable first-party Xquik redirect URL for the active Stripe Checkout session.
# Stable Xquik redirect URL for the active checkout.
redirect_url:,
# Same stable first-party Xquik redirect URL as redirect_url. The response never
# exposes a raw Stripe Checkout URL.
# Same stable Xquik redirect URL as redirect_url. The response never exposes the
# hosted checkout URL.
url:
)
end
Expand Down
14 changes: 8 additions & 6 deletions rbi/x_twitter_scraper/models/guest_wallet_create_response.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module XTwitterScraper
end
attr_writer :authorization

# Raw Stripe-hosted checkout URL for user interaction.
# Hosted checkout URL for user interaction.
sig { returns(String) }
attr_accessor :checkout_url

Expand All @@ -60,7 +60,8 @@ module XTwitterScraper
sig { returns(Time) }
attr_accessor :expires_at

sig { returns(Symbol) }
# Hosted checkout and status polling instructions.
sig { returns(String) }
attr_accessor :instructions

# Wait at least this long before polling status_url.
Expand Down Expand Up @@ -96,13 +97,13 @@ module XTwitterScraper
checkout_url: String,
credits: String,
expires_at: Time,
instructions: String,
purchase_id: String,
status:
XTwitterScraper::Models::GuestWalletCreateResponse::Status::OrSymbol,
wallet_id: String,
account_required: T::Boolean,
credential_notice: Symbol,
instructions: Symbol,
poll_after_seconds: Integer,
requires_user_interaction: T::Boolean,
status_url: Symbol
Expand All @@ -115,18 +116,19 @@ module XTwitterScraper
# secret. Never place it in a URL or log.
api_key:,
authorization:,
# Raw Stripe-hosted checkout URL for user interaction.
# Hosted checkout URL for user interaction.
checkout_url:,
# Credits granted after verified payment.
credits:,
# Time when the pending checkout expires.
expires_at:,
# Hosted checkout and status polling instructions.
instructions:,
purchase_id:,
status:,
wallet_id:,
account_required: false,
credential_notice: :"Store api_key and the Idempotency-Key securely before sharing checkout_url. No email recovery is available.",
instructions: :"Give checkout_url to the user. They must complete payment on Stripe. Never submit payment for them. After payment, poll status_url every poll_after_seconds until latest_purchase.status is no longer pending.",
# Wait at least this long before polling status_url.
poll_after_seconds: 2,
requires_user_interaction: true,
Expand All @@ -146,7 +148,7 @@ module XTwitterScraper
credential_notice: Symbol,
credits: String,
expires_at: Time,
instructions: Symbol,
instructions: String,
poll_after_seconds: Integer,
purchase_id: String,
requires_user_interaction: T::Boolean,
Expand Down
Loading