getMultipleConversation
Description
info
Get info for multiple conversations based on conversation IDs.
- iOS
- Android
- Flutter
- uni-app
- Browser/Electron
- React-Native
- Unity
Function Prototype
Future<List<ConversationInfo>> getMultipleConversation({
required List<String> conversationIDList,
String? operationID,
})
Input Parameters
| Parameter Name | Parameter Type | Required | Description |
|---|---|---|---|
| conversationIDList | List<String> | Yes | Check conversation ID List |
Return Result
| Name | Type | Description |
|---|---|---|
| ~ | List<ConversationInfo> | Success return |
Code Example
final list = await OpenIM.iMManager.conversationManager.getMultipleConversation(conversationIDList: conversationIDList);
//todo
Function Prototype
- (void)getMultipleConversation:(NSArray <NSString *> *)conversationIDs
onSuccess:(nullable OIMConversationsInfoCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;
Input Parameters
| Parameter Name | Parameter Type | Required | Description |
|---|---|---|---|
| conversationIDs | NSArray <NSString *> | Yes | Check conversation ID list |
Return Result
| Name | Type | Description |
|---|---|---|
| onSuccess | OIMConversationInfo | Success return |
| onFailure | OIMFailureCallback | Failure return |
Code Example
[OIMManager.manager getMultipleConversation:@[]
onSuccess:^(OIMConversationInfo * _Nullable conversation) {
} onFailure:^(NSInteger code, NSString * _Nullable msg) {
}];
Function Prototype
public void getMultipleConversation(OnBase<List<ConversationInfo>> base, List<String> conversationIDs)
Input Parameters
| Parameter Name | Parameter Type | Required | Description |
|---|---|---|---|
| base | OnBase<List<ConversationInfo>> | Yes | Callback interface |
| conversationIDs | List<String> | Yes | Check conversation ID List |
Code Example
OpenIMClient.getInstance().conversationManager.getMultipleConversation(new OnBase<List<ConversationInfo>>() {
@Override
public void onError(int code, String error) {
}
@Override
public void onSuccess(List<ConversationInfo> data) {
}
},conversationIDs);
Function Prototype
IMSDK.getMultipleConversation(conversationIDList: string[],operationID?: string): Promise<WsResponse<ConversationItem[]>>
Input Parameters
| Parameter Name | Parameter Type | Required | Description |
|---|---|---|---|
| conversationIDList | string[] | Yes | Check conversation ID List |
Return Result
| Parameter Name | Parameter Type | Description |
|---|---|---|
| Promise.then() | Promise<WsResponse<ConversationItem[]>> | Success callback |
| Promise.catch() | Promise<WsResponse> | Failure callback |
Code Example
import { getSDK } from '@openim/wasm-client-sdk';
const IMSDK = getSDK();
// use in electron with ffi
// import { getWithRenderProcess } from '@openim/electron-client-sdk/lib/render';
// const { instance: IMSDK } = getWithRenderProcess();
IMSDK.getMultipleConversation(['conversationID'])
.then(({ data }) => {
// Call successful
})
.catch(({ errCode, errMsg }) => {
// Call failed
});
Function Prototype
IMSDK.asyncApi('getMultipleConversation', operationID: string, conversationIDList: string[]): Promise<ConversationItem[]>
Input Parameters
| Parameter Name | Parameter Type | Required | Description |
|---|---|---|---|
| operationID | string | Yes | Operation ID, used to pinpoint issues, keep unique, prefer time+random |
| conversationIDList | string[] | Yes | Check conversation ID List |
Return Result
Use the
openim-uniapp-polyfillpackage to make the function Promise. When calling, you need to usethenandcatchto determine and handle success and failure callbacks.
| Parameter Name | Parameter Type | Description |
|---|---|---|
| Promise.then() | Promise<ConversationItem[]> | Success callback |
| Promise.catch() | Promise<CatchResponse> | Failure callback |
Code Example
import IMSDK from 'openim-uniapp-polyfill';
IMSDK.asyncApi('getMultipleConversation', IMSDK.uuid(), ['conversationID'])
.then((data) => {
// Call successful
})
.catch(({ errCode, errMsg }) => {
// Call failed
});
Function Prototype
OpenIMSDK.getMultipleConversation({
conversationIDList: string[],
}, operationID?: string): Promise<ConversationItem[]>
Input Parameters
| Parameter Name | Parameter Type | Required | Description |
|---|---|---|---|
| conversationIDList | string[] | Yes | Check conversation ID List |
| operationID | string | No | Operation ID, used to pinpoint issues, keep unique, prefer time+random |
Return Result
| Parameter Name | Parameter Type | Description |
|---|---|---|
| Promise.then() | Promise<ConversationItem[]> | Success callback |
| Promise.catch() | Promise<OpenIMApiError> | Failure callback |
Code Example
import OpenIMSDK from "@openim/rn-client-sdk";
OpenIMSDK.getMultipleConversation(['conversationID'])
.then((data) => {
// Call successful
})
.catch((error) => {
// Call failed
});
Function Prototype
public static void GetMultipleConversation(OnBase<List<Conversation>> cb, string[] conversationIdList)
Input Parameters
| Parameter Name | Parameter Type | Required | Description |
|---|---|---|---|
| cb | OnBase<List<Conversation>> | Yes | Callback interface |
| conversationIdList | string[] | Yes | Check conversation ID List |
Code Example
IMSDK.GetMultipleConversation((list,errCode,errMsg)=>{
},conversationIdList);