From ce45f84b416cbd1f1bd19e13ef4227ee23e1ead5 Mon Sep 17 00:00:00 2001 From: liujiahua123123 Date: Sun, 15 Dec 2019 17:11:06 +0800 Subject: [PATCH 1/4] http --- mirai-api-http/README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/mirai-api-http/README.md b/mirai-api-http/README.md index cfc22b29c..d95986eee 100644 --- a/mirai-api-http/README.md +++ b/mirai-api-http/README.md @@ -14,11 +14,27 @@ Method: POST this verify your session to one bot and you could have full access to that bot
NOTE that only 1 bot could be control under 1 session, you could have multiple session to control all bots. +Request:
+ | name | type | optional|example|note| | --- | --- | --- | --- | --- | -| key | String |false|U9HSaDXl39ksd918273hU|this could be found after initialize| +| key | String |false|U9HSaDXl39ksd918273hU|MIRAI API HTTP key, this could be found after initialize| | qq | String |false|1040400290|bot QQ number you want to access| +Response:
+ +| name | type | example|note| +| --- | --- | --- | --- | +| success |Boolean |true|if this session is authorized| +| session |String |UANSHDKSLAOISN|your session key| + + + without session key, you are not able to access any method below.
+ session key should be attached to your cookies like this: - \ No newline at end of file + | name | value | + | --- | --- | + | session |your session key here | + + if you were getting HTTP error code 403, you should ask for a new session key. \ No newline at end of file From f5f11f947275ffaa06844e6c7160d3dd39ebb5ed Mon Sep 17 00:00:00 2001 From: liujiahua123123 Date: Sun, 15 Dec 2019 17:14:03 +0800 Subject: [PATCH 2/4] http --- mirai-api-http/README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/mirai-api-http/README.md b/mirai-api-http/README.md index d95986eee..8c671fc28 100644 --- a/mirai-api-http/README.md +++ b/mirai-api-http/README.md @@ -22,7 +22,7 @@ Request:
| qq | String |false|1040400290|bot QQ number you want to access| -Response:
+Response if success:
| name | type | example|note| | --- | --- | --- | --- | @@ -30,6 +30,22 @@ Response:
| session |String |UANSHDKSLAOISN|your session key| +Response if failed:
+ +| name | type | example|note| +| --- | --- | --- | --- | +| success |Boolean |false|if this session is authorized| +| session |String |null|your session key| +| error |int |0|error code| + +Error:
+ +| code | reason| +| --- | --- | +| 0 | wrong MIRAI API HTTP key | +| 1 | unknown bot number | + + without session key, you are not able to access any method below.
session key should be attached to your cookies like this: From 25af15e0ed11bd1149a0fbe4c4d0c801b3accd94 Mon Sep 17 00:00:00 2001 From: liujiahua123123 Date: Sun, 15 Dec 2019 17:15:25 +0800 Subject: [PATCH 3/4] http --- mirai-api-http/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mirai-api-http/README.md b/mirai-api-http/README.md index 8c671fc28..beb05ce4d 100644 --- a/mirai-api-http/README.md +++ b/mirai-api-http/README.md @@ -5,7 +5,7 @@ Mirai-API-http provides adapter for ALL langugae to access mirai via HTTP protoc -#### Start Session-Authorize +### Start Session-Authorize ```php Path: /auth @@ -14,7 +14,7 @@ Method: POST this verify your session to one bot and you could have full access to that bot
NOTE that only 1 bot could be control under 1 session, you could have multiple session to control all bots. -Request:
+####Request:
| name | type | optional|example|note| | --- | --- | --- | --- | --- | @@ -22,7 +22,7 @@ Request:
| qq | String |false|1040400290|bot QQ number you want to access| -Response if success:
+####Response if success:
| name | type | example|note| | --- | --- | --- | --- | @@ -30,7 +30,7 @@ Response if success:
| session |String |UANSHDKSLAOISN|your session key| -Response if failed:
+####Response if failed:
| name | type | example|note| | --- | --- | --- | --- | @@ -38,7 +38,7 @@ Response if failed:
| session |String |null|your session key| | error |int |0|error code| -Error:
+####Error:
| code | reason| | --- | --- | @@ -47,7 +47,7 @@ Error:
without session key, you are not able to access any method below.
- session key should be attached to your cookies like this: + session key should be attached to your cookies like this: | name | value | | --- | --- | From 0f2c1f1c8bb00cd14a39d69a60a8596fae8c8b09 Mon Sep 17 00:00:00 2001 From: liujiahua123123 Date: Sun, 15 Dec 2019 17:15:54 +0800 Subject: [PATCH 4/4] http --- mirai-api-http/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mirai-api-http/README.md b/mirai-api-http/README.md index beb05ce4d..139b3bf06 100644 --- a/mirai-api-http/README.md +++ b/mirai-api-http/README.md @@ -14,7 +14,7 @@ Method: POST this verify your session to one bot and you could have full access to that bot
NOTE that only 1 bot could be control under 1 session, you could have multiple session to control all bots. -####Request:
+#### Request:
| name | type | optional|example|note| | --- | --- | --- | --- | --- | @@ -22,7 +22,7 @@ NOTE that only 1 bot could be control under 1 session, you could have multiple s | qq | String |false|1040400290|bot QQ number you want to access| -####Response if success:
+#### Response if success:
| name | type | example|note| | --- | --- | --- | --- | @@ -30,7 +30,7 @@ NOTE that only 1 bot could be control under 1 session, you could have multiple s | session |String |UANSHDKSLAOISN|your session key| -####Response if failed:
+#### Response if failed:
| name | type | example|note| | --- | --- | --- | --- | @@ -38,7 +38,7 @@ NOTE that only 1 bot could be control under 1 session, you could have multiple s | session |String |null|your session key| | error |int |0|error code| -####Error:
+#### Error:
| code | reason| | --- | --- |