getFriendApplicationListAsApplicant
Feature Introduction
Description
Retrieve the friend request list, referring to those initiated by the user 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 Value
Parameter Name | Parameter Type | Description |
---|---|---|
~ | List<FriendApplicationInfo> | Successful Return |
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 Value
Parameter Name | Parameter Type | Description |
---|---|---|
onSuccess | NSArray< OIMFriendApplication * > | Successful Return |
onFailure | OIMFailureCallback | Failure Return |
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 | Mandatory | Description |
---|---|---|---|
callBack | OnBase<List<FriendApplicationInfo>> | Yes | Callback Interface |
Return Value
Code Example
OpenIMClient.getInstance().friendshipManager.getSendFriendApplicationList(new OnBase<List<FriendApplicationInfo>>{...})
Function Prototype
IMSDK.getFriendApplicationListAsApplicant(operationID?: string): Promise<WsResponse<FriendApplication[]>>
Input Parameters
None
Return Value
Parameter Name | Parameter Type | Description |
---|---|---|
Promise.then() | Promise<WsResponse<FriendApplicationItem[]>> | List of 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 { OpenIMSDK } from 'open-im-sdk';
// const IMSDK = new OpenIMSDK();
IMSDK.getFriendApplicationListAsApplicant()
.then(({ data }) => {
// Success
})
.catch(({ errCode, errMsg }) => {
// Failure
});
Function Prototype
IMSDK.asyncApi('getFriendApplicationListAsApplicant', operationID: string): Promise<FriendApplication[]>
Input Parameters
Parameter Name | Parameter Type | Mandatory | Description |
---|---|---|---|
operationID | string | Yes | Operation ID, used for problem location, unique, recommended to use current time and random number |
Return Value
Through the
openim-uniapp-polyfill
package, the function is Promise-ified. When calling, usethen
andcatch
to determine and handle the success and failure callbacks.
Parameter Name | Parameter Type | Description |
---|---|---|
Promise.then() | Promise<FriendApplicationItem[]> | List of 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
OpenIMSDKRN.getFriendApplicationListAsApplicant(operationID: string): Promise<FriendApplication[]>
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<FriendApplicationItem[]> | List of friend requests |
Promise.catch() | Promise<CatchResponse> | Callback on failed call |
Code Example
import OpenIMSDKRN from "open-im-sdk-rn";
OpenIMSDKRN.getFriendApplicationListAsApplicant('operationID')
.then((data) => {
// Success
})
.catch(({ errCode, errMsg }) => {
// Failure
});
Function Prototype
public static void GetFriendApplicationListAsApplicant(OnBase<List<FriendApplicationInfo>> cb)
Input Parameter
Parameter Name | Parameter Type | Mandatory | Description |
---|---|---|---|
cb | OnBase<List<FriendApplicationInfo>> | Yes | Callback |
Return Result
Code Example
IMSDK.GetFriendApplicationListAsApplicant((list,errCode,errMsg)=>{
});