收藏夹

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

失败的结果列表

阿里云首页 网盘与相册服务 相关技术圈