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.6.1"
".": "0.7.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.7.0 (2026-07-29)

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

### Features

* **api:** api update ([b63b37b](https://github.com/Xquik-dev/x-twitter-scraper-python/commit/b63b37b882b4d227a542f0404604927912b60e99))
* **api:** api update ([533e09c](https://github.com/Xquik-dev/x-twitter-scraper-python/commit/533e09c3b13682cc872ad9bac273dbc9f3de00ac))

## 0.6.1 (2026-07-28)

Full Changelog: [v0.6.0...v0.6.1](https://github.com/Xquik-dev/x-twitter-scraper-python/compare/v0.6.0...v0.6.1)
Expand Down
15 changes: 13 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@ Types:
from x_twitter_scraper.types.x import (
XAccount,
XAccountDetail,
AccountCreateResponse,
AccountListResponse,
AccountDeleteResponse,
AccountBulkRetryResponse,
Expand All @@ -470,7 +469,7 @@ from x_twitter_scraper.types.x import (

Methods:

- <code title="post /x/accounts">client.x.accounts.<a href="./src/x_twitter_scraper/resources/x/accounts.py">create</a>(\*\*<a href="src/x_twitter_scraper/types/x/account_create_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/x/account_create_response.py">AccountCreateResponse</a></code>
- <code title="post /x/accounts">client.x.accounts.<a href="./src/x_twitter_scraper/resources/x/accounts.py">create</a>(\*\*<a href="src/x_twitter_scraper/types/x/account_create_params.py">params</a>) -> object</code>
- <code title="get /x/accounts/{id}">client.x.accounts.<a href="./src/x_twitter_scraper/resources/x/accounts.py">retrieve</a>(id) -> <a href="./src/x_twitter_scraper/types/x/x_account_detail.py">XAccountDetail</a></code>
- <code title="get /x/accounts">client.x.accounts.<a href="./src/x_twitter_scraper/resources/x/accounts.py">list</a>() -> <a href="./src/x_twitter_scraper/types/x/account_list_response.py">AccountListResponse</a></code>
- <code title="delete /x/accounts/{id}">client.x.accounts.<a href="./src/x_twitter_scraper/resources/x/accounts.py">delete</a>(id) -> <a href="./src/x_twitter_scraper/types/x/account_delete_response.py">AccountDeleteResponse</a></code>
Expand All @@ -489,6 +488,18 @@ Methods:

- <code title="post /x/account-connection-challenges/{id}/submit">client.x.account_connection_challenges.<a href="./src/x_twitter_scraper/resources/x/account_connection_challenges.py">submit</a>(id, \*\*<a href="src/x_twitter_scraper/types/x/account_connection_challenge_submit_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/x/account_connection_challenge_submit_response.py">AccountConnectionChallengeSubmitResponse</a></code>

## AccountConnectionAttempts

Types:

```python
from x_twitter_scraper.types.x import AccountConnectionAttemptRetrieveResponse
```

Methods:

- <code title="get /x/account-connection-attempts/{id}">client.x.account_connection_attempts.<a href="./src/x_twitter_scraper/resources/x/account_connection_attempts.py">retrieve</a>(id) -> <a href="./src/x_twitter_scraper/types/x/account_connection_attempt_retrieve_response.py">AccountConnectionAttemptRetrieveResponse</a></code>

## Bookmarks

Types:
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.6.1"
version = "0.7.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.6.1" # x-release-please-version
__version__ = "0.7.0" # x-release-please-version
48 changes: 24 additions & 24 deletions src/x_twitter_scraper/resources/compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ def create(
) -> ComposeCreateResponse:
"""Run one step of Xquik's three-step writing workflow.

Compose returns questions
and editorial rules. Refine returns goal-specific guidance. Score applies
deterministic text checks. It does not predict reach or expose X ranking
weights.
Compose returns questions,
editorial rules, and source-specific Radar recommendations. Refine returns
goal-specific guidance. Score applies deterministic text checks. It does not
predict reach or expose X ranking weights.

Args:
topic: Subject for the post.
Expand Down Expand Up @@ -109,10 +109,10 @@ def create(
) -> ComposeCreateResponse:
"""Run one step of Xquik's three-step writing workflow.

Compose returns questions
and editorial rules. Refine returns goal-specific guidance. Score applies
deterministic text checks. It does not predict reach or expose X ranking
weights.
Compose returns questions,
editorial rules, and source-specific Radar recommendations. Refine returns
goal-specific guidance. Score applies deterministic text checks. It does not
predict reach or expose X ranking weights.

Args:
goal: Editorial goal for the guidance.
Expand Down Expand Up @@ -154,10 +154,10 @@ def create(
) -> ComposeCreateResponse:
"""Run one step of Xquik's three-step writing workflow.

Compose returns questions
and editorial rules. Refine returns goal-specific guidance. Score applies
deterministic text checks. It does not predict reach or expose X ranking
weights.
Compose returns questions,
editorial rules, and source-specific Radar recommendations. Refine returns
goal-specific guidance. Score applies deterministic text checks. It does not
predict reach or expose X ranking weights.

Args:
draft: Full post text for deterministic editorial checks.
Expand Down Expand Up @@ -267,10 +267,10 @@ async def create(
) -> ComposeCreateResponse:
"""Run one step of Xquik's three-step writing workflow.

Compose returns questions
and editorial rules. Refine returns goal-specific guidance. Score applies
deterministic text checks. It does not predict reach or expose X ranking
weights.
Compose returns questions,
editorial rules, and source-specific Radar recommendations. Refine returns
goal-specific guidance. Score applies deterministic text checks. It does not
predict reach or expose X ranking weights.

Args:
topic: Subject for the post.
Expand Down Expand Up @@ -309,10 +309,10 @@ async def create(
) -> ComposeCreateResponse:
"""Run one step of Xquik's three-step writing workflow.

Compose returns questions
and editorial rules. Refine returns goal-specific guidance. Score applies
deterministic text checks. It does not predict reach or expose X ranking
weights.
Compose returns questions,
editorial rules, and source-specific Radar recommendations. Refine returns
goal-specific guidance. Score applies deterministic text checks. It does not
predict reach or expose X ranking weights.

Args:
goal: Editorial goal for the guidance.
Expand Down Expand Up @@ -354,10 +354,10 @@ async def create(
) -> ComposeCreateResponse:
"""Run one step of Xquik's three-step writing workflow.

Compose returns questions
and editorial rules. Refine returns goal-specific guidance. Score applies
deterministic text checks. It does not predict reach or expose X ranking
weights.
Compose returns questions,
editorial rules, and source-specific Radar recommendations. Refine returns
goal-specific guidance. Score applies deterministic text checks. It does not
predict reach or expose X ranking weights.

Args:
draft: Full post text for deterministic editorial checks.
Expand Down
14 changes: 14 additions & 0 deletions src/x_twitter_scraper/resources/x/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@
WriteActionsResourceWithStreamingResponse,
AsyncWriteActionsResourceWithStreamingResponse,
)
from .account_connection_attempts import (
AccountConnectionAttemptsResource,
AsyncAccountConnectionAttemptsResource,
AccountConnectionAttemptsResourceWithRawResponse,
AsyncAccountConnectionAttemptsResourceWithRawResponse,
AccountConnectionAttemptsResourceWithStreamingResponse,
AsyncAccountConnectionAttemptsResourceWithStreamingResponse,
)
from .account_connection_challenges import (
AccountConnectionChallengesResource,
AsyncAccountConnectionChallengesResource,
Expand Down Expand Up @@ -170,6 +178,12 @@
"AsyncAccountConnectionChallengesResourceWithRawResponse",
"AccountConnectionChallengesResourceWithStreamingResponse",
"AsyncAccountConnectionChallengesResourceWithStreamingResponse",
"AccountConnectionAttemptsResource",
"AsyncAccountConnectionAttemptsResource",
"AccountConnectionAttemptsResourceWithRawResponse",
"AsyncAccountConnectionAttemptsResourceWithRawResponse",
"AccountConnectionAttemptsResourceWithStreamingResponse",
"AsyncAccountConnectionAttemptsResourceWithStreamingResponse",
"BookmarksResource",
"AsyncBookmarksResource",
"BookmarksResourceWithRawResponse",
Expand Down
180 changes: 180 additions & 0 deletions src/x_twitter_scraper/resources/x/account_connection_attempts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing import Any, cast

import httpx

from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._utils import path_template
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
from ..._base_client import make_request_options
from ...types.x.account_connection_attempt_retrieve_response import AccountConnectionAttemptRetrieveResponse

__all__ = ["AccountConnectionAttemptsResource", "AsyncAccountConnectionAttemptsResource"]


class AccountConnectionAttemptsResource(SyncAPIResource):
"""Connected X account management"""

@cached_property
def with_raw_response(self) -> AccountConnectionAttemptsResourceWithRawResponse:
"""
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.

For more information, see https://www.github.com/Xquik-dev/x-twitter-scraper-python#accessing-raw-response-data-eg-headers
"""
return AccountConnectionAttemptsResourceWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> AccountConnectionAttemptsResourceWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/Xquik-dev/x-twitter-scraper-python#with_streaming_response
"""
return AccountConnectionAttemptsResourceWithStreamingResponse(self)

def retrieve(
self,
id: str,
*,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AccountConnectionAttemptRetrieveResponse:
"""
Get X account connection status

Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return cast(
AccountConnectionAttemptRetrieveResponse,
self._get(
path_template("/x/account-connection-attempts/{id}", id=id),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=cast(
Any, AccountConnectionAttemptRetrieveResponse
), # Union types cannot be passed in as arguments in the type system
),
)


class AsyncAccountConnectionAttemptsResource(AsyncAPIResource):
"""Connected X account management"""

@cached_property
def with_raw_response(self) -> AsyncAccountConnectionAttemptsResourceWithRawResponse:
"""
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.

For more information, see https://www.github.com/Xquik-dev/x-twitter-scraper-python#accessing-raw-response-data-eg-headers
"""
return AsyncAccountConnectionAttemptsResourceWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> AsyncAccountConnectionAttemptsResourceWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/Xquik-dev/x-twitter-scraper-python#with_streaming_response
"""
return AsyncAccountConnectionAttemptsResourceWithStreamingResponse(self)

async def retrieve(
self,
id: str,
*,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AccountConnectionAttemptRetrieveResponse:
"""
Get X account connection status

Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return cast(
AccountConnectionAttemptRetrieveResponse,
await self._get(
path_template("/x/account-connection-attempts/{id}", id=id),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=cast(
Any, AccountConnectionAttemptRetrieveResponse
), # Union types cannot be passed in as arguments in the type system
),
)


class AccountConnectionAttemptsResourceWithRawResponse:
def __init__(self, account_connection_attempts: AccountConnectionAttemptsResource) -> None:
self._account_connection_attempts = account_connection_attempts

self.retrieve = to_raw_response_wrapper(
account_connection_attempts.retrieve,
)


class AsyncAccountConnectionAttemptsResourceWithRawResponse:
def __init__(self, account_connection_attempts: AsyncAccountConnectionAttemptsResource) -> None:
self._account_connection_attempts = account_connection_attempts

self.retrieve = async_to_raw_response_wrapper(
account_connection_attempts.retrieve,
)


class AccountConnectionAttemptsResourceWithStreamingResponse:
def __init__(self, account_connection_attempts: AccountConnectionAttemptsResource) -> None:
self._account_connection_attempts = account_connection_attempts

self.retrieve = to_streamed_response_wrapper(
account_connection_attempts.retrieve,
)


class AsyncAccountConnectionAttemptsResourceWithStreamingResponse:
def __init__(self, account_connection_attempts: AsyncAccountConnectionAttemptsResource) -> None:
self._account_connection_attempts = account_connection_attempts

self.retrieve = async_to_streamed_response_wrapper(
account_connection_attempts.retrieve,
)
Loading