From 7427a63d43353e6d554d7e9a4c3435293ef79b7e Mon Sep 17 00:00:00 2001
From: qscbm187531 <1309635304@qq.com>
Date: Sat, 5 Aug 2023 21:20:46 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 32 ++++----
.../dodoopenjava/api/v2/BotApi.java | 21 +++--
.../dodoopenjava/api/v2/ChannelApi.java | 21 +++--
.../api/v2/ChannelArticleApi.java | 10 +--
.../api/v2/ChannelMessageApi.java | 77 +++++++++----------
.../dodoopenjava/api/v2/ChannelVoiceApi.java | 14 ++--
.../dodoopenjava/api/v2/GiftApi.java | 22 +++---
.../dodoopenjava/api/v2/IntegralApi.java | 10 +--
.../dodoopenjava/api/v2/IslandApi.java | 20 ++---
.../dodoopenjava/api/v2/MemberApi.java | 54 +++++++------
.../dodoopenjava/api/v2/NTFApi.java | 8 +-
.../dodoopenjava/api/v2/PersonalApi.java | 56 +++++++-------
.../dodoopenjava/api/v2/ResourceApi.java | 4 +-
.../dodoopenjava/api/v2/RoleApi.java | 22 +++---
pom.xml | 2 +-
15 files changed, 177 insertions(+), 196 deletions(-)
diff --git a/README.md b/README.md
index ea522320..bf83b86b 100644
--- a/README.md
+++ b/README.md
@@ -48,43 +48,43 @@ permissions: 763KB
top.qscraft.dodoopenjava
core
- 2.5.1
+ 2.5.2
top.qscraft.dodoopenjava
command
- 2.5.1
+ 2.5.2
top.qscraft.dodoopenjava
configuration
- 2.5.1
+ 2.5.2
top.qscraft.dodoopenjava
event-core
- 2.5.1
+ 2.5.2
top.qscraft.dodoopenjava
event-websocket
- 2.5.1
+ 2.5.2
top.qscraft.dodoopenjava
event-webhook
- 2.5.1
+ 2.5.2
top.qscraft.dodoopenjava
permissions
- 2.5.1
+ 2.5.2
top.qscraft
dodoopenjava
- 2.5.1
+ 2.5.2
```
@@ -97,15 +97,15 @@ permissions: 763KB
}
dependencies {
- implementation 'top.qscraft.dodoopenjava:core:2.5.1'
- implementation 'top.qscraft.dodoopenjava:command:2.5.1'
- implementation 'top.qscraft.dodoopenjava:configuration:2.5.1'
- implementation 'top.qscraft.dodoopenjava:event-core:2.5.1'
- implementation 'top.qscraft.dodoopenjava:event-websocket:2.5.1'
- implementation 'top.qscraft.dodoopenjava:event-webhook:2.5.1'
- implementation 'top.qscraft.dodoopenjava:permissions:2.5.1'
+ implementation 'top.qscraft.dodoopenjava:core:2.5.2'
+ implementation 'top.qscraft.dodoopenjava:command:2.5.2'
+ implementation 'top.qscraft.dodoopenjava:configuration:2.5.2'
+ implementation 'top.qscraft.dodoopenjava:event-core:2.5.2'
+ implementation 'top.qscraft.dodoopenjava:event-websocket:2.5.2'
+ implementation 'top.qscraft.dodoopenjava:event-webhook:2.5.2'
+ implementation 'top.qscraft.dodoopenjava:permissions:2.5.2'
//又或者直接合成一个依赖项
- implementation 'top.qscraft:dodoopenjava:2.5.1'
+ implementation 'top.qscraft:dodoopenjava:2.5.2'
}
```
### 教程(编写中,只差实战部分)
diff --git a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/BotApi.java b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/BotApi.java
index ac9ae42a..c870ce18 100644
--- a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/BotApi.java
+++ b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/BotApi.java
@@ -10,7 +10,6 @@
* 机器人API
*/
public class BotApi {
- public static String url, param;
/**
* 获取机器人信息
@@ -32,8 +31,8 @@ public static JSONObject getBotInfo(String clientId, String token) throws IOExce
* @throws IOException 发送请求失败后抛出
*/
public static JSONObject getBotInfo(String authorization) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/bot/info";
- param = "{}";
+ String url = "https://botopen.imdodo.com/api/v2/bot/info";
+ String param = "{}";
return new JSONObject(NetUtil.sendRequest(param, url, authorization));
}
@@ -59,8 +58,8 @@ public static JSONObject setBotIslandLeave(String clientId, String token, String
* @throws IOException 发送请求失败后抛出
*/
public static JSONObject setBotIslandLeave(String authorization, String islandSourceId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/bot/island/leave";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/bot/island/leave";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"" +
"}";
return new JSONObject(NetUtil.sendRequest(param, url, authorization));
@@ -76,8 +75,8 @@ public static JSONObject setBotIslandLeave(String authorization, String islandSo
* @throws IOException 发送请求失败后抛出
*/
public static JSONObject getBotInviteList(String authorization, int pageSize, long maxId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/bot/invite/list";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/bot/invite/list";
+ String param = "{" +
" \"pageSize\":" + pageSize + "," +
" \"maxId\":" + maxId + "" +
"}";
@@ -93,8 +92,8 @@ public static JSONObject getBotInviteList(String authorization, int pageSize, lo
* @throws IOException 发送请求失败后抛出
*/
public static JSONObject addBotInvite(String authorization, String dodoSourceId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/bot/invite/add";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/bot/invite/add";
+ String param = "{" +
" \"dodoSourceId\": \"" + dodoSourceId + "\"" +
"}";
return new JSONObject(NetUtil.sendRequest(param, url, authorization));
@@ -109,8 +108,8 @@ public static JSONObject addBotInvite(String authorization, String dodoSourceId)
* @throws IOException 发送请求失败后抛出
*/
public static JSONObject removeBotInvite(String authorization, String dodoSourceId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/bot/invite/remove";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/bot/invite/remove";
+ String param = "{" +
" \"dodoSourceId\": \"" + dodoSourceId + "\"" +
"}";
return new JSONObject(NetUtil.sendRequest(param, url, authorization));
diff --git a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/ChannelApi.java b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/ChannelApi.java
index 3086b3c7..5d40f194 100644
--- a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/ChannelApi.java
+++ b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/ChannelApi.java
@@ -10,7 +10,6 @@
* 频道API
*/
public class ChannelApi {
- public static String url, param;
/**
* 获取频道列表
@@ -34,8 +33,8 @@ public static JSONObject getChannelList(String clientId, String token, String is
* @throws IOException 失败后抛出
*/
public static JSONObject getChannelList(String authorization, String islandSourceId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/list";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/list";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"" +
"}";
return new JSONObject(NetUtil.sendRequest(param, url, authorization));
@@ -63,8 +62,8 @@ public static JSONObject getChannelInfo(String clientId, String token, String ch
* @throws IOException 失败后抛出
*/
public static JSONObject getChannelInfo(String authorization, String channelId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/info";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/info";
+ String param = "{" +
" \"channelId\": \"" + channelId + "\"" +
"}";
return new JSONObject(NetUtil.sendRequest(param, url, authorization));
@@ -96,8 +95,8 @@ public static JSONObject addChannel(String clientId, String token, String island
* @throws IOException 失败后抛出
*/
public static JSONObject addChannel(String authorization, String islandSourceId, String channelName, int channelType) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/add";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/add";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"channelName\": \"" + channelName + "\"," +
" \"channelType\": " + channelType + "" +
@@ -131,8 +130,8 @@ public static JSONObject editChannel(String clientId, String token, String islan
* @throws IOException 失败后抛出
*/
public static JSONObject editChannel(String authorization, String islandSourceId, String channelName, String channelId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/edit";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/edit";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"channelId\": \"" + channelId + "\"," +
" \"channelName\": \"" + channelName + "\"" +
@@ -164,8 +163,8 @@ public static JSONObject deleteChannel(String clientId, String token, String isl
* @throws IOException 失败后抛出
*/
public static JSONObject deleteChannel(String authorization, String islandSourceId, String channelId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/remove";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/remove";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"channelId\": \"" + channelId + "\"" +
"}";
diff --git a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/ChannelArticleApi.java b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/ChannelArticleApi.java
index 9fa57cdc..16fb7a45 100644
--- a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/ChannelArticleApi.java
+++ b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/ChannelArticleApi.java
@@ -10,8 +10,6 @@
* 帖子频道API
*/
public class ChannelArticleApi {
- public static String url, param;
-
/**
* 发布帖子
*
@@ -40,8 +38,8 @@ public static JSONObject addChannelArticle(String channelId, String title, Strin
* @throws IOException 失败后抛出
*/
public static JSONObject addChannelArticle(String channelId, String title, String content, String imageUrl, String authorization) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/article/add";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/article/add";
+ String param = "{" +
" \"channelId\": \"" + channelId + "\"," +
" \"title\": \"" + title + "\"," +
" \"content\": \"" + content + "\"," +
@@ -77,8 +75,8 @@ public static JSONObject removeChannelArticle(int type, String id, String channe
* @throws IOException 失败后抛出
*/
public static JSONObject removeChannelArticle(int type, String id, String channelId, String authorization) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/article/remove";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/article/remove";
+ String param = "{" +
" \"id\": \"" + id + "\"," +
" \"type\": " + type + "," +
" \"channelId\": \"" + channelId + "\"" +
diff --git a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/ChannelMessageApi.java b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/ChannelMessageApi.java
index e3baf5ed..a6b0bb8b 100644
--- a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/ChannelMessageApi.java
+++ b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/ChannelMessageApi.java
@@ -12,7 +12,6 @@
* 频道消息API
*/
public class ChannelMessageApi {
- public static String url, param;
/**
* 发送文本消息
@@ -38,8 +37,8 @@ public static JSONObject sendTextMessage(String clientId, String token, String c
* @throws IOException 失败后抛出
*/
public static JSONObject sendTextMessage(String authorization, String channelId, String Message) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/message/send";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/message/send";
+ String param = "{" +
" \"channelId\": \"" + channelId + "\"," +
" \"messageType\": 1," +
" \"messageBody\": {" +
@@ -87,8 +86,8 @@ public static JSONObject setChannelMessageTop(String clientId, String token, Str
* @throws IOException 失败后抛出
*/
public static JSONObject setChannelMessageTop(String authorization, String messageId, int operateType) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/message/top";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/message/top";
+ String param = "{" +
" \"messageId\": \"" + messageId + "\"," +
" \"operateType\": " + operateType + "" +
"}";
@@ -117,8 +116,8 @@ public static JSONObject getChannelMessageReactionList(String clientId, String t
* @throws IOException 失败后抛出
*/
public static JSONObject getChannelMessageReactionList(String authorization, String messageId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/message/reaction/list";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/message/reaction/list";
+ String param = "{" +
" \"messageId\": \"" + messageId + "\"" +
"}";
return new JSONObject(NetUtil.sendRequest(param, url, authorization));
@@ -146,8 +145,8 @@ public static JSONObject getChannelMessageReactionMemberList(String clientId, St
* @throws IOException 失败后抛出
*/
public static JSONObject getChannelMessageReactionMemberList(String authorization, String messageId, int type, String id, int pageSize, long maxId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/message/reaction/member/list";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/message/reaction/member/list";
+ String param = "{" +
" \"messageId\": \"" + messageId + "\",\n" +
" \"emoji\": {\n" +
" \"type\": " + type + ",\n" +
@@ -185,8 +184,8 @@ public static JSONObject referencedMessage(String clientId, String token, String
* @throws IOException 失败后抛出
*/
public static JSONObject referencedMessage(String authorization, String channelId, String Message, String referencedMessageId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/message/send";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/message/send";
+ String param = "{" +
" \"channelId\": \"" + channelId + "\"," +
" \"messageType\": 1," +
" \"messageBody\": {" +
@@ -227,14 +226,14 @@ public static JSONObject sendChannelPictureMessage(String clientId, String token
* @throws IOException 失败后抛出
*/
public static JSONObject sendChannelPictureMessage(String authorization, String channelId, String Url, int width, int height, Boolean isOriginal) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/message/send";
+ String url = "https://botopen.imdodo.com/api/v2/channel/message/send";
int Original;
if (isOriginal) {
Original = 1;
} else {
Original = 0;
}
- param = "{" +
+ String param = "{" +
" \"channelId\": \"" + channelId + "\"," +
" \"messageType\": 2," +
" \"messageBody\": {" +
@@ -275,8 +274,8 @@ public static JSONObject sendChannelPictureMessage(String clientId, String token
* @throws IOException 失败后抛出
*/
public static JSONObject sendChannelPictureMessage(String authorization, String channelId, String Url, int width, int height) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/message/send";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/message/send";
+ String param = "{" +
" \"channelId\": \"" + channelId + "\"," +
" \"messageType\": 2," +
" \"messageBody\": {" +
@@ -332,8 +331,8 @@ public static JSONObject sendChannelVideoMessage(String clientId, String token,
* @throws IOException 失败后抛出
*/
public static JSONObject sendChannelVideoMessage(String authorization, String channelId, String Url) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/message/send";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/message/send";
+ String param = "{" +
" \"channelId\": \"" + channelId + "\"," +
" \"messageType\": 3," +
" \"messageBody\": {" +
@@ -373,8 +372,8 @@ public static JSONObject sendChannelVideoMessage(String clientId, String token,
* @throws IOException 失败后抛出
*/
public static JSONObject sendChannelVideoMessage(String authorization, String channelId, String Url, String coverUrl, long duration, long size) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/message/send";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/message/send";
+ String param = "{" +
" \"channelId\": \"" + channelId + "\"," +
" \"messageType\": 3," +
" \"messageBody\": {" +
@@ -411,8 +410,8 @@ public static JSONObject sendChannelShareMessage(String clientId, String token,
* @throws IOException 失败后抛出
*/
public static JSONObject sendChannelShareMessage(String authorization, String channelId, String jumpUrl) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/message/send";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/message/send";
+ String param = "{" +
" \"channelId\": \"" + channelId + "\"," +
" \"messageType\": 4," +
" \"messageBody\": {" +
@@ -450,8 +449,8 @@ public static JSONObject sendChannelFileMessage(String clientId, String token, S
* @throws IOException 失败后抛出
*/
public static JSONObject sendChannelFileMessage(String authorization, String channelId, String Url, String name, long size) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/message/send";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/message/send";
+ String param = "{" +
" \"channelId\": \"" + channelId + "\"," +
" \"messageType\": 5," +
" \"messageBody\": {" +
@@ -487,8 +486,8 @@ public static JSONObject editChannelMessage(String clientId, String token, Strin
* @throws IOException 失败后抛出
*/
public static JSONObject editChannelMessage(String authorization, String messageId, String content) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/message/edit";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/message/edit";
+ String param = "{" +
" \"messageId\": \"" + messageId + "\"," +
" \"messageType\": 1," +
" \"messageBody\": {" +
@@ -520,8 +519,8 @@ public static JSONObject withdrawChannelMessage(String clientId, String token, S
* @throws IOException 失败后抛出
*/
public static JSONObject withdrawChannelMessage(String authorization, String messageId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/message/withdraw";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/message/withdraw";
+ String param = "{" +
" \"messageId\": \"" + messageId + "\"" +
"}";
return new JSONObject(NetUtil.sendRequest(param, url, authorization));
@@ -551,8 +550,8 @@ public static JSONObject withdrawChannelMessageWithReason(String clientId, Strin
* @throws IOException 失败后抛出
*/
public static JSONObject withdrawChannelMessageWithReason(String authorization, String messageId, String reason) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/message/withdraw";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/message/withdraw";
+ String param = "{" +
" \"messageId\": \"" + messageId + "\"," +
" \"reason\": \"" + reason + "\"" +
"}";
@@ -583,8 +582,8 @@ public static JSONObject addChannelMessageReaction(String clientId, String token
* @throws IOException 失败后抛出
*/
public static JSONObject addChannelMessageReaction(String authorization, String messageId, String id) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/message/reaction/add";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/message/reaction/add";
+ String param = "{" +
" \"messageId\": \"" + messageId + "\"," +
" \"emoji\": {" +
" \"type\": 1," +
@@ -620,8 +619,8 @@ public static JSONObject removeChannelMessageReaction(String clientId, String to
* @throws IOException 失败后抛出
*/
public static JSONObject removeChannelMessageReaction(String authorization, String messageId, String id, String dodoSourceId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/message/reaction/remove";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/message/reaction/remove";
+ String param = "{" +
" \"messageId\": \"" + messageId + "\"," +
" \"emoji\": {" +
" \"type\": 1," +
@@ -656,8 +655,8 @@ public static JSONObject removeChannelMessageBotReaction(String clientId, String
* @throws IOException 失败后抛出
*/
public static JSONObject removeChannelMessageBotReaction(String authorization, String messageId, String id) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/message/reaction/remove";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/message/reaction/remove";
+ String param = "{" +
" \"messageId\": \"" + messageId + "\"," +
" \"emoji\": {" +
" \"type\": 1," +
@@ -691,8 +690,8 @@ public static JSONObject sendCardMessage(String clientId, String token, String c
* @throws IOException 失败后抛出
*/
public static JSONObject sendCardMessage(String authorization, String channelId, Card messageBody) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/message/send";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/message/send";
+ String param = "{" +
" \"channelId\": \"" + channelId + "\"," +
" \"messageType\": 6," +
" \"messageBody\": " + messageBody.toJSONObject().toString() +
@@ -724,8 +723,8 @@ public static JSONObject editChannelCardMessage(String clientId, String token, S
* @throws IOException 失败后抛出
*/
public static JSONObject editChannelCardMessage(String authorization, String messageId, Card messageBody) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/message/edit";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/message/edit";
+ String param = "{" +
" \"messageId\": \"" + messageId + "\"," +
" \"messageType\": 1," +
" \"messageBody\": " + messageBody.toJSONObject().toString() +
diff --git a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/ChannelVoiceApi.java b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/ChannelVoiceApi.java
index 67b58194..08c1adf6 100644
--- a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/ChannelVoiceApi.java
+++ b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/ChannelVoiceApi.java
@@ -10,8 +10,6 @@
* 语言频道API
*/
public class ChannelVoiceApi {
- public static String url, param;
-
/**
* 获取成员语音频道状态
*
@@ -36,8 +34,8 @@ public static JSONObject getChannelVoiceMemberStatus(String islandSourceId, Stri
* @throws IOException 失败后抛出
*/
public static JSONObject getChannelVoiceMemberStatus(String islandSourceId, String dodoSourceId, String authorization) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/voice/member/status";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/voice/member/status";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"dodoSourceId\": \"" + dodoSourceId + "\"" +
"}";
@@ -71,8 +69,8 @@ public static JSONObject moveChannelVoiceMember(String islandSourceId, String do
* @throws IOException 失败后抛出
*/
public static JSONObject moveChannelVoiceMember(String islandSourceId, String dodoSourceId, String channelId, String authorization) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/voice/member/move";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/voice/member/move";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"dodoSourceId\": \"" + dodoSourceId + "\"," +
" \"channelId\": \"" + channelId + "\"" +
@@ -106,8 +104,8 @@ public static JSONObject editChannelVoiceMember(int operateType, String dodoSour
* @throws IOException 失败后抛出
*/
public static JSONObject editChannelVoiceMember(int operateType, String dodoSourceId, String channelId, String authorization) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/channel/voice/member/edit";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/channel/voice/member/edit";
+ String param = "{" +
" \"operateType\": " + operateType + "," +
" \"dodoSourceId\": \"" + dodoSourceId + "\"," +
" \"channelId\": \"" + channelId + "\"" +
diff --git a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/GiftApi.java b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/GiftApi.java
index a2a196a2..2d3865cf 100644
--- a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/GiftApi.java
+++ b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/GiftApi.java
@@ -10,8 +10,6 @@
* 赠礼系统Api
*/
public class GiftApi {
- public static String url, param;
-
/**
* 获取群收入
*
@@ -34,8 +32,8 @@ public static JSONObject getGiftAccount(String clientId, String token, String is
* @throws IOException 发送请求失败后抛出
*/
public static JSONObject getGiftAccount(String authorization, String islandSourceId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/gift/account/info";
- param = new JSONObject().put("islandSourceId", islandSourceId).toString();
+ String url = "https://botopen.imdodo.com/api/v2/gift/account/info";
+ String param = new JSONObject().put("islandSourceId", islandSourceId).toString();
return new JSONObject(NetUtil.sendRequest(param, url, authorization));
}
@@ -61,8 +59,8 @@ public static JSONObject getGiftShareRatioInfo(String clientId, String token, St
* @throws IOException 发送请求失败后抛出
*/
public static JSONObject getGiftShareRatioInfo(String authorization, String islandSourceId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/gift/share/ratio/info";
- param = new JSONObject().put("islandSourceId", islandSourceId).toString();
+ String url = "https://botopen.imdodo.com/api/v2/gift/share/ratio/info";
+ String param = new JSONObject().put("islandSourceId", islandSourceId).toString();
return new JSONObject(NetUtil.sendRequest(param, url, authorization));
}
@@ -90,8 +88,8 @@ public static JSONObject getGiftList(String clientId, String token, String targe
* @throws IOException 发送请求失败后抛出
*/
public static JSONObject getGiftList(String authorization, String targetId, int targetType) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/gift/list";
- param = new JSONObject().put("targetId", targetId).put("targetType", targetType).toString();
+ String url = "https://botopen.imdodo.com/api/v2/gift/list";
+ String param = new JSONObject().put("targetId", targetId).put("targetType", targetType).toString();
return new JSONObject(NetUtil.sendRequest(param, url, authorization));
}
@@ -125,8 +123,8 @@ public static JSONObject getGiftMemberList(String clientId, String token, String
* @throws IOException 发送请求失败后抛出
*/
public static JSONObject getGiftMemberList(String authorization, String targetId, int targetType, String giftId, int pageSize, long maxId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/gift/member/list";
- param = new JSONObject().put("targetId", targetId).put("targetType", targetType).put("giftId", giftId).put("pageSize", pageSize).put("maxId", maxId).toString();
+ String url = "https://botopen.imdodo.com/api/v2/gift/member/list";
+ String param = new JSONObject().put("targetId", targetId).put("targetType", targetType).put("giftId", giftId).put("pageSize", pageSize).put("maxId", maxId).toString();
return new JSONObject(NetUtil.sendRequest(param, url, authorization));
}
@@ -158,8 +156,8 @@ public static JSONObject getGiftGrossValueList(String clientId, String token, St
* @throws IOException 发送请求失败后抛出
*/
public static JSONObject getGiftGrossValueList(String authorization, String targetId, int targetType, int pageSize, long maxId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/gift/gross/value/list";
- param = new JSONObject().put("targetId", targetId).put("targetType", targetType).put("pageSize", pageSize).put("maxId", maxId).toString();
+ String url = "https://botopen.imdodo.com/api/v2/gift/gross/value/list";
+ String param = new JSONObject().put("targetId", targetId).put("targetType", targetType).put("pageSize", pageSize).put("maxId", maxId).toString();
return new JSONObject(NetUtil.sendRequest(param, url, authorization));
}
}
diff --git a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/IntegralApi.java b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/IntegralApi.java
index a0c5dfd5..76026aac 100644
--- a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/IntegralApi.java
+++ b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/IntegralApi.java
@@ -10,8 +10,6 @@
* 积分API
*/
public class IntegralApi {
- public static String url, param;
-
/**
* 查询成员积分
*
@@ -36,8 +34,8 @@ public static JSONObject getIntegralInfo(String clientId, String token, String i
* @throws IOException 失败后抛出
*/
public static JSONObject getIntegralInfo(String Authorization, String islandSourceId, String dodoSourceId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/integral/info";
- param = "{\n" +
+ String url = "https://botopen.imdodo.com/api/v2/integral/info";
+ String param = "{\n" +
" \"islandSourceId\": \"" + islandSourceId + "\",\n" +
" \"dodoSourceId\": \"" + dodoSourceId + "\"\n" +
"}";
@@ -72,8 +70,8 @@ public static JSONObject setIntegralEdit(String clientId, String token, String i
* @throws IOException 失败后抛出
*/
public static JSONObject setIntegralEdit(String Authorization, String islandSourceId, String dodoSourceId, int operateType, long integral) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/integral/edit";
- param = "{\n" +
+ String url = "https://botopen.imdodo.com/api/v2/integral/edit";
+ String param = "{\n" +
" \"islandSourceId\": \"" + islandSourceId + "\",\n" +
" \"dodoSourceId\": \"" + dodoSourceId + "\"\n" +
" \"operateType\": " + operateType + ",\n" +
diff --git a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/IslandApi.java b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/IslandApi.java
index 07ac8925..8bcd62c5 100644
--- a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/IslandApi.java
+++ b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/IslandApi.java
@@ -34,8 +34,8 @@ public static JSONObject getIslandInfo(String clientId, String token, String isl
* @throws IOException 失败后抛出
*/
public static JSONObject getIslandInfo(String authorization, String islandSourceId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/island/info";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/island/info";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"" +
"}";
return new JSONObject(NetUtil.sendRequest(param, url, authorization));
@@ -61,8 +61,8 @@ public static JSONObject getIslandList(String clientId, String token) throws IOE
* @throws IOException 失败后抛出
*/
public static JSONObject getIslandList(String authorization) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/island/list";
- param = "{}";
+ String url = "https://botopen.imdodo.com/api/v2/island/list";
+ String param = "{}";
return new JSONObject(NetUtil.sendRequest(param, url, authorization));
}
@@ -92,8 +92,8 @@ public static JSONObject getIslandLevelRankList(String clientId, String token, S
* @throws IOException 失败后抛出
*/
public static JSONObject getIslandLevelRankList(String authorization, String islandSourceId, int pageSize, long maxId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/island/info";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/island/info";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"pageSize\": \"" + pageSize + "\"," +
" \"maxId\": \"" + maxId + "\"" +
@@ -123,8 +123,8 @@ public static JSONObject getIslandMuteList(String clientId, String token, String
* @throws IOException 失败后抛出
*/
public static JSONObject getIslandMuteList(String authorization, String islandSourceId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/island/mute/list";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/island/mute/list";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"" +
"}";
return new JSONObject(NetUtil.sendRequest(param, url, authorization));
@@ -152,8 +152,8 @@ public static JSONObject getIslandBanList(String clientId, String token, String
* @throws IOException 失败后抛出
*/
public static JSONObject getIslandBanList(String authorization, String islandSourceId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/island/ban/list";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/island/ban/list";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"" +
"}";
return new JSONObject(NetUtil.sendRequest(param, url, authorization));
diff --git a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/MemberApi.java b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/MemberApi.java
index 4fd27047..5df6ce2e 100644
--- a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/MemberApi.java
+++ b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/MemberApi.java
@@ -10,8 +10,6 @@
* 成员API
*/
public class MemberApi {
- public static String url, param;
-
/**
* 获取成员列表
*
@@ -38,8 +36,8 @@ public static JSONObject getMemberList(String clientId, String token, String isl
* @throws IOException 失败后抛出
*/
public static JSONObject getMemberList(String authorization, String islandSourceId, int pageSize, long maxId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/member/list";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/member/list";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"pageSize\": \"" + pageSize + "\"," +
" \"maxId\": \"" + maxId + "\"" +
@@ -71,8 +69,8 @@ public static JSONObject getMemberInfo(String clientId, String token, String isl
* @throws IOException 失败后抛出
*/
public static JSONObject getMemberInfo(String authorization, String islandSourceId, String dodoSourceId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/member/info";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/member/info";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"dodoSourceId\": \"" + dodoSourceId + "\"" +
"}";
@@ -103,8 +101,8 @@ public static JSONObject getMemberRoleList(String clientId, String token, String
* @throws IOException 失败后抛出
*/
public static JSONObject getMemberRoleList(String authorization, String islandSourceId, String dodoSourceId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/member/role/list";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/member/role/list";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"dodoSourceId\": \"" + dodoSourceId + "\"" +
"}";
@@ -135,8 +133,8 @@ public static JSONObject getMemberInvitationInfo(String clientId, String token,
* @throws IOException 失败后抛出
*/
public static JSONObject getMemberInvitationInfo(String authorization, String islandSourceId, String dodoSourceId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/member/role/list";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/member/role/list";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"dodoSourceId\": \"" + dodoSourceId + "\"" +
"}";
@@ -169,8 +167,8 @@ public static JSONObject editMemberNickName(String clientId, String token, Strin
* @throws IOException 失败后抛出
*/
public static JSONObject editMemberNickName(String authorization, String islandSourceId, String dodoSourceId, String nickName) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/member/nick/set";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/member/nick/set";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"dodoSourceId\": \"" + dodoSourceId + "\"," +
" \"nickName\": \"" + nickName + "\"" +
@@ -204,8 +202,8 @@ public static JSONObject addMemberMute(String clientId, String token, String isl
* @throws IOException 失败后抛出
*/
public static JSONObject addMemberMute(String authorization, String islandSourceId, String dodoSourceId, int duration) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/member/ban/set";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/member/ban/set";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"dodoSourceId\": \"" + dodoSourceId + "\"," +
" \"duration\": " + duration + "" +
@@ -241,8 +239,8 @@ public static JSONObject addMemberReasonrMute(String clientId, String token, Str
* @throws IOException 失败后抛出
*/
public static JSONObject addMemberReasonrMute(String authorization, String islandSourceId, String dodoSourceId, int duration, String reason) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/member/ban/set";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/member/ban/set";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"dodoSourceId\": \"" + dodoSourceId + "\"," +
" \"duration\": " + duration + "," +
@@ -275,8 +273,8 @@ public static JSONObject removeMemberMute(String clientId, String token, String
* @throws IOException 失败后抛出
*/
public static JSONObject removeMemberMute(String authorization, String islandSourceId, String dodoSourceId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/member/mute/remove";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/member/mute/remove";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"dodoSourceId\": \"" + dodoSourceId + "\"" +
"}";
@@ -307,8 +305,8 @@ public static JSONObject addMemberBan(String clientId, String token, String isla
* @throws IOException 失败后抛出
*/
public static JSONObject addMemberBan(String authorization, String islandSourceId, String dodoSourceId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/member/ban/add";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/member/ban/add";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"dodoSourceId\": \"" + dodoSourceId + "\"" +
"}";
@@ -341,8 +339,8 @@ public static JSONObject addMemberReasonBan(String clientId, String token, Strin
* @throws IOException 失败后抛出
*/
public static JSONObject addMemberReasonBan(String authorization, String islandSourceId, String dodoSourceId, String reason) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/member/ban/add";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/member/ban/add";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"dodoSourceId\": \"" + dodoSourceId + "\"," +
" \"reason\": \"" + reason + "\"" +
@@ -376,8 +374,8 @@ public static JSONObject addMemberChannelBan(String clientId, String token, Stri
* @throws IOException 失败后抛出
*/
public static JSONObject addMemberChannelBan(String authorization, String islandSourceId, String dodoSourceId, String noticeChannelId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/member/ban/add";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/member/ban/add";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"dodoSourceId\": \"" + dodoSourceId + "\"," +
" \"noticeChannelId\": \"" + noticeChannelId + "\"" +
@@ -413,8 +411,8 @@ public static JSONObject addMemberBan(String clientId, String token, String isla
* @throws IOException 失败后抛出
*/
public static JSONObject addMemberBan(String authorization, String islandSourceId, String dodoSourceId, String noticeChannelId, String reason) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/member/ban/add";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/member/ban/add";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"dodoSourceId\": \"" + dodoSourceId + "\"," +
" \"noticeChannelId\": \"" + noticeChannelId + "\"," +
@@ -447,8 +445,8 @@ public static JSONObject removeMemberBan(String clientId, String token, String i
* @throws IOException 失败后抛出
*/
public static JSONObject removeMemberBan(String authorization, String islandSourceId, String dodoSourceId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/member/ban/remove";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/member/ban/remove";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"dodoSourceId\": \"" + dodoSourceId + "\"" +
"}";
diff --git a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/NTFApi.java b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/NTFApi.java
index f192100b..e3e6b34b 100644
--- a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/NTFApi.java
+++ b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/NTFApi.java
@@ -39,8 +39,8 @@ public static JSONObject getMemberNftStatus(String clientId, String token, Strin
* @throws IOException 失败后抛出
*/
public static JSONObject getMemberNftStatus(String authorization, String islandSourceId, String dodoSourceId, String platform) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/member/nft/status";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/member/nft/status";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"dodoSourceId\": \"" + dodoSourceId + "\"," +
" \"platform\": \"" + platform + "\"" +
@@ -72,8 +72,8 @@ public static JSONObject getMemberNftStatus(String clientId, String token, Strin
* @param platform 数藏平台
*/
public static JSONObject getMemberNftStatus(String authorization, String islandSourceId, String dodoSourceId, String platform, String issuer, String series) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/member/nft/status";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/member/nft/status";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"dodoSourceId\": \"" + dodoSourceId + "\"," +
" \"platform\": \"" + platform + "\"," +
diff --git a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/PersonalApi.java b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/PersonalApi.java
index 3efff57b..c29539ab 100644
--- a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/PersonalApi.java
+++ b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/PersonalApi.java
@@ -10,8 +10,6 @@
* 私信API
*/
public class PersonalApi {
- public static String URL, param;
-
/**
* 发送文本消息
*
@@ -36,8 +34,8 @@ public static JSONObject sendPersonalMessage(String clientId, String token, Stri
* @throws IOException 失败后抛出
*/
public static JSONObject sendPersonalMessage(String authorization, String islandSourceId, String dodoSourceId, String message) throws IOException {
- URL = "https://botopen.imdodo.com/api/v2/personal/message/send";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/personal/message/send";
+ String param = "{" +
" \"dodoSourceId\": \"" + dodoSourceId + "\"," +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"messageType\": 1," +
@@ -45,7 +43,7 @@ public static JSONObject sendPersonalMessage(String authorization, String island
" \"content\": \"" + message + "\"" +
" }" +
"}";
- return new JSONObject(NetUtil.sendRequest(param, URL, authorization));
+ return new JSONObject(NetUtil.sendRequest(param, url, authorization));
}
/**
@@ -70,33 +68,33 @@ public static JSONObject sendDodoPictureMessage(String clientId, String token, S
*
* @param authorization authorization
* @param dodoSourceId dodo号
- * @param url 图片url地址
+ * @param u 图片url地址
* @param height 图片高度
* @param width 图片宽度
* @param isOriginal 是否原图
* @return JSON对象
* @throws IOException 失败后抛出
*/
- public static JSONObject sendDodoPictureMessage(String authorization, String islandSourceId, String dodoSourceId, String url, int width, int height, Boolean isOriginal) throws IOException {
- URL = "https://botopen.imdodo.com/api/v2/personal/message/send";
+ public static JSONObject sendDodoPictureMessage(String authorization, String islandSourceId, String dodoSourceId, String u, int width, int height, Boolean isOriginal) throws IOException {
+ String url = "https://botopen.imdodo.com/api/v2/personal/message/send";
int original;
if (isOriginal) {
original = 1;
} else {
original = 0;
}
- param = "{" +
+ String param = "{" +
" \"dodoSourceId\": \"" + dodoSourceId + "\"," +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"messageType\": 2," +
" \"messageBody\": {" +
- " \"url\": \"" + url + "\"," +
+ " \"url\": \"" + u + "\"," +
" \"width\": " + width + "," +
" \"height\": " + height + "," +
" \"isOriginal\": " + original + "" +
" }" +
"}";
- return new JSONObject(NetUtil.sendRequest(param, URL, authorization));
+ return new JSONObject(NetUtil.sendRequest(param, url, authorization));
}
/**
@@ -120,25 +118,25 @@ public static JSONObject sendDodoPictureMessage(String clientId, String token, S
*
* @param authorization authorization
* @param dodoSourceId dodo号
- * @param url 图片url地址
+ * @param u 图片url地址
* @param height 图片高度
* @param width 图片宽度
* @return JSON对象
* @throws IOException 失败后抛出
*/
- public static JSONObject sendDodoPictureMessage(String authorization, String islandSourceId, String dodoSourceId, String url, int width, int height) throws IOException {
- URL = "https://botopen.imdodo.com/api/v2/personal/message/send";
- param = "{" +
+ public static JSONObject sendDodoPictureMessage(String authorization, String islandSourceId, String dodoSourceId, String u, int width, int height) throws IOException {
+ String url = "https://botopen.imdodo.com/api/v2/personal/message/send";
+ String param = "{" +
" \"dodoSourceId\": \"" + dodoSourceId + "\"," +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"messageType\": 2," +
" \"messageBody\": {" +
- " \"url\": \"" + url + "\"," +
+ " \"url\": \"" + u + "\"," +
" \"width\": " + width + "," +
" \"height\": " + height + "" +
" }" +
"}";
- return new JSONObject(NetUtil.sendRequest(param, URL, authorization));
+ return new JSONObject(NetUtil.sendRequest(param, url, authorization));
}
/**
@@ -160,21 +158,21 @@ public static JSONObject sendDodoVideoMessage(String clientId, String token, Str
*
* @param authorization authorization
* @param dodoSourceId dodo号
- * @param url 视频url地址
+ * @param u 视频url地址
* @return JSON对象
* @throws IOException 失败后抛出
*/
- public static JSONObject sendDodoVideoMessage(String authorization, String islandSourceId, String dodoSourceId, String url) throws IOException {
- URL = "https://botopen.imdodo.com/api/v2/personal/message/send";
- param = "{" +
+ public static JSONObject sendDodoVideoMessage(String authorization, String islandSourceId, String dodoSourceId, String u) throws IOException {
+ String url = "https://botopen.imdodo.com/api/v2/personal/message/send";
+ String param = "{" +
" \"dodoSourceId\": \"" + dodoSourceId + "\"," +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"messageType\": 3," +
" \"messageBody\": {" +
- " \"url\": \"" + url + "\"" +
+ " \"url\": \"" + u + "\"" +
" }" +
"}";
- return new JSONObject(NetUtil.sendRequest(param, URL, authorization));
+ return new JSONObject(NetUtil.sendRequest(param, url, authorization));
}
/**
@@ -199,26 +197,26 @@ public static JSONObject sendDodoVideoMessage(String clientId, String token, Str
*
* @param authorization authorization
* @param dodoSourceId dodo号
- * @param url 视频url地址
+ * @param u 视频url地址
* @param coverurl 封面url地址
* @param duration 视频长度
* @param size 视频大小
* @return JSON对象
* @throws IOException 失败后抛出
*/
- public static JSONObject sendDodoVideoMessage(String authorization, String islandSourceId, String dodoSourceId, String url, String coverurl, long duration, long size) throws IOException {
- URL = "https://botopen.imdodo.com/api/v2/personal/message/send";
- param = "{" +
+ public static JSONObject sendDodoVideoMessage(String authorization, String islandSourceId, String dodoSourceId, String u, String coverurl, long duration, long size) throws IOException {
+ String url = "https://botopen.imdodo.com/api/v2/personal/message/send";
+ String param = "{" +
" \"dodoSourceId\": \"" + dodoSourceId + "\"," +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"messageType\": 3," +
" \"messageBody\": {" +
- " \"url\": \"" + url + "\"," +
+ " \"url\": \"" + u + "\"," +
" \"coverurl\": \"" + coverurl + "\"," +
" \"duration\": " + duration + "," +
" \"size\": " + size + "" +
" }" +
"}";
- return new JSONObject(NetUtil.sendRequest(param, URL, authorization));
+ return new JSONObject(NetUtil.sendRequest(param, url, authorization));
}
}
diff --git a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/ResourceApi.java b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/ResourceApi.java
index d84877a4..cd094608 100644
--- a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/ResourceApi.java
+++ b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/ResourceApi.java
@@ -10,8 +10,6 @@
* 资源API
*/
public class ResourceApi {
- public static String url;
-
/**
* 上传资源
*
@@ -34,7 +32,7 @@ public static JSONObject uploadResource(String clientId, String token, String pa
* @throws IOException 失败后抛出
*/
public static JSONObject uploadResource(String authorization, String path) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/resource/picture/upload";
+ String url = "https://botopen.imdodo.com/api/v2/resource/picture/upload";
return new JSONObject(NetUtil.uploadFile(authorization, path, url));
}
}
diff --git a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/RoleApi.java b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/RoleApi.java
index 73b45807..5d5b24c1 100644
--- a/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/RoleApi.java
+++ b/core/src/main/java/io/github/minecraftchampions/dodoopenjava/api/v2/RoleApi.java
@@ -10,8 +10,6 @@
* 身份组API
*/
public class RoleApi {
- public static String url, param;
-
/**
* 获取身份组列表
*
@@ -34,8 +32,8 @@ public static JSONObject getRoleList(String clientId, String token, String islan
* @throws IOException 失败后抛出
*/
public static JSONObject getRoleList(String authorization, String islandSourceId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/role/list";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/role/list";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"" +
"}";
return new JSONObject(NetUtil.sendRequest(param, url, authorization));
@@ -67,8 +65,8 @@ public static JSONObject addRoleMember(String clientId, String token, String isl
* @throws IOException 失败后抛出
*/
public static JSONObject addRoleMember(String authorization, String islandSourceId, String dodoSourceId, String roleId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/role/member/add";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/role/member/add";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"dodoSourceId\": \"" + dodoSourceId + "\"," +
" \"roleId\": \"" + roleId + "\"" +
@@ -102,8 +100,8 @@ public static JSONObject removeRoleMember(String clientId, String token, String
* @throws IOException 失败后抛出
*/
public static JSONObject removeRoleMember(String authorization, String islandSourceId, String dodoSourceId, String roleId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/role/member/remove";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/role/member/remove";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"dodoSourceId\": \"" + dodoSourceId + "\"," +
" \"roleId\": \"" + roleId + "\"" +
@@ -141,7 +139,7 @@ public static JSONObject addRole(String clientId, String token, String islandSou
* @throws IOException 失败后抛出
*/
public static JSONObject addRole(String authorization, String islandSourceId, String roleName, String roleColor, int position, String permission) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/role/add";
+ String url = "https://botopen.imdodo.com/api/v2/role/add";
JSONObject param = new JSONObject("{" +
" \"islandSourceId\": \"" + islandSourceId + "\"}");
if (roleName != null) {
@@ -195,7 +193,7 @@ public static JSONObject editRole(String clientId, String token, String islandSo
* @throws IOException 失败后抛出
*/
public static JSONObject editRole(String authorization, String islandSourceId, String roleId, String roleName, String roleColor, int position, String permission) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/role/edit";
+ String url = "https://botopen.imdodo.com/api/v2/role/edit";
JSONObject param = new JSONObject("{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"roleId\": \"" + roleId + "\"}");
@@ -241,8 +239,8 @@ public static JSONObject deleteRole(String clientId, String token, String island
* @throws IOException 失败后抛出
*/
public static JSONObject deleteRole(String authorization, String islandSourceId, String roleId) throws IOException {
- url = "https://botopen.imdodo.com/api/v2/role/remove";
- param = "{" +
+ String url = "https://botopen.imdodo.com/api/v2/role/remove";
+ String param = "{" +
" \"islandSourceId\": \"" + islandSourceId + "\"," +
" \"roleId\": \"" + roleId + "\"" +
"}";
diff --git a/pom.xml b/pom.xml
index 0e7669cf..9090aeaf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
UTF-8
UTF-8
UTF-8
- 2.5.1
+ 2.5.2
io.github.minecraftchampions.dodoopenjava