GroupItems
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
資源表示法
以下 JSON 結構顯示 groupItems
資源的格式:
{
"kind": "youtube#groupItem",
"etag": etag,
"id": string,
"groupId": string,
"resource": {
"kind": string,
"id": string
}
}
屬性
下表定義了這個資源中顯示的屬性:
屬性 |
kind |
string
識別 API 資源的類型。值為 youtube#groupItem 。 |
etag |
etag
這項資源的 Etag。 |
id |
string
YouTube 會使用這個 ID 來識別群組中 channel 、video 、playlist 或 asset 資源。請注意,這個 ID 專門用於指稱特定群組中的資源,與用來識別資源本身的頻道 ID、影片 ID、播放清單 ID 或資產 ID 不同。resource.id 屬性的值會指定專屬的頻道、影片、播放清單或資產 ID。 |
groupId |
string
YouTube 用來識別含有商品群組的專屬 ID。 |
resource |
object
resource 物件包含可識別加入群組的項目資訊。 |
resource.kind |
string
識別要加入群組的資源類型。
這個屬性的有效值如下:
youtube#channel
youtube#playlist
youtube#video
youtubePartner#asset
|
resource.id |
string
YouTube 用來識別要加入群組的項目的頻道、影片、播放清單或資產 ID。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-21 (世界標準時間)。
[null,null,["上次更新時間:2025-08-21 (世界標準時間)。"],[[["\u003cp\u003eThe YouTube Analytics API provides methods to manage group items, enabling you to list, insert, and delete them within groups.\u003c/p\u003e\n"],["\u003cp\u003eGroup items associate a YouTube resource like a channel, video, or playlist with a specific group for analysis.\u003c/p\u003e\n"],["\u003cp\u003eEach group item is uniquely identified by an ID and contains information about the resource it links to and the group it belongs to.\u003c/p\u003e\n"],["\u003cp\u003eThe API uses a JSON structure to represent group items, including properties like \u003ccode\u003ekind\u003c/code\u003e, \u003ccode\u003eetag\u003c/code\u003e, \u003ccode\u003eid\u003c/code\u003e, \u003ccode\u003egroupId\u003c/code\u003e, and \u003ccode\u003eresource\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eresource\u003c/code\u003e property within a group item further specifies the type and unique ID of the linked YouTube resource (channel, video, playlist, or asset).\u003c/p\u003e\n"]]],["The API for `groupItems` resources supports listing, inserting, and deleting items. `groupItems` contain properties like `kind`, `etag`, `id`, and `groupId`. The `resource` object within a `groupItem` identifies the item, specifying its `kind` (channel, playlist, video, or asset) and its unique `id`. The `id` in groupItem identifies a specific resource within a group and is different than the resources' ID, while the `groupId` is the identifier for the group containing the item.\n"],null,["# GroupItems\n\n\u003cbr /\u003e\n\nMethods\n-------\n\nThe API supports the following methods for `groupItems` resources:\n\n[list](/youtube/analytics/reference/groupItems/list)\n: Returns a collection of group items that match the API request parameters.\n [Try it now](/youtube/analytics/reference/groupItems/list#try-it).\n\n[insert](/youtube/analytics/reference/groupItems/insert)\n: Creates a group item.\n [Try it now](/youtube/analytics/reference/groupItems/insert#try-it).\n\n[delete](/youtube/analytics/reference/groupItems/delete)\n: Removes an item from a group.\n [Try it now](/youtube/analytics/reference/groupItems/delete#try-it).\n\nResource representation\n-----------------------\n\nThe JSON structure below shows the format of a `groupItems` resource: \n\n```text\n{\n \"kind\": \"youtube#groupItem\",\n \"etag\": etag,\n \"id\": string,\n \"groupId\": string,\n \"resource\": {\n \"kind\": string,\n \"id\": string\n }\n}\n```\n\n### Properties\n\nThe following table defines the properties that appear in this resource:\n\n| Properties ||\n|-----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Identifies the API resource's type. The value will be `youtube#groupItem`. |\n| `etag` | `etag` The Etag of this resource. |\n| `id` | `string` The ID that YouTube uses to uniquely identify the `channel`, `video`, `playlist`, or `asset` resource that is included in the group. Note that this ID refers specifically to the inclusion of that resource in a particular group and is different than the channel ID, video ID, playlist ID, or asset ID that uniquely identifies the resource itself. The [resource.id](#resource.id) property's value specifies the unique channel, video, playlist, or asset ID. |\n| `groupId` | `string` The ID that YouTube uses to uniquely identify the group that contains the item. |\n| `resource` | `object` The `resource` object contains information that identifies the item being added to the group. |\n| resource.`kind` | `string` Identifies the type of resource being added to the group. Valid values for this property are: - `youtube#channel` - `youtube#playlist` - `youtube#video` - `youtubePartner#asset` |\n| resource.`id` | `string` The channel, video, playlist, or asset ID that YouTube uses to uniquely identify the item that is being added to the group. |"]]