Skip to content

Commit cdeb2ad

Browse files
committed
FEAT(m-5337441553):translation
1 parent ca15dba commit cdeb2ad

File tree

130 files changed

+253
-379
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+253
-379
lines changed

README-en.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ RongCloud IM Server SDK in Java.
1010
<dependency>
1111
<groupId>cn.rongcloud.im</groupId>
1212
<artifactId>server-sdk-java</artifactId>
13-
<version>3.7.0</version>
13+
<version>3.8.0</version>
1414
</dependency>
1515
```
1616
* Gradle
1717
```
18-
compile group: 'cn.rongcloud.im', name: 'server-sdk-java', version: '3.7.0'
18+
compile group: 'cn.rongcloud.im', name: 'server-sdk-java', version: '3.8.0'
1919
```
2020
* Build from source
2121
```
@@ -40,8 +40,9 @@ Here’s how to register a user:
4040
```
4141
String appKey = "appKey";
4242
String appSecret = "appSecret";
43-
44-
RongCloud rongCloud = RongCloud.getInstance(appKey, appSecret);
43+
44+
// Initialize the RongCloud SDK, Set up the data center you use.
45+
RongCloud rongCloud = RongCloud.getInstance(appKey, appSecret,CenterEnum.BJ);
4546
User user = rongCloud.user;
4647
4748
/**
@@ -81,4 +82,4 @@ Note: Each API call returns a unique ***request ID***, which identifies the requ
8182

8283
# Version notes
8384

84-
We’ve updated to SDK version 3.6.0 for easier integration and better maintenance. Older versions still work but don’t support group and friend hosting interfaces.
85+
We’ve updated to SDK version 3.8.0 for easier integration and better maintenance. Data center must be specified for new version initialization

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ RongCloud IM Server SDK in Java.
4343
```
4444
String appKey = "appKey";
4545
String appSecret = "appSecret";
46-
46+
// 初始化,设置您使用的数据中心
4747
RongCloud rongCloud = RongCloud.getInstance(appKey, appSecret, CenterEnum.BJ);
4848
User user = rongCloud.user;
4949
@@ -85,4 +85,4 @@ RongCloud IM Server SDK in Java.
8585

8686

8787
# 版本说明
88-
为方便开发者的接入使用,更好的对融云 Server SDK 进行维护管理,现更新SDK 3.6.0 版本,老版本的 Server SDK仍可使用,但不支持群和好友托管接口
88+
为方便开发者的接入使用,更好的对融云 Server SDK 进行维护管理,现更新SDK 3.8.0,需强制设置服务器地址

Server SDK Supported Feature Version List.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
### Server SDK Feature Version Support List
22

3+
34
| Module | Method Name | Description | Supported Versions (Tags) |
45
|:------------------------------------------------------------------------------------------------|:-------------------------------------|:------------------------------------------------------------------------------------|:-----------|
56
| [User Information](./src/main/java/io/rong/methods/user/User.java) | register | Register and obtain token | 3.0.1 |

src/main/java/io/rong/example/chatroom/BanAllMemberExample.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public static void main(String[] args) throws Exception {
2828
BanAllMember banAllMember = rongCloud.chatroom.banAllMember;
2929

3030
/**
31-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
31+
*
3232
* Mute all members in a chatroom
3333
* */
3434
ChatroomModel chatroom = new ChatroomModel();
@@ -38,22 +38,19 @@ public static void main(String[] args) throws Exception {
3838
System.out.println("addBanAllMember: " + result.toString());
3939

4040
/**
41-
* API Documentation: https://docs.rongcloud.cn/v4/views/im/server/chatroom/ban.html#ban-add
4241
* Check the mute status of all members in a chatroom
4342
* */
4443
StatusResult statusResult = banAllMember.check(chatroom);
4544
System.out.println("checkBanAllMember: " + statusResult.toString());
4645

4746
/**
48-
* API documentation: https://docs.rongcloud.cn/v4/views/im/server/chatroom/ban.html#ban-query
4947
* Get the list of all muted members in the chatroom
5048
*/
5149
ChatroomBanListResult chatroomBanListResult = banAllMember.getList(10,1);
5250
System.out.println("listBanAllMember: " + chatroomBanListResult.toString());
5351

5452
/**
5553
*
56-
* API documentation: https://docs.rongcloud.cn/v4/views/im/server/chatroom/ban.html#ban-rollback
5754
* Remove the mute for all members in the chatroom
5855
*/
5956
ResponseResult removeResult = banAllMember.remove(chatroom);

src/main/java/io/rong/example/chatroom/BanAllMemberWhitelistExample.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public static void main(String[] args) throws Exception {
2828
BanAllMemberWhitelist banAllMemberWhitelist = rongCloud.chatroom.banAllMemberWhitelist;
2929

3030
/**
31-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
31+
*
3232
* Add chatroom mute exceptions
3333
*/
3434
ChatroomMember[] members = {
@@ -43,15 +43,15 @@ public static void main(String[] args) throws Exception {
4343
System.out.println("addBanAllMemberWhitelist: " + result.toString());
4444

4545
/**
46-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
46+
*
4747
* Get chatroom mute exceptions list
4848
*/
4949
GroupBanWhitelistResult groupBanWhitelistResult = banAllMemberWhitelist.getList(chatroom.getId());
5050
System.out.println("listBanAllMemberWhitelist: " + groupBanWhitelistResult.toString());
5151

5252
/**
5353
*
54-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
54+
*
5555
* Remove the Mute Exceptions for all members in the chatroom
5656
*/
5757
ResponseResult removeResult = banAllMemberWhitelist.remove(chatroom);

src/main/java/io/rong/example/chatroom/BanExample.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static void main(String[] args) throws Exception {
3030
Ban ban = rongCloud.chatroom.ban;
3131

3232
/**
33-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
33+
*
3434
* Add global chatroom mute
3535
*/
3636
ChatroomMember[] members = {
@@ -43,7 +43,7 @@ public static void main(String[] args) throws Exception {
4343
System.out.println("addGagUser: " + result.toString());
4444

4545
/**
46-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
46+
*
4747
* Get global chatroom mute list
4848
*/
4949

@@ -52,7 +52,7 @@ public static void main(String[] args) throws Exception {
5252

5353
/**
5454
*
55-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
55+
*
5656
* Remove global mute in chatroom
5757
*/
5858
chatroom = new ChatroomModel()

src/main/java/io/rong/example/chatroom/BlockExample.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static void main(String[] args) throws Exception {
3232
new ChatroomMember().setId("qawr34h"), new ChatroomMember().setId("qawr35h")
3333
};
3434
/**
35-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
35+
*
3636
*
3737
* Add banned chatroom members
3838
*/
@@ -47,7 +47,7 @@ public static void main(String[] args) throws Exception {
4747

4848

4949
/**
50-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
50+
*
5151
*
5252
* Method to unban chatroom members
5353
*/
@@ -58,7 +58,7 @@ public static void main(String[] args) throws Exception {
5858
//System.out.println("removeResult: " + removeResult.toString());
5959

6060
/**
61-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
61+
*
6262
*
6363
* Method to query banned chatroom members
6464
*/

src/main/java/io/rong/example/chatroom/ChatroomExample.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public static void main(String[] args) throws Exception {
2828
Chatroom chatroom = rongCloud.chatroom;
2929

3030
/**
31-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
31+
*
3232
*
3333
* Create a chatroom
3434
*/
@@ -48,7 +48,7 @@ public static void main(String[] args) throws Exception {
4848

4949
/**
5050
*
51-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
51+
*
5252
* Destroy a chatroom
5353
*
5454
* */
@@ -61,7 +61,7 @@ public static void main(String[] args) throws Exception {
6161

6262
/**
6363
*
64-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
64+
*
6565
* Query chatroom members demo
6666
*
6767
* */
@@ -76,7 +76,7 @@ public static void main(String[] args) throws Exception {
7676

7777
/**
7878
*
79-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
79+
*
8080
* Check if a chatroom member exists
8181
*
8282
* */
@@ -90,7 +90,7 @@ public static void main(String[] args) throws Exception {
9090

9191
/**
9292
*
93-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
93+
*
9494
* Batch check if chatroom members exist
9595
*
9696
* */

src/main/java/io/rong/example/chatroom/DemotionExample.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ public static void main(String[] args) throws Exception {
2323
Demotion demotion = rongCloud.chatroom.demotion;
2424

2525
/**
26-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
26+
*
2727
* Add in-app chatroom message demotion
2828
*/
2929
String[] messageType = {"RC:VcMsg", "RC:ImgTextMsg", "RC:ImgMsg"};
3030
ResponseResult addResult = demotion.add(messageType);
3131
System.out.println("add demotion: " + addResult.toString());
3232

3333
/**
34-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
34+
*
3535
* Remove in-app chatroom message demotion
3636
*/
3737
ResponseResult removeResult = demotion.remove(messageType);

src/main/java/io/rong/example/chatroom/DistributeExample.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public static void main(String[] args) throws Exception {
2626
Distribute distribute = rongCloud.chatroom.distribute;
2727

2828
/**
29-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
29+
*
3030
*
3131
* Stop Chatroom Message Distribution
3232
*/
@@ -37,7 +37,7 @@ public static void main(String[] args) throws Exception {
3737
System.out.println("stopDistributionMessage: " + result.toString());
3838

3939
/**
40-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
40+
*
4141
*
4242
* Resume Chatroom Message Distribution
4343
*/

src/main/java/io/rong/example/chatroom/EntryExample.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
/**
1616
* Demo for setting, deleting, and querying chatroom attributes
1717
*
18-
* Response codes: https://doc.rongcloud.cn/imserver/server/v1/im-server-api-list-v1
1918
*
2019
*/
2120
public class EntryExample {
@@ -36,7 +35,7 @@ public static void main(String[] args) throws Exception {
3635

3736
Reader reader = null;
3837
/**
39-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
38+
*
4039
*
4140
* Create chatroom
4241
*
@@ -50,7 +49,6 @@ public static void main(String[] args) throws Exception {
5049
/**
5150
* Chatroom attribute settings, refer to the documentation
5251
*
53-
* https://doc.rongcloud.cn/imserver/server/v1/im-server-api-list-v1
5452
*/
5553
ChatroomEntryModel model = new ChatroomEntryModel();
5654
model.setChatroomId("chatroomId1");
@@ -81,7 +79,6 @@ public static void main(String[] args) throws Exception {
8179
/**
8280
* Chatroom attribute deletion, refer to the documentation
8381
*
84-
* https://doc.rongcloud.cn/imserver/server/v1/im-server-api-list-v1
8582
*/
8683
ChatroomEntryModel modelRemove = new ChatroomEntryModel();
8784
modelRemove.setChatroomId("chatroomId1");
@@ -97,7 +94,6 @@ public static void main(String[] args) throws Exception {
9794
/**
9895
* Chatroom attribute query, refer to the documentation
9996
*
100-
* https://doc.rongcloud.cn/imserver/server/v1/im-server-api-list-v1
10197
*/
10298
ChatroomEntryModel modelQuery = new ChatroomEntryModel();
10399
modelQuery.setChatroomId("chatroomId1");

src/main/java/io/rong/example/chatroom/GagExample.java

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static void main(String[] args) throws Exception {
3131
Gag gag = rongCloud.chatroom.gag;
3232

3333
/**
34-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
34+
*
3535
* Add a muted user to the chatroom (When you want to prevent a user from sending messages in a chatroom, you can mute them.
3636
* The muted user can still receive and view messages in the chatroom but cannot send messages.)
3737
*/
@@ -46,27 +46,26 @@ public static void main(String[] args) throws Exception {
4646
ResponseResult result = gag.add(chatroom);
4747
System.out.println("addGagUser: " + result.toString());
4848

49+
/**
50+
*
51+
* Method to query muted chatroom members
52+
*/
53+
chatroom = new ChatroomModel()
54+
.setId("hjhf07kk");
55+
ListGagChatroomUserResult chatroomListGagUserResult = gag.getList(chatroom);
56+
System.out.println("ListGagUser: " + chatroomListGagUserResult.toString());
4957

50-
/**
51-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
52-
* Method to query muted chatroom members
53-
*/
54-
chatroom = new ChatroomModel()
55-
.setId("hjhf07kk");
56-
ListGagChatroomUserResult chatroomListGagUserResult = gag.getList(chatroom);
57-
System.out.println("ListGagUser: " + chatroomListGagUserResult.toString());
58-
59-
/**
60-
*
61-
* API Documentation: https://docs.rongcloud.io/platform-chat-api/im-server-api-list-v1
62-
*
63-
* Method to remove muted chatroom members
64-
*/
65-
chatroom = new ChatroomModel()
66-
.setId("hjhf07kk")
67-
.setMembers(members);
68-
ResponseResult removeResult = gag.remove(chatroom);
69-
System.out.println("rollbackGagUser: " + result.toString());
58+
/**
59+
*
60+
*
61+
*
62+
* Method to remove muted chatroom members
63+
*/
64+
chatroom = new ChatroomModel()
65+
.setId("hjhf07kk")
66+
.setMembers(members);
67+
ResponseResult removeResult = gag.remove(chatroom);
68+
System.out.println("rollbackGagUser: " + result.toString());
7069

7170

7271

src/main/java/io/rong/example/chatroom/whitelist/UserExample.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ public static void main(String[] args) throws Exception {
2626
Whitelist whitelist = rongCloud.chatroom.whiteList;
2727

2828
/**
29-
* API: Documentation https://doc.rongcloud.cn/imserver/server/v1/im-server-api-list-v1
3029
* Add users to the chatroom allowlist
3130
*/
3231
ChatroomMember[] members = {

src/main/java/io/rong/example/group/GroupExample.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ public static void main(String[] args) throws Exception {
8989
Result refreshResult = (Result) Group.update(group);
9090
System.out.println("refresh: " + refreshResult.toString());
9191

92-
/**
93-
*
94-
*
95-
* Invite users to join a group
96-
*
97-
*/
92+
/**
93+
*
94+
*
95+
* Invite users to join a group
96+
*
97+
*/
9898
group = new GroupModel()
9999
.setId("hdiuj87jj")
100100
.setMembers(members)

0 commit comments

Comments
 (0)