From 2b1cffdefa71f6a621129880ad30ea0a2d296f7e Mon Sep 17 00:00:00 2001 From: Him188 Date: Sun, 15 Dec 2019 18:37:54 +0800 Subject: [PATCH 1/6] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1616c9aeb..85479a582 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 test mirai-core:jvmTest From c79574ddb85bb9b6fcc7534aa479876dc6a13533 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tesla=20Ice=20Zhang=E2=80=AE?= Date: Sun, 15 Dec 2019 15:03:51 -0500 Subject: [PATCH 2/6] Add GitHub Action badge --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8c8625412..2efbffdd3 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 协议支持库. From 555a3c7bb85c24159a626e042ebba7396e0e83f4 Mon Sep 17 00:00:00 2001 From: Him188 Date: Mon, 16 Dec 2019 07:11:19 +0800 Subject: [PATCH 3/6] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 85479a582..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 -x test mirai-core:jvmTest + gradleTasks: build -x mirai-core:jvmTest From fd0556d2e14fe76858d9e1b46bcbab57360a3cd0 Mon Sep 17 00:00:00 2001 From: Him188 Date: Mon, 16 Dec 2019 07:59:24 +0800 Subject: [PATCH 4/6] Update README.md --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2efbffdd3..45b309974 100644 --- a/README.md +++ b/README.md @@ -73,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? From 87e5229cbb0ba7fe0d9d290b4ab8604ab8d92487 Mon Sep 17 00:00:00 2001 From: liujiahua123123 Date: Tue, 17 Dec 2019 11:02:45 +0800 Subject: [PATCH 5/6] readme of HTTP --- mirai-api-http/README.md | 2 ++ mirai-api-http/README_CH.md | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 mirai-api-http/README_CH.md 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..bc5d0808d --- /dev/null +++ b/mirai-api-http/README_CH.md @@ -0,0 +1,6 @@ +# mirai-api-http + + +Mirai-API-http provides adapter for ALL langugae to access mirai via HTTP protocol.
+
+ \ No newline at end of file From 2c0ecbd84c8a15327d7050bd544a899441e21f23 Mon Sep 17 00:00:00 2001 From: liujiahua123123 Date: Tue, 17 Dec 2019 11:45:08 +0800 Subject: [PATCH 6/6] readme of HTTP --- mirai-api-http/README_CH.md | 53 +++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/mirai-api-http/README_CH.md b/mirai-api-http/README_CH.md index bc5d0808d..a56c1c5a7 100644 --- a/mirai-api-http/README_CH.md +++ b/mirai-api-http/README_CH.md @@ -1,6 +1,55 @@ # mirai-api-http -Mirai-API-http provides adapter for ALL langugae to access mirai via HTTP protocol.
+Mirai-API-http 提供HTTP API供所有语言使用mirai
- \ No newline at end of file + +### 开始会话-认证(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