收藏夹

更新时间:
复制 MD 格式

listStarredFiles 方法

重要

标准模式支持

警告

托管模式不支持

调用同步接口获取收藏文件列表。

const result = await client.listStarredFiles(params, options)

参数说明

字段

类型

必选

说明

params

object

是

具体字段请查看 ICustomIndexKeyReq

options

AxiosRequestConfig

否

其它配置项

ICustomIndexKeyReq

字段

类型

必选

说明

drive_id

string

是

云盘

image_thumbnail_process

string

是

图片缩略图处理规则。

image_url_process

string

是

图片处理规则。

video_thumbnail_process

string

是

视频缩略图处理规则。

custom_index_key

string

是

自定义的key。

fields

string

是

文件类型,全部为 '*'

limit

number

是

返回结果数量

marker

string

否

标记

referer

string

否

地址,location.origin 或者 undefined

order_direction

string

是

可选值 'DESC' | 'ASC'

返回值

字段

类型

必选

说明

result

IListRes

是

返回结果

IListRes

字段

类型

必选

说明

items

IFileItem

是

文件列表,其中每一项可参考 listFiles 方法中 IFileItem 类型

next_marker

string

否

分页标记

batchToggleFilesStar 方法

重要

标准模式支持

警告

托管模式不支持

收藏操作

const result = await client.batchToggleFilesStar(fileItems, starred, options)

参数说明

字段

类型

必选

说明

fileItems

IFileItem[]

是

其中每一项请查看 listFiles方法中的 IFileItem 类型。

starred

boolean

为true表示收藏,为false表示取消收藏。

如果不传,fileItems中含有 starred 不为 true的时,默认为收藏,否则为取消收藏。

options

AxiosRequestConfig

其它配置项

返回值

字段

类型

必选

说明

result

object

是

返回结果

result

字段

类型

必选

说明

type

string

是

值为 star 或者 unStar

changeItems

array

是

未收藏的文件信息

successItems

array

是

成功的结果列表

errorItems

array

是

失败的结果列表