File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " twitter_openapi_python"
3- version = " 0.0.37 "
3+ version = " 0.0.40 "
44description = " Twitter OpenAPI"
55authors = [" fa0311 <yuki@yuki0311.com>" ]
66license = " proprietary" # or "AGPL-3.0-only"
@@ -14,6 +14,7 @@ include = ["twitter_openapi_python/py.typed"]
1414python = " ^3.7"
1515pydantic = " >=2.6"
1616urllib3 = " >= 2.1.0 < 3.0.0"
17+ xclienttransaction = " >= 1.0.0 < 2.0.0"
1718
1819twitter-openapi-python-generated = " 0.0.33"
1920
Original file line number Diff line number Diff line change 55from setuptools import find_packages , setup
66
77NAME = "twitter_openapi_python"
8- VERSION = "0.0.37 "
8+ VERSION = "0.0.40 "
99PYTHON_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+ ]
1116GITHUB_RAW_URL = (
1217 "https://raw.githubusercontent.com/fa0311/twitter_openapi_python/refs/heads/master/twitter_openapi_python/"
1318)
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 :
You can’t perform that action at this time.
0 commit comments