Skip to content

Commit ec52bdf

Browse files
committed
feat: enhance API reference documentation with new sections
- Update titles and descriptions for clarity, changing "API Reference" to "Overview" - Introduce new sections for Extension API and Restful API with detailed usage examples - Add new files for authentication, account management, and task handling in the API reference - Improve overall structure and readability of the documentation
1 parent 6e6e655 commit ec52bdf

File tree

15 files changed

+37
-23
lines changed

15 files changed

+37
-23
lines changed
File renamed without changes.

content/docs/api-reference/extension-authentication.mdx renamed to content/docs/api-reference/extension/authentication.mdx

File renamed without changes.
File renamed without changes.

content/docs/api-reference/extension.mdx renamed to content/docs/api-reference/extension/overview.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ title: Overview
44

55
## 原理介绍
66

7+
你可以在你自己的 Web App 中,准备好自己的内容,调用 MultiPost 的 Extension API,发布到多个平台。
8+
9+
如果你开发了类似公众号排版工具、类似“流光卡片”的网站,那么非常适合接入 MultiPost 的 Extension API。
10+
711
我们通过 `window.postMessage` 来实现网页和扩展程序之间的通信。
812
扩展首先会在每个网页中都注入 `src/contents/extension.ts` 中的脚本,然后通过 `window.postMessage` 来发送消息和接收消息并将消息发送给 `src/background/index.ts` 中的脚本进行处理。
913

1014
**你需要使用适当的的方式,发起请求并处理扩展的返回值。**
1115

12-
## 使用
13-
1416
一个基本的处理逻辑和思路,应该是:
1517

1618
1. 检查是否安装了扩展
File renamed without changes.
File renamed without changes.
Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
---
2-
title: API Reference
2+
title: Overview
33
---
44

5-
为了让我们的扩展更加强大,我们对外提供了相关接口,允许网页调用我们的扩展程序。你可以在自己的网页中,集成 MultiPost 扩展,允许用户一键发布内容到多个平台上
5+
MultiPost 提供的丰富的 API 接口,允许开发者远程调用我们的扩展程序的接口,可以半自动、全自动发布内容到多个平台
66

7-
## 扩展 API
7+
目前,我们提供了两种 API 接口:
8+
9+
## Extension API
810

911
我们通过 `window.postMessage` 来实现网页和扩展程序之间的通信。允许开发者调用我们的扩展程序的接口,来实现发布、获取账号信息、获取平台信息等功能。
1012

11-
## 网页 API (Beta, Only for Version above 1.1.0)
13+
## Restful API (Beta, Only for Version above 1.1.0)
1214

13-
我们在 multipost.app 中,提供了一个网页 API,允许开发者远程调用我们的扩展程序的接口,来实现扩展信息获取、发布任务创建等功能。目前支持远程调用、定时发布等功能。
15+
我们在 multipost.app 中,提供了 Restful API,允许开发者远程调用我们的扩展程序的接口,来实现扩展信息获取、发布任务创建等功能。目前支持远程调用、定时发布等功能。
1416

1517
## What is Next?
1618

1719
<Cards>
1820
<Card title="Learn more about Extension API" href="/docs/api-reference/extension" />
19-
<Card title="Learn more about Web API" href="/docs/api-reference/web" />
21+
<Card title="Learn more about Restful API" href="/docs/api-reference/restful" />
22+
<Card title="MultiPost" href="https://multipost.app" />
23+
<Card title="User Guide" href="/docs/user-guide" />
2024
</Cards>

content/docs/api-reference/meta.json

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,21 @@
33
"description": "How to use the API of MultiPost",
44
"root": true,
55
"pages": [
6-
"---Introduction---",
76
"index",
87
"---Extension API---",
9-
"extension",
10-
"extension-authentication",
11-
"extension-publish",
12-
"extension-accounts",
13-
"extension-others",
14-
"extension-reference",
15-
"---Web API---",
16-
"web",
17-
"web-authentication",
18-
"clients/get",
19-
"client/get",
20-
"client/put",
21-
"task/get",
22-
"task/post"
8+
"extension/overview",
9+
"extension/authentication",
10+
"extension/publish",
11+
"extension/accounts",
12+
"extension/others",
13+
"extension/reference",
14+
"---Restful API---",
15+
"restful/overview",
16+
"restful/authentication",
17+
"restful/clients/get",
18+
"restful/client/get",
19+
"restful/client/put",
20+
"restful/task/post",
21+
"restful/task/get"
2322
]
2423
}
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)