getGroupApplicationListAsRecipient
Function Introduction
Description
As the group owner or administrator, retrieve the applications from members wishing to join the group.
Note
Retrieve all join 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 | Data Type | Description |
---|---|---|
~ | List<GroupApplicationInfo> | Successful return |
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 | Data Type | Description |
---|---|---|
onSuccess | NSArray< OIMGroupApplicationInfo *> | Successful return |
onFailure | OIMFailureCallback | Failure return |
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 | Data 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(operationID?: string): Promise<WsResponse<GroupApplicationItem[]>>
Input Parameters
None
Return Result
Parameter Name | Data Type | Description |
---|---|---|
Promise.then() | Promise<WsResponse<GroupApplicationItem[]>> | List of join requests |
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 { OpenIMSDK } from 'open-im-sdk';
// const IMSDK = new OpenIMSDK();
IMSDK.getGroupApplicationListAsRecipient()
.then(({ data }) => {
// Successful call
})
.catch(({ errCode, errMsg }) => {
// Call failed
});
Function Prototype
IMSDK.asyncApi('getGroupApplicationListAsRecipient', operationID: string): Promise<GroupApplicationItem[]>
Input Parameters
Parameter Name | Data Type | Required | Description |
---|---|---|---|
operationID | string | Yes | Operation ID, used for troubleshooting. It's recommended to use the current time combined with a random number |
Return Result
Through the
openim-uniapp-polyfill
package, the function is made Promise-based. When calling, you need to usethen
andcatch
to determine and handle the successful and failure callbacks, respectively.
Parameter Name | Data Type | Description |
---|---|---|
Promise.then() | Promise<GroupApplicationItem[]> | List of join requests |
Promise.catch() | Promise<CatchResponse> | Failure callback |
Code Example
import IMSDK from 'openim-uniapp-polyfill';
IMSDK.asyncApi('getGroupApplicationListAsRecipient', IMSDK.uuid())
.then((data) => {
// Successful call
})
.catch(({ errCode, errMsg }) => {
// Call failed
});
Function Prototype
OpenIMSDKRN.getGroupApplicationListAsRecipient(operationID: string): Promise<GroupApplicationItem[]>
Input Parameters
Parameter Name | Parameter Type | Mandatory | Description |
---|---|---|---|
operationID | string | Yes | Operation ID, used for problem location, keep unique, suggest using current time and random number |
Return Result
Parameter Name | Parameter Type | Description |
---|---|---|
Promise.then() | Promise<GroupApplicationItem[]> | List of join requests |
Promise.catch() | Promise<CatchResponse> | Callback on failed call |
Code Example
import OpenIMSDKRN from "open-im-sdk-rn";
OpenIMSDKRN.getGroupApplicationListAsRecipient('operationID')
.then((data) => {
// Successful call
})
.catch(({ errCode, errMsg }) => {
// Call failed
});
Function Prototype
public static void GetGroupApplicationListAsRecipient(OnBase<List<GroupApplicationInfo>> cb)
Input Parameter
Parameter Name | Parameter Type | Mandatory | Description |
---|---|---|---|
cb | OnBase<List<GroupApplicationInfo>> | Yes | Callback |
Return Result
Code Example
IMSDK.GetGroupApplicationListAsRecipient((list,errCode,errMsg)=>{
});