YouTube API . playlistItems

Instance Methods

list(part, playlistId=None, maxResults=None, contentOwnerId=None, startIndex=None, id=None)

Browse the YouTube playlist collection.

Method Details

list(part, playlistId=None, maxResults=None, contentOwnerId=None, startIndex=None, id=None)
Browse the YouTube playlist collection.

Args:
  part: string, Parts of the playlist resource to be returned. (required)
  playlistId: string, Retrieves playlist items from the given playlist id.
  maxResults: integer, Maximum number of results to return
  contentOwnerId: string, The authenticated user acts on behalf of this content owner.
  startIndex: integer, Index of the first element to return (starts at 0)
  id: string, YouTube IDs of the playlists to be returned.

Returns:
  An object of the form:

    { # JSON template for a PlaylistItemService.List() response.
    "playlistItems": { # Map of playlist items matching the request criteria, keyed by id.
      "a_key": { # JSON template for a YouTube Playlist item. # An entry in the "playlistItems" map: the key is the video id, the value is the playlist item resource.
        "snippet": { # JSON template for the snippet part of a playlist item. # Basic details about the playlist item: title, description, thumbnails.
          "playlistId": "A String", # The playlist the item is part of.
          "description": "A String", # Description of the playlist item.
          "title": "A String", # Title of the playlist item.
          "resourceId": { # JSON template for a resource id. # The ID of the resource referenced by the playlist item.
            "kind": "A String", # The kind of the referred resource.
            "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
            "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
            "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
          },
          "channelId": "A String", # Author of the playlist item.
          "publishedAt": "A String", # The date and time the playlist item was created.
          "position": 42, # The position of the item within the playlist.
        },
        "contentDetails": { # JSON template for the content details part of a playlist item. # Content details about the playlist item: start and end clipping time.
          "note": "A String", # The user-generated note for this item.
          "startAt": "A String", # The time video playback begins.
          "endAt": "A String", # The time video playback ends.
          "videoId": "A String", # ID of the video.
        },
        "kind": "youtube#playlistItem", # The type of this API resource.
        "etag": "A String", # The eTag of the playlist item.
        "id": "A String", # The unique id of the playlist item.
      },
    },
    "kind": "youtube#playlistItemListResponse", # The type of this API response.
    "etag": "A String", # The eTag of the response.
  }