LiveChatBans
liveChatBan
リソースは、YouTube ユーザーと、ユーザーの参加が禁止されている YouTube チャットを特定します。
Methods
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 Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2023-02-23 UTC。
[null,null,["最終更新日 2023-02-23 UTC。"],[[["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"]]