全部產品
Search
文件中心

Drive and Photo Service:收藏夾

更新時間:Dec 23, 2025

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

失敗的結果清單