按照以下步骤,快速接入 阿探(AtSeeker) Services
1. 登录 阿探(AtSeeker) Services 控制台
2. 进入「API Key」页面
3. 复制您的 API Key
# 使用 npm npm install @atseeker/sdk # 或使用 yarn yarn add @atseeker/sdk # 或使用 pnpm pnpm add @atseeker/sdk
import { AtSeekerSDK } from "@atseeker/sdk"; // 初始化 SDK const sdk = new AtSeekerSDK({ apiKey: "your-api-key" }); // 用户注册 const registerResult = await sdk.passport.register({ email: "user@example.com", password: "password123" }); console.log("注册成功:", registerResult); // 创建支付订单 const orderResult = await sdk.payment.createOrder({ amount: 9900, description: "Premium 会员", channel: "wechat" }); console.log("订单创建成功:", orderResult); // 上传文件 const file = new File(["Hello"], "hello.txt", { type: "text/plain" }); const uploadResult = await sdk.asset.upload(file); console.log("上传成功:", uploadResult);