getGroupAttributes

Introduction

Load the specific attributes for the group.

It will returns all of the attributes for the group, if the key is not specified.

Only works with AVChatRoom temporarily.

initGroupAttributes, setGroupAttributes, deleteGroupAttributes methods calculate request rate merged: SDK limit rate at 5 seconds 10 times, and the 8511 error code is returned after over limit; The server limit rate at 5 times in a second, and 10049 error code is returned after exceeding the limit.

Parameter details

Parameter name Parameter type Required Platform Description
groupID String yes All The target group ID.
keys List< String > yes All The list of keys of the attributes.

Returned template

V2TimValueCallback<Map<String, String>>

{
    code : int
    desc : String
    data : Map<String, String>// The group attributes.
}

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 Map< String,String > The map of the attributes obtained.

Code example

    V2TimValueCallback<Map<String, String>> getGroupAttributesRes =
        await TencentImSDKPlugin.v2TIMManager
            .getGroupManager()
            .getGroupAttributes(
              groupID: "groupID",
              keys: ["custom"]
               );
    if (getGroupAttributesRes.code == 0) {
      Map<String, String>? groupAttributes = getGroupAttributesRes.data;
    }

results matching ""

    No results matching ""