From 12627bf65fb21a9d38ecaf3230bb0f854c0574b6 Mon Sep 17 00:00:00 2001 From: justoneapi <139095138+justoneapi@users.noreply.github.com> Date: Fri, 10 Apr 2026 04:36:21 +0000 Subject: [PATCH] chore: sync OpenAPI spec and generated SDK --- justoneapi/generated/models.py | 1 + justoneapi/generated/resources/__init__.py | 3 + justoneapi/generated/resources/douyin_ec.py | 30 +++++++ justoneapi/generated/resources/kuaishou.py | 2 +- justoneapi/generated/resources/weibo.py | 23 +++++ openapi/public-api.json | 98 ++++++++++++++++++-- openapi/public-api.normalized.json | 99 +++++++++++++++++++-- 7 files changed, 239 insertions(+), 17 deletions(-) create mode 100644 justoneapi/generated/resources/douyin_ec.py diff --git a/justoneapi/generated/models.py b/justoneapi/generated/models.py index ebba29b8..6b672d28 100644 --- a/justoneapi/generated/models.py +++ b/justoneapi/generated/models.py @@ -13,6 +13,7 @@ class Code(Enum): field_0 = "0" field_100 = "100" field_101 = "101" + field_202 = "202" field_300 = "300" field_301 = "301" field_302 = "302" diff --git a/justoneapi/generated/resources/__init__.py b/justoneapi/generated/resources/__init__.py index d8865fef..2d7992ee 100644 --- a/justoneapi/generated/resources/__init__.py +++ b/justoneapi/generated/resources/__init__.py @@ -5,6 +5,7 @@ from justoneapi.generated.resources.bilibili import BilibiliResource from justoneapi.generated.resources.douban import DoubanResource from justoneapi.generated.resources.douyin import DouyinResource +from justoneapi.generated.resources.douyin_ec import DouyinEcResource from justoneapi.generated.resources.douyin_xingtu import DouyinXingtuResource from justoneapi.generated.resources.facebook import FacebookResource from justoneapi.generated.resources.imdb import ImdbResource @@ -33,6 +34,7 @@ "bilibili": BilibiliResource, "douban": DoubanResource, "douyin": DouyinResource, + "douyin_ec": DouyinEcResource, "douyin_xingtu": DouyinXingtuResource, "facebook": FacebookResource, "imdb": ImdbResource, @@ -62,6 +64,7 @@ "BilibiliResource", "DoubanResource", "DouyinResource", + "DouyinEcResource", "DouyinXingtuResource", "FacebookResource", "ImdbResource", diff --git a/justoneapi/generated/resources/douyin_ec.py b/justoneapi/generated/resources/douyin_ec.py new file mode 100644 index 00000000..f709f904 --- /dev/null +++ b/justoneapi/generated/resources/douyin_ec.py @@ -0,0 +1,30 @@ +from __future__ import annotations + +from typing import Any + +from justoneapi._resource import BaseResource +from justoneapi._response import ApiResponse + + +class DouyinEcResource(BaseResource): + """Generated resource for Douyin E-commerce.""" + + def get_item_detail_v1( + self, + *, + item_id: str, + ) -> ApiResponse[Any]: + """ + Item Details + + Get Douyin E-commerce item details, including price, title, and stock, for product monitoring and competitive analysis. + + Args: + item_id: The unique ID of the item on Douyin E-commerce. + """ + return self._get( + "/api/douyin-ec/get-item-detail/v1", + { + "itemId": item_id, + }, + ) diff --git a/justoneapi/generated/resources/kuaishou.py b/justoneapi/generated/resources/kuaishou.py index f5577202..9f4630cc 100644 --- a/justoneapi/generated/resources/kuaishou.py +++ b/justoneapi/generated/resources/kuaishou.py @@ -155,7 +155,7 @@ def get_video_comments_v1( - Gathering engagement data for specific videos Args: - video_id: The unique ID of the Kuaishou video, e.g. `3xbknvct79h46h9` + video_id: The unique ID of the Kuaishou video, e.g. `3xbknvct79h46h9` or refer_photo_id `177012131237` pcursor: Pagination cursor for subsequent pages. """ return self._get( diff --git a/justoneapi/generated/resources/weibo.py b/justoneapi/generated/resources/weibo.py index f9bb67ff..cff93963 100644 --- a/justoneapi/generated/resources/weibo.py +++ b/justoneapi/generated/resources/weibo.py @@ -159,6 +159,29 @@ def get_user_published_posts_v1( }, ) + def get_user_video_list_v1( + self, + *, + uid: str, + cursor: str | None = None, + ) -> ApiResponse[Any]: + """ + User Video List + + Get Weibo user Video list data (waterfall), including pagination cursor for next page. + + Args: + uid: Weibo User ID (UID). + cursor: Pagination cursor returned by the previous response. + """ + return self._get( + "/api/weibo/get-user-video-list/v1", + { + "uid": uid, + "cursor": cursor, + }, + ) + def tv_component_v1( self, *, diff --git a/openapi/public-api.json b/openapi/public-api.json index 4e56ad33..b99d5e08 100644 --- a/openapi/public-api.json +++ b/openapi/public-api.json @@ -8,6 +8,7 @@ "0", "100", "101", + "202", "300", "301", "302", @@ -8905,6 +8906,45 @@ "x-order": "21001200" } }, + "/api/douyin-ec/get-item-detail/v1": { + "get": { + "description": "Get Douyin E-commerce item details, including price, title, and stock, for product monitoring and competitive analysis.", + "operationId": "getItemDetailV1", + "parameters": [ + { + "description": "Access token for this API service.", + "in": "query", + "name": "token", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The unique ID of the item on Douyin E-commerce.", + "in": "query", + "name": "itemId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "content": { + "application/json": {} + }, + "description": "default response" + } + }, + "summary": "Item Details", + "tags": [ + "Douyin E-commerce" + ], + "x-order": "14502000" + } + }, "/api/douyin-xingtu/get-author-commerce-seed-base-info/v1": { "get": { "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 @@ } }, { - "description": "The unique ID of the Kuaishou video, e.g. `3xbknvct79h46h9`", + "description": "The unique ID of the Kuaishou video, e.g. `3xbknvct79h46h9` or refer_photo_id `177012131237`", "in": "query", "name": "videoId", "required": true, @@ -57944,6 +57984,54 @@ "x-order": "17001500" } }, + "/api/weibo/get-user-video-list/v1": { + "get": { + "description": "Get Weibo user Video list data (waterfall), including pagination cursor for next page.", + "operationId": "getUserVideoListV1", + "parameters": [ + { + "description": "API access token.", + "in": "query", + "name": "token", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Weibo User ID (UID).", + "in": "query", + "name": "uid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Pagination cursor returned by the previous response.", + "in": "query", + "name": "cursor", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "content": { + "application/json": {} + }, + "description": "default response" + } + }, + "summary": "User Video List", + "tags": [ + "Weibo" + ], + "x-order": "17001510" + } + }, "/api/weibo/get-weibo-detail/v1": { "get": { "description": "Get Weibo post Details data, including media, author metadata, and engagement counts, for post analysis, archiving, and campaign monitoring.", @@ -68054,7 +68142,6 @@ }, "/api/xiaohongshu/search-note/v3": { "get": { - "deprecated": true, "description": "Get Xiaohongshu (RedNote) note Search data, including snippets, authors, and media, for topic discovery.", "operationId": "getSearchNoteV3", "parameters": [ @@ -68123,12 +68210,7 @@ "responses": { "default": { "content": { - "application/json": { - "example": { - "code": 0, - "data": {} - } - } + "application/json": {} }, "description": "default response" } diff --git a/openapi/public-api.normalized.json b/openapi/public-api.normalized.json index 1bd19805..541ce9d0 100644 --- a/openapi/public-api.normalized.json +++ b/openapi/public-api.normalized.json @@ -8,6 +8,7 @@ "0", "100", "101", + "202", "300", "301", "302", @@ -8936,6 +8937,45 @@ "x-sdk-resource": "douban" } }, + "/api/douyin-ec/get-item-detail/v1": { + "get": { + "description": "Get Douyin E-commerce item details, including price, title, and stock, for product monitoring and competitive analysis.", + "operationId": "getItemDetailV1", + "parameters": [ + { + "description": "The unique ID of the item on Douyin E-commerce.", + "in": "query", + "name": "itemId", + "required": true, + "schema": { + "type": "string" + }, + "x-sdk-python-name": "item_id" + } + ], + "responses": { + "default": { + "content": { + "application/json": {} + }, + "description": "default response" + } + }, + "security": [ + { + "tokenAuth": [] + } + ], + "summary": "Item Details", + "tags": [ + "Douyin E-commerce" + ], + "x-order": "14502000", + "x-sdk-class-name": "DouyinEcResource", + "x-sdk-method-name": "get_item_detail_v1", + "x-sdk-resource": "douyin_ec" + } + }, "/api/douyin-xingtu/get-author-commerce-seed-base-info/v1": { "get": { "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 @@ "operationId": "getVideoCommentsV1", "parameters": [ { - "description": "The unique ID of the Kuaishou video, e.g. `3xbknvct79h46h9`", + "description": "The unique ID of the Kuaishou video, e.g. `3xbknvct79h46h9` or refer_photo_id `177012131237`", "in": "query", "name": "videoId", "required": true, @@ -58143,6 +58183,55 @@ "x-sdk-resource": "weibo" } }, + "/api/weibo/get-user-video-list/v1": { + "get": { + "description": "Get Weibo user Video list data (waterfall), including pagination cursor for next page.", + "operationId": "getUserVideoListV1", + "parameters": [ + { + "description": "Weibo User ID (UID).", + "in": "query", + "name": "uid", + "required": true, + "schema": { + "type": "string" + }, + "x-sdk-python-name": "uid" + }, + { + "description": "Pagination cursor returned by the previous response.", + "in": "query", + "name": "cursor", + "required": false, + "schema": { + "type": "string" + }, + "x-sdk-python-name": "cursor" + } + ], + "responses": { + "default": { + "content": { + "application/json": {} + }, + "description": "default response" + } + }, + "security": [ + { + "tokenAuth": [] + } + ], + "summary": "User Video List", + "tags": [ + "Weibo" + ], + "x-order": "17001510", + "x-sdk-class-name": "WeiboResource", + "x-sdk-method-name": "get_user_video_list_v1", + "x-sdk-resource": "weibo" + } + }, "/api/weibo/get-weibo-detail/v1": { "get": { "description": "Get Weibo post Details data, including media, author metadata, and engagement counts, for post analysis, archiving, and campaign monitoring.", @@ -68326,7 +68415,6 @@ }, "/api/xiaohongshu/search-note/v3": { "get": { - "deprecated": true, "description": "Get Xiaohongshu (RedNote) note Search data, including snippets, authors, and media, for topic discovery.", "operationId": "getSearchNoteV3", "parameters": [ @@ -68390,12 +68478,7 @@ "responses": { "default": { "content": { - "application/json": { - "example": { - "code": 0, - "data": {} - } - } + "application/json": {} }, "description": "default response" }