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.9.0"
".": "0.10.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.10.0 (2026-08-11)

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

### Features

* **api:** api update ([0382bcc](https://github.com/Xquik-dev/x-twitter-scraper-python/commit/0382bcc811e1705b67dd83e49249447c5684ae76))

## 0.9.0 (2026-08-11)

Full Changelog: [v0.8.1...v0.9.0](https://github.com/Xquik-dev/x-twitter-scraper-python/compare/v0.8.1...v0.9.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "x_twitter_scraper"
version = "0.9.0"
version = "0.10.0"
description = "Python library for the Xquik API. Not affiliated with X Corp."
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/x_twitter_scraper/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "x_twitter_scraper"
__version__ = "0.9.0" # x-release-please-version
__version__ = "0.10.0" # x-release-please-version
8 changes: 4 additions & 4 deletions src/x_twitter_scraper/resources/credits.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ def topup_balance(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CreditTopupBalanceResponse:
"""Create a Stripe Checkout session only after the user confirms.
"""Create a hosted checkout only after the user confirms.

The request never
completes payment or adds credits by itself.
completes payment or adds credits.

Args:
dollars: Amount to top up in US dollars. Minimum 10.
Expand Down Expand Up @@ -331,10 +331,10 @@ async def topup_balance(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CreditTopupBalanceResponse:
"""Create a Stripe Checkout session only after the user confirms.
"""Create a hosted checkout only after the user confirms.

The request never
completes payment or adds credits by itself.
completes payment or adds credits.

Args:
dollars: Amount to top up in US dollars. Minimum 10.
Expand Down
54 changes: 24 additions & 30 deletions src/x_twitter_scraper/resources/guest_wallets.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,11 @@ def create(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> GuestWalletCreateResponse:
"""
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.

Args:
amount_minor: USD cents accepted for this checkout.
Expand Down Expand Up @@ -112,12 +111,11 @@ def retrieve_status(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> GuestWalletRetrieveStatusResponse:
"""Poll after Stripe payment.
"""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 verified webhook fulfillment. Send the guest key as
Authorization: Bearer.
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.
"""
return self._get(
"/guest-wallets/status",
Expand Down Expand Up @@ -145,10 +143,9 @@ def topup(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> GuestWalletTopupResponse:
"""
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.

Args:
amount_minor: USD cents accepted for this checkout.
Expand Down Expand Up @@ -217,12 +214,11 @@ async def create(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> GuestWalletCreateResponse:
"""
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.

Args:
amount_minor: USD cents accepted for this checkout.
Expand Down Expand Up @@ -265,12 +261,11 @@ async def retrieve_status(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> GuestWalletRetrieveStatusResponse:
"""Poll after Stripe payment.
"""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 verified webhook fulfillment. Send the guest key as
Authorization: Bearer.
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.
"""
return await self._get(
"/guest-wallets/status",
Expand Down Expand Up @@ -298,10 +293,9 @@ async def topup(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> GuestWalletTopupResponse:
"""
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.

Args:
amount_minor: USD cents accepted for this checkout.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

class CreditTopupBalanceResponse(BaseModel):
redirect_url: str
"""Stable first-party Xquik redirect URL for the active Stripe Checkout session."""
"""Stable Xquik redirect URL for the active checkout."""

url: str
"""Same stable first-party Xquik redirect URL as redirect_url.
"""Same stable Xquik redirect URL as redirect_url.

The response never exposes a raw Stripe Checkout URL.
The response never exposes the hosted checkout URL.
"""
7 changes: 3 additions & 4 deletions src/x_twitter_scraper/types/guest_wallet_create_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class GuestWalletCreateResponse(BaseModel):
authorization: Authorization

checkout_url: str
"""Raw Stripe-hosted checkout URL for user interaction."""
"""Hosted checkout URL for user interaction."""

credential_notice: Literal[
"Store api_key and the Idempotency-Key securely before sharing checkout_url. No email recovery is available."
Expand All @@ -48,9 +48,8 @@ class GuestWalletCreateResponse(BaseModel):
expires_at: datetime
"""Time when the pending checkout expires."""

instructions: Literal[
"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."
]
instructions: str
"""Hosted checkout and status polling instructions."""

poll_after_seconds: Literal[2]
"""Wait at least this long before polling status_url."""
Expand Down
9 changes: 4 additions & 5 deletions src/x_twitter_scraper/types/guest_wallet_topup_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,24 @@ class Authorization(BaseModel):


class GuestWalletTopupResponse(BaseModel):
"""Pending Stripe checkout and guest wallet purchase details."""
"""Pending hosted checkout and guest wallet purchase details."""

account_required: Literal[False]

amount: GuestWalletAmount
"""Confirmed USD amount for a guest wallet purchase."""

checkout_url: str
"""Raw Stripe-hosted checkout URL for user interaction."""
"""Hosted checkout URL for user interaction."""

credits: str
"""Credits granted after verified payment."""

expires_at: datetime
"""Time when the pending checkout expires."""

instructions: Literal[
"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."
]
instructions: str
"""Hosted checkout and status polling instructions."""

poll_after_seconds: Literal[2]
"""Wait at least this long before polling status_url."""
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.