@ apicity/ 收音机
Dropbox HTTP API 供用户,文件,内容上传/下載,并共享端点使用.
运行时间依赖性 :
zod@^4.6.6- 请求在 Dropbox 端点方法上附加的策略如下:.schema
安装
npm install @apicity/dropbox
# or
pnpm add @apicity/dropbox
快速启动
import { createDropbox } from "@apicity/dropbox";
const dropbox = createDropbox({ oauthToken: process.env.DROPBOX_OAUTH_TOKEN! });
若为 oauthToken 被省略,提供者读取 DROPBOX_OAUTH_TOKEN 请求时间.
访问符只在 Authorization: Bearer ... 头曰.
oauth2.token 交换授权代码( 带有可选的 PKCE) code_verifier)或连接符的刷新符. 它要求 clientId 选项,添加 clientSecret 并且将补助金作为形式机构发放给 oauthBaseURL (默认) https://api.dropboxapi.com) (中文(简体) ).
API 参考
17个终点横跨5个组. 每个方法都映射出上游的 URL 路径 .
检查
POST dropbox.check.user
POST https://api.dropboxapi.com/2/check/user
成本等级 : cheap
const res = await dropbox.check.user({ /* ... */ });
文件
POST dropbox.files.copyV2
POST https://api.dropboxapi.com/2/files/copy_v2
成本等级 : cheap
const res = await dropbox.files.copyV2({ /* ... */ });
POST dropbox.files.createFolderV2
POST https://api.dropboxapi.com/2/files/create_folder_v2
成本等级 : cheap
const res = await dropbox.files.createFolderV2({ /* ... */ });
POST dropbox.files.deleteV2
POST https://api.dropboxapi.com/2/files/delete_v2
成本等级 : cheap
const res = await dropbox.files.deleteV2({ /* ... */ });
POST dropbox.files.download
POST https://content.dropboxapi.com/2/files/download
成本等级 : cheap
const res = await dropbox.files.download({ /* ... */ });
POST dropbox.files.getMetadata
POST https://api.dropboxapi.com/2/files/get_metadata
成本等级 : cheap
const res = await dropbox.files.getMetadata({ /* ... */ });
POST dropbox.files.listFolder
POST https://api.dropboxapi.com/2/files/list_folder
成本等级 : cheap
const res = await dropbox.files.listFolder({ /* ... */ });
POST dropbox.files.listFolderContinue
POST https://api.dropboxapi.com/2/files/list_folder/continue
成本等级 : cheap
const res = await dropbox.files.listFolderContinue({ /* ... */ });
POST dropbox.files.moveV2
POST https://api.dropboxapi.com/2/files/move_v2
成本等级 : cheap
const res = await dropbox.files.moveV2({ /* ... */ });
POST dropbox.files.upload
POST https://content.dropboxapi.com/2/files/upload
成本等级 : cheap
const res = await dropbox.files.upload({ /* ... */ });
POST dropbox.files.uploadSession.appendV2
POST https://content.dropboxapi.com/2/files/upload_session/append_v2
成本等级 : cheap
const res = await dropbox.files.uploadSession.appendV2({ /* ... */ });
POST dropbox.files.uploadSession.finish
POST https://content.dropboxapi.com/2/files/upload_session/finish
成本等级 : cheap
const res = await dropbox.files.uploadSession.finish({ /* ... */ });
POST dropbox.files.uploadSession.start
POST https://content.dropboxapi.com/2/files/upload_session/start
成本等级 : cheap
const res = await dropbox.files.uploadSession.start({ /* ... */ });
欧斯2
POST dropbox.oauth2.token
POST https://api.dropboxapi.com/oauth2/token
成本等级 : cheap
const res = await dropbox.oauth2.token({ /* ... */ });
共享
POST dropbox.sharing.createSharedLinkWithSettings
POST https://api.dropboxapi.com/2/sharing/create_shared_link_with_settings
成本等级 : cheap
const res = await dropbox.sharing.createSharedLinkWithSettings({ /* ... */ });
POST dropbox.sharing.listSharedLinks
POST https://api.dropboxapi.com/2/sharing/list_shared_links
成本等级 : cheap
const res = await dropbox.sharing.listSharedLinks({ /* ... */ });
用户
POST dropbox.users.getCurrentAccount
POST https://api.dropboxapi.com/2/users/get_current_account
成本等级 : cheap
const res = await dropbox.users.getCurrentAccount();
部分 辣点 单相机.
许可证
麻省理工学院——见 自由主义。 。 。 .