From 7939e1203b5605da558e59833780d917111c9deb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Mon, 12 May 2025 01:25:48 +0900 Subject: [PATCH 1/3] update communityId MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- twitter_openapi_python/pyproject.toml | 2 +- twitter_openapi_python/setup.py | 2 +- .../twitter_openapi_python/api/tweet_api.py | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/twitter_openapi_python/pyproject.toml b/twitter_openapi_python/pyproject.toml index c197ad5..8d49d72 100644 --- a/twitter_openapi_python/pyproject.toml +++ b/twitter_openapi_python/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "twitter_openapi_python" -version = "0.0.37" +version = "0.0.38" description = "Twitter OpenAPI" authors = ["fa0311 "] license = "proprietary" # or "AGPL-3.0-only" diff --git a/twitter_openapi_python/setup.py b/twitter_openapi_python/setup.py index 93da89c..e2a276d 100644 --- a/twitter_openapi_python/setup.py +++ b/twitter_openapi_python/setup.py @@ -5,7 +5,7 @@ from setuptools import find_packages, setup NAME = "twitter_openapi_python" -VERSION = "0.0.37" +VERSION = "0.0.38" PYTHON_REQUIRES = ">=3.7" REQUIRES = ["twitter_openapi_python_generated == 0.0.33", "pydantic >= 2.6", "urllib3 >= 2.1.0, < 3.0.0"] GITHUB_RAW_URL = ( diff --git a/twitter_openapi_python/twitter_openapi_python/api/tweet_api.py b/twitter_openapi_python/twitter_openapi_python/api/tweet_api.py index f37ec97..3e93e8f 100644 --- a/twitter_openapi_python/twitter_openapi_python/api/tweet_api.py +++ b/twitter_openapi_python/twitter_openapi_python/api/tweet_api.py @@ -301,12 +301,13 @@ def get_bookmarks( def get_community_tweets_timeline( self, + communityId: str, cursor: Optional[str] = None, count: Optional[int] = None, rankingMode: Optional[Literal["Recency", "Relevance"]] = None, extra_param: Optional[ParamType] = None, ) -> ResponseType: - param: ParamType = {} + param: ParamType = {"communityId": communityId} if cursor is not None: param["cursor"] = cursor if count is not None: @@ -328,11 +329,12 @@ def get_community_tweets_timeline( def get_community_media_timeline( self, + communityId: str, cursor: Optional[str] = None, count: Optional[int] = None, extra_param: Optional[ParamType] = None, ) -> ResponseType: - param: ParamType = {} + param: ParamType = {"communityId": communityId} if cursor is not None: param["cursor"] = cursor if count is not None: From d75f6b9dde9f0028ed621f9357b47bcc51629deb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Mon, 12 May 2025 01:28:25 +0900 Subject: [PATCH 2/3] update 0.0.39 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- twitter_openapi_python/pyproject.toml | 2 +- twitter_openapi_python/setup.py | 2 +- twitter_openapi_python/test/api/test_1_tweet_api.py | 4 ++-- .../twitter_openapi_python/api/tweet_api.py | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/twitter_openapi_python/pyproject.toml b/twitter_openapi_python/pyproject.toml index 8d49d72..69df687 100644 --- a/twitter_openapi_python/pyproject.toml +++ b/twitter_openapi_python/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "twitter_openapi_python" -version = "0.0.38" +version = "0.0.39" description = "Twitter OpenAPI" authors = ["fa0311 "] license = "proprietary" # or "AGPL-3.0-only" diff --git a/twitter_openapi_python/setup.py b/twitter_openapi_python/setup.py index e2a276d..3297332 100644 --- a/twitter_openapi_python/setup.py +++ b/twitter_openapi_python/setup.py @@ -5,7 +5,7 @@ from setuptools import find_packages, setup NAME = "twitter_openapi_python" -VERSION = "0.0.38" +VERSION = "0.0.39" PYTHON_REQUIRES = ">=3.7" REQUIRES = ["twitter_openapi_python_generated == 0.0.33", "pydantic >= 2.6", "urllib3 >= 2.1.0, < 3.0.0"] GITHUB_RAW_URL = ( diff --git a/twitter_openapi_python/test/api/test_1_tweet_api.py b/twitter_openapi_python/test/api/test_1_tweet_api.py index 7d01349..a212a07 100644 --- a/twitter_openapi_python/test/api/test_1_tweet_api.py +++ b/twitter_openapi_python/test/api/test_1_tweet_api.py @@ -60,12 +60,12 @@ def test_get_bookmarks(self): print_tweet(tweet) def test_get_community_tweets_timeline(self): - result = self.client.get_community_tweets_timeline() + result = self.client.get_community_tweets_timeline(community_id="1489422448332197888") for tweet in list(filter(self.ad_fillter, result.data.data)): print_tweet(tweet) def test_get_community_media_timeline(self): - result = self.client.get_community_media_timeline() + result = self.client.get_community_media_timeline(community_id="1489422448332197888") for tweet in list(filter(self.ad_fillter, result.data.data)): print_tweet(tweet) diff --git a/twitter_openapi_python/twitter_openapi_python/api/tweet_api.py b/twitter_openapi_python/twitter_openapi_python/api/tweet_api.py index 3e93e8f..3bffc88 100644 --- a/twitter_openapi_python/twitter_openapi_python/api/tweet_api.py +++ b/twitter_openapi_python/twitter_openapi_python/api/tweet_api.py @@ -301,13 +301,13 @@ def get_bookmarks( def get_community_tweets_timeline( self, - communityId: str, + community_id: str, cursor: Optional[str] = None, count: Optional[int] = None, rankingMode: Optional[Literal["Recency", "Relevance"]] = None, extra_param: Optional[ParamType] = None, ) -> ResponseType: - param: ParamType = {"communityId": communityId} + param: ParamType = {"communityId": community_id} if cursor is not None: param["cursor"] = cursor if count is not None: @@ -329,12 +329,12 @@ def get_community_tweets_timeline( def get_community_media_timeline( self, - communityId: str, + community_id: str, cursor: Optional[str] = None, count: Optional[int] = None, extra_param: Optional[ParamType] = None, ) -> ResponseType: - param: ParamType = {"communityId": communityId} + param: ParamType = {"communityId": community_id} if cursor is not None: param["cursor"] = cursor if count is not None: From 4ab69e153ac7e39218bd2d8f096d6ef7bc178967 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Sun, 15 Jun 2025 22:44:14 +0900 Subject: [PATCH 3/3] fix #44 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- twitter_openapi_python/pyproject.toml | 3 ++- twitter_openapi_python/requirements.txt | Bin 240 -> 274 bytes twitter_openapi_python/setup.py | 9 +++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/twitter_openapi_python/pyproject.toml b/twitter_openapi_python/pyproject.toml index 69df687..87f7d16 100644 --- a/twitter_openapi_python/pyproject.toml +++ b/twitter_openapi_python/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "twitter_openapi_python" -version = "0.0.39" +version = "0.0.40" description = "Twitter OpenAPI" authors = ["fa0311 "] license = "proprietary" # or "AGPL-3.0-only" @@ -14,6 +14,7 @@ include = ["twitter_openapi_python/py.typed"] python = "^3.7" pydantic = ">=2.6" urllib3 = ">= 2.1.0 < 3.0.0" +xclienttransaction = ">= 1.0.0 < 2.0.0" twitter-openapi-python-generated = "0.0.33" diff --git a/twitter_openapi_python/requirements.txt b/twitter_openapi_python/requirements.txt index 579bf2aa1fa32abd5f74b283508acf07cdccb411..1a889a343cbfc0e9a986c945e0650f5fea107a6b 100644 GIT binary patch delta 88 zcmeysIEiV(I{pfVWQH7uOomj3Jcbg6l8Fb!?d%wA859@{8T1$oz*q;!vjJiwxCk!; V7Xt_v0kst}lmf|Opypz*7yuj&4#WTe delta 54 zcmbQl^nr20I$>T0E`|sOXNDYxOomj3Jcbg6kcoT6B|ySOK!HMrQXp9j6fR}}i2(pw C8w(%+ diff --git a/twitter_openapi_python/setup.py b/twitter_openapi_python/setup.py index 3297332..950765c 100644 --- a/twitter_openapi_python/setup.py +++ b/twitter_openapi_python/setup.py @@ -5,9 +5,14 @@ from setuptools import find_packages, setup NAME = "twitter_openapi_python" -VERSION = "0.0.39" +VERSION = "0.0.40" PYTHON_REQUIRES = ">=3.7" -REQUIRES = ["twitter_openapi_python_generated == 0.0.33", "pydantic >= 2.6", "urllib3 >= 2.1.0, < 3.0.0"] +REQUIRES = [ + "twitter_openapi_python_generated == 0.0.33", + "pydantic >= 2.6", + "urllib3 >= 2.1.0, < 3.0.0", + "xclienttransaction >= 1.0.0, < 2.0.0" +] GITHUB_RAW_URL = ( "https://raw.githubusercontent.com/fa0311/twitter_openapi_python/refs/heads/master/twitter_openapi_python/" )