LiveChatBans
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
liveChatBan
資源可識別該使用者遭到禁止的 YouTube 使用者和 YouTube 聊天室。
方法
這個 API 支援下列 liveChatBans
資源的方法:
- 插入
- 將特定使用者加入聊天室。API 要求必須由頻道擁有者或與停權相關的聊天室管理員授權。立即試用。
- 刪除
- 移除禁止特定使用者參與聊天室的停權,讓使用者能重新加入即時通訊。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。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2023-02-23 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間: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"]]