@ikenxuan/amagi 6.0.0-beta.3 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -13
- package/dist/default/index.cjs +1 -1
- package/dist/default/index.d.ts +3147 -3147
- package/dist/default/index.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,17 +1,54 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<h1 align="center">@ikenxuan/amagi</h1>
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
<p align="center">
|
|
6
|
+
抖音、B站、小红书 Web 端数据接口的 Node.js 封装
|
|
7
|
+
</p>
|
|
5
8
|
|
|
6
|
-
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://www.npmjs.com/package/@ikenxuan/amagi"><img src="https://img.shields.io/npm/v/@ikenxuan/amagi?style=flat-square&color=black" alt="npm version" /></a>
|
|
11
|
+
<a href="https://www.npmjs.com/package/@ikenxuan/amagi"><img src="https://img.shields.io/npm/dm/@ikenxuan/amagi?style=flat-square&color=black" alt="npm downloads" /></a>
|
|
12
|
+
<a href="https://github.com/ikenxuan/amagi/blob/main/LICENSE"><img src="https://img.shields.io/github/license/ikenxuan/amagi?style=flat-square&color=black" alt="license" /></a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<a href="https://amagi-docs.vercel.app">文档</a> ·
|
|
17
|
+
<a href="https://amagi.apifox.cn">API 参考</a> ·
|
|
18
|
+
<a href="https://github.com/ikenxuan/amagi/issues">反馈问题</a>
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 特性
|
|
24
|
+
|
|
25
|
+
- **多平台支持** — 抖音、B站、小红书的主流数据接口
|
|
26
|
+
- **双模式调用** — SDK 直接调用或启动本地 HTTP 服务
|
|
27
|
+
- **类型安全** — 完整的 TypeScript 类型定义,支持 strict 模式
|
|
28
|
+
- **参数校验** — 基于 Zod 的严格参数验证,统一响应格式
|
|
29
|
+
- **事件驱动** — 全新事件系统,灵活的日志与监控
|
|
30
|
+
- **双模块输出** — 同时支持 ESM 与 CJS
|
|
7
31
|
|
|
8
32
|
## 安装
|
|
9
33
|
|
|
10
34
|
```bash
|
|
11
|
-
pnpm add @ikenxuan/amagi
|
|
35
|
+
pnpm add @ikenxuan/amagi
|
|
12
36
|
```
|
|
13
37
|
|
|
14
|
-
|
|
38
|
+
<details>
|
|
39
|
+
<summary>其他包管理器</summary>
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# npm
|
|
43
|
+
npm install @ikenxuan/amagi
|
|
44
|
+
|
|
45
|
+
# yarn
|
|
46
|
+
yarn add @ikenxuan/amagi
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
</details>
|
|
50
|
+
|
|
51
|
+
## 快速开始
|
|
15
52
|
|
|
16
53
|
```ts
|
|
17
54
|
import amagi from '@ikenxuan/amagi'
|
|
@@ -20,25 +57,30 @@ const client = amagi({
|
|
|
20
57
|
cookies: {
|
|
21
58
|
bilibili: 'SESSDATA=xxx; ...',
|
|
22
59
|
douyin: 'ttwid=...; ...',
|
|
23
|
-
kuaishou: 'did=...; ...',
|
|
24
|
-
xiaohongshu: 'a1=...; ...',
|
|
25
60
|
}
|
|
26
61
|
})
|
|
27
62
|
|
|
28
|
-
//
|
|
63
|
+
// SDK 调用
|
|
29
64
|
const video = await client.bilibili.fetcher.fetchVideoInfo({
|
|
30
65
|
bvid: 'BV1xx411c7mD'
|
|
31
66
|
})
|
|
32
67
|
|
|
33
|
-
//
|
|
68
|
+
// 或启动 HTTP 服务
|
|
34
69
|
client.startServer(4567)
|
|
35
70
|
```
|
|
36
71
|
|
|
37
72
|
## 文档
|
|
38
73
|
|
|
39
|
-
|
|
40
|
-
|
|
74
|
+
访问 [amagi-docs.vercel.app](https://amagi-docs.vercel.app) 查看完整文档。
|
|
75
|
+
|
|
76
|
+
- [安装指南](https://amagi-docs.vercel.app/docs/usage/installation)
|
|
77
|
+
- [快速上手](https://amagi-docs.vercel.app/docs/usage/getting-started)
|
|
78
|
+
- [API 参考](https://amagi-docs.vercel.app/docs/usage/api/bilibili)
|
|
79
|
+
|
|
80
|
+
## 贡献
|
|
81
|
+
|
|
82
|
+
欢迎提交 Issue 和 Pull Request。详见 [开发文档](https://amagi-docs.vercel.app/docs/dev)。
|
|
41
83
|
|
|
42
84
|
## 许可证
|
|
43
85
|
|
|
44
|
-
[GPL-3.0](
|
|
86
|
+
[GPL-3.0](LICENSE)
|
package/dist/default/index.cjs
CHANGED