添加检查会议是否存在的接口
This commit is contained in:
@@ -90,6 +90,7 @@ public interface APIPath {
|
||||
String Health = "/admin/health";
|
||||
|
||||
String Conference_List = "/admin/conference/list";
|
||||
String Conference_Exist = "/admin/conference/exist";
|
||||
String Conference_List_Participant = "/admin/conference/list_participant";
|
||||
String Conference_Create = "/admin/conference/create";
|
||||
String Conference_Destroy = "/admin/conference/destroy";
|
||||
|
||||
@@ -11,6 +11,12 @@ public class ConferenceAdmin {
|
||||
return AdminHttpUtils.httpJsonPost(path, null, PojoConferenceInfoList.class);
|
||||
}
|
||||
|
||||
public static IMResult<Boolean> existsConferences(String conferenceId) throws Exception {
|
||||
String path = APIPath.Conference_Exist;
|
||||
PojoConferenceRoomId data = new PojoConferenceRoomId(conferenceId, false);
|
||||
return AdminHttpUtils.httpJsonPost(path, data, Boolean.class);
|
||||
}
|
||||
|
||||
public static IMResult<PojoConferenceParticipantList> listParticipants(String roomId, boolean advance) throws Exception {
|
||||
String path = APIPath.Conference_List_Participant;
|
||||
PojoConferenceRoomId data = new PojoConferenceRoomId(roomId, advance);
|
||||
|
||||
@@ -1691,6 +1691,14 @@ public class Main {
|
||||
System.out.println("create conference");
|
||||
}
|
||||
|
||||
IMResult<Boolean> booleanIMResult = ConferenceAdmin.existsConferences("helloroomid2");
|
||||
if(booleanIMResult == null || booleanIMResult.getErrorCode() != ErrorCode.ERROR_CODE_SUCCESS) {
|
||||
System.out.println("exist conference failure");
|
||||
System.exit(-1);
|
||||
} else {
|
||||
System.out.println("exit conference success");
|
||||
}
|
||||
|
||||
voidIMResult = ConferenceAdmin.enableRecording("helloroomid2", true, true);
|
||||
if(voidIMResult == null || voidIMResult.getErrorCode() != ErrorCode.ERROR_CODE_SUCCESS) {
|
||||
System.out.println("recording conference failure");
|
||||
|
||||
Reference in New Issue
Block a user