AI-generated Key Takeaways
-
A
channelSectionresource contains information about a set of videos that a channel features, such as latest uploads, popular uploads, or playlists. -
Channels can manage their featured videos using the API, which allows creating, listing, updating, and deleting
channelSectionresources. -
A channel can have a maximum of 10 sections, each with a specified type like
singlePlaylist,multipleChannels, orpopularUploads. -
Each
channelSectionhas properties such askind,etag,id,snippet, andcontentDetails, which specify details about the section and its contents. -
The
contentDetailsproperty can contain a list of either playlists or channels featured in the section, depending on thesnippet.typeproperty.
A channelSection resource contains information about a set of
videos that a channel has chosen to feature. For example, a section could feature a channel's
latest uploads, most popular uploads, or videos from one or more playlists.
A channel can create a maximum of 10 shelves.
Methods
The API supports the following methods for channelSections resources:
- list
- Returns a list of
channelSectionresources that match the API request criteria. Try it now. - insert
- Adds a channel section to the authenticated user's channel. A channel can create a maximum of 10 shelves. Try it now.
- update
- Updates a channel section. Try it now.
- delete
- Deletes a channel section. Try it now.
Resource representation
The following JSON structure shows the format of a channelSections resource:
{
"kind": "youtube#channelSection",
"etag": etag,
"id": string,
"snippet": {
"type": string,
"channelId": string,
"title": string,
"position": unsigned integer
},
"contentDetails": {
"playlists": [
string
],
"channels": [
string
]
}
}Properties
The following table defines the properties that appear in this resource:
| Properties | |
|---|---|
kind |
stringIdentifies the API resource's type. The value will be youtube#channelSection. |
etag |
etagThe Etag of this resource. |
id |
stringThe ID that YouTube uses to uniquely identify the channel section. |
snippet |
objectThe snippet object contains basic details about the channel section, such as its type and title. |
snippet.type |
stringThe channel section's type. Valid values for this property are:
|
snippet.channelId |
stringThe ID that YouTube uses to uniquely identify the channel that published the channel section. |
snippet.title |
stringThe section's title. You can only set the title of a channel section that has a snippet.type value of either multiplePlaylists or multipleChannels, and, in fact, you must specify a title when inserting or updating either of those types of sections. If you specify a title for other types of channel sections, the value will be ignored.This property's value has a maximum length of 100 characters and may contain all valid UTF-8 characters except < and >. |
snippet.position |
unsigned integerThe section's position on the channel page. This property uses a 0-based index. A value of 0 identifies the first section that appears on the channel, a value of 1 identifies the second section, and so forth.If you do not specify a value for this property when inserting a channel section, the default behavior is to display the new section last. |
contentDetails |
objectThe contentDetails object contains details about the channel section's content, such as a list of playlists or channels featured in the section. |
contentDetails.playlists[] |
listA list of one or more playlist IDs that are featured in a channel section. You must specify a list of playlist IDs if the channelSection resource's snippet.type property is either singlePlaylist or multiplePlaylists, and this property should not be specified for other types of sections. If the type is singlePlaylist, this list must specify exactly one playlist ID. |
contentDetails.channels[] |
listA list of one or more channel IDs that are featured in a channel section. You must specify a list of channel IDs if the channelSection resource's snippet.type property is multipleChannels, and this property should not be specified for other types of sections. You cannot include your own channel in the list. |