Video API, gRPC: PlaylistService.List
List playlists for a channel.
gRPC request
rpc List (ListPlaylistsRequest) returns (ListPlaylistsResponse)
ListPlaylistsRequest
{
"channel_id": "string",
"page_size": "int64",
"page_token": "string",
"order_by": "string",
"filter": "string"
}
Field |
Description |
channel_id |
string Required field. ID of the channel. |
page_size |
int64 The maximum number of the results per page to return. |
page_token |
string Page token for getting the next page of the result. |
order_by |
string By which column the listing should be ordered and in which direction, |
filter |
string Filter expression that filters resources listed in the response. |
ListPlaylistsResponse
{
"playlists": [
{
"id": "string",
"channel_id": "string",
"title": "string",
"description": "string",
"items": [
{
// Includes only one of the fields `video_id`, `episode_id`
"video_id": "string",
"episode_id": "string",
// end of the list of possible fields
"position": "int64"
}
],
"created_at": "google.protobuf.Timestamp",
"updated_at": "google.protobuf.Timestamp"
}
],
"next_page_token": "string"
}
Field |
Description |
playlists[] |
List of playlists for specific channel. |
next_page_token |
string Token for getting the next page. |
Playlist
Entity representing an ordered list of videos or episodes.
Field |
Description |
id |
string ID of the playlist. |
channel_id |
string ID of the channel to create the playlist in. |
title |
string Playlist title. |
description |
string Playlist description. |
items[] |
List of playlist items. |
created_at |
Time when playlist was created. |
updated_at |
Time of last playlist update. |
PlaylistItem
Field |
Description |
video_id |
string ID of the video. Includes only one of the fields |
episode_id |
string ID of the episode. Includes only one of the fields |
position |
int64 Item position (zero-indexed). |