Skip to content

Commit 1d13271

Browse files
committed
feat: update API reference with new Scraper API sections
- Change "Api Reference" to "API Reference" for consistency - Add new Scraper API documentation including authentication and overview sections - Update existing API references to use the new OpenAPI schema files - Enhance overall structure and clarity of the API documentation
1 parent a6477f7 commit 1d13271

File tree

14 files changed

+549
-9
lines changed

14 files changed

+549
-9
lines changed

app/(home)/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function HomePage() {
1818
href="/docs/api-reference"
1919
className="px-6 py-3 bg-fd-primary text-fd-primary-foreground rounded-md font-medium hover:bg-fd-primary/90 transition-colors"
2020
>
21-
Api Reference
21+
API Reference
2222
</Link>
2323
<Link
2424
href="/docs/development"

content/docs/api-reference/meta.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
"restful/client/get",
1919
"restful/client/put",
2020
"restful/task/post",
21-
"restful/task/get"
21+
"restful/task/get",
22+
"---Scraper API---",
23+
"scraper/overview",
24+
"scraper/authentication",
25+
"scraper/web/post",
26+
"scraper/search/post"
2227
]
2328
}

content/docs/api-reference/restful/client/get.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ _openapi:
1212

1313
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
1414

15-
<APIPage document={"./scripts/web-api.json"} operations={[{"path":"/client","method":"get"}]} webhooks={[]} hasHead={false} />
15+
<APIPage document={"./scripts/restful.openapi.json"} operations={[{"path":"/client","method":"get"}]} webhooks={[]} hasHead={false} />

content/docs/api-reference/restful/client/put.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ _openapi:
1212

1313
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
1414

15-
<APIPage document={"./scripts/web-api.json"} operations={[{"path":"/client","method":"put"}]} webhooks={[]} hasHead={false} />
15+
<APIPage document={"./scripts/restful.openapi.json"} operations={[{"path":"/client","method":"put"}]} webhooks={[]} hasHead={false} />

content/docs/api-reference/restful/clients/get.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ _openapi:
1212

1313
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
1414

15-
<APIPage document={"./scripts/web-api.json"} operations={[{"path":"/clients","method":"get"}]} webhooks={[]} hasHead={false} />
15+
<APIPage document={"./scripts/restful.openapi.json"} operations={[{"path":"/clients","method":"get"}]} webhooks={[]} hasHead={false} />

content/docs/api-reference/restful/task/get.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ _openapi:
1212

1313
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
1414

15-
<APIPage document={"./scripts/web-api.json"} operations={[{"path":"/task","method":"get"}]} webhooks={[]} hasHead={false} />
15+
<APIPage document={"./scripts/restful.openapi.json"} operations={[{"path":"/task","method":"get"}]} webhooks={[]} hasHead={false} />

content/docs/api-reference/restful/task/post.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ _openapi:
1212

1313
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
1414

15-
<APIPage document={"./scripts/web-api.json"} operations={[{"path":"/task","method":"post"}]} webhooks={[]} hasHead={false} />
15+
<APIPage document={"./scripts/restful.openapi.json"} operations={[{"path":"/task","method":"post"}]} webhooks={[]} hasHead={false} />
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: API Key 认证
3+
---
4+
5+
MULTIPOST API 使用 API 密钥进行身份验证。您可以在 [API Keys](https://multipost.app/dashboard/api-keys) 页面创建、管理和了解更多关于 API 密钥的信息。
6+
7+
请记住,您的 API 密钥是保密的!不要与他人分享或在任何客户端代码(浏览器、应用程序)中暴露它。API 密钥应该从服务器上的环境变量或密钥管理服务中安全加载。
8+
9+
API 密钥应通过 HTTP Bearer 认证提供。
10+
11+
Authorization: Bearer MULTIPOST_API_KEY
12+
13+
示例请求:
14+
15+
```bash
16+
curl https://multipost.app/api/scraper/web \
17+
-H "Authorization: Bearer $MULTIPOST_API_KEY"
18+
```
19+
20+
21+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: Overview
3+
---
4+
5+
## 原理介绍
6+
7+
我们通过云端 API 接口,来实现网页内容爬取、搜索等功能。
8+
9+
## 使用
10+
11+
1.[multipost.app](https://multipost.app) 中创建一个账号
12+
2. 打开 [API Keys](https://multipost.app/dashboard/api-keys)
13+
3. 点击 `Create API Key` 按钮,创建一个 API Key
14+
4. 复制 `API Key`
15+
5. 使用 `API Key` 调用相关接口
16+
17+
## Pricing
18+
19+
请注意,Scraper API 的调用,需要消耗积分,充值积分后才能使用,计费按实际返回内容长度计算。详情请参考 [Pricing](/docs/user-guide/pricing)
20+
21+
## 名词解析
22+
23+
### API Key
24+
25+
API Key 是用于调用 Restful API 的凭证。
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: 搜索
3+
description: 提供搜索关键词,返回搜索结果
4+
full: true
5+
_openapi:
6+
method: POST
7+
route: /scraper/search
8+
toc: []
9+
structuredData:
10+
headings: []
11+
contents:
12+
- content: 提供搜索关键词,返回搜索结果
13+
---
14+
15+
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
16+
17+
<APIPage document={"./scripts/scraper.openapi.json"} operations={[{"path":"/scraper/search","method":"post"}]} webhooks={[]} hasHead={false} />

0 commit comments

Comments
 (0)