ChannelAttributes
自定义频道属性。
示例
client.getChannelAttributes("channelId")
  .then(channelAttributes => {
    console.log("channelAttributes", channelAttributes);
  })
包含以下内容:
| 参数 | 类型 | 描述 | 
|---|---|---|
| [key: string] | ChannelAttributeProperties | 频道属性名和频道属性健值对,以键值对形式表示。 key是字符串,value是 ChannelAttributeProperties | 
单个属性名和属性值的总长度不得超过 8 KB。单个属性名长度不得超过 32 字节。
ChannelAttributeProperties
频道属性的属性。
示例
client.getChannelAttributes("channelId")
  .then(channelAttributes => {
    Object.keys(channelAttributes).forEach(key => {
      const attribute = channelAttributes[key];
      console.log("value ", attribute.value);
      console.log("lastUpdateTs ", attribute.lastUpdateTs);
      console.log("lastUpdateUserId ", attribute.lastUpdateUserId);
    });
  })
包含以下内容:
| 属性 | 类型 | 描述 | 
|---|---|---|
| lastUpdateTs | number | 频道属性最近一次更新的时间戳(毫秒)。 | 
| lastUpdateUserId | string | 最近一次更新频道属性用户的 ID。 | 
| value | string | 频道属性的属性值,长度不得超过 8 KB。 | 

