@@ -27,3 +27,34 @@ async def fetch_user_post_tweet(self, userId: str, count: int = 20, cursor: str
27
27
endpoint = "/api/v1/twitter/web/fetch_user_post_tweet"
28
28
data = await self .client .fetch_get_json (f"{ endpoint } ?userId={ userId } &count={ count } &cursor={ cursor } " )
29
29
return data
30
+
31
+ # SearchTimeline | 搜索时间线
32
+ async def fetch_search_timeline (self , rawQuery : str , count : int = 20 , product : str = 'Top' , cursor : str = None ):
33
+ endpoint = "/api/v1/twitter/web/fetch_search_timeline"
34
+ data = await self .client .fetch_get_json (f"{ endpoint } ?rawQuery={ rawQuery } &count={ count } &product={ product } &cursor={ cursor } " )
35
+ return data
36
+
37
+ # Post Comments | 获取评论
38
+ async def fetch_post_comments (self , tweetId : str , rankingModel : str = 'Relevance' , cursor : str = None ):
39
+ endpoint = "/api/v1/twitter/web/fetch_post_comments"
40
+ data = await self .client .fetch_get_json (f"{ endpoint } ?tweetId={ tweetId } &rankingModel={ rankingModel } &cursor={ cursor } " )
41
+ return data
42
+
43
+ # Fetch user tweet replies | 获取用户推文回复
44
+ async def fetch_user_tweet_replies (self , userId : str , count : int = 20 , cursor : str = None ):
45
+ endpoint = "/api/v1/twitter/web/fetch_user_tweet_replies"
46
+ data = await self .client .fetch_get_json (f"{ endpoint } ?userId={ userId } &count={ count } &cursor={ cursor } " )
47
+ return data
48
+
49
+ # UserHighlightsTweets | 获取用户高光推文
50
+ async def fetch_user_highlights_tweets (self , userId : str , count : int = 20 , cursor : str = None ):
51
+ endpoint = "/api/v1/twitter/web/fetch_user_highlights_tweets"
52
+ data = await self .client .fetch_get_json (f"{ endpoint } ?userId={ userId } &count={ count } &cursor={ cursor } " )
53
+ return data
54
+
55
+ # UserMedia | 获取用户媒体
56
+ async def fetch_user_media (self , userId : str , count : int = 20 , cursor : str = None ):
57
+ endpoint = "/api/v1/twitter/web/fetch_user_media"
58
+ data = await self .client .fetch_get_json (f"{ endpoint } ?userId={ userId } &count={ count } &cursor={ cursor } " )
59
+ return data
60
+
0 commit comments