Skip to content

Commit

Permalink
更新,更新依赖
Browse files Browse the repository at this point in the history
  • Loading branch information
mcchampions committed Oct 20, 2022
1 parent 97b0d20 commit c83518a
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 64 deletions.
13 changes: 0 additions & 13 deletions .idea/libraries/Maven__org_json_json_20220320.xml

This file was deleted.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__org_json_json_20220924.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 31 additions & 27 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions DodoOpenJava.iml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<orderEntry type="library" name="Maven: com.squareup.okio:okio:1.17.5" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.12.0" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.11.0" level="project" />
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.32" level="project" />
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.33" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:31.1-jre" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" level="project" />
Expand All @@ -32,7 +32,7 @@
<orderEntry type="library" name="Maven: org.mongodb:mongodb-driver-core:4.7.1" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.mongodb:bson-record-codec:4.7.1" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains:annotations:23.0.0" level="project" />
<orderEntry type="library" name="Maven: org.json:json:20220320" level="project" />
<orderEntry type="library" name="Maven: org.json:json:20220924" level="project" />
<orderEntry type="library" name="Maven: org.tomlj:tomlj:1.0.0" level="project" />
<orderEntry type="library" name="Maven: org.antlr:antlr4-runtime:4.7.2" level="project" />
</component>
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Dodo开放平台:https://open.imdodo.com/
<dependency>
<groupId>com.github.minecraftchampions</groupId>
<artifactId>DodoOpenJava</artifactId>
<version>1.0.5</version>
<version>1.0.6</version>
</dependency>
</dependencies>
```
Expand All @@ -38,9 +38,11 @@ Dodo开放平台:https://open.imdodo.com/
}
dependencies {
implementation 'com.github.minecraftchampions:DodoOpenJava:1.0.5'
implementation 'com.github.minecraftchampions:DodoOpenJava:1.0.6'
}
```

### 其他
别问我以前版本号为什么那么大,问就是非正式版(你就说信不信吧)
别问我以前版本号为什么那么大,问就是非正式版(你就说信不信吧)
### 教程(编写中)
[直达链接](https://www.showdoc.com.cn/DodoOpenJava/)
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.github.mcchampions.DodoOpenJava</groupId>
<artifactId>DodoOpenJava</artifactId>
<version>1.0.5</version>
<version>1.0.6</version>

<properties>
<java.version>18</java.version>
Expand Down Expand Up @@ -124,7 +124,7 @@
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.32</version>
<version>1.33</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -160,7 +160,7 @@
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20220320</version>
<version>20220924</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public class ChannelTextApi {
* @return JSON对象
* @throws IOException 失败后抛出
*/
public static JSONObject setChannelMessageSend(String clientId, String token, String channelId, String Message) throws IOException {
return setChannelMessageSend(BaseUtil.Authorization(clientId,token), channelId, Message);
public static JSONObject sendTextMessage(String clientId, String token, String channelId, String Message) throws IOException {
return sendTextMessage(BaseUtil.Authorization(clientId,token), channelId, Message);
}

/**
Expand All @@ -37,7 +37,7 @@ public static JSONObject setChannelMessageSend(String clientId, String token, St
* @return JSON对象
* @throws IOException 失败后抛出
*/
public static JSONObject setChannelMessageSend(String Authorization, String channelId, String Message) throws IOException {
public static JSONObject sendTextMessage(String Authorization, String channelId, String Message) throws IOException {
url = "https://botopen.imdodo.com/api/v1/channel/message/send";
parm = "{" +
" \"channelId\": \"" + channelId + "\"," +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public enum Align {
}

/**
* 行数
* 对齐方式
*/
private final String type;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,38 @@ public enum DataType {
/**
* YAML文件
*/
YAML,
YAML("YAML"),
/**
* JSON文件
*/
JSON,
JSON("JSON"),
/**
* MongoDB数据库
*/
MongoDB,
MongoDB("MongoDB"),
/**
* Xml文件
*/
Xml,
Xml("Xml"),
/**
* Toml文件
*/
Toml
Toml("Toml");

DataType(String type) {
this.type = type;
}

/**
* 数据存储方式
*/
private final String type;

/**
* 获取类型
* @return 类型
*/
public String getType() {
return type;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class Permissions {
* @return true成功,false失败
*/
public static Boolean initMongoDB(String ip, int port, String Authorization) {
if (Objects.equals(type.toString(), "MongoDB")) {
if (!Objects.equals(type.getType(), "MongoDB")) {
MongoDBData mongoDB = new MongoDBData();
mongoDB.initPermissions(ip,port);
}
Expand All @@ -37,7 +37,7 @@ public static Boolean initMongoDB(String ip, int port, String Authorization) {
* @return true成功,false失败
*/
public static Boolean initMongoDB(String ip, String Authorization) {
if (Objects.equals(type.toString(), "MongoDB")) {
if (!Objects.equals(type.getType(), "MongoDB")) {
MongoDBData mongoDB = new MongoDBData();
mongoDB.initPermissions(ip,25575);
}
Expand All @@ -53,7 +53,7 @@ public static Boolean initMongoDB(String ip, String Authorization) {
* @return true成功,false失败
*/
public static Boolean init(DataType type, String Authorization) {
switch (type.toString()) {
switch (type.getType()) {
case "YAML" -> YamlData.init();
case "JSON" -> JsonData.init();
case "Xml" -> XmlData.init();
Expand Down

0 comments on commit c83518a

Please sign in to comment.