mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 09:50:16 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
da18aafa2f
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -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
|
||||
|
||||
|
14
README.md
14
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<MemberPermissionChangedEvent> {
|
||||
我们欢迎一切形式的贡献. 若您有兴趣为 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?
|
||||
|
@ -3,6 +3,8 @@
|
||||
<b>
|
||||
Mirai-API-http provides adapter for ALL langugae to access mirai via HTTP protocol.<br>
|
||||
</b>
|
||||
|
||||
**[中文](README_CH.md)**
|
||||
|
||||
|
||||
### Start Session-Authorize
|
||||
|
55
mirai-api-http/README_CH.md
Normal file
55
mirai-api-http/README_CH.md
Normal file
@ -0,0 +1,55 @@
|
||||
# mirai-api-http
|
||||
|
||||
<b>
|
||||
Mirai-API-http 提供HTTP API供所有语言使用mirai<br>
|
||||
</b>
|
||||
|
||||
### 开始会话-认证(Authorize)
|
||||
|
||||
```php
|
||||
路径: /auth
|
||||
方法: POST
|
||||
```
|
||||
使用此方法验证你的会话连接, 并将这个会话绑定一个BOT<br>
|
||||
注意: 每个会话只能绑定一个BOT.
|
||||
|
||||
#### 请求:<br>
|
||||
|
||||
| 名字 | 类型 | 可选 | 举例 | 说明 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| key | String |false|U9HSaDXl39ksd918273hU|MIRAI API HTTP key, HTTP API的核心key|
|
||||
| qq | String |false|1040400290|需要绑定的BOT QQ号|
|
||||
|
||||
|
||||
#### 返回(成功):<br>
|
||||
|
||||
| 名字 | 类型 | 举例 | 说明|
|
||||
| --- | --- | --- | --- |
|
||||
| success |Boolean |true|是否验证成功|
|
||||
| session |String |UANSHDKSLAOISN|你的session key|
|
||||
|
||||
|
||||
#### 返回(失败):<br>
|
||||
|
||||
| name | type | example|note|
|
||||
| --- | --- | --- | --- |
|
||||
| success |Boolean |false|是否验证成功|
|
||||
| session |String |null|你的session key|
|
||||
| error |int |0|错误码|
|
||||
|
||||
#### 错误码:<br>
|
||||
|
||||
| 代码 | 原因|
|
||||
| --- | --- |
|
||||
| 0 | 错误的MIRAI API HTTP key |
|
||||
| 1 | 试图绑定不存在的bot|
|
||||
|
||||
|
||||
session key 是使用以下方法必须携带的</br>
|
||||
session key 需要被以cookie的形式上报 <b>cookies</b> :
|
||||
|
||||
| name | value |
|
||||
| --- | --- |
|
||||
| session |your session key here |
|
||||
|
||||
如果出现HTTP 403错误码,代表session key已过期, 需要重新获取
|
Loading…
Reference in New Issue
Block a user