Skip to content

Commit 8556e73

Browse files
authored
Merge pull request #21 from justoneapi/codex/openapi-sync
chore: sync OpenAPI spec and generated SDK
2 parents 80d803f + fc6e0ea commit 8556e73

5 files changed

Lines changed: 1254 additions & 452 deletions

File tree

justoneapi/generated/resources/jd.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,26 @@ def get_item_detail_v1(
2929
},
3030
)
3131

32+
def get_item_detail_v2(
33+
self,
34+
*,
35+
item_id: str,
36+
) -> ApiResponse[Any]:
37+
"""
38+
Product Details
39+
40+
Get JD.com product Details data through the task-backed v2 flow. If data is not ready within a short wait, the response returns a pending task status.
41+
42+
Args:
43+
item_id: A unique product identifier on JD.com (item ID).
44+
"""
45+
return self._get(
46+
"/api/jd/get-item-detail/v2",
47+
{
48+
"itemId": item_id,
49+
},
50+
)
51+
3252
def get_item_price_v1(
3353
self,
3454
*,

justoneapi/generated/resources/tiktok_shop.py

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def search_products_v1(
2424
2525
Args:
2626
keyword: Search keyword.
27-
region: Target region for product search. Available Values: - `US`: United States - `GB`: United Kingdom - `SG`: Singapore - `MY`: Malaysia - `PH`: Philippines - `TH`: Thailand - `VN`: Vietnam - `ID`: Indonesia
27+
region: Target region for product search. Available Values: - `US`: United States - `GB`: United Kingdom - `FR`: France - `SG`: Singapore - `MY`: Malaysia - `PH`: Philippines - `TH`: Thailand - `VN`: Vietnam - `ID`: Indonesia
2828
offset: Search result offset.
2929
page_token: Pagination token for the next page.
3030
"""
@@ -51,7 +51,7 @@ def get_product_detail_v1(
5151
5252
Args:
5353
product_id: TikTok Shop Product ID.
54-
region: Target region for product detail. Available Values: - `US`: United States - `GB`: United Kingdom - `SG`: Singapore - `MY`: Malaysia - `PH`: Philippines - `TH`: Thailand - `VN`: Vietnam - `ID`: Indonesia
54+
region: Target region for product detail. Available Values: - `US`: United States - `GB`: United Kingdom - `FR`: France - `SG`: Singapore - `MY`: Malaysia - `PH`: Philippines - `TH`: Thailand - `VN`: Vietnam - `ID`: Indonesia
5555
"""
5656
return self._get(
5757
"/api/tiktok-shop/get-product-detail/v1",
@@ -60,3 +60,26 @@ def get_product_detail_v1(
6060
"region": region,
6161
},
6262
)
63+
64+
def get_product_detail_v2(
65+
self,
66+
*,
67+
product_id: str,
68+
region: str | None = "FR",
69+
) -> ApiResponse[Any]:
70+
"""
71+
Product Details
72+
73+
Get TikTok Shop product Details data, including title, description, and price, for building product catalogs, price and stock monitoring, and in-depth product analysis.
74+
75+
Args:
76+
product_id: TikTok Shop Product ID.
77+
region: Target region for product detail. Available Values: - `FR`: France
78+
"""
79+
return self._get(
80+
"/api/tiktok-shop/get-product-detail/v2",
81+
{
82+
"productId": product_id,
83+
"region": region,
84+
},
85+
)

justoneapi/generated/resources/xiaohongshu.py

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,26 @@ def get_note_detail_v1(
118118
},
119119
)
120120

121+
def get_note_detail_v2(
122+
self,
123+
*,
124+
note_id: str,
125+
) -> ApiResponse[Any]:
126+
"""
127+
Note Details
128+
129+
Get Xiaohongshu (RedNote) note Details data, including media and engagement metrics, for content analysis, archiving, and campaign research.
130+
131+
Args:
132+
note_id: Unique note identifier on Xiaohongshu.
133+
"""
134+
return self._get(
135+
"/api/xiaohongshu/get-note-detail/v2",
136+
{
137+
"noteId": note_id,
138+
},
139+
)
140+
121141
def get_note_detail_v3(
122142
self,
123143
*,
@@ -138,6 +158,46 @@ def get_note_detail_v3(
138158
},
139159
)
140160

161+
def get_note_detail_v4(
162+
self,
163+
*,
164+
note_id: str,
165+
) -> ApiResponse[Any]:
166+
"""
167+
Note Details
168+
169+
Get Xiaohongshu (RedNote) note Details data, including media and engagement metrics, for content analysis, archiving, and campaign research.
170+
171+
Args:
172+
note_id: Unique note identifier on Xiaohongshu.
173+
"""
174+
return self._get(
175+
"/api/xiaohongshu/get-note-detail/v4",
176+
{
177+
"noteId": note_id,
178+
},
179+
)
180+
181+
def get_note_detail_v5(
182+
self,
183+
*,
184+
note_id: str,
185+
) -> ApiResponse[Any]:
186+
"""
187+
Note Details
188+
189+
Get Xiaohongshu (RedNote) note Details data, including media and engagement metrics, for content analysis, archiving, and campaign research.
190+
191+
Args:
192+
note_id: Unique note identifier on Xiaohongshu.
193+
"""
194+
return self._get(
195+
"/api/xiaohongshu/get-note-detail/v5",
196+
{
197+
"noteId": note_id,
198+
},
199+
)
200+
141201
def get_note_detail_v7(
142202
self,
143203
*,
@@ -291,6 +351,32 @@ def search_note_v3(
291351
},
292352
)
293353

354+
def get_topic_note_list_v1(
355+
self,
356+
*,
357+
topic_id: str,
358+
sort: str | None = "hot",
359+
cursor: str | None = None,
360+
) -> ApiResponse[Any]:
361+
"""
362+
Topic Note List
363+
364+
Get Xiaohongshu (RedNote) topic Note List data, including notes under a topic, for topic monitoring and content discovery.
365+
366+
Args:
367+
topic_id: Unique topic identifier on Xiaohongshu.
368+
sort: Sort order for the result set. Available Values: - `time`: Latest - `hot`: Hot
369+
cursor: Pagination cursor from the previous page.
370+
"""
371+
return self._get(
372+
"/api/xiaohongshu/get-topic-note-list/v1",
373+
{
374+
"topicId": topic_id,
375+
"sort": sort,
376+
"cursor": cursor,
377+
},
378+
)
379+
294380
def search_user_v2(
295381
self,
296382
*,

0 commit comments

Comments
 (0)