TIMGroupGetOnlineMemberCount

Introduction

Get group online member count

Current only for AVChatRoom

Frequency limit is 1 calling per minute

Parameter details

Parameter name Parameter type Required Description
params GetOnlineMemberCountParams yes Param of getting group online member count

Returned template

Promise<commonResult<GetOnlineMemberCountResult>>

{
    code: TIMResult | TIMErrCode;
    desc?: string | undefined;
    json_param?: GetOnlineMemberCountResult | undefined;
    json_params?: GetOnlineMemberCountResult | 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 GetOnlineMemberCountResult | undefined Return value of calling API
json_params GetOnlineMemberCountResult | 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 { GetOnlineMemberCountParams } from "im_electron_sdk/dist/interfaces";

let groupId = ''
let param: GetOnlineMemberCountParams = {
    groupId: groupId,   // required
    data: ''    // optional
}
const { code } = await timRenderInstance.TIMGroupGetOnlineMemberCount(param)
if (code == 0) {
    // success
}

results matching ""

    No results matching ""