getTopicInfoList

Introduction

Load the topic info list.

Only works since version of 4.0.1.

Community group only works with the SDK version of 4.0 and above, with Ultimate Edition, you can see the pricing plan here.

It will returns all the topics if topicIDList is empty.

It will only returns the specified topics if topicIDList is not empty.

Parameter details

Parameter name Parameter type Required Platform Description
groupID String yes All The group ID(Community ID) of those topics.
topicIDList List< String > yes All The specified topic ID list.

Returned template

V2TimValueCallback<List<V2TimTopicInfoResult>>

{shi a
    code : int
    desc : String
    data : List<V2TimTopicInfoResult>// The list of topic infos.
}

Return value details

name type description
code int Request result: Error codes. 0 means success.
desc String The description of the error. It will be empty if success.
data List< V2TimTopicInfoResult > The list of topic infos.

Code example

    V2TimValueCallback<List<V2TimTopicInfoResult>> getTopicInfoListoRes =
        await TencentImSDKPlugin.v2TIMManager
            .getGroupManager()
            .getTopicInfoList(
      groupID: "groupID",
      topicIDList: [],
    );
    if (getTopicInfoListoRes.code == 0) {
      getTopicInfoListoRes.data?.forEach((element) {
        element.errorCode;
        element.errorMessage;
        element.topicInfo?.customString;
        element.topicInfo?.draftText;
        element.topicInfo?.groupAtInfoList;
        element.topicInfo?.introduction;
        element.topicInfo?.isAllMute;
        element.topicInfo?.lastMessage;
        element.topicInfo?.notification;
        element.topicInfo?.recvOpt;
        element.topicInfo?.selfMuteTime;
        element.topicInfo?.topicFaceUrl;
        element.topicInfo?.topicID;
        element.topicInfo?.unreadCount;
      });
    }

results matching ""

    No results matching ""