YouTube API . playlistitems

Instance Methods

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

Browse the YouTube playlist collection.

Method Details

list(part, playlistId=None, maxResults=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
  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": [ # List of playlists matching the request criteria.
      { # JSON template for a YouTube Playlist item.
        "snippet": { # JSON template for the snippet part of a playlist item. # Basic details about the playlist item: title, description, thumbnails.
          "description": "A String", # Description of the playlist item.
          "author": "A String", # Author of the playlist item.
          "resourceId": { # JSON template for a resource id. # The resource id contained in this playlist item.
            "type": "A String", # Type of the resource.
            "channelId": "A String", # Only set if type == CHANNEL.
            "playlistId": "A String", # Only set if type == PLAYLIST.
            "videoId": "A String", # Only set if type == VIDEO.
          },
          "timePublished": "A String", # The time the playlist item was created.
          "playlistId": "A String", # The playlist in which this playlist item is contained.
          "title": "A String", # Title of the playlist item.
          "timeUpdated": "A String", # The time the playlist item was updated.
          "position": 42, # The position of the playlist item within the playlist.
        },
        "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.
  }