TIMGroupGetGroupInfoList

Introduction

Get group info list

Call GroupGetGroupInfoList to get the group profile of one or more groups at a time. To get the group profiles of multiple groups by a single call, pass in multiple groupID at a time.

Parameter details

Parameter name Parameter type Required Description
getGroupListParams GetGroupListParams yes Param of getting group info list

Returned template

Promise<commonResult<Array<GroupInfoResult>>>

{
    code: TIMResult | TIMErrCode;
    desc?: string | undefined;
    json_param?: Array<GroupInfoResult> | undefined;
    json_params?: Array<GroupInfoResult> | undefined; 
    user_data?: string | undefined;
}

Return value details

name type description
code TIMResultTIMErrCode Request result: Error codes. 0 means success.
desc string | undefined The description of the error. It will be empty if success.
json_param Array< GroupInfoResult > | undefined Return value of calling API
json_params Array< GroupInfoResult > | 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 { GetGroupListParams } from "im_electron_sdk/dist/interfaces";

let groupID = ''

let param: GetGroupListParams = {
    groupIds: [groupID],// required
    data: ''    // optional
}
let { code } = await timRenderInstance.TIMGroupGetGroupInfoList(param)
if (code == 0) {
    // success
}

results matching ""

    No results matching ""