瀏覽代碼

Merge remote-tracking branch 'origin/master' into dev

ryoii 4 年之前
父節點
當前提交
7088054db8

+ 0 - 44
.github/workflows/docs.yml

@@ -1,44 +0,0 @@
-name: Publish Mah Docs
-
-on:
-  push:
-    branches: [master]
-    paths:
-      - 'docs/**'
-
-jobs:
-
-  build:
-
-    runs-on: ubuntu-latest
-
-    steps:
-      - uses: actions/checkout@v2
-
-      - name: Get yarn cache directory path
-        id: yarn-cache-dir-path
-        run: echo "::set-output name=dir::$(yarn cache dir)"
-
-      - name: Cache Packages
-        id: yarn-cache
-        uses: actions/cache@v2
-        with:
-          path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
-          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
-          restore-keys: |
-            ${{ runner.os }}-yarn-
-
-      - name: Install and build
-        run: |
-          yarn install
-          yarn docs:build
-
-      - name: GitHub Pages Deploy
-        uses: peaceiris/actions-gh-pages@v3
-        with:
-          github_token: ${{ secrets.GITHUB_TOKEN }}
-          publish_dir: docs/.vuepress/dist
-          user_name: 'mamoebot'
-          user_email: '[email protected]'
-          keep_files: true
-          full_commit_message: ${{ github.event.head_commit.message }} (${{ github.event.head_commit.id }})

+ 0 - 1
docs/.vuepress/.gitignore

@@ -1 +0,0 @@
-dist/

+ 0 - 51
docs/.vuepress/config.js

@@ -1,51 +0,0 @@
-module.exports = {
-    title: "mirai-api-http",
-    description: "Mirai HTTP API (console) plugin",
-    base: "/mirai-api-http",
-    markdown: {
-        lineNumbers: true,
-    },
-    theme: "antdocs",
-    themeConfig: {
-        backToTop: true,
-        sidebar: "auto",
-        sidebarDepth: 2,
-        displayAllHeaders: true,
-        repo: "project-mirai/mirai-api-http",
-        logo: "https://raw.githubusercontent.com/mamoe/mirai/dev/docs/mirai.png",
-        docsDir: "docs",
-        editLinks: true,
-        smoothScroll: true,
-        editLinkText: "在 GitHub 上编辑此页",
-        lastUpdated: "上次更新",
-        nav: [
-            {text: "首页", link: "/"},
-            {text: "API", link: "/api/API.html"},
-            {text: "事件类型", link: "/api/EventType.html"},
-            {text: "消息类型", link: "/api/MessageType.html"},
-            {
-                text: "接口适配器",
-                items: [
-                    {text: "http轮询", link: "/adapter/HttpAdapter.html"},
-                    {text: "websocket", link: "/adapter/WebsocketAdapter.html"},
-                    {text: "反向websocket", link: "/adapter/ReverseWebsocketAdapter.html"},
-                    {text: "webhook上报", link: "/adapter/Webhook.html"},
-                ],
-            },
-        ],
-    },
-    plugins: [
-        "@vuepress/plugin-medium-zoom",
-        "@vuepress/nprogress",
-        [
-            "@vuepress/pwa",
-            {
-                serviceWorker: true,
-                updatePopup: {
-                    message: "发现新内容",
-                    buttonText: "刷新",
-                },
-            },
-        ],
-    ],
-};

+ 1 - 1
docs/adapter/Adapter.md

@@ -10,7 +10,7 @@
 
 | 适配器名称     | 描述                           | 文档                                      |
 | ------------ | ------------------------------ | ---------------------------------------- |
-| http         | 提供基于轮询的 http 接口          | [http](docs/adapter/HttpAdapter.md)                   |
+| http         | 提供基于轮询的 http 接口          | [http](HttpAdapter.md)                   |
 | ws           | 提供 websocket server 形式的接口 | [ws](WebsocketAdapter.md)                |
 | reverse-ws   | 提供 websocket client 形式的接口 | [reverse-ws](ReverseWebsocketAdapter.md) |
 | webhook      | 通过 http 反向调用形式的接口      | [webhook](WebhookAdapter.md)              | 

+ 3 - 3
docs/adapter/HttpAdapter.md

@@ -47,7 +47,7 @@ adapterSettings:
 
 通用接口为所有 `built-in adapter` 公用的数据规范, 该文档定义了不同 `adapter` 的具体调用方式
 + **[获取插件信息](#获取插件信息)**
-+ **[缓存操作]()**
++ **[缓存操作](#缓存操作)**
   + [通过messageId获取消息](#通过messageId获取消息)
 + **[获取账号信息](#获取账号信息)**
   + [获取好友列表](#获取好友列表)
@@ -455,7 +455,7 @@ adapterSettings:
 [GET] /file/list
 ```
 
-**本接口为[GET]请求, 参数格式为参数格式为url参数**
+**本接口为[GET]请求, 参数格式为url参数**
 
 通用接口定义: [查看文件列表](../api/API.md#查看文件列表)
 
@@ -465,7 +465,7 @@ adapterSettings:
 [GET] /file/info
 ```
 
-**本接口为[GET]请求, 参数格式为参数格式为url参数**
+**本接口为[GET]请求, 参数格式为url参数**
 
 通用接口定义: [获取文件信息](../api/API.md#获取文件信息)
 

+ 1 - 1
docs/adapter/WebhookAdapter.md

@@ -1,4 +1,4 @@
-## Http Adapter
+## Webhook Adapter
 
 提供 http 回调形式的接口, 可单纯做上报使用
 

+ 3 - 3
docs/adapter/WebsocketAdapter.md

@@ -180,7 +180,7 @@ adapterSettings:
 命令字: friendList
 ```
 
-通用接口定义: [通过messageId获取消息](../api/API.md#获取好友列表)
+通用接口定义: [获取好友列表](../api/API.md#获取好友列表)
 
 ### 获取群列表
 
@@ -190,7 +190,7 @@ adapterSettings:
 命令字: groupList
 ```
 
-通用接口定义: [通过messageId获取消息](../api/API.md#获取群列表)
+通用接口定义: [获取群列表](../api/API.md#获取群列表)
 
 ### 获取群成员列表
 
@@ -200,7 +200,7 @@ adapterSettings:
 命令字: memberList
 ```
 
-通用接口定义: [通过messageId获取消息](../api/API.md#获取群成员列表)
+通用接口定义: [获取群成员列表](../api/API.md#获取群成员列表)
 
 ### 获取Bot资料
 

+ 0 - 23
package.json

@@ -1,23 +0,0 @@
-{
-  "name": "mirai-api-http",
-  "version": "1.9.7",
-  "description": "Mirai HTTP API (console) plugin",
-  "main": "index.js",
-  "repository": "https://github.com/project-mirai/mirai-api-http.git",
-  "author": "project-mirai",
-  "license": "AGPL-3.0",
-  "devDependencies": {
-    "@vuepress/plugin-medium-zoom": "^1.8.0",
-    "@vuepress/plugin-nprogress": "^1.8.0",
-    "@vuepress/plugin-pwa": "^1.8.0",
-    "vuepress": "^1.8.0",
-    "vuepress-theme-antdocs": "^1.2.2"
-  },
-  "scripts": {
-    "docs:dev": "vuepress dev docs",
-    "docs:build": "vuepress build docs"
-  },
-  "dependencies": {
-    "core-js": "^2.6.11"
-  }
-}