update MuipAPI documentation for ja, en and zh-TW to be consistent with zh-CN

This commit is contained in:
anyrainel
2025-02-22 10:44:02 -08:00
parent 82acbf352d
commit 5f1c178e10
3 changed files with 101 additions and 65 deletions

View File

@@ -12,17 +12,16 @@
</div>
## 💡API Help
- Since version 2.3, external APIs are supported
- For example, your Dispatch is http://127.0.0.1:8080, and the request parameters and returns are in json format
- (1) Authorization interface: http://127.0.0.1:8080/muip/auth_admin (support POST)
- -Required parameter 1: admin_key (MuipServer/AdminKey configuration in config.php)
- -Required parameter 2: key_type (type, e.g. PEM or XML)
- -Return example:
- External API call interfaces are supported starting from version 2.3.
- The main interface is the Dispatch interface with an entry point. For example, if your Dispatch is http://127.0.0.1:8080, the request parameters and responses are in JSON format.
- (1) Create Session Interface: http://127.0.0.1:8080/muip/create_session (supports POST)
- -Optional parameter: key_type (type, only supports PEM or default XML)
- -Response example:
```json
{
"code": 0,
//codeResponse: `code`: `0 -> Success` `1 -> Token incorrect or not enable`
"message": "Authorized admin key successfully!",
"message": "Created!",
"data": {
"rsaPublicKey": "***",
"sessionId": "***",
@@ -30,29 +29,41 @@
}
}
```
- (2)Submit command interface: http://127.0.0.1:8080/muip/exec_cmd (support POST/GET)
- -Required parameter 1: SessionId (obtained after authorization API request)
- -Required parameter 2: Command (the command to be executed is encrypted by RSA[pacs#1] under rsaPublicKey)
- -Required parameter 3: TargetUid (UID of the player executing the command)
- -Return example:
- (2) Authorization Interface: http://127.0.0.1:8080/muip/auth_admin (supports POST)
- -Required parameter 1: SessionId (obtained after requesting the Create Session Interface)
- -Required parameter 2: admin_key (configured in config.json's MuipServer.AdminKey and encrypted under rsaPublicKey [obtained from Create Session Interface] using RSA [pacs#1])
- -Response example:
```json
{
"code": 0,
//codeResponse: `code`: `0 -> Success` `1 -> Session expired` `2 -> session not found` `3 -> encryption error`
"message": "Success",
"message": "Authorized admin key successfully!",
"data": {
"sessionId": "***",
"message": "*** //base64
"expireTimeStamp": ***
}
}
```
- (3)Interface to get server status: http://127.0.0.1:8080/muip/server_information (support POST/GET)
- -Required parameter 1: SessionId (obtained after authorization API request)
- -Return example:
- (3) Command Submission Interface: http://127.0.0.1:8080/muip/exec_cmd (supports POST/GET)
- -Required parameter 1: SessionId (obtained after requesting the Create Session Interface)
- -Required parameter 2: Command (the command to be executed, encrypted under rsaPublicKey [obtained from Create Session Interface] using RSA [pacs#1])
- -Required parameter 3: TargetUid (UID of the player executing the command)
- -Response example:
```json
{
"code": 0,
"message": "Success",
"data": {
"sessionId": "***",
"message": "*** //after base64 encoding
}
}
```
- (4) Get Server Status Interface: http://127.0.0.1:8080/muip/server_information (supports POST/GET)
- -Required parameter 1: SessionId (obtained after requesting the Create Session Interface)
- -Response example:
```json
{
"code": 0,
//codeResponse: `code`: `0 -> Success` `1 -> Session expired` `2 -> session not found`
"message": "Success",
"data": {
"onlinePlayers": [
@@ -70,14 +81,13 @@
}
}
```
- (4)Interface to get player information: http://127.0.0.1:8080/muip/player_information (support POST/GET)
- -Required parameter 1: SessionId (obtained after authorization API request)
- (5) Get Player Information Interface: http://127.0.0.1:8080/muip/player_information (supports POST/GET)
- -Required parameter 1: SessionId (obtained after requesting the Create Session Interface)
- -Required parameter 2: Uid (player UID)
- -Return example:
- -Response example:
```json
{
"code": 0,
//Response: `code`: `0 -> Success` `1 -> Session expired` `2 -> player not exist` `3 -> session not found`
"message": "Success",
"data": {
"uid": 10001,

View File

@@ -11,44 +11,57 @@
</table>
</div>
##💡API支援です
## 💡APIヘルプ
-バージョン2.3から、外部API呼び出しインタフェースをサポートします。
-全体のインタフェースはDispatchインタフェースに入口を加えます。例えば、Dispatchhttp://127.0.0.1:8080、要求パラメータとリターンはjson形式です
-(1)ライセンスインタフェース:http://127.0.0.1:8080/muip/auth_admin(支持ポスト/ get)
- -必須引数1:admin_key (config.phpでのMuipServer/AdminKey構成)
- -必須パラメータ2:key_type(タイプ、例えばPEM)です。
- -リターン例です:
```json
- バージョン2.3以降、外部API呼び出しをサポート
-インタフェースはDispatchインタフェースにエントリを加えたもので、例えばあなたのDispatchhttp://127.0.0.1:8080 の場合、リクエストパラメータと返り値はjson形式です
- (1)セッション作成インタフェース: http://127.0.0.1:8080/muip/create_session (POSTサポート)
- -オプションパラメータkey_type (タイプ、PEMまたはデフォルトのXMLのみサポート)
- -返り値の例:
```json
{
"code": 0,
"message": "Authorized admin key successfully!",
"message": "Created!",
"data": {
"rsaPublicKey": "***",
"sessionId": "***",
"expireTimeStamp": ***
}
}
```
—(2)提出命令インタフェース:http://127.0.0.1:8080/muip/exec_cmd(支持ポスト/ get)
- -必パラメータ1:SessionId(ライセンスインターフェース要求後に取得します)
- -必須引数2:Command(実行するコマンドをrsaPublicKey[ライセンスインターフェース取得]でRSA[pacs#1]で暗号化します)
- -必伝パラメータ3:TargetUid(コマンドを実行するプレイヤーUID)です
- -リターン例です:
```json
```
- (2)認証インタフェース: http://127.0.0.1:8080/muip/auth_admin (POSTサポート)
- -必パラメータ1SessionId (セッション作成インターフェースのリクエスト後に取得)
- -必須パラメータ2admin_key (config.jsonのMuipServer.AdminKey設定で、rsaPublicKey[セッション作成インターフェース取得]でRSA[pacs#1]暗号化)
- -返り値の例:
```json
{
"code": 0,
"message": "Authorized admin key successfully!",
"data": {
"sessionId": "***",
"expireTimeStamp": ***
}
}
```
- (3)コマンド送信インターフェース: http://127.0.0.1:8080/muip/exec_cmd (POST/GETサポート)
- -必須パラメータ1SessionId (セッション作成インターフェースのリクエスト後に取得)
- -必須パラメータ2Command (実行するコマンドはrsaPublicKey[セッション作成インターフェースで取得]下でRSA[pacs#1]暗号化)
- -必須パラメータ3TargetUid (コマンドを実行するプレイヤーのUID)
- -返り値の例:
```json
{
"code": 0,
"message": "Success",
"data": {
"sessionId": "***",
"message": "*** //base64编码后
"message": "*** //base64エンコード後
}
}
```
—(3)サーバー状態インタフェース:http://127.0.0.1:8080/muip/server_information(支持get)だけ
- -必パラメータ1:SessionId(ライセンスインターフェース要求後に取得します)
- -リターン例です:
```json
```
- (4)サーバー状態取得インタフェース: http://127.0.0.1:8080/muip/server_information (POST/GETサポート)
- -必パラメータ1SessionId (セッション作成インターフェースのリクエスト後に取得)
- -返り値の例:
```json
{
"code": 0,
"message": "Success",
@@ -67,12 +80,12 @@
"programUsedMemory": 323
}
}
```
—(4)プレイヤー情報を盗み出すインタフェース:http://127.0.0.1:8080/muip/player_information(支持get)だけ
- -必パラメータ1:SessionId(ライセンスインターフェース要求後に取得します)
- -必パラメーター2:Uid(プレイヤーUid)
- -リターン例です:
```json
```
- (5)プレイヤー情報取得インタフェース: http://127.0.0.1:8080/muip/player_information (POST/GETサポート)
- -必パラメータ1SessionId (セッション作成インターフェースのリクエスト後に取得)
- -必パラメータ2Uid (プレイヤーUID)
- -返り値の例:
```json
{
"code": 0,
"message": "Success",
@@ -94,4 +107,4 @@
"acceptedSubMissionIdList": Array[169]
}
}
```
```

View File

@@ -15,14 +15,13 @@
- 自2.3版本開始支持外部API調用接口
- 總接口為Dispatch接口加上入口比如你的Dispatch為 http://127.0.0.1:8080 請求參數和返回都為json格式
- (1)授權接口: http://127.0.0.1:8080/muip/auth_admin (支持POST)
- -必傳參數1admin_key (在config.php的MuipServer/AdminKey配置)
- -必傳參數2key_type (類型比如PEM)
- (1)創建會話接口: http://127.0.0.1:8080/muip/create_session (支持POST)
- -可選參數key_type (類型僅支持PEM或默認XML)
- -返回示例:
```json
{
"code": 0,
"message": "Authorized admin key successfully!",
"message": "Created!",
"data": {
"rsaPublicKey": "***",
"sessionId": "***",
@@ -30,9 +29,23 @@
}
}
```
- (2)提交命令接口: http://127.0.0.1:8080/muip/exec_cmd (支持POST/GET)
- -必傳參數1SessionId (在授權接口請求後獲得)
- -必傳參數2Command (需要執行的命令經過rsaPublicKey[授權接口獲取]下RSA[pacs#1]加密)
- (2)授權接口: http://127.0.0.1:8080/muip/auth_admin (支持POST)
- -必傳參數1SessionId (在創建會話接口請求後獲得)
- -必傳參數2admin_key (在config.json的MuipServer.AdminKey配置並且經過rsaPublicKey[創建會話接口獲取]下RSA[pacs#1]加密)
- -返回示例:
```json
{
"code": 0,
"message": "Authorized admin key successfully!",
"data": {
"sessionId": "***",
"expireTimeStamp": ***
}
}
```
- (3)提交命令接口: http://127.0.0.1:8080/muip/exec_cmd (支持POST/GET)
- -必傳參數1SessionId (在創建會話接口請求後獲得)
- -必傳參數2Command (需要執行的命令經過rsaPublicKey[創建會話接口獲取]下RSA[pacs#1]加密)
- -必傳參數3TargetUid (執行命令的玩家UID)
- -返回示例:
```json
@@ -45,8 +58,8 @@
}
}
```
- (3)獲取服器狀態接口: http://127.0.0.1:8080/muip/server_information (支持POST/GET)
- -必傳參數1SessionId (在授權接口請求後獲得)
- (4)獲取服器狀態接口: http://127.0.0.1:8080/muip/server_information (支持POST/GET)
- -必傳參數1SessionId (在創建會話接口請求後獲得)
- -返回示例:
```json
{
@@ -68,10 +81,10 @@
}
}
```
- (4)獲取玩家信息接口: http://127.0.0.1:8080/muip/player_information (支持POST/GET)
- -必傳參數1SessionId (在授權接口請求後獲得)
- (5)獲取玩家信息接口: http://127.0.0.1:8080/muip/player_information (支持POST/GET)
- -必傳參數1SessionId (在創建會話接口請求後獲得)
- -必傳參數2Uid (玩家UID)
- - -返回示例:
- -返回示例:
```json
{
"code": 0,