getGroupApplicationListAsRecipient
Description
info
As a group owner or administrator, get the group applications received by the groups you manage.
Note
Get all group applications at once.
- iOS
- Android
- Flutter
- uni-app
- Browser/Electron/MiniProgram
- React-Native
- Unity
Function Prototype
Future<List<GroupApplicationInfo>> getGroupApplicationListAsRecipient(
{String? operationID})
Input Parameters
None
Return Result
| Parameter Name | Parameter Type | Description |
|---|---|---|
| ~ | List<GroupApplicationInfo> | Success |
Code Example
List<GroupApplicationInfo> list = await OpenIM.iMManager.groupManager.getGroupApplicationListAsRecipient();
// todo
Function Prototype
- (void)getGroupApplicationListAsRecipientWithOnSuccess:(nullable OIMGroupsApplicationCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;
Input Parameters
None
Return Result
| Parameter Name | Parameter Type | Description |
|---|---|---|
| onSuccess | NSArray< OIMGroupApplicationInfo *> | Success |
| onFailure | OIMFailureCallback | Failure |
Code Example
[OIMManager.manager getGroupApplicationListAsRecipientWithOnSuccess:^(NSArray<OIMGroupApplicationInfo *> * _Nullable groupsInfo) {
} onFailure:^(NSInteger code, NSString * _Nullable msg) {
}];
Function Prototype
public void getRecvGroupApplicationList(OnBase<List<GroupApplicationInfo>> callBack)
Input Parameters
| Parameter Name | Parameter Type | Required | Description |
|---|---|---|---|
| callBack | OnBase<List<GroupApplicationInfo>> | Yes | Callback interface |
Return Result
Code Example
OpenIMClient.getInstance().groupManager.getRecvGroupApplicationList(new OnBase<List<GroupApplicationInfo>>() {
@Override
public void onError(int code, String error) {
}
@Override
public void onSuccess(List<GroupApplicationInfo> data) {
}
});
Function Prototype
IMSDK.getGroupApplicationListAsRecipient(params: {
offset: number;
count: number;
}): Promise<WsResponse<GroupApplicationItem[]>>
Input Parameters
| Parameter Name | Parameter Type | Required | Description |
|---|---|---|---|
| offset | number | Yes | Start index for paginated pull |
| count | number | Yes | Number of items to pull per page |
Return Result
| Parameter Name | Parameter Type | Description |
|---|---|---|
| Promise.then() | Promise<WsResponse<GroupApplicationItem[]>> | List of received group applications |
| 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();
// use in mini program
// import { getSDK } from '@openim/client-sdk';
// const IMSDK = getSDK();
IMSDK.getGroupApplicationListAsRecipient({
offset: 0,
count: 10,
})
.then(({ data }) => {
// Success
})
.catch(({ errCode, errMsg }) => {
// Failure
});
Function Prototype
IMSDK.asyncApi('getGroupApplicationListAsRecipient', operationID: string): Promise<GroupApplicationItem[]>
Input Parameters
| Parameter Name | Parameter Type | Required | Description |
|---|---|---|---|
| operationID | string | Yes | Operation ID, used to pinpoint issues, keep unique, prefer time+random |
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<GroupApplicationItem[]> | List of received group applications |
| Promise.catch() | Promise<CatchResponse> | Failure callback |
Code Example
import IMSDK from 'openim-uniapp-polyfill';
IMSDK.asyncApi('getGroupApplicationListAsRecipient', IMSDK.uuid())
.then((data) => {
// Success
})
.catch(({ errCode, errMsg }) => {
// Failure
});
Function Prototype
OpenIMSDK.getGroupApplicationListAsRecipient(req: {
groupIDs: string[];
handleResults: number[]
offset: number;
count: number;
}, operationID?: string): Promise<GroupApplicationItem[]>
Input Parameters
| Parameter Name | Parameter Type | Required | Description |
|---|---|---|---|
| groupIDs | string[] | Yes | List of Group IDs |
| handleResults | number[] | Yes | - |
| offset | number | Yes | Start index for paginated pull |
| count | number | Yes | Number of items to pull per page |
| operationID | string | No | Operation ID, used to pinpoint issues, keep unique, prefer time+random |
Return Result
| Parameter Name | Parameter Type | Description |
|---|---|---|
| Promise.then() | Promise<GroupApplicationItem[]> | List of received group applications |
| Promise.catch() | Promise<OpenIMApiError> | Failure callback |
Code Example
import OpenIMSDK from "@openim/rn-client-sdk";
OpenIMSDK.getGroupApplicationListAsRecipient({
offset: 0,
count: 10,
handleResults: [],
groupIDs: ['groupID1', 'groupID2'],
})
.then((data) => {
// Success
})
.catch((error) => {
// Failure
});
Function Prototype
public static void GetGroupApplicationListAsRecipient(OnBase<List<GroupApplicationInfo>> cb)
Input Parameters
| Parameter Name | Parameter Type | Required | Description |
|---|---|---|---|
| cb | OnBase<List<GroupApplicationInfo>> | Yes | Callback interface |
Return Result
Code Example
IMSDK.GetGroupApplicationListAsRecipient((list,errCode,errMsg)=>{
});