liveChatBan 资源用于标识 YouTube 用户以及该用户被禁止参与的 YouTube 实时聊天。
方法
该 API 支持对 liveChatBans 资源使用以下方法:
资源表示法
以下 JSON 结构显示了 liveChatBans 资源的格式:
{
"kind": "youtube#liveChatBan",
"etag": etag,
"id": string,
"snippet": {
"liveChatId": string,
"type": string,
"banDurationSeconds": unsigned long,
"bannedUserDetails": {
"channelId": string
}
}
}属性
下表定义了此资源中显示的属性:
| 属性 | |
|---|---|
kind |
string用于标识 API 资源的类型。该值将为 youtube#liveChatBan。 |
etag |
etag此资源的 ETag。 |
id |
string由 YouTube 分配的 ID,用于唯一标识禁播。 |
snippet |
objectsnippet 对象用于标识被禁用户,并包含有关禁用的详细信息。 |
snippet.liveChatId |
string禁播所涵盖的实时聊天。与直播关联的实时聊天 ID 会在 liveBroadcast 资源的 snippet.liveChatId 属性中返回。 |
snippet.type |
string禁播类型。 此属性的有效值如下:
|
snippet.banDurationSeconds |
unsigned long禁播时长。仅当禁播类型为 temporary 时,才为此属性设置值。默认值为 300(5 分钟)。 |
snippet.bannedUserDetails |
object此对象包含用于标识被禁用户的信息。 |
snippet.bannedUserDetails.channelId |
string被禁用户的 YouTube 频道 ID。 |