@open-dy/ai_coding_sdk 1.0.9 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/openapi/account/ai_data.d.ts +18 -1
- package/dist/openapi/account/ai_data.js +6 -1
- package/dist/openapi/account/ai_items.d.ts +22 -1
- package/dist/openapi/account/ai_items.js +9 -1
- package/dist/openapi/account/ai_profile.d.ts +15 -1
- package/dist/openapi/account/ai_profile.js +6 -1
- package/dist/openapi/account/identity.d.ts +6 -2
- package/dist/openapi/account/identity.js +4 -2
- package/dist/openapi/account/profile.d.ts +9 -1
- package/dist/openapi/account/profile.js +8 -1
- package/dist/openapi/comment/comment.d.ts +18 -1
- package/dist/openapi/comment/comment.js +6 -1
- package/dist/openapi/content/follow.d.ts +2 -0
- package/dist/openapi/content/recommend.d.ts +18 -0
- package/dist/openapi/content/video.d.ts +11 -1
- package/dist/openapi/content/video.js +8 -1
- package/dist/openapi/core.d.ts +3 -0
- package/dist/openapi/hot/hot.d.ts +9 -1
- package/dist/openapi/hot/hot.js +6 -1
- package/dist/openapi/platform/following.d.ts +21 -2
- package/dist/openapi/platform/following.js +6 -2
- package/dist/openapi/platform/topic.d.ts +9 -2
- package/dist/openapi/platform/topic.js +6 -2
- package/dist/openapi/platform/user-basic.d.ts +17 -2
- package/dist/openapi/platform/user-basic.js +6 -2
- package/dist/openapi/search/experience.d.ts +32 -0
- package/dist/openapi/search/general.d.ts +11 -0
- package/dist/openapi/search/music.d.ts +14 -0
- package/dist/openapi/search/poi.d.ts +27 -0
- package/dist/openapi/search/search.d.ts +51 -0
- package/dist/openapi/search/vision.d.ts +14 -1
- package/dist/openapi/search/vision.js +7 -1
- package/package.json +1 -1
|
@@ -1,20 +1,37 @@
|
|
|
1
1
|
import type { CallOptions, OpenAPIResponse } from '../core';
|
|
2
2
|
export interface AIUserDataInfoParams {
|
|
3
|
+
/** 用户 open_id,等同于 open_id */
|
|
3
4
|
open_user_id: string;
|
|
4
5
|
}
|
|
5
6
|
export interface AIUserBase {
|
|
7
|
+
/** 最近30天播放次数 */
|
|
6
8
|
total_play: number;
|
|
9
|
+
/** 最近30天点赞数 */
|
|
7
10
|
total_like: number;
|
|
11
|
+
/** 最近30天评论数 */
|
|
8
12
|
total_comment: number;
|
|
13
|
+
/** 最近30天分享数 */
|
|
9
14
|
total_share: number;
|
|
10
15
|
}
|
|
11
16
|
export interface AIUserDataInfoResponse {
|
|
17
|
+
/** 作品数 */
|
|
12
18
|
aweme_count: number;
|
|
19
|
+
/** 粉丝数 */
|
|
13
20
|
follower_count: number;
|
|
21
|
+
/** 关注数 */
|
|
14
22
|
following_count: number;
|
|
23
|
+
/** 获赞数 */
|
|
15
24
|
favoriting_count: number;
|
|
25
|
+
/** 总获赞数 */
|
|
16
26
|
total_favorited: number;
|
|
27
|
+
/** 好友数 */
|
|
17
28
|
friend_count: number;
|
|
29
|
+
/** 用户最近30天平均基础数据 */
|
|
18
30
|
user_base: AIUserBase;
|
|
19
31
|
}
|
|
20
|
-
export declare function getAIUserDataInfo(
|
|
32
|
+
export declare function getAIUserDataInfo(
|
|
33
|
+
/**
|
|
34
|
+
* AI 用户数据信息(dy.open.aweme.dy.ai.user_data_info)
|
|
35
|
+
* 获取账号个人页数据,包括作品数、粉丝数、关注数、获赞数等
|
|
36
|
+
*/
|
|
37
|
+
params: AIUserDataInfoParams, options?: CallOptions): Promise<OpenAPIResponse<AIUserDataInfoResponse>>;
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getAIUserDataInfo = getAIUserDataInfo;
|
|
4
4
|
const core_1 = require("../core");
|
|
5
|
-
async function getAIUserDataInfo(
|
|
5
|
+
async function getAIUserDataInfo(
|
|
6
|
+
/**
|
|
7
|
+
* AI 用户数据信息(dy.open.aweme.dy.ai.user_data_info)
|
|
8
|
+
* 获取账号个人页数据,包括作品数、粉丝数、关注数、获赞数等
|
|
9
|
+
*/
|
|
10
|
+
params, options) {
|
|
6
11
|
return (0, core_1.callOpenAPI)({ path: '/dy_open_api/ai/user_data_info/', method: 'POST', body: params, domain: 'open.douyin.com' }, options);
|
|
7
12
|
}
|
|
@@ -1,22 +1,43 @@
|
|
|
1
1
|
import type { CallOptions, OpenAPIResponse } from '../core';
|
|
2
2
|
export interface AIUserItemListParams {
|
|
3
3
|
open_user_id: string;
|
|
4
|
+
/** 分页游标,第一页传 0,后续传上一页返回的 cursor */
|
|
4
5
|
cursor?: number;
|
|
6
|
+
/** 每页数量 */
|
|
5
7
|
count?: number;
|
|
6
8
|
}
|
|
7
9
|
export interface AIUserItem {
|
|
10
|
+
/** 创建时间(时间戳) */
|
|
8
11
|
create_time: number;
|
|
12
|
+
/** 点赞数 */
|
|
9
13
|
digg_count: number;
|
|
14
|
+
/** 视频/作品 ID */
|
|
10
15
|
item_id: string;
|
|
16
|
+
/** 标题 */
|
|
11
17
|
title: string;
|
|
18
|
+
/** 封面图 URL */
|
|
12
19
|
cover: string;
|
|
20
|
+
/** 作者头像 */
|
|
13
21
|
author_icon: string;
|
|
22
|
+
/** 作者名称 */
|
|
14
23
|
author_name: string;
|
|
15
24
|
}
|
|
16
25
|
export interface AIUserItemListResponse {
|
|
26
|
+
/** 总数 */
|
|
17
27
|
total: number;
|
|
28
|
+
/** 分页游标,第一页传 0,后续传上一页返回的 cursor */
|
|
18
29
|
cursor: number;
|
|
30
|
+
/** 是否有更多数据 */
|
|
19
31
|
has_more: boolean;
|
|
32
|
+
/** 视频列表 */
|
|
20
33
|
video_list: AIUserItem[];
|
|
21
34
|
}
|
|
22
|
-
export declare function getAIUserItemList(
|
|
35
|
+
export declare function getAIUserItemList(
|
|
36
|
+
/**
|
|
37
|
+
* AI 用户作品列表(dy.open.aweme.dy.ai.user_item_list)
|
|
38
|
+
* 获取用户的公开作品列表
|
|
39
|
+
* @param params.open_user_id 用户 open_id
|
|
40
|
+
* @param params.cursor 分页游标
|
|
41
|
+
* @param params.count 返回条数
|
|
42
|
+
*/
|
|
43
|
+
params: AIUserItemListParams, options?: CallOptions): Promise<OpenAPIResponse<AIUserItemListResponse>>;
|
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getAIUserItemList = getAIUserItemList;
|
|
4
4
|
const core_1 = require("../core");
|
|
5
|
-
async function getAIUserItemList(
|
|
5
|
+
async function getAIUserItemList(
|
|
6
|
+
/**
|
|
7
|
+
* AI 用户作品列表(dy.open.aweme.dy.ai.user_item_list)
|
|
8
|
+
* 获取用户的公开作品列表
|
|
9
|
+
* @param params.open_user_id 用户 open_id
|
|
10
|
+
* @param params.cursor 分页游标
|
|
11
|
+
* @param params.count 返回条数
|
|
12
|
+
*/
|
|
13
|
+
params, options) {
|
|
6
14
|
return (0, core_1.callOpenAPI)({ path: '/dy_open_api/ai/user_item_list/', method: 'POST', body: params, domain: 'open.douyin.com' }, options);
|
|
7
15
|
}
|
|
@@ -3,16 +3,30 @@ export interface AIUserProfileParams {
|
|
|
3
3
|
open_user_id: string;
|
|
4
4
|
}
|
|
5
5
|
export interface AIUserInfo {
|
|
6
|
+
/** 性别:0-未知 1-男 2-女 */
|
|
6
7
|
gender: number;
|
|
8
|
+
/** 用户昵称 */
|
|
7
9
|
nickname: string;
|
|
10
|
+
/** 用户头像 URL */
|
|
8
11
|
avatar_url: string;
|
|
12
|
+
/** 用户签名 */
|
|
9
13
|
signature: string;
|
|
14
|
+
/** 生日 */
|
|
10
15
|
birthday: string;
|
|
16
|
+
/** 城市 */
|
|
11
17
|
city: string;
|
|
18
|
+
/** 学校名称 */
|
|
12
19
|
school_name: string;
|
|
20
|
+
/** 背景图 URL */
|
|
13
21
|
background_images: string;
|
|
14
22
|
}
|
|
15
23
|
export interface AIUserProfileResponse {
|
|
24
|
+
/** 用户信息 */
|
|
16
25
|
UserInfo: AIUserInfo;
|
|
17
26
|
}
|
|
18
|
-
export declare function getAIUserProfile(
|
|
27
|
+
export declare function getAIUserProfile(
|
|
28
|
+
/**
|
|
29
|
+
* AI 用户画像(dy.open.aweme.dy.ai.user_profile)
|
|
30
|
+
* 获取账号公开资料,包括昵称、头像、签名、生日、城市等
|
|
31
|
+
*/
|
|
32
|
+
params: AIUserProfileParams, options?: CallOptions): Promise<OpenAPIResponse<AIUserProfileResponse>>;
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getAIUserProfile = getAIUserProfile;
|
|
4
4
|
const core_1 = require("../core");
|
|
5
|
-
async function getAIUserProfile(
|
|
5
|
+
async function getAIUserProfile(
|
|
6
|
+
/**
|
|
7
|
+
* AI 用户画像(dy.open.aweme.dy.ai.user_profile)
|
|
8
|
+
* 获取账号公开资料,包括昵称、头像、签名、生日、城市等
|
|
9
|
+
*/
|
|
10
|
+
params, options) {
|
|
6
11
|
return (0, core_1.callOpenAPI)({ path: '/dy_open_api/ai/user_profile/', method: 'POST', body: params, domain: 'open.douyin.com' }, options);
|
|
7
12
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { CallOptions, OpenAPIResponse } from '../core';
|
|
2
2
|
export interface GetRelatedIdRequest {
|
|
3
|
+
/** 用户 open_id,通过 /oauth/access_token/ 获取,用户唯一标志 */
|
|
3
4
|
open_id?: string;
|
|
5
|
+
/** 用户的 union_id */
|
|
4
6
|
union_id?: string;
|
|
5
7
|
}
|
|
6
8
|
export interface GetRelatedIdResponse {
|
|
@@ -8,10 +10,12 @@ export interface GetRelatedIdResponse {
|
|
|
8
10
|
affiliate_id_list: string[];
|
|
9
11
|
}
|
|
10
12
|
/**
|
|
11
|
-
*
|
|
13
|
+
* 获取同主体 ID(dy.open.account.data)
|
|
14
|
+
* 通过 open_id 或 union_id 获取关联的 related_id 和 affiliate_id 列表
|
|
12
15
|
*/
|
|
13
16
|
export declare function getRelatedId(params: GetRelatedIdRequest, options?: CallOptions): Promise<OpenAPIResponse<GetRelatedIdResponse>>;
|
|
14
17
|
/**
|
|
15
|
-
*
|
|
18
|
+
* 获取 Affiliate ID(dy.open.account.data)
|
|
19
|
+
* 通过 open_id 或 union_id 获取关联的 affiliate_id 列表
|
|
16
20
|
*/
|
|
17
21
|
export declare function getAffiliateId(params: GetRelatedIdRequest, options?: CallOptions): Promise<OpenAPIResponse<GetRelatedIdResponse>>;
|
|
@@ -4,7 +4,8 @@ exports.getRelatedId = getRelatedId;
|
|
|
4
4
|
exports.getAffiliateId = getAffiliateId;
|
|
5
5
|
const core_1 = require("../core");
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* 获取同主体 ID(dy.open.account.data)
|
|
8
|
+
* 通过 open_id 或 union_id 获取关联的 related_id 和 affiliate_id 列表
|
|
8
9
|
*/
|
|
9
10
|
async function getRelatedId(params, options) {
|
|
10
11
|
return (0, core_1.callOpenAPI)({
|
|
@@ -15,7 +16,8 @@ async function getRelatedId(params, options) {
|
|
|
15
16
|
}, options);
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
+
* 获取 Affiliate ID(dy.open.account.data)
|
|
20
|
+
* 通过 open_id 或 union_id 获取关联的 affiliate_id 列表
|
|
19
21
|
*/
|
|
20
22
|
async function getAffiliateId(params, options) {
|
|
21
23
|
return (0, core_1.callOpenAPI)({
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CallOptions } from '../core';
|
|
2
2
|
export interface ConstellationResponse {
|
|
3
3
|
UserDataAsset?: {
|
|
4
|
+
/** 星座名称 */
|
|
4
5
|
constellation?: string;
|
|
5
6
|
};
|
|
6
7
|
}
|
|
@@ -8,7 +9,14 @@ export interface ConstellationResponse {
|
|
|
8
9
|
* 获取用户星座信息。
|
|
9
10
|
* @param openid - 用户 OpenID
|
|
10
11
|
*/
|
|
11
|
-
export declare function getUserConstellation(
|
|
12
|
+
export declare function getUserConstellation(
|
|
13
|
+
/**
|
|
14
|
+
* 获取用户星座(dy.open.ai.user_data_asset)
|
|
15
|
+
* AI 应用小程序获取用户的星座信息
|
|
16
|
+
* @param openid 用户 openid
|
|
17
|
+
* @returns 星座名称(如"双子座"),非 OpenAPIResponse 包装
|
|
18
|
+
*/
|
|
19
|
+
openid: string, options?: CallOptions): Promise<string>;
|
|
12
20
|
/**
|
|
13
21
|
* 搜索用户参数。
|
|
14
22
|
*/
|
|
@@ -6,7 +6,14 @@ const core_1 = require("../core");
|
|
|
6
6
|
* 获取用户星座信息。
|
|
7
7
|
* @param openid - 用户 OpenID
|
|
8
8
|
*/
|
|
9
|
-
async function getUserConstellation(
|
|
9
|
+
async function getUserConstellation(
|
|
10
|
+
/**
|
|
11
|
+
* 获取用户星座(dy.open.ai.user_data_asset)
|
|
12
|
+
* AI 应用小程序获取用户的星座信息
|
|
13
|
+
* @param openid 用户 openid
|
|
14
|
+
* @returns 星座名称(如"双子座"),非 OpenAPIResponse 包装
|
|
15
|
+
*/
|
|
16
|
+
openid, options) {
|
|
10
17
|
const response = await (0, core_1.callOpenAPI)({
|
|
11
18
|
path: '/dy_open_api/ai/user_data_asset/',
|
|
12
19
|
method: 'GET',
|
|
@@ -1,23 +1,40 @@
|
|
|
1
1
|
import type { CallOptions, OpenAPIResponse } from '../core';
|
|
2
2
|
export interface CommentSearchParams {
|
|
3
|
+
/** 搜索关键词 */
|
|
3
4
|
keyword: string;
|
|
5
|
+
/** 分页游标,第一页传空,loadmore 时传上一页返回的 cursor */
|
|
4
6
|
cursor?: number;
|
|
7
|
+
/** 每页最大数量 */
|
|
5
8
|
count?: number;
|
|
6
9
|
}
|
|
7
10
|
export interface CommentSearchItem {
|
|
11
|
+
/** 评论 ID */
|
|
8
12
|
comment_id: string;
|
|
13
|
+
/** 评论内容 */
|
|
9
14
|
text: string;
|
|
15
|
+
/** 视频/作品 ID */
|
|
10
16
|
item_id: string;
|
|
17
|
+
/** 作品标题 */
|
|
11
18
|
item_title: string;
|
|
19
|
+
/** 创建时间(时间戳) */
|
|
12
20
|
create_time: number;
|
|
21
|
+
/** 评论用户昵称 */
|
|
13
22
|
user_nickname: string;
|
|
14
23
|
}
|
|
15
24
|
export interface CommentSearchResponse {
|
|
25
|
+
/** 分页游标,第一页传 0,后续传上一页返回的 cursor */
|
|
16
26
|
cursor: number;
|
|
27
|
+
/** 是否有更多数据 */
|
|
17
28
|
has_more: boolean;
|
|
29
|
+
/** 数据列表 */
|
|
18
30
|
data: CommentSearchItem[];
|
|
19
31
|
}
|
|
20
32
|
/**
|
|
21
33
|
* 评论搜索
|
|
22
34
|
*/
|
|
23
|
-
export declare function searchComment(
|
|
35
|
+
export declare function searchComment(
|
|
36
|
+
/**
|
|
37
|
+
* 抖音评论搜索(dy.open.aweme.dy.comment_search)
|
|
38
|
+
* 根据关键词搜索抖音评论
|
|
39
|
+
*/
|
|
40
|
+
params: CommentSearchParams, options?: CallOptions): Promise<OpenAPIResponse<CommentSearchResponse>>;
|
|
@@ -5,7 +5,12 @@ const core_1 = require("../core");
|
|
|
5
5
|
/**
|
|
6
6
|
* 评论搜索
|
|
7
7
|
*/
|
|
8
|
-
async function searchComment(
|
|
8
|
+
async function searchComment(
|
|
9
|
+
/**
|
|
10
|
+
* 抖音评论搜索(dy.open.aweme.dy.comment_search)
|
|
11
|
+
* 根据关键词搜索抖音评论
|
|
12
|
+
*/
|
|
13
|
+
params, options) {
|
|
9
14
|
return (0, core_1.callOpenAPI)({
|
|
10
15
|
path: '/dy_open_api/search/comment/',
|
|
11
16
|
method: 'POST',
|
|
@@ -22,9 +22,11 @@ export interface FollowFeedResponse {
|
|
|
22
22
|
follow_items: any[];
|
|
23
23
|
}
|
|
24
24
|
export interface FeedItem {
|
|
25
|
+
/** 作者头像 URL */
|
|
25
26
|
author_avatar: string;
|
|
26
27
|
author_name: string;
|
|
27
28
|
author_urls: HotWordUrl[];
|
|
29
|
+
/** 封面图 URL */
|
|
28
30
|
cover: string;
|
|
29
31
|
title: string;
|
|
30
32
|
item_id: string;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { CallOptions, OpenAPIResponse } from '../core';
|
|
2
2
|
export interface RecommendRequest {
|
|
3
|
+
/** 每页数量 */
|
|
3
4
|
count?: number;
|
|
5
|
+
/** 请求 ID */
|
|
4
6
|
reqId?: string;
|
|
7
|
+
/** 时间戳 */
|
|
5
8
|
timestamp?: number;
|
|
6
9
|
deviceInfo?: {
|
|
7
10
|
lang?: string;
|
|
@@ -17,25 +20,40 @@ export interface RecommendRequest {
|
|
|
17
20
|
oaid?: string;
|
|
18
21
|
userTag?: string;
|
|
19
22
|
};
|
|
23
|
+
/** 场景标签 */
|
|
20
24
|
sceneTag?: string[];
|
|
21
25
|
}
|
|
22
26
|
export interface RecommendItem {
|
|
27
|
+
/** 内容 ID */
|
|
23
28
|
contentId: string;
|
|
29
|
+
/** 内容类型 */
|
|
24
30
|
contentType: string;
|
|
31
|
+
/** 标题 */
|
|
25
32
|
title: string;
|
|
33
|
+
/** 封面图 URL */
|
|
26
34
|
cover: string;
|
|
35
|
+
/** 原始封面图 URL */
|
|
27
36
|
originalCover: string;
|
|
37
|
+
/** 时长(秒) */
|
|
28
38
|
duration: number;
|
|
29
39
|
likedCount: number;
|
|
30
40
|
commentCount: number;
|
|
41
|
+
/** 发布时间(时间戳) */
|
|
31
42
|
publishTime: number;
|
|
32
43
|
userId: string;
|
|
44
|
+
/** 用户名 */
|
|
33
45
|
userName: string;
|
|
46
|
+
/** 深度链接 */
|
|
34
47
|
deeplink: string;
|
|
48
|
+
/** 点击上报 URL */
|
|
35
49
|
clickUrl: string;
|
|
50
|
+
/** 曝光上报 URL */
|
|
36
51
|
exposureUrl: string;
|
|
52
|
+
/** 场景标签 */
|
|
37
53
|
sceneTag: string;
|
|
54
|
+
/** 是否电商直播 */
|
|
38
55
|
ecommerceWebcast: boolean;
|
|
56
|
+
/** 实验参数 */
|
|
39
57
|
exp: string;
|
|
40
58
|
}
|
|
41
59
|
export type RecommendResponse = RecommendItem[];
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import type { CallOptions, OpenAPIResponse } from '../core';
|
|
2
2
|
export interface HighQualityTextParams {
|
|
3
|
+
/** 视频/作品 ID */
|
|
3
4
|
item_id: string;
|
|
4
5
|
}
|
|
5
6
|
export interface HighQualityTextResponse {
|
|
7
|
+
/** 视频/作品 ID */
|
|
6
8
|
item_id: string;
|
|
9
|
+
/** 高质量文本总结 */
|
|
7
10
|
high_quality_text: string;
|
|
8
11
|
}
|
|
9
12
|
/**
|
|
10
13
|
* 获取视频高质量文本
|
|
11
14
|
*/
|
|
12
|
-
export declare function getHighQualityText(
|
|
15
|
+
export declare function getHighQualityText(
|
|
16
|
+
/**
|
|
17
|
+
* 视频内容总结(dy.open.aweme.dy.item.high_quality_text)
|
|
18
|
+
* 获取抖音视频的高质量文本总结
|
|
19
|
+
* @param params.item_id 视频 id
|
|
20
|
+
* @param params.share_url 视频链接,支持分享链接/PC 链接等
|
|
21
|
+
*/
|
|
22
|
+
params: HighQualityTextParams, options?: CallOptions): Promise<OpenAPIResponse<HighQualityTextResponse>>;
|
|
@@ -5,7 +5,14 @@ const core_1 = require("../core");
|
|
|
5
5
|
/**
|
|
6
6
|
* 获取视频高质量文本
|
|
7
7
|
*/
|
|
8
|
-
async function getHighQualityText(
|
|
8
|
+
async function getHighQualityText(
|
|
9
|
+
/**
|
|
10
|
+
* 视频内容总结(dy.open.aweme.dy.item.high_quality_text)
|
|
11
|
+
* 获取抖音视频的高质量文本总结
|
|
12
|
+
* @param params.item_id 视频 id
|
|
13
|
+
* @param params.share_url 视频链接,支持分享链接/PC 链接等
|
|
14
|
+
*/
|
|
15
|
+
params, options) {
|
|
9
16
|
return (0, core_1.callOpenAPI)({
|
|
10
17
|
path: '/dy_open_api/item/get_high_quality_text/',
|
|
11
18
|
method: 'POST',
|
package/dist/openapi/core.d.ts
CHANGED
|
@@ -11,8 +11,11 @@ export interface CallOptions {
|
|
|
11
11
|
ppeEnv?: string;
|
|
12
12
|
}
|
|
13
13
|
export interface OpenAPIResponse<T> {
|
|
14
|
+
/** 错误码,0 表示成功 */
|
|
14
15
|
err_no: number;
|
|
16
|
+
/** 错误信息 */
|
|
15
17
|
err_msg: string;
|
|
18
|
+
/** 数据 */
|
|
16
19
|
data: T;
|
|
17
20
|
}
|
|
18
21
|
export declare function callOpenAPI<T>(params: CallOpenAPIParams, options?: CallOptions): Promise<OpenAPIResponse<T>>;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { CallOptions, OpenAPIResponse } from '../core';
|
|
2
2
|
export interface HotListParams {
|
|
3
|
+
/** 每页数量 */
|
|
3
4
|
cursor?: number;
|
|
5
|
+
/** 每页数量 */
|
|
4
6
|
count?: number;
|
|
7
|
+
/** 榜单类型:1-抖音热榜 2-挑战榜 3-娱乐榜 4-种草榜,默认热榜 */
|
|
5
8
|
type?: number;
|
|
6
9
|
}
|
|
7
10
|
export interface HotBoardItem {
|
|
@@ -12,4 +15,9 @@ export interface HotBoardItem {
|
|
|
12
15
|
export interface HotListResponse {
|
|
13
16
|
BoardList: HotBoardItem[];
|
|
14
17
|
}
|
|
15
|
-
export declare function getHotList(
|
|
18
|
+
export declare function getHotList(
|
|
19
|
+
/**
|
|
20
|
+
* 获取抖音榜单(dy.open.aweme.dy.hot_list)
|
|
21
|
+
* 根据 type 值获取不同的抖音榜单(热点榜、挑战榜、娱乐榜、种草榜)
|
|
22
|
+
*/
|
|
23
|
+
params: HotListParams, options?: CallOptions): Promise<OpenAPIResponse<HotListResponse>>;
|
package/dist/openapi/hot/hot.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getHotList = getHotList;
|
|
4
4
|
const core_1 = require("../core");
|
|
5
|
-
async function getHotList(
|
|
5
|
+
async function getHotList(
|
|
6
|
+
/**
|
|
7
|
+
* 获取抖音榜单(dy.open.aweme.dy.hot_list)
|
|
8
|
+
* 根据 type 值获取不同的抖音榜单(热点榜、挑战榜、娱乐榜、种草榜)
|
|
9
|
+
*/
|
|
10
|
+
params, options) {
|
|
6
11
|
return (0, core_1.callOpenAPI)({ path: '/dy_open_api/hot_list/', method: 'POST', body: params, domain: 'open.douyin.com' }, options);
|
|
7
12
|
}
|
|
@@ -1,30 +1,49 @@
|
|
|
1
1
|
import type { CallOptions, OpenAPIResponse } from '../core';
|
|
2
2
|
export interface FollowingListParams {
|
|
3
|
+
/** 用户 id */
|
|
3
4
|
user_id: string;
|
|
5
|
+
/** 分页游标,第一页传 0 */
|
|
4
6
|
cursor?: number;
|
|
7
|
+
/** 每页数量 */
|
|
5
8
|
count: number;
|
|
6
9
|
}
|
|
7
10
|
export interface FollowingUser {
|
|
11
|
+
/** 用户的 open_id */
|
|
8
12
|
open_id: string;
|
|
13
|
+
/** 用户的 union_id */
|
|
9
14
|
union_id?: string;
|
|
15
|
+
/** 用户昵称 */
|
|
10
16
|
nickname: string;
|
|
17
|
+
/** 用户头像 URL */
|
|
11
18
|
avatar: string;
|
|
19
|
+
/** 城市 */
|
|
12
20
|
city: string;
|
|
21
|
+
/** 省份 */
|
|
13
22
|
province: string;
|
|
23
|
+
/** 国家 */
|
|
14
24
|
country: string;
|
|
25
|
+
/** 性别:0-未知 1-男 2-女 */
|
|
15
26
|
gender: number;
|
|
16
27
|
}
|
|
17
28
|
export interface FollowingListData {
|
|
29
|
+
/** 分页游标,第一页传 0,后续传上一页返回的 cursor */
|
|
18
30
|
cursor: number;
|
|
31
|
+
/** 是否有更多数据 */
|
|
19
32
|
has_more: boolean;
|
|
33
|
+
/** 用户列表 */
|
|
20
34
|
user_list: FollowingUser[];
|
|
21
35
|
create_time_list?: number[];
|
|
22
36
|
}
|
|
23
37
|
export interface FollowingListResponse {
|
|
38
|
+
/** 数据列表 */
|
|
24
39
|
data?: FollowingListData;
|
|
25
40
|
}
|
|
26
41
|
/**
|
|
27
42
|
* 查询用户关注列表
|
|
28
|
-
* 需要 PPE 环境:options 中设置 ppeEnv
|
|
29
43
|
*/
|
|
30
|
-
export declare function getUserFollowing(
|
|
44
|
+
export declare function getUserFollowing(
|
|
45
|
+
/**
|
|
46
|
+
* 获取用户关注列表(dy.open.aweme.dy.user_following)
|
|
47
|
+
* 获取指定用户的关注列表
|
|
48
|
+
*/
|
|
49
|
+
params: FollowingListParams, options?: CallOptions): Promise<OpenAPIResponse<FollowingListResponse>>;
|
|
@@ -4,9 +4,13 @@ exports.getUserFollowing = getUserFollowing;
|
|
|
4
4
|
const core_1 = require("../core");
|
|
5
5
|
/**
|
|
6
6
|
* 查询用户关注列表
|
|
7
|
-
* 需要 PPE 环境:options 中设置 ppeEnv
|
|
8
7
|
*/
|
|
9
|
-
async function getUserFollowing(
|
|
8
|
+
async function getUserFollowing(
|
|
9
|
+
/**
|
|
10
|
+
* 获取用户关注列表(dy.open.aweme.dy.user_following)
|
|
11
|
+
* 获取指定用户的关注列表
|
|
12
|
+
*/
|
|
13
|
+
params, options) {
|
|
10
14
|
return (0, core_1.callOpenAPI)({
|
|
11
15
|
path: '/dy_open_api/ai_platform/data/get_following_list_info/',
|
|
12
16
|
method: 'POST',
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
import type { CallOptions, OpenAPIResponse } from '../core';
|
|
2
2
|
export interface TopicSearchParams {
|
|
3
|
+
/** 搜索 query */
|
|
3
4
|
query: string;
|
|
5
|
+
/** 返回 top_k 个话题 */
|
|
4
6
|
top_k?: number;
|
|
5
7
|
}
|
|
6
8
|
export interface TopicSearchResponse {
|
|
9
|
+
/** 结果列表 */
|
|
7
10
|
list: string[];
|
|
8
11
|
}
|
|
9
12
|
/**
|
|
10
13
|
* 搜索热点话题
|
|
11
|
-
* 需要 PPE 环境:options 中设置 ppeEnv,或环境变量 APP_ENV=ppe_0629
|
|
12
14
|
*/
|
|
13
|
-
export declare function topicSearch(
|
|
15
|
+
export declare function topicSearch(
|
|
16
|
+
/**
|
|
17
|
+
* 搜索热点话题(dy.open.aweme.dy.topic_search)
|
|
18
|
+
* 获取用户圈层下对应话题列表
|
|
19
|
+
*/
|
|
20
|
+
params: TopicSearchParams, options?: CallOptions): Promise<OpenAPIResponse<TopicSearchResponse>>;
|
|
@@ -4,9 +4,13 @@ exports.topicSearch = topicSearch;
|
|
|
4
4
|
const core_1 = require("../core");
|
|
5
5
|
/**
|
|
6
6
|
* 搜索热点话题
|
|
7
|
-
* 需要 PPE 环境:options 中设置 ppeEnv,或环境变量 APP_ENV=ppe_0629
|
|
8
7
|
*/
|
|
9
|
-
async function topicSearch(
|
|
8
|
+
async function topicSearch(
|
|
9
|
+
/**
|
|
10
|
+
* 搜索热点话题(dy.open.aweme.dy.topic_search)
|
|
11
|
+
* 获取用户圈层下对应话题列表
|
|
12
|
+
*/
|
|
13
|
+
params, options) {
|
|
10
14
|
return (0, core_1.callOpenAPI)({
|
|
11
15
|
path: '/dy_open_api/ai_platform/data/query_topic/',
|
|
12
16
|
method: 'POST',
|
|
@@ -1,23 +1,38 @@
|
|
|
1
1
|
import type { CallOptions, OpenAPIResponse } from '../core';
|
|
2
2
|
export interface UserBasicDataParams {
|
|
3
|
+
/** 抖音 user_id */
|
|
3
4
|
uid: string;
|
|
4
5
|
}
|
|
5
6
|
export interface UserInfo {
|
|
7
|
+
/** 用户的 open_id */
|
|
6
8
|
open_user_id: string;
|
|
9
|
+
/** 用户签名 */
|
|
7
10
|
signature?: string;
|
|
11
|
+
/** 学校圈 ID */
|
|
8
12
|
college_group_id?: string;
|
|
13
|
+
/** 学校圈名称 */
|
|
9
14
|
college_group_name?: string;
|
|
15
|
+
/** 生日 */
|
|
10
16
|
birthday: string;
|
|
17
|
+
/** 注册年龄 */
|
|
11
18
|
register_age: string;
|
|
19
|
+
/** 注册性别 */
|
|
12
20
|
register_gender: string;
|
|
21
|
+
/** 是否隐藏位置 */
|
|
13
22
|
is_hide_location: number;
|
|
23
|
+
/** 用户创建天数 */
|
|
14
24
|
user_create_days: number;
|
|
15
25
|
}
|
|
16
26
|
export interface UserBasicDataResponse {
|
|
27
|
+
/** 用户信息 */
|
|
17
28
|
user_info: UserInfo;
|
|
18
29
|
}
|
|
19
30
|
/**
|
|
20
31
|
* 查询用户基础数据
|
|
21
|
-
* 需要 PPE 环境:options 中设置 ppeEnv
|
|
22
32
|
*/
|
|
23
|
-
export declare function getUserBasicData(
|
|
33
|
+
export declare function getUserBasicData(
|
|
34
|
+
/**
|
|
35
|
+
* 获取用户基础属性(dy.open.aweme.dy.user_basic_data)
|
|
36
|
+
* 获取抖音用户的基础属性,包括创建天数、注册年龄、注册性别、生日等信息
|
|
37
|
+
*/
|
|
38
|
+
params: UserBasicDataParams, options?: CallOptions): Promise<OpenAPIResponse<UserBasicDataResponse>>;
|
|
@@ -4,9 +4,13 @@ exports.getUserBasicData = getUserBasicData;
|
|
|
4
4
|
const core_1 = require("../core");
|
|
5
5
|
/**
|
|
6
6
|
* 查询用户基础数据
|
|
7
|
-
* 需要 PPE 环境:options 中设置 ppeEnv
|
|
8
7
|
*/
|
|
9
|
-
async function getUserBasicData(
|
|
8
|
+
async function getUserBasicData(
|
|
9
|
+
/**
|
|
10
|
+
* 获取用户基础属性(dy.open.aweme.dy.user_basic_data)
|
|
11
|
+
* 获取抖音用户的基础属性,包括创建天数、注册年龄、注册性别、生日等信息
|
|
12
|
+
*/
|
|
13
|
+
params, options) {
|
|
10
14
|
return (0, core_1.callOpenAPI)({
|
|
11
15
|
path: '/dy_open_api/ai_platform/data/query_user_basic_info/',
|
|
12
16
|
method: 'POST',
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import type { CallOptions, OpenAPIResponse } from '../core';
|
|
2
2
|
export interface SearchExperienceParams {
|
|
3
|
+
/** 搜索关键词 */
|
|
3
4
|
keyword: string;
|
|
5
|
+
/** 设备 ID */
|
|
4
6
|
device_id?: number;
|
|
7
|
+
/** 抖音用户 ID */
|
|
5
8
|
uid?: string;
|
|
9
|
+
/** 分页游标,第一页传 0,后续传上一页返回的 cursor */
|
|
6
10
|
cursor?: number;
|
|
11
|
+
/** 每页数量 */
|
|
7
12
|
count?: number;
|
|
13
|
+
/** 搜索 ID,首刷传空,loadmore 时传上一页返回的 search_id */
|
|
8
14
|
search_id?: string;
|
|
15
|
+
/** 排序类型 */
|
|
9
16
|
sort_type?: number;
|
|
17
|
+
/** 内容类型 */
|
|
10
18
|
content_type?: number;
|
|
11
19
|
}
|
|
12
20
|
/**
|
|
@@ -21,20 +29,30 @@ export interface ExperienceCover {
|
|
|
21
29
|
* 图文搜索结果项。
|
|
22
30
|
*/
|
|
23
31
|
export interface SearchExperienceItem {
|
|
32
|
+
/** 视频/作品 ID */
|
|
24
33
|
item_id: string;
|
|
34
|
+
/** 标题 */
|
|
25
35
|
title: string;
|
|
36
|
+
/** 封面图 URL */
|
|
26
37
|
cover: ExperienceCover;
|
|
38
|
+
/** 内容类型 */
|
|
27
39
|
content_type: number;
|
|
40
|
+
/** 时长(秒) */
|
|
28
41
|
duration: number;
|
|
42
|
+
/** 用户昵称 */
|
|
29
43
|
nickname: string;
|
|
30
44
|
}
|
|
31
45
|
/**
|
|
32
46
|
* 图文搜索响应数据。
|
|
33
47
|
*/
|
|
34
48
|
export interface SearchExperienceResponse {
|
|
49
|
+
/** 分页游标,第一页传 0,后续传上一页返回的 cursor */
|
|
35
50
|
cursor: number;
|
|
51
|
+
/** 是否有更多数据 */
|
|
36
52
|
has_more: boolean;
|
|
53
|
+
/** 搜索 ID,首刷传空,loadmore 时传上一页返回的 search_id */
|
|
37
54
|
search_id: string;
|
|
55
|
+
/** 数据列表 */
|
|
38
56
|
data: SearchExperienceItem[];
|
|
39
57
|
}
|
|
40
58
|
/**
|
|
@@ -46,29 +64,43 @@ export declare function searchExperience(params: SearchExperienceParams, options
|
|
|
46
64
|
* 音乐搜索参数。
|
|
47
65
|
*/
|
|
48
66
|
export interface SearchMusicParams {
|
|
67
|
+
/** 搜索关键词 */
|
|
49
68
|
keyword: string;
|
|
69
|
+
/** 分页游标,第一页传 0,后续传上一页返回的 cursor */
|
|
50
70
|
cursor?: string;
|
|
71
|
+
/** 每页数量 */
|
|
51
72
|
count?: number;
|
|
52
73
|
}
|
|
53
74
|
/**
|
|
54
75
|
* 音乐搜索结果项。
|
|
55
76
|
*/
|
|
56
77
|
export interface SearchMusicItem {
|
|
78
|
+
/** 音乐 ID */
|
|
57
79
|
mid: string;
|
|
80
|
+
/** 封面图 URL */
|
|
58
81
|
cover: string[];
|
|
82
|
+
/** 作者信息 */
|
|
59
83
|
author: string;
|
|
84
|
+
/** 时长(秒) */
|
|
60
85
|
duration: number;
|
|
86
|
+
/** 播放地址 */
|
|
61
87
|
play_addr: string;
|
|
88
|
+
/** 标题 */
|
|
62
89
|
title: string;
|
|
90
|
+
/** 音乐标签 */
|
|
63
91
|
tag: string;
|
|
92
|
+
/** 抖音分享 URL */
|
|
64
93
|
doyin_share_url: string;
|
|
65
94
|
}
|
|
66
95
|
/**
|
|
67
96
|
* 音乐搜索响应数据。
|
|
68
97
|
*/
|
|
69
98
|
export interface SearchMusicResponse {
|
|
99
|
+
/** 分页游标,第一页传 0,后续传上一页返回的 cursor */
|
|
70
100
|
cursor: number;
|
|
101
|
+
/** 是否有更多数据 */
|
|
71
102
|
has_more: boolean;
|
|
103
|
+
/** 搜索结果列表 */
|
|
72
104
|
result: SearchMusicItem[];
|
|
73
105
|
}
|
|
74
106
|
/**
|
|
@@ -1,20 +1,31 @@
|
|
|
1
1
|
import type { CallOptions, OpenAPIResponse } from '../core';
|
|
2
2
|
export interface GeneralSearchParams {
|
|
3
|
+
/** 搜索关键词 */
|
|
3
4
|
keyword: string;
|
|
5
|
+
/** 分页游标,第一页传 0,后续传上一页返回的 cursor */
|
|
4
6
|
cursor?: number;
|
|
7
|
+
/** 每页数量 */
|
|
5
8
|
count?: number;
|
|
9
|
+
/** 搜索 ID,首刷传空,loadmore 时传上一页返回的 search_id */
|
|
6
10
|
search_id?: string;
|
|
7
11
|
}
|
|
8
12
|
export interface GeneralSearchItem {
|
|
13
|
+
/** 视频/作品 ID */
|
|
9
14
|
item_id: string;
|
|
15
|
+
/** 标题 */
|
|
10
16
|
title: string;
|
|
17
|
+
/** 封面图 URL */
|
|
11
18
|
cover: string;
|
|
12
19
|
item_type: number;
|
|
20
|
+
/** 作者名称 */
|
|
13
21
|
author_name: string;
|
|
14
22
|
}
|
|
15
23
|
export interface GeneralSearchResponse {
|
|
24
|
+
/** 分页游标,第一页传 0,后续传上一页返回的 cursor */
|
|
16
25
|
cursor: number;
|
|
26
|
+
/** 是否有更多数据 */
|
|
17
27
|
has_more: boolean;
|
|
28
|
+
/** 数据列表 */
|
|
18
29
|
data: GeneralSearchItem[];
|
|
19
30
|
}
|
|
20
31
|
/**
|
|
@@ -1,28 +1,42 @@
|
|
|
1
1
|
import type { CallOptions, OpenAPIResponse } from '../core';
|
|
2
2
|
export interface SearchMusicParams {
|
|
3
|
+
/** 搜索关键词 */
|
|
3
4
|
keyword: string;
|
|
5
|
+
/** 分页游标,第一页传 0,后续传上一页返回的 cursor */
|
|
4
6
|
cursor?: string;
|
|
7
|
+
/** 每页数量 */
|
|
5
8
|
count?: number;
|
|
6
9
|
}
|
|
7
10
|
/**
|
|
8
11
|
* 音乐搜索结果项。
|
|
9
12
|
*/
|
|
10
13
|
export interface SearchMusicItem {
|
|
14
|
+
/** 音乐 ID */
|
|
11
15
|
mid: string;
|
|
16
|
+
/** 封面图 URL */
|
|
12
17
|
cover: string[];
|
|
18
|
+
/** 作者信息 */
|
|
13
19
|
author: string;
|
|
20
|
+
/** 时长(秒) */
|
|
14
21
|
duration: number;
|
|
22
|
+
/** 播放地址 */
|
|
15
23
|
play_addr: string;
|
|
24
|
+
/** 标题 */
|
|
16
25
|
title: string;
|
|
26
|
+
/** 音乐标签 */
|
|
17
27
|
tag: string;
|
|
28
|
+
/** 抖音分享 URL */
|
|
18
29
|
doyin_share_url: string;
|
|
19
30
|
}
|
|
20
31
|
/**
|
|
21
32
|
* 音乐搜索响应数据。
|
|
22
33
|
*/
|
|
23
34
|
export interface SearchMusicResponse {
|
|
35
|
+
/** 分页游标,第一页传 0,后续传上一页返回的 cursor */
|
|
24
36
|
cursor: number;
|
|
37
|
+
/** 是否有更多数据 */
|
|
25
38
|
has_more: boolean;
|
|
39
|
+
/** 搜索结果列表 */
|
|
26
40
|
result: SearchMusicItem[];
|
|
27
41
|
}
|
|
28
42
|
/**
|
|
@@ -1,47 +1,74 @@
|
|
|
1
1
|
import type { CallOptions, OpenAPIResponse } from '../core';
|
|
2
2
|
export interface PoiSearchParams {
|
|
3
|
+
/** 搜索关键词 */
|
|
3
4
|
keyword: string;
|
|
5
|
+
/** 每页数量 */
|
|
4
6
|
count: number;
|
|
7
|
+
/** 分页游标,第一页传 0,后续传上一页返回的 cursor */
|
|
5
8
|
cursor?: number;
|
|
9
|
+
/** 搜索 ID,首刷传空,loadmore 时传上一页返回的 search_id */
|
|
6
10
|
search_id?: string;
|
|
11
|
+
/** 设备 ID */
|
|
7
12
|
device_id?: string;
|
|
8
13
|
sort_params?: {
|
|
9
14
|
filter_params?: Array<{
|
|
10
15
|
id?: string;
|
|
16
|
+
/** 榜单类型 */
|
|
11
17
|
type?: string;
|
|
18
|
+
/** 条件字段 */
|
|
12
19
|
condition_field?: string;
|
|
20
|
+
/** 条件值 */
|
|
13
21
|
condition_value?: string;
|
|
22
|
+
/** 日志信息 */
|
|
14
23
|
log_info?: {
|
|
15
24
|
data_id?: string;
|
|
16
25
|
};
|
|
26
|
+
/** 日志文本 */
|
|
17
27
|
log_text?: string;
|
|
18
28
|
}>;
|
|
19
29
|
rank_param?: {
|
|
20
30
|
id?: string;
|
|
31
|
+
/** 榜单类型 */
|
|
21
32
|
type?: string;
|
|
33
|
+
/** 条件字段 */
|
|
22
34
|
condition_field?: string;
|
|
35
|
+
/** 条件值 */
|
|
23
36
|
condition_value?: string;
|
|
37
|
+
/** 日志信息 */
|
|
24
38
|
log_info?: {
|
|
25
39
|
data_id?: string;
|
|
26
40
|
};
|
|
41
|
+
/** 日志文本 */
|
|
27
42
|
log_text?: string;
|
|
28
43
|
};
|
|
29
44
|
};
|
|
30
45
|
}
|
|
31
46
|
export interface PoiItem {
|
|
47
|
+
/** POI ID */
|
|
32
48
|
poi_id: string;
|
|
49
|
+
/** POI 名称 */
|
|
33
50
|
poi_name: string;
|
|
51
|
+
/** 地址 */
|
|
34
52
|
address: string;
|
|
53
|
+
/** 城市 */
|
|
35
54
|
city: string;
|
|
55
|
+
/** 纬度 */
|
|
36
56
|
latitude: number;
|
|
57
|
+
/** 经度 */
|
|
37
58
|
longitude: number;
|
|
59
|
+
/** 均价 */
|
|
38
60
|
avg_price: number;
|
|
61
|
+
/** POI 图片 URL */
|
|
39
62
|
poi_image: string;
|
|
40
63
|
}
|
|
41
64
|
export interface PoiSearchResponse {
|
|
65
|
+
/** 分页游标,第一页传 0,后续传上一页返回的 cursor */
|
|
42
66
|
cursor: number;
|
|
67
|
+
/** 是否有更多数据 */
|
|
43
68
|
has_more: boolean;
|
|
69
|
+
/** 搜索 ID,首刷传空,loadmore 时传上一页返回的 search_id */
|
|
44
70
|
search_id: string;
|
|
71
|
+
/** 数据列表 */
|
|
45
72
|
data: PoiItem[];
|
|
46
73
|
}
|
|
47
74
|
export declare function searchPoi(params: PoiSearchParams, options?: CallOptions): Promise<OpenAPIResponse<PoiSearchResponse>>;
|
|
@@ -1,31 +1,50 @@
|
|
|
1
1
|
import type { CallOptions, OpenAPIResponse } from '../core';
|
|
2
2
|
export interface VideoSearchParams {
|
|
3
3
|
[key: string]: string | number | undefined;
|
|
4
|
+
/** 设备 ID */
|
|
4
5
|
device_id: number;
|
|
6
|
+
/** 搜索关键词 */
|
|
5
7
|
keyword: string;
|
|
8
|
+
/** 每页数量 */
|
|
6
9
|
count: number;
|
|
10
|
+
/** 分页游标,第一页传 0,后续传上一页返回的 cursor */
|
|
7
11
|
cursor?: number;
|
|
12
|
+
/** 用户的 open_id */
|
|
8
13
|
open_id?: string;
|
|
9
14
|
publish_time?: number;
|
|
15
|
+
/** 搜索 ID,首刷传空,loadmore 时传上一页返回的 search_id */
|
|
10
16
|
search_id?: string;
|
|
17
|
+
/** 排序类型 */
|
|
11
18
|
sort_type?: number;
|
|
12
19
|
}
|
|
13
20
|
export interface VideoSearchItem {
|
|
21
|
+
/** 视频/作品 ID */
|
|
14
22
|
item_id: string;
|
|
23
|
+
/** 标题 */
|
|
15
24
|
title: string;
|
|
25
|
+
/** 封面图 URL */
|
|
16
26
|
cover: string;
|
|
27
|
+
/** 创建时间(时间戳) */
|
|
17
28
|
create_time: number;
|
|
29
|
+
/** 用户头像 URL */
|
|
18
30
|
avatar: string;
|
|
31
|
+
/** 用户昵称 */
|
|
19
32
|
nickname: string;
|
|
20
33
|
statistics: {
|
|
34
|
+
/** 点赞数 */
|
|
21
35
|
digg_count: number;
|
|
22
36
|
};
|
|
37
|
+
/** 视频链接 */
|
|
23
38
|
link: string;
|
|
24
39
|
}
|
|
25
40
|
export interface VideoSearchResponse {
|
|
41
|
+
/** 视频列表 */
|
|
26
42
|
video_list: VideoSearchItem[];
|
|
43
|
+
/** 是否有更多数据 */
|
|
27
44
|
has_more: boolean;
|
|
45
|
+
/** 分页游标,第一页传 0,后续传上一页返回的 cursor */
|
|
28
46
|
cursor: number;
|
|
47
|
+
/** 搜索 ID,首刷传空,loadmore 时传上一页返回的 search_id */
|
|
29
48
|
search_id: string;
|
|
30
49
|
}
|
|
31
50
|
/**
|
|
@@ -36,9 +55,13 @@ export declare function searchVideo(params: VideoSearchParams, options?: CallOpt
|
|
|
36
55
|
* 用户星座信息响应数据。
|
|
37
56
|
*/
|
|
38
57
|
export interface SearchUserParams {
|
|
58
|
+
/** 搜索 ID,首刷传空,loadmore 时传上一页返回的 search_id */
|
|
39
59
|
search_id?: string;
|
|
60
|
+
/** 搜索关键词 */
|
|
40
61
|
keyword: string;
|
|
62
|
+
/** 分页游标,第一页传 0,后续传上一页返回的 cursor */
|
|
41
63
|
cursor?: string;
|
|
64
|
+
/** 每页数量 */
|
|
42
65
|
count?: number;
|
|
43
66
|
}
|
|
44
67
|
/**
|
|
@@ -53,21 +76,32 @@ export interface AvatarThumb {
|
|
|
53
76
|
* 搜索结果用户项。
|
|
54
77
|
*/
|
|
55
78
|
export interface SearchUserItem {
|
|
79
|
+
/** 用户昵称 */
|
|
56
80
|
nickname: string;
|
|
81
|
+
/** 用户头像缩略图 */
|
|
57
82
|
avatar_thumb: AvatarThumb;
|
|
83
|
+
/** 自定义认证信息 */
|
|
58
84
|
custom_verify: string;
|
|
85
|
+
/** 认证类型 */
|
|
59
86
|
verification_type: number;
|
|
87
|
+
/** 账号认证信息 */
|
|
60
88
|
account_cert_info: string;
|
|
89
|
+
/** 直播状态 */
|
|
61
90
|
live_status: number;
|
|
91
|
+
/** 直播间 ID */
|
|
62
92
|
room_id: number;
|
|
63
93
|
}
|
|
64
94
|
/**
|
|
65
95
|
* 搜索用户响应数据。
|
|
66
96
|
*/
|
|
67
97
|
export interface SearchUserResponse {
|
|
98
|
+
/** 分页游标,第一页传 0,后续传上一页返回的 cursor */
|
|
68
99
|
cursor: number;
|
|
100
|
+
/** 是否有更多数据 */
|
|
69
101
|
has_more: boolean;
|
|
102
|
+
/** 搜索 ID,首刷传空,loadmore 时传上一页返回的 search_id */
|
|
70
103
|
search_id: string;
|
|
104
|
+
/** 搜索结果列表 */
|
|
71
105
|
result: SearchUserItem[];
|
|
72
106
|
}
|
|
73
107
|
/**
|
|
@@ -79,16 +113,22 @@ export declare function searchUser(params: SearchUserParams, options?: CallOptio
|
|
|
79
113
|
* 搜索用户参数。
|
|
80
114
|
*/
|
|
81
115
|
export interface SearchLiveParams {
|
|
116
|
+
/** 搜索 ID,首刷传空,loadmore 时传上一页返回的 search_id */
|
|
82
117
|
search_id?: string;
|
|
118
|
+
/** 搜索关键词 */
|
|
83
119
|
keyword: string;
|
|
120
|
+
/** 分页游标,第一页传 0,后续传上一页返回的 cursor */
|
|
84
121
|
cursor?: string;
|
|
122
|
+
/** 每页数量 */
|
|
85
123
|
count?: number;
|
|
86
124
|
}
|
|
87
125
|
/**
|
|
88
126
|
* 直播作者信息。
|
|
89
127
|
*/
|
|
90
128
|
export interface LiveAuthor {
|
|
129
|
+
/** 用户昵称 */
|
|
91
130
|
nickname: string;
|
|
131
|
+
/** 用户头像缩略图 */
|
|
92
132
|
avatar_thumb: AvatarThumb;
|
|
93
133
|
}
|
|
94
134
|
/**
|
|
@@ -101,31 +141,42 @@ export interface LiveCover {
|
|
|
101
141
|
* 直播原始数据。
|
|
102
142
|
*/
|
|
103
143
|
export interface LiveRawData {
|
|
144
|
+
/** 视频流标签 */
|
|
104
145
|
video_feed_tag: string;
|
|
146
|
+
/** 直播间 ID(字符串) */
|
|
105
147
|
id_str: string;
|
|
148
|
+
/** 状态 */
|
|
106
149
|
status: number;
|
|
150
|
+
/** 封面图 URL */
|
|
107
151
|
cover: LiveCover;
|
|
152
|
+
/** 标题 */
|
|
108
153
|
title: string;
|
|
109
154
|
}
|
|
110
155
|
/**
|
|
111
156
|
* 直播信息。
|
|
112
157
|
*/
|
|
113
158
|
export interface LiveInfo {
|
|
159
|
+
/** 作者信息 */
|
|
114
160
|
author: LiveAuthor;
|
|
161
|
+
/** 原始数据 */
|
|
115
162
|
rawdata: LiveRawData;
|
|
116
163
|
}
|
|
117
164
|
/**
|
|
118
165
|
* 搜索直播结果项。
|
|
119
166
|
*/
|
|
120
167
|
export interface SearchLiveItem {
|
|
168
|
+
/** 直播信息 */
|
|
121
169
|
lives: LiveInfo;
|
|
122
170
|
}
|
|
123
171
|
/**
|
|
124
172
|
* 搜索直播响应数据。
|
|
125
173
|
*/
|
|
126
174
|
export interface SearchLiveResponse {
|
|
175
|
+
/** 数据列表 */
|
|
127
176
|
data: SearchLiveItem[];
|
|
177
|
+
/** 分页游标,第一页传 0,后续传上一页返回的 cursor */
|
|
128
178
|
cursor: number;
|
|
179
|
+
/** 是否有更多数据 */
|
|
129
180
|
has_more: boolean;
|
|
130
181
|
}
|
|
131
182
|
/**
|
|
@@ -24,14 +24,27 @@ export interface VisionSearchParams {
|
|
|
24
24
|
ts: string;
|
|
25
25
|
}
|
|
26
26
|
export interface VisionSearchItem {
|
|
27
|
+
/** 视频/作品 ID */
|
|
27
28
|
item_id: string;
|
|
29
|
+
/** 标题 */
|
|
28
30
|
title: string;
|
|
31
|
+
/** 封面图 URL */
|
|
29
32
|
cover: string;
|
|
33
|
+
/** 作者名称 */
|
|
30
34
|
author_name: string;
|
|
35
|
+
/** 相似度 */
|
|
31
36
|
similarity: number;
|
|
32
37
|
}
|
|
33
38
|
export interface VisionSearchResponse {
|
|
39
|
+
/** 业务配置 */
|
|
34
40
|
business_config: Record<string, unknown>;
|
|
41
|
+
/** 业务数据 */
|
|
35
42
|
business_data: VisionSearchItem[];
|
|
36
43
|
}
|
|
37
|
-
export declare function searchVision(
|
|
44
|
+
export declare function searchVision(
|
|
45
|
+
/**
|
|
46
|
+
* 抖音视觉图搜(dy.open.vison.search)
|
|
47
|
+
* 以图搜图,支持 URL/Blob/ArrayBuffer/Uint8Array/base64 格式的图片
|
|
48
|
+
* @param params.image 图片(URL 会自动下载后以 form-data 上传)
|
|
49
|
+
*/
|
|
50
|
+
params: VisionSearchParams, options?: CallOptions): Promise<OpenAPIResponse<VisionSearchResponse>>;
|
|
@@ -33,7 +33,13 @@ async function downloadImageAsBlob(url) {
|
|
|
33
33
|
}
|
|
34
34
|
return await resp.blob();
|
|
35
35
|
}
|
|
36
|
-
async function searchVision(
|
|
36
|
+
async function searchVision(
|
|
37
|
+
/**
|
|
38
|
+
* 抖音视觉图搜(dy.open.vison.search)
|
|
39
|
+
* 以图搜图,支持 URL/Blob/ArrayBuffer/Uint8Array/base64 格式的图片
|
|
40
|
+
* @param params.image 图片(URL 会自动下载后以 form-data 上传)
|
|
41
|
+
*/
|
|
42
|
+
params, options) {
|
|
37
43
|
const { image: _, ...queryParams } = params;
|
|
38
44
|
const imageBlob = typeof params.image === 'string' && isImageUrl(params.image)
|
|
39
45
|
? await downloadImageAsBlob(params.image)
|