Skip to content

Commit f9283fc

Browse files
justoneapigithub-actions[bot]
authored andcommitted
chore: sync OpenAPI spec and generated SDK
1 parent 34ec4a7 commit f9283fc

File tree

7 files changed

+239
-17
lines changed

7 files changed

+239
-17
lines changed

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+
)

justoneapi/generated/resources/kuaishou.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def get_video_comments_v1(
155155
- Gathering engagement data for specific videos
156156
157157
Args:
158-
video_id: The unique ID of the Kuaishou video, e.g. `3xbknvct79h46h9`
158+
video_id: The unique ID of the Kuaishou video, e.g. `3xbknvct79h46h9` or refer_photo_id `177012131237`
159159
pcursor: Pagination cursor for subsequent pages.
160160
"""
161161
return self._get(

justoneapi/generated/resources/weibo.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,29 @@ def get_user_published_posts_v1(
159159
},
160160
)
161161

162+
def get_user_video_list_v1(
163+
self,
164+
*,
165+
uid: str,
166+
cursor: str | None = None,
167+
) -> ApiResponse[Any]:
168+
"""
169+
User Video List
170+
171+
Get Weibo user Video list data (waterfall), including pagination cursor for next page.
172+
173+
Args:
174+
uid: Weibo User ID (UID).
175+
cursor: Pagination cursor returned by the previous response.
176+
"""
177+
return self._get(
178+
"/api/weibo/get-user-video-list/v1",
179+
{
180+
"uid": uid,
181+
"cursor": cursor,
182+
},
183+
)
184+
162185
def tv_component_v1(
163186
self,
164187
*,

openapi/public-api.json

Lines changed: 90 additions & 8 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.",
@@ -37293,7 +37333,7 @@
3729337333
}
3729437334
},
3729537335
{
37296-
"description": "The unique ID of the Kuaishou video, e.g. `3xbknvct79h46h9`",
37336+
"description": "The unique ID of the Kuaishou video, e.g. `3xbknvct79h46h9` or refer_photo_id `177012131237`",
3729737337
"in": "query",
3729837338
"name": "videoId",
3729937339
"required": true,
@@ -57944,6 +57984,54 @@
5794457984
"x-order": "17001500"
5794557985
}
5794657986
},
57987+
"/api/weibo/get-user-video-list/v1": {
57988+
"get": {
57989+
"description": "Get Weibo user Video list data (waterfall), including pagination cursor for next page.",
57990+
"operationId": "getUserVideoListV1",
57991+
"parameters": [
57992+
{
57993+
"description": "API access token.",
57994+
"in": "query",
57995+
"name": "token",
57996+
"required": true,
57997+
"schema": {
57998+
"type": "string"
57999+
}
58000+
},
58001+
{
58002+
"description": "Weibo User ID (UID).",
58003+
"in": "query",
58004+
"name": "uid",
58005+
"required": true,
58006+
"schema": {
58007+
"type": "string"
58008+
}
58009+
},
58010+
{
58011+
"description": "Pagination cursor returned by the previous response.",
58012+
"in": "query",
58013+
"name": "cursor",
58014+
"required": false,
58015+
"schema": {
58016+
"type": "string"
58017+
}
58018+
}
58019+
],
58020+
"responses": {
58021+
"default": {
58022+
"content": {
58023+
"application/json": {}
58024+
},
58025+
"description": "default response"
58026+
}
58027+
},
58028+
"summary": "User Video List",
58029+
"tags": [
58030+
"Weibo"
58031+
],
58032+
"x-order": "17001510"
58033+
}
58034+
},
5794758035
"/api/weibo/get-weibo-detail/v1": {
5794858036
"get": {
5794958037
"description": "Get Weibo post Details data, including media, author metadata, and engagement counts, for post analysis, archiving, and campaign monitoring.",
@@ -68054,7 +68142,6 @@
6805468142
},
6805568143
"/api/xiaohongshu/search-note/v3": {
6805668144
"get": {
68057-
"deprecated": true,
6805868145
"description": "Get Xiaohongshu (RedNote) note Search data, including snippets, authors, and media, for topic discovery.",
6805968146
"operationId": "getSearchNoteV3",
6806068147
"parameters": [
@@ -68123,12 +68210,7 @@
6812368210
"responses": {
6812468211
"default": {
6812568212
"content": {
68126-
"application/json": {
68127-
"example": {
68128-
"code": 0,
68129-
"data": {}
68130-
}
68131-
}
68213+
"application/json": {}
6813268214
},
6813368215
"description": "default response"
6813468216
}

openapi/public-api.normalized.json

Lines changed: 91 additions & 8 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.",
@@ -37434,7 +37474,7 @@
3743437474
"operationId": "getVideoCommentsV1",
3743537475
"parameters": [
3743637476
{
37437-
"description": "The unique ID of the Kuaishou video, e.g. `3xbknvct79h46h9`",
37477+
"description": "The unique ID of the Kuaishou video, e.g. `3xbknvct79h46h9` or refer_photo_id `177012131237`",
3743837478
"in": "query",
3743937479
"name": "videoId",
3744037480
"required": true,
@@ -58143,6 +58183,55 @@
5814358183
"x-sdk-resource": "weibo"
5814458184
}
5814558185
},
58186+
"/api/weibo/get-user-video-list/v1": {
58187+
"get": {
58188+
"description": "Get Weibo user Video list data (waterfall), including pagination cursor for next page.",
58189+
"operationId": "getUserVideoListV1",
58190+
"parameters": [
58191+
{
58192+
"description": "Weibo User ID (UID).",
58193+
"in": "query",
58194+
"name": "uid",
58195+
"required": true,
58196+
"schema": {
58197+
"type": "string"
58198+
},
58199+
"x-sdk-python-name": "uid"
58200+
},
58201+
{
58202+
"description": "Pagination cursor returned by the previous response.",
58203+
"in": "query",
58204+
"name": "cursor",
58205+
"required": false,
58206+
"schema": {
58207+
"type": "string"
58208+
},
58209+
"x-sdk-python-name": "cursor"
58210+
}
58211+
],
58212+
"responses": {
58213+
"default": {
58214+
"content": {
58215+
"application/json": {}
58216+
},
58217+
"description": "default response"
58218+
}
58219+
},
58220+
"security": [
58221+
{
58222+
"tokenAuth": []
58223+
}
58224+
],
58225+
"summary": "User Video List",
58226+
"tags": [
58227+
"Weibo"
58228+
],
58229+
"x-order": "17001510",
58230+
"x-sdk-class-name": "WeiboResource",
58231+
"x-sdk-method-name": "get_user_video_list_v1",
58232+
"x-sdk-resource": "weibo"
58233+
}
58234+
},
5814658235
"/api/weibo/get-weibo-detail/v1": {
5814758236
"get": {
5814858237
"description": "Get Weibo post Details data, including media, author metadata, and engagement counts, for post analysis, archiving, and campaign monitoring.",
@@ -68326,7 +68415,6 @@
6832668415
},
6832768416
"/api/xiaohongshu/search-note/v3": {
6832868417
"get": {
68329-
"deprecated": true,
6833068418
"description": "Get Xiaohongshu (RedNote) note Search data, including snippets, authors, and media, for topic discovery.",
6833168419
"operationId": "getSearchNoteV3",
6833268420
"parameters": [
@@ -68390,12 +68478,7 @@
6839068478
"responses": {
6839168479
"default": {
6839268480
"content": {
68393-
"application/json": {
68394-
"example": {
68395-
"code": 0,
68396-
"data": {}
68397-
}
68398-
}
68481+
"application/json": {}
6839968482
},
6840068483
"description": "default response"
6840168484
}

0 commit comments

Comments
 (0)