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
3 changes: 2 additions & 1 deletion twitter_openapi_python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "twitter_openapi_python"
version = "0.0.37"
version = "0.0.40"
description = "Twitter OpenAPI"
authors = ["fa0311 <yuki@yuki0311.com>"]
license = "proprietary" # or "AGPL-3.0-only"
Expand All @@ -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"

Expand Down
Binary file modified twitter_openapi_python/requirements.txt
Binary file not shown.
9 changes: 7 additions & 2 deletions twitter_openapi_python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@
from setuptools import find_packages, setup

NAME = "twitter_openapi_python"
VERSION = "0.0.37"
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/"
)
Expand Down
4 changes: 2 additions & 2 deletions twitter_openapi_python/test/api/test_1_tweet_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,13 @@ def get_bookmarks(

def get_community_tweets_timeline(
self,
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 = {}
param: ParamType = {"communityId": community_id}
if cursor is not None:
param["cursor"] = cursor
if count is not None:
Expand All @@ -328,11 +329,12 @@ def get_community_tweets_timeline(

def get_community_media_timeline(
self,
community_id: str,
cursor: Optional[str] = None,
count: Optional[int] = None,
extra_param: Optional[ParamType] = None,
) -> ResponseType:
param: ParamType = {}
param: ParamType = {"communityId": community_id}
if cursor is not None:
param["cursor"] = cursor
if count is not None:
Expand Down