TIMFriendshipCheckFriendType
Introduction
Check friend type
Use this API to check relationship to the current account by the given UserID list, more details please check Verifying friends.
Parameter details
Parameter name | Parameter type | Required | Description |
---|---|---|---|
checkFriendTypeParams | CheckFriendTypeParams | yes | Param of checking friend type |
Returned template
Promise<commonResult<Array<CheckFriendTypeResult>>>
{
code: TIMResult | TIMErrCode;
desc?: string | undefined;
json_param?: Array<CheckFriendTypeResult> | undefined;
json_params?: Array<CheckFriendTypeResult> | undefined;
user_data?: string | undefined;
}
Return value details
name | type | description |
---|---|---|
code | TIMResult | TIMErrCode | Request result: Error codes. 0 means success. |
desc | string | undefined | The description of the error. It will be empty if success. |
json_param | Array< CheckFriendTypeResult > | undefined | Return value of calling API |
json_params | Array< CheckFriendTypeResult > | undefined | Return value of calling API. Compatible field, which is returned in some cases. |
user_data | string | undefined | ImSDK is responsible for transporting user-defined data without any processing |
Code example
import TimRender from "im_electron_sdk/dist/renderer";
const timRenderInstance = new TimRender();
import { CheckFriendTypeParams } from "im_electron_sdk/dist/interfaces";
let param: CheckFriendTypeParams = {
params: {
friendship_check_friendtype_param_check_type: 0,
friendship_check_friendtype_param_identifier_array: [""]
},
user_data: "" // optional
}
const { code } = await timRenderInstance.TIMFriendshipCheckFriendType(param);
if (code == 0) {
// success
}