diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1616c9aeb..e365cd46c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,5 +13,5 @@ jobs: uses: msfjarvis/setup-android@0.2 with: # Gradle tasks to run - If you want to run ./gradlew assemble, specify assemble here. - gradleTasks: build + gradleTasks: build -x mirai-core:jvmTest diff --git a/README.md b/README.md index 8c8625412..45b309974 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Mirai -[![Codacy Badge](https://api.codacy.com/project/badge/Grade/7d0ec3ea244b424f93a6f59038a9deeb)](https://www.codacy.com/manual/Him188/mirai?utm_source=github.com&utm_medium=referral&utm_content=mamoe/mirai&utm_campaign=Badge_Grade) [![Gitter](https://badges.gitter.im/mamoe/mirai.svg)](https://gitter.im/mamoe/mirai?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Download](https://api.bintray.com/packages/him188moe/mirai/mirai-core/images/download.svg)](https://bintray.com/him188moe/mirai/mirai-core/) +[![Codacy Badge](https://api.codacy.com/project/badge/Grade/7d0ec3ea244b424f93a6f59038a9deeb)](https://www.codacy.com/manual/Him188/mirai?utm_source=github.com&utm_medium=referral&utm_content=mamoe/mirai&utm_campaign=Badge_Grade) +[![Gitter](https://badges.gitter.im/mamoe/mirai.svg)](https://gitter.im/mamoe/mirai?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +[![Actions Status](https://github.com/mamoe/mirai/workflows/CI/badge.svg)](https://github.com/mamoe/mirai/actions) +[![Download](https://api.bintray.com/packages/him188moe/mirai/mirai-core/images/download.svg)](https://bintray.com/him188moe/mirai/mirai-core/) **[English](README-eng.md)** **TIM PC 协议** 跨平台 QQ 协议支持库. @@ -70,12 +73,11 @@ bot.subscribeAlways { 我们欢迎一切形式的贡献. 若您有兴趣为 Mirai 实现 JS, iOS, Native 平台, 请联系我(`Him188@mamoe.net`). 若在使用过程中有任何疑问, 可提交 issue 或是邮件联系. 我们希望 Mirai 变得更易用. -## Requirements +## Build Requirements -Kotlin 1.3.61 - -JVM 平台: Java 6 -Android: SDK 15 +- Kotlin 1.3.61 +- JDK 8 +- Android SDK 29 ### Using Java Q: 是否能只使用 Java 而不使用 Kotlin 来调用 Mirai? diff --git a/mirai-api-http/README.md b/mirai-api-http/README.md index 139b3bf06..d08e19f4e 100644 --- a/mirai-api-http/README.md +++ b/mirai-api-http/README.md @@ -3,6 +3,8 @@ Mirai-API-http provides adapter for ALL langugae to access mirai via HTTP protocol.
+ +**[中文](README_CH.md)** ### Start Session-Authorize diff --git a/mirai-api-http/README_CH.md b/mirai-api-http/README_CH.md new file mode 100644 index 000000000..a56c1c5a7 --- /dev/null +++ b/mirai-api-http/README_CH.md @@ -0,0 +1,55 @@ +# mirai-api-http + + +Mirai-API-http 提供HTTP API供所有语言使用mirai
+
+ +### 开始会话-认证(Authorize) + +```php +路径: /auth +方法: POST +``` +使用此方法验证你的会话连接, 并将这个会话绑定一个BOT
+注意: 每个会话只能绑定一个BOT. + +#### 请求:
+ +| 名字 | 类型 | 可选 | 举例 | 说明 | +| --- | --- | --- | --- | --- | +| key | String |false|U9HSaDXl39ksd918273hU|MIRAI API HTTP key, HTTP API的核心key| +| qq | String |false|1040400290|需要绑定的BOT QQ号| + + +#### 返回(成功):
+ +| 名字 | 类型 | 举例 | 说明| +| --- | --- | --- | --- | +| success |Boolean |true|是否验证成功| +| session |String |UANSHDKSLAOISN|你的session key| + + +#### 返回(失败):
+ +| name | type | example|note| +| --- | --- | --- | --- | +| success |Boolean |false|是否验证成功| +| session |String |null|你的session key| +| error |int |0|错误码| + +#### 错误码:
+ +| 代码 | 原因| +| --- | --- | +| 0 | 错误的MIRAI API HTTP key | +| 1 | 试图绑定不存在的bot| + + + session key 是使用以下方法必须携带的
+ session key 需要被以cookie的形式上报 cookies : + + | name | value | + | --- | --- | + | session |your session key here | + +如果出现HTTP 403错误码,代表session key已过期, 需要重新获取 \ No newline at end of file