Skip to content

Commit 9a69c86

Browse files
justoneapigithub-actions[bot]
authored andcommitted
chore: sync OpenAPI spec and generated SDK
1 parent 663cb97 commit 9a69c86

5 files changed

Lines changed: 116 additions & 14 deletions

File tree

justoneapi/generated/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class Code(Enum):
1313
field_0 = "0"
1414
field_100 = "100"
1515
field_101 = "101"
16+
field_202 = "202"
1617
field_300 = "300"
1718
field_301 = "301"
1819
field_302 = "302"

justoneapi/generated/resources/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from justoneapi.generated.resources.bilibili import BilibiliResource
66
from justoneapi.generated.resources.douban import DoubanResource
77
from justoneapi.generated.resources.douyin import DouyinResource
8+
from justoneapi.generated.resources.douyin_ec import DouyinEcResource
89
from justoneapi.generated.resources.douyin_xingtu import DouyinXingtuResource
910
from justoneapi.generated.resources.facebook import FacebookResource
1011
from justoneapi.generated.resources.imdb import ImdbResource
@@ -33,6 +34,7 @@
3334
"bilibili": BilibiliResource,
3435
"douban": DoubanResource,
3536
"douyin": DouyinResource,
37+
"douyin_ec": DouyinEcResource,
3638
"douyin_xingtu": DouyinXingtuResource,
3739
"facebook": FacebookResource,
3840
"imdb": ImdbResource,
@@ -62,6 +64,7 @@
6264
"BilibiliResource",
6365
"DoubanResource",
6466
"DouyinResource",
67+
"DouyinEcResource",
6568
"DouyinXingtuResource",
6669
"FacebookResource",
6770
"ImdbResource",
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 DouyinEcResource(BaseResource):
10+
"""Generated resource for Douyin E-commerce."""
11+
12+
def get_item_detail_v1(
13+
self,
14+
*,
15+
item_id: str,
16+
) -> ApiResponse[Any]:
17+
"""
18+
Item Details
19+
20+
Get Douyin E-commerce item details, including price, title, and stock, for product monitoring and competitive analysis.
21+
22+
Args:
23+
item_id: The unique ID of the item on Douyin E-commerce.
24+
"""
25+
return self._get(
26+
"/api/douyin-ec/get-item-detail/v1",
27+
{
28+
"itemId": item_id,
29+
},
30+
)

openapi/public-api.json

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"0",
99
"100",
1010
"101",
11+
"202",
1112
"300",
1213
"301",
1314
"302",
@@ -8905,6 +8906,45 @@
89058906
"x-order": "21001200"
89068907
}
89078908
},
8909+
"/api/douyin-ec/get-item-detail/v1": {
8910+
"get": {
8911+
"description": "Get Douyin E-commerce item details, including price, title, and stock, for product monitoring and competitive analysis.",
8912+
"operationId": "getItemDetailV1",
8913+
"parameters": [
8914+
{
8915+
"description": "Access token for this API service.",
8916+
"in": "query",
8917+
"name": "token",
8918+
"required": true,
8919+
"schema": {
8920+
"type": "string"
8921+
}
8922+
},
8923+
{
8924+
"description": "The unique ID of the item on Douyin E-commerce.",
8925+
"in": "query",
8926+
"name": "itemId",
8927+
"required": true,
8928+
"schema": {
8929+
"type": "string"
8930+
}
8931+
}
8932+
],
8933+
"responses": {
8934+
"default": {
8935+
"content": {
8936+
"application/json": {}
8937+
},
8938+
"description": "default response"
8939+
}
8940+
},
8941+
"summary": "Item Details",
8942+
"tags": [
8943+
"Douyin E-commerce"
8944+
],
8945+
"x-order": "14502000"
8946+
}
8947+
},
89088948
"/api/douyin-xingtu/get-author-commerce-seed-base-info/v1": {
89098949
"get": {
89108950
"description": "Get Douyin Creator Marketplace (Xingtu) author Commerce Seeding Base Info data, including baseline metrics, commercial signals, and seeding indicators, for product seeding analysis, creator vetting, and campaign planning.",
@@ -68054,7 +68094,6 @@
6805468094
},
6805568095
"/api/xiaohongshu/search-note/v3": {
6805668096
"get": {
68057-
"deprecated": true,
6805868097
"description": "Get Xiaohongshu (RedNote) note Search data, including snippets, authors, and media, for topic discovery.",
6805968098
"operationId": "getSearchNoteV3",
6806068099
"parameters": [
@@ -68123,12 +68162,7 @@
6812368162
"responses": {
6812468163
"default": {
6812568164
"content": {
68126-
"application/json": {
68127-
"example": {
68128-
"code": 0,
68129-
"data": {}
68130-
}
68131-
}
68165+
"application/json": {}
6813268166
},
6813368167
"description": "default response"
6813468168
}

openapi/public-api.normalized.json

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"0",
99
"100",
1010
"101",
11+
"202",
1112
"300",
1213
"301",
1314
"302",
@@ -8936,6 +8937,45 @@
89368937
"x-sdk-resource": "douban"
89378938
}
89388939
},
8940+
"/api/douyin-ec/get-item-detail/v1": {
8941+
"get": {
8942+
"description": "Get Douyin E-commerce item details, including price, title, and stock, for product monitoring and competitive analysis.",
8943+
"operationId": "getItemDetailV1",
8944+
"parameters": [
8945+
{
8946+
"description": "The unique ID of the item on Douyin E-commerce.",
8947+
"in": "query",
8948+
"name": "itemId",
8949+
"required": true,
8950+
"schema": {
8951+
"type": "string"
8952+
},
8953+
"x-sdk-python-name": "item_id"
8954+
}
8955+
],
8956+
"responses": {
8957+
"default": {
8958+
"content": {
8959+
"application/json": {}
8960+
},
8961+
"description": "default response"
8962+
}
8963+
},
8964+
"security": [
8965+
{
8966+
"tokenAuth": []
8967+
}
8968+
],
8969+
"summary": "Item Details",
8970+
"tags": [
8971+
"Douyin E-commerce"
8972+
],
8973+
"x-order": "14502000",
8974+
"x-sdk-class-name": "DouyinEcResource",
8975+
"x-sdk-method-name": "get_item_detail_v1",
8976+
"x-sdk-resource": "douyin_ec"
8977+
}
8978+
},
89398979
"/api/douyin-xingtu/get-author-commerce-seed-base-info/v1": {
89408980
"get": {
89418981
"description": "Get Douyin Creator Marketplace (Xingtu) author Commerce Seeding Base Info data, including baseline metrics, commercial signals, and seeding indicators, for product seeding analysis, creator vetting, and campaign planning.",
@@ -68326,7 +68366,6 @@
6832668366
},
6832768367
"/api/xiaohongshu/search-note/v3": {
6832868368
"get": {
68329-
"deprecated": true,
6833068369
"description": "Get Xiaohongshu (RedNote) note Search data, including snippets, authors, and media, for topic discovery.",
6833168370
"operationId": "getSearchNoteV3",
6833268371
"parameters": [
@@ -68390,12 +68429,7 @@
6839068429
"responses": {
6839168430
"default": {
6839268431
"content": {
68393-
"application/json": {
68394-
"example": {
68395-
"code": 0,
68396-
"data": {}
68397-
}
68398-
}
68432+
"application/json": {}
6839968433
},
6840068434
"description": "default response"
6840168435
}

0 commit comments

Comments
 (0)