Skip to content

Commit 6c7e2bd

Browse files
justoneapigithub-actions[bot]
authored andcommitted
chore: sync OpenAPI spec and generated SDK
1 parent 8fe5053 commit 6c7e2bd

9 files changed

Lines changed: 1519 additions & 274 deletions

File tree

justoneapi/generated/resources/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from justoneapi.generated.resources.instagram import InstagramResource
1414
from justoneapi.generated.resources.jd import JdResource
1515
from justoneapi.generated.resources.kuaishou import KuaishouResource
16+
from justoneapi.generated.resources.llm import LlmResource
1617
from justoneapi.generated.resources.reddit import RedditResource
1718
from justoneapi.generated.resources.search import SearchResource
1819
from justoneapi.generated.resources.taobao import TaobaoResource
@@ -43,6 +44,7 @@
4344
"instagram": InstagramResource,
4445
"jd": JdResource,
4546
"kuaishou": KuaishouResource,
47+
"llm": LlmResource,
4648
"reddit": RedditResource,
4749
"search": SearchResource,
4850
"taobao": TaobaoResource,
@@ -74,6 +76,7 @@
7476
"InstagramResource",
7577
"JdResource",
7678
"KuaishouResource",
79+
"LlmResource",
7780
"RedditResource",
7881
"SearchResource",
7982
"TaobaoResource",

justoneapi/generated/resources/douyin.py

Lines changed: 63 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -9,69 +9,6 @@
99
class DouyinResource(BaseResource):
1010
"""Generated resource for Douyin (TikTok China)."""
1111

12-
def get_user_detail_v3(
13-
self,
14-
*,
15-
sec_uid: str,
16-
) -> ApiResponse[Any]:
17-
"""
18-
User Profile
19-
20-
Get Douyin (TikTok China) user Profile data, including follower counts, verification status, and bio details, for creator research and account analysis.
21-
22-
Args:
23-
sec_uid: The unique user ID (sec_uid) on Douyin.
24-
"""
25-
return self._get(
26-
"/api/douyin/get-user-detail/v3",
27-
{
28-
"secUid": sec_uid,
29-
},
30-
)
31-
32-
def get_user_video_list_v3(
33-
self,
34-
*,
35-
sec_uid: str,
36-
max_cursor: int | None = 0,
37-
) -> ApiResponse[Any]:
38-
"""
39-
User Published Videos
40-
41-
Get Douyin (TikTok China) user Published Videos data, including captions, covers, and publish times, for account monitoring.
42-
43-
Args:
44-
sec_uid: The unique user ID (sec_uid) on Douyin.
45-
max_cursor: Pagination cursor; use 0 for the first page, and the `max_cursor` from the previous response for subsequent pages.
46-
"""
47-
return self._get(
48-
"/api/douyin/get-user-video-list/v3",
49-
{
50-
"secUid": sec_uid,
51-
"maxCursor": max_cursor,
52-
},
53-
)
54-
55-
def get_video_detail_v2(
56-
self,
57-
*,
58-
video_id: str,
59-
) -> ApiResponse[Any]:
60-
"""
61-
Video Details
62-
63-
Get Douyin (TikTok China) video Details data, including author details, publish time, and engagement counts, for video research, archiving, and performance analysis.
64-
65-
Args:
66-
video_id: The unique video identifier (aweme_id or model_id).
67-
"""
68-
return self._get(
69-
"/api/douyin/get-video-detail/v2",
70-
{
71-
"videoId": video_id,
72-
},
73-
)
74-
7512
def search_video_v4(
7613
self,
7714
*,
@@ -133,6 +70,49 @@ def search_user_v2(
13370
},
13471
)
13572

73+
def get_user_video_list_v3(
74+
self,
75+
*,
76+
sec_uid: str,
77+
max_cursor: int | None = 0,
78+
) -> ApiResponse[Any]:
79+
"""
80+
User Published Videos
81+
82+
Get Douyin (TikTok China) user Published Videos data, including captions, covers, and publish times, for account monitoring.
83+
84+
Args:
85+
sec_uid: The unique user ID (sec_uid) on Douyin.
86+
max_cursor: Pagination cursor; use 0 for the first page, and the `max_cursor` from the previous response for subsequent pages.
87+
"""
88+
return self._get(
89+
"/api/douyin/get-user-video-list/v3",
90+
{
91+
"secUid": sec_uid,
92+
"maxCursor": max_cursor,
93+
},
94+
)
95+
96+
def get_video_detail_v2(
97+
self,
98+
*,
99+
video_id: str,
100+
) -> ApiResponse[Any]:
101+
"""
102+
Video Details
103+
104+
Get Douyin (TikTok China) video Details data, including author details, publish time, and engagement counts, for video research, archiving, and performance analysis.
105+
106+
Args:
107+
video_id: The unique video identifier (aweme_id or model_id).
108+
"""
109+
return self._get(
110+
"/api/douyin/get-video-detail/v2",
111+
{
112+
"videoId": video_id,
113+
},
114+
)
115+
136116
def get_video_comment_v1(
137117
self,
138118
*,
@@ -179,6 +159,26 @@ def get_video_sub_comment_v1(
179159
},
180160
)
181161

162+
def get_user_detail_v3(
163+
self,
164+
*,
165+
sec_uid: str,
166+
) -> ApiResponse[Any]:
167+
"""
168+
User Profile
169+
170+
Get Douyin (TikTok China) user Profile data, including follower counts, verification status, and bio details, for creator research and account analysis.
171+
172+
Args:
173+
sec_uid: The unique user ID (sec_uid) on Douyin.
174+
"""
175+
return self._get(
176+
"/api/douyin/get-user-detail/v3",
177+
{
178+
"secUid": sec_uid,
179+
},
180+
)
181+
182182
def share_url_transfer_v1(
183183
self,
184184
*,

justoneapi/generated/resources/kuaishou.py

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,29 @@
99
class KuaishouResource(BaseResource):
1010
"""Generated resource for Kuaishou."""
1111

12+
def search_video_v2(
13+
self,
14+
*,
15+
keyword: str,
16+
page: int | None = 1,
17+
) -> ApiResponse[Any]:
18+
"""
19+
Video Search
20+
21+
Get Kuaishou video Search data, including video ID, cover image, and description, for competitive analysis and market trends and keywords monitoring and brand tracking.
22+
23+
Args:
24+
keyword: The search keyword to find videos.
25+
page: Page number for results, starting from 1.
26+
"""
27+
return self._get(
28+
"/api/kuaishou/search-video/v2",
29+
{
30+
"keyword": keyword,
31+
"page": page,
32+
},
33+
)
34+
1235
def search_user_v2(
1336
self,
1437
*,
@@ -75,26 +98,31 @@ def get_video_detail_v2(
7598
},
7699
)
77100

78-
def search_video_v2(
101+
def get_video_comment_v1(
79102
self,
80103
*,
81-
keyword: str,
82-
page: int | None = 1,
104+
video_id: str,
105+
pcursor: str | None = None,
83106
) -> ApiResponse[Any]:
84107
"""
85-
Video Search
108+
Video Comments
86109
87-
Get Kuaishou video Search data, including video ID, cover image, and description, for competitive analysis and market trends and keywords monitoring and brand tracking.
110+
Retrieves public comments of a Kuaishou video, including comment content,
111+
author info, like count, and reply count.
112+
113+
Typical use cases:
114+
- Sentiment analysis and community feedback monitoring
115+
- Gathering engagement data for specific videos
88116
89117
Args:
90-
keyword: The search keyword to find videos.
91-
page: Page number for results, starting from 1.
118+
video_id: The unique ID of the Kuaishou video, e.g. `3xbknvct79h46h9` or refer_photo_id `177012131237`
119+
pcursor: Pagination cursor for subsequent pages.
92120
"""
93121
return self._get(
94-
"/api/kuaishou/search-video/v2",
122+
"/api/kuaishou/get-video-comment/v1",
95123
{
96-
"keyword": keyword,
97-
"page": page,
124+
"videoId": video_id,
125+
"pcursor": pcursor,
98126
},
99127
)
100128

@@ -137,31 +165,3 @@ def share_url_transfer_v1(
137165
"shareUrl": share_url,
138166
},
139167
)
140-
141-
def get_video_comment_v1(
142-
self,
143-
*,
144-
video_id: str,
145-
pcursor: str | None = None,
146-
) -> ApiResponse[Any]:
147-
"""
148-
Video Comments
149-
150-
Retrieves public comments of a Kuaishou video, including comment content,
151-
author info, like count, and reply count.
152-
153-
Typical use cases:
154-
- Sentiment analysis and community feedback monitoring
155-
- Gathering engagement data for specific videos
156-
157-
Args:
158-
video_id: The unique ID of the Kuaishou video, e.g. `3xbknvct79h46h9` or refer_photo_id `177012131237`
159-
pcursor: Pagination cursor for subsequent pages.
160-
"""
161-
return self._get(
162-
"/api/kuaishou/get-video-comment/v1",
163-
{
164-
"videoId": video_id,
165-
"pcursor": pcursor,
166-
},
167-
)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
from __future__ import annotations
2+
3+
from typing import Any
4+
5+
from justoneapi._resource import BaseResource
6+
from justoneapi._response import ApiResponse
7+
8+
9+
class LlmResource(BaseResource):
10+
"""Generated resource for LLM."""
11+
12+
def doubao_answer_v1(
13+
self,
14+
*,
15+
keyword: str,
16+
) -> ApiResponse[Any]:
17+
"""
18+
Doubao Answer
19+
20+
Get a Doubao web answer for a keyword or question, including extracted references when available.
21+
22+
Args:
23+
keyword: Keyword or question to ask Doubao.
24+
"""
25+
return self._get(
26+
"/api/llm/doubao-answer/v1",
27+
{
28+
"keyword": keyword,
29+
},
30+
)

0 commit comments

Comments
 (0)