Skip to content

Commit 39bca47

Browse files
authored
Merge pull request #45 from fa0311/develop
Develop
2 parents f49f2e1 + 4ab69e1 commit 39bca47

5 files changed

Lines changed: 15 additions & 7 deletions

File tree

twitter_openapi_python/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "twitter_openapi_python"
3-
version = "0.0.37"
3+
version = "0.0.40"
44
description = "Twitter OpenAPI"
55
authors = ["fa0311 <yuki@yuki0311.com>"]
66
license = "proprietary" # or "AGPL-3.0-only"
@@ -14,6 +14,7 @@ include = ["twitter_openapi_python/py.typed"]
1414
python = "^3.7"
1515
pydantic = ">=2.6"
1616
urllib3 = ">= 2.1.0 < 3.0.0"
17+
xclienttransaction = ">= 1.0.0 < 2.0.0"
1718

1819
twitter-openapi-python-generated = "0.0.33"
1920

34 Bytes
Binary file not shown.

twitter_openapi_python/setup.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
from setuptools import find_packages, setup
66

77
NAME = "twitter_openapi_python"
8-
VERSION = "0.0.37"
8+
VERSION = "0.0.40"
99
PYTHON_REQUIRES = ">=3.7"
10-
REQUIRES = ["twitter_openapi_python_generated == 0.0.33", "pydantic >= 2.6", "urllib3 >= 2.1.0, < 3.0.0"]
10+
REQUIRES = [
11+
"twitter_openapi_python_generated == 0.0.33",
12+
"pydantic >= 2.6",
13+
"urllib3 >= 2.1.0, < 3.0.0",
14+
"xclienttransaction >= 1.0.0, < 2.0.0"
15+
]
1116
GITHUB_RAW_URL = (
1217
"https://raw.githubusercontent.com/fa0311/twitter_openapi_python/refs/heads/master/twitter_openapi_python/"
1318
)

twitter_openapi_python/test/api/test_1_tweet_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ def test_get_bookmarks(self):
6060
print_tweet(tweet)
6161

6262
def test_get_community_tweets_timeline(self):
63-
result = self.client.get_community_tweets_timeline()
63+
result = self.client.get_community_tweets_timeline(community_id="1489422448332197888")
6464
for tweet in list(filter(self.ad_fillter, result.data.data)):
6565
print_tweet(tweet)
6666

6767
def test_get_community_media_timeline(self):
68-
result = self.client.get_community_media_timeline()
68+
result = self.client.get_community_media_timeline(community_id="1489422448332197888")
6969
for tweet in list(filter(self.ad_fillter, result.data.data)):
7070
print_tweet(tweet)
7171

twitter_openapi_python/twitter_openapi_python/api/tweet_api.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,12 +301,13 @@ def get_bookmarks(
301301

302302
def get_community_tweets_timeline(
303303
self,
304+
community_id: str,
304305
cursor: Optional[str] = None,
305306
count: Optional[int] = None,
306307
rankingMode: Optional[Literal["Recency", "Relevance"]] = None,
307308
extra_param: Optional[ParamType] = None,
308309
) -> ResponseType:
309-
param: ParamType = {}
310+
param: ParamType = {"communityId": community_id}
310311
if cursor is not None:
311312
param["cursor"] = cursor
312313
if count is not None:
@@ -328,11 +329,12 @@ def get_community_tweets_timeline(
328329

329330
def get_community_media_timeline(
330331
self,
332+
community_id: str,
331333
cursor: Optional[str] = None,
332334
count: Optional[int] = None,
333335
extra_param: Optional[ParamType] = None,
334336
) -> ResponseType:
335-
param: ParamType = {}
337+
param: ParamType = {"communityId": community_id}
336338
if cursor is not None:
337339
param["cursor"] = cursor
338340
if count is not None:

0 commit comments

Comments
 (0)