getFriendApplicationListAsApplicant
Description
info
Get the friend application list (as the applicant).
- iOS
- Android
- Flutter
- uni-app
- Browser/Electron/MiniProgram
- React-Native
- Unity
Function Prototype
Future<List<FriendApplicationInfo>> getFriendApplicationListAsApplicant(
{String? operationID})
Input Parameters
None
Return Result
| Parameter Name | Parameter Type | Description |
|---|---|---|
| ~ | List<FriendApplicationInfo> | Success |
Code Example
List<FriendApplicationInfo> list = await OpenIM.iMManager.friendshipManager.getFriendApplicationListAsApplicant();
// todo
Function Prototype
- (void)getSendFriendApplicationListWithOnSuccess:(nullable OIMFriendApplicationsCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;
Input Parameters
None
Return Result
| Parameter Name | Parameter Type | Description |
|---|---|---|
| onSuccess | NSArray< OIMFriendApplication * > | Success |
| onFailure | OIMFailureCallback | Failure |
Code Example
[OIMManager.manager getSendFriendApplicationListWithOnSuccess:^(NSArray<OIMFriendApplication *> * _Nullable friendApplications) {
} onFailure:^(NSInteger code, NSString * _Nullable msg) {
}];
Function Prototype
public void getSendFriendApplicationList(OnBase<List<FriendApplicationInfo>> callBack)
Input Parameters
| Parameter Name | Parameter Type | Required | Description |
|---|---|---|---|
| callBack | OnBase<List<FriendApplicationInfo>> | Yes | Callback interface |
Return Result
Code Example
OpenIMClient.getInstance().friendshipManager.getSendFriendApplicationList(new OnBase<List<FriendApplicationInfo>>{...})
Function Prototype
IMSDK.getFriendApplicationListAsApplicant(params: {
offset: number;
count: number;
},operationID?: string): Promise<WsResponse<FriendApplication[]>>
Input Parameters
| Parameter Name | Parameter Type | Required | Description |
|---|---|---|---|
| offset | number | Yes | Starting index for pagination |
| count | number | Yes | Number of records per page |
Return Result
| Parameter Name | Parameter Type | Description |
|---|---|---|
| Promise.then() | Promise<WsResponse<FriendApplicationItem[]>> | List of sent friend 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 { getSDK } from '@openim/client-sdk';
// const IMSDK = getSDK();
IMSDK.getFriendApplicationListAsApplicant({
offset: 0,
count: 10,
})
.then(({ data }) => {
// Success
})
.catch(({ errCode, errMsg }) => {
// Failure
});
Function Prototype
IMSDK.asyncApi('getFriendApplicationListAsApplicant', operationID: string): Promise<FriendApplication[]>
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<FriendApplicationItem[]> | List of sent friend requests |
| Promise.catch() | Promise<CatchResponse> | Failure callback |
Code Example
import IMSDK from 'openim-uniapp-polyfill';
IMSDK.asyncApi('getFriendApplicationListAsApplicant', IMSDK.uuid())
.then((data) => {
// Success
})
.catch(({ errCode, errMsg }) => {
// Failure
});
Function Prototype
OpenIMSDK.getFriendApplicationListAsApplicant(req: {
offset: number;
count: number;
}, operationID?: string): Promise<FriendApplication[]>
Input Parameters
| Parameter Name | Parameter Type | Required | Description |
|---|---|---|---|
| offset | number | Yes | Starting index for pagination |
| count | number | Yes | Number of records 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<FriendApplicationItem[]> | List of sent friend requests |
| Promise.catch() | Promise<OpenIMApiError> | Failure callback |
Code Example
import OpenIMSDK from "@openim/rn-client-sdk";
OpenIMSDK.getFriendApplicationListAsApplicant({
offset: 0,
count: 10,
})
.then((data) => {
// Success
})
.catch((error) => {
// Failure
});
Function Prototype
public static void GetFriendApplicationListAsApplicant(OnBase<List<FriendApplicationInfo>> cb)
Input Parameters
| Parameter Name | Parameter Type | Required | Description |
|---|---|---|---|
| cb | OnBase<List<FriendApplicationInfo>> | Yes | Callback |
Return Result
Code Example
IMSDK.GetFriendApplicationListAsApplicant((list,errCode,errMsg)=>{
});