Skip to content

Commit 29437b1

Browse files
release: 0.4.0 (#10)
* codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * feat(api): api update * codegen metadata * feat(api): api update * feat(api): api update * codegen metadata * feat(api): api update * codegen metadata * fix: ensure file data are only sent as 1 parameter * codegen metadata * codegen metadata * perf(client): optimize file structure copying in multipart requests * chore: sync OpenAPI spec * chore: wire production_repo for all targets * fix: escape ampersand in OpenAPI summaries for C# XML docs * release: 0.4.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 483b5a6 commit 29437b1

84 files changed

Lines changed: 803 additions & 2368 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish-pypi.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ jobs:
1212
publish:
1313
name: publish
1414
runs-on: ubuntu-latest
15-
permissions:
16-
contents: read
17-
id-token: write
1815

1916
steps:
2017
- uses: actions/checkout@v6
@@ -27,3 +24,5 @@ jobs:
2724
- name: Publish to PyPI
2825
run: |
2926
bash ./bin/publish-pypi
27+
env:
28+
PYPI_TOKEN: ${{ secrets.X_TWITTER_SCRAPER_PYPI_TOKEN || secrets.PYPI_TOKEN }}

.github/workflows/release-doctor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ jobs:
1717
- name: Check release environment
1818
run: |
1919
bash ./bin/check-release-environment
20+
env:
21+
PYPI_TOKEN: ${{ secrets.X_TWITTER_SCRAPER_PYPI_TOKEN || secrets.PYPI_TOKEN }}

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.3.1"
2+
".": "0.4.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 117
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-d40c57a05527faf060d21c0e013729f371d88017b10680cea7c8fd6780ffaef5.yml
3-
openapi_spec_hash: 597ebc460cf86740b9f6f7c95478dece
4-
config_hash: 30ce23c9cfbf8fb8be9e5dd28a2124fa
1+
configured_endpoints: 110
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-2adc33156b4b42a4be18cc20c0205b38f0432d7958da99c65ee9b3f6a555ea0e.yml
3+
openapi_spec_hash: be760f5620a268521d6793f65576a61f
4+
config_hash: 320a9cb2f1293d1a7b73c63ab5865af5

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
# Changelog
22

3+
## 0.4.0 (2026-04-22)
4+
5+
Full Changelog: [v0.3.1...v0.4.0](https://github.com/Xquik-dev/x-twitter-scraper-python/compare/v0.3.1...v0.4.0)
6+
7+
### Features
8+
9+
* **api:** api update ([ea97c97](https://github.com/Xquik-dev/x-twitter-scraper-python/commit/ea97c97b83f9388dfe339655bd7e1e2f39bf8537))
10+
* **api:** api update ([9ab5907](https://github.com/Xquik-dev/x-twitter-scraper-python/commit/9ab59079a7538deaedc38cb221ba6421ff4dd39a))
11+
* **api:** api update ([e6edd37](https://github.com/Xquik-dev/x-twitter-scraper-python/commit/e6edd371ab5a80748ae26a0173206e89634c5da5))
12+
* **api:** api update ([8e576ed](https://github.com/Xquik-dev/x-twitter-scraper-python/commit/8e576ed647806a054a3f6b7f3be7dbcaffb36aef))
13+
14+
15+
### Bug Fixes
16+
17+
* ensure file data are only sent as 1 parameter ([c86dcf1](https://github.com/Xquik-dev/x-twitter-scraper-python/commit/c86dcf186aed37ef154028b708bc9cdf3a56bf39))
18+
* escape ampersand in OpenAPI summaries for C# XML docs ([d2d9141](https://github.com/Xquik-dev/x-twitter-scraper-python/commit/d2d9141e286e7f032f9aec934e93f33414c7221e))
19+
20+
21+
### Performance Improvements
22+
23+
* **client:** optimize file structure copying in multipart requests ([eb0688d](https://github.com/Xquik-dev/x-twitter-scraper-python/commit/eb0688d0ae9da72c17a1b3550e0221d2f81a9ef4))
24+
25+
26+
### Chores
27+
28+
* sync OpenAPI spec ([e7bfdb7](https://github.com/Xquik-dev/x-twitter-scraper-python/commit/e7bfdb76972a4d2c6b5ddb5f0f1f815579fd175d))
29+
* wire production_repo for all targets ([18d4cc3](https://github.com/Xquik-dev/x-twitter-scraper-python/commit/18d4cc3d3c5796aaa637f3841224dfaa9e076a5b))
30+
331
## 0.3.1 (2026-04-08)
432

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

README.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -117,24 +117,6 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ
117117

118118
Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
119119

120-
## Nested params
121-
122-
Nested parameters are dictionaries, typed using `TypedDict`, for example:
123-
124-
```python
125-
from x_twitter_scraper import XTwitterScraper
126-
127-
client = XTwitterScraper()
128-
129-
integration = client.integrations.create(
130-
config={"chat_id": "-1001234567890"},
131-
event_types=["tweet.new", "follower.gained"],
132-
name="My Telegram Bot",
133-
type="telegram",
134-
)
135-
print(integration.config)
136-
```
137-
138120
## File uploads
139121

140122
Request parameters that correspond to file uploads can be passed as `bytes`, or a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.

api.md

Lines changed: 10 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
# Shared Types
22

33
```python
4-
from x_twitter_scraper.types import Error, EventType, PaginatedTweets, PaginatedUsers
4+
from x_twitter_scraper.types import (
5+
Error,
6+
EventType,
7+
PaginatedTweets,
8+
PaginatedUsers,
9+
SearchTweet,
10+
UserProfile,
11+
)
512
```
613

714
# Account
@@ -219,31 +226,6 @@ Methods:
219226
- <code title="get /webhooks/{id}/deliveries">client.webhooks.<a href="./src/x_twitter_scraper/resources/webhooks.py">list_deliveries</a>(id) -> <a href="./src/x_twitter_scraper/types/webhook_list_deliveries_response.py">WebhookListDeliveriesResponse</a></code>
220227
- <code title="post /webhooks/{id}/test">client.webhooks.<a href="./src/x_twitter_scraper/resources/webhooks.py">test</a>(id) -> <a href="./src/x_twitter_scraper/types/webhook_test_response.py">WebhookTestResponse</a></code>
221228

222-
# Integrations
223-
224-
Types:
225-
226-
```python
227-
from x_twitter_scraper.types import (
228-
Integration,
229-
IntegrationDelivery,
230-
IntegrationListResponse,
231-
IntegrationDeleteResponse,
232-
IntegrationListDeliveriesResponse,
233-
IntegrationSendTestResponse,
234-
)
235-
```
236-
237-
Methods:
238-
239-
- <code title="post /integrations">client.integrations.<a href="./src/x_twitter_scraper/resources/integrations.py">create</a>(\*\*<a href="src/x_twitter_scraper/types/integration_create_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/integration.py">Integration</a></code>
240-
- <code title="get /integrations/{id}">client.integrations.<a href="./src/x_twitter_scraper/resources/integrations.py">retrieve</a>(id) -> <a href="./src/x_twitter_scraper/types/integration.py">Integration</a></code>
241-
- <code title="patch /integrations/{id}">client.integrations.<a href="./src/x_twitter_scraper/resources/integrations.py">update</a>(id, \*\*<a href="src/x_twitter_scraper/types/integration_update_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/integration.py">Integration</a></code>
242-
- <code title="get /integrations">client.integrations.<a href="./src/x_twitter_scraper/resources/integrations.py">list</a>() -> <a href="./src/x_twitter_scraper/types/integration_list_response.py">IntegrationListResponse</a></code>
243-
- <code title="delete /integrations/{id}">client.integrations.<a href="./src/x_twitter_scraper/resources/integrations.py">delete</a>(id) -> <a href="./src/x_twitter_scraper/types/integration_delete_response.py">IntegrationDeleteResponse</a></code>
244-
- <code title="get /integrations/{id}/deliveries">client.integrations.<a href="./src/x_twitter_scraper/resources/integrations.py">list_deliveries</a>(id, \*\*<a href="src/x_twitter_scraper/types/integration_list_deliveries_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/integration_list_deliveries_response.py">IntegrationListDeliveriesResponse</a></code>
245-
- <code title="post /integrations/{id}/test">client.integrations.<a href="./src/x_twitter_scraper/resources/integrations.py">send_test</a>(id) -> <a href="./src/x_twitter_scraper/types/integration_send_test_response.py">IntegrationSendTestResponse</a></code>
246-
247229
# X
248230

249231
Types:
@@ -261,15 +243,14 @@ Methods:
261243
- <code title="get /x/articles/{tweetId}">client.x.<a href="./src/x_twitter_scraper/resources/x/x.py">get_article</a>(tweet_id) -> <a href="./src/x_twitter_scraper/types/x_get_article_response.py">XGetArticleResponse</a></code>
262244
- <code title="get /x/timeline">client.x.<a href="./src/x_twitter_scraper/resources/x/x.py">get_home_timeline</a>(\*\*<a href="src/x_twitter_scraper/types/x_get_home_timeline_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/shared/paginated_tweets.py">PaginatedTweets</a></code>
263245
- <code title="get /x/notifications">client.x.<a href="./src/x_twitter_scraper/resources/x/x.py">get_notifications</a>(\*\*<a href="src/x_twitter_scraper/types/x_get_notifications_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/x_get_notifications_response.py">XGetNotificationsResponse</a></code>
264-
- <code title="get /x/trends">client.x.<a href="./src/x_twitter_scraper/resources/x/x.py">get_trends</a>() -> <a href="./src/x_twitter_scraper/types/x_get_trends_response.py">XGetTrendsResponse</a></code>
246+
- <code title="get /x/trends">client.x.<a href="./src/x_twitter_scraper/resources/x/x.py">get_trends</a>(\*\*<a href="src/x_twitter_scraper/types/x_get_trends_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/x_get_trends_response.py">XGetTrendsResponse</a></code>
265247

266248
## Tweets
267249

268250
Types:
269251

270252
```python
271253
from x_twitter_scraper.types.x import (
272-
SearchTweet,
273254
TweetAuthor,
274255
TweetDetail,
275256
TweetCreateResponse,
@@ -319,15 +300,9 @@ Methods:
319300

320301
## Users
321302

322-
Types:
323-
324-
```python
325-
from x_twitter_scraper.types.x import UserProfile
326-
```
327-
328303
Methods:
329304

330-
- <code title="get /x/users/{id}">client.x.users.<a href="./src/x_twitter_scraper/resources/x/users/users.py">retrieve</a>(id) -> <a href="./src/x_twitter_scraper/types/x/user_profile.py">UserProfile</a></code>
305+
- <code title="get /x/users/{id}">client.x.users.<a href="./src/x_twitter_scraper/resources/x/users/users.py">retrieve</a>(id) -> <a href="./src/x_twitter_scraper/types/shared/user_profile.py">UserProfile</a></code>
331306
- <code title="get /x/users/batch">client.x.users.<a href="./src/x_twitter_scraper/resources/x/users/users.py">retrieve_batch</a>(\*\*<a href="src/x_twitter_scraper/types/x/user_retrieve_batch_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/shared/paginated_users.py">PaginatedUsers</a></code>
332307
- <code title="get /x/users/{id}/followers">client.x.users.<a href="./src/x_twitter_scraper/resources/x/users/users.py">retrieve_followers</a>(id, \*\*<a href="src/x_twitter_scraper/types/x/user_retrieve_followers_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/shared/paginated_users.py">PaginatedUsers</a></code>
333308
- <code title="get /x/users/{id}/followers-you-know">client.x.users.<a href="./src/x_twitter_scraper/resources/x/users/users.py">retrieve_followers_you_know</a>(id, \*\*<a href="src/x_twitter_scraper/types/x/user_retrieve_followers_you_know_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/shared/paginated_users.py">PaginatedUsers</a></code>

bin/check-release-environment

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
errors=()
44

5+
if [ -z "${PYPI_TOKEN}" ]; then
6+
errors+=("The PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
7+
fi
8+
59
lenErrors=${#errors[@]}
610

711
if [[ lenErrors -gt 0 ]]; then

bin/publish-pypi

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,4 @@ set -eux
44
rm -rf dist
55
mkdir -p dist
66
uv build
7-
if [ -n "${PYPI_TOKEN:-}" ]; then
8-
uv publish --token=$PYPI_TOKEN
9-
else
10-
uv publish
11-
fi
7+
uv publish --token=$PYPI_TOKEN

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "x_twitter_scraper"
3-
version = "0.3.1"
3+
version = "0.4.0"
44
description = "The official Python library for the x-twitter-scraper API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

0 commit comments

Comments
 (0)