LiveChatBans
liveChatBan
资源用于标识被禁止参与的 YouTube 用户和 YouTube 实时聊天。
方法
该 API 支持 liveChatBans
资源的以下方法:
- 插入
- 禁止特定用户参与实时聊天。API 请求必须获得频道所有者或与禁令相关联的实时聊天管理员的授权。
立即试用。
- delete
- 移除禁止特定用户参与实时聊天的禁令,让用户可以重新加入聊天。API 请求必须获得频道所有者或与禁令相关联的实时聊天管理员的授权。
立即试用。
属性
下表定义了此资源中显示的属性:
属性 |
kind |
string
标识 API 资源类型。值为 youtube#liveChatBan 。 |
etag |
etag
此资源的 Etag。 |
id |
string
YouTube 分配的 ID,用于明确标识此禁令。 |
snippet |
object
snippet 对象会禁止用户,并包含有关禁止的详细信息。 |
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。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-02-23。
[null,null,["最后更新时间 (UTC):2023-02-23。"],[[["A `liveChatBan` resource identifies a YouTube user who is banned from a specific YouTube live chat."],["The API allows channel owners or moderators to insert a `liveChatBan` to ban a user or delete one to remove the ban."],["A `liveChatBan` can be either permanent or temporary, and the duration of a temporary ban can be specified in seconds."],["The `liveChatBan` resource's `snippet` object includes the ID of the live chat, the type of ban, the ban duration (if temporary), and details of the banned user."],["The `liveChatBan` resource has properties such as `kind`, `etag`, and `id`, which provide general information about the resource, such as the resource type, its ETag, and the ban's unique ID."]]],["The `liveChatBan` resource manages user bans in YouTube live chats. Key actions include: inserting a ban (`insert`) to prevent a user from participating, and deleting a ban (`delete`) to allow a user to rejoin. The resource identifies the banned user, the live chat, ban type (`permanent` or `temporary`), and ban duration in seconds. The resource properties include `kind`, `etag`, and `id`. Authorization from the channel owner or a moderator is required for both inserting and deleting.\n"]]