YouTube API . videos

Instance Methods

list(id, part)

Browse the YouTube video collection.

Method Details

list(id, part)
Browse the YouTube video collection.

Args:
  id: string, YouTube IDs of the videos to be returned. (required)
  part: string, Parts of the video resource to be returned. (required)

Returns:
  An object of the form:

    { # JSON template for a VideoService.List() response.
    "kind": "youtube#videoListResponse", # The type of this API response.
    "etag": "A String", # The eTag of the response.
    "videos": { # Map of videos matching the request criteria, keyed by video id.
      "a_key": { # JSON template for a YouTube Video.
        "status": { # JSON template for the status part of a video. # Status of the video upload, privacy status.
          "privacyStatus": "A String", # Privacy of the video.
          "uploadStatus": "A String", # Status of the video upload.
          "rejectionReason": "A String", # Present only if the uploadStatus indicates a rejected upload.
          "failureReason": "A String", # Present only if the uploadStatus indicates a failed upload.
        },
        "kind": "youtube#video", # The type of this API resource.
        "statistics": { # JSON template for the statistics part of a video. # Statistics about the video: number of views, ratings.
          "commentCount": "A String", # Number of comments for this video.
          "viewCount": "A String", # Number of times the video was viewed.
          "favoriteCount": "A String", # Number of times the video was added to a user's favorites list.
          "dislikeCount": "A String", # Number of times the video was disliked.
          "likeCount": "A String", # Number of times the video was liked.
        },
        "contentDetails": { # JSON template for the content details part of a video. # Information about the video content, media file.
          "duration": "A String", # Duration of the video.
          "aspectRatio": "A String", # The aspect ratio of the video.
        },
        "snippet": { # JSON template for the snippet part of a video. # Basic details about the video: title, description, thumbnails.
          "thumbnails": { # Video thumbnails.
            "a_key": { # JSON template for a thumbnail. # The name of the thumbnail.
              "url": "A String", # The URL for the thumbnail.
            },
          },
          "tags": [ # Textual tags associated with the video.
            "A String",
          ],
          "channelId": "A String", # Channel the video was uploaded into.
          "publishedAt": "A String", # Date time the video was uploaded.
          "title": "A String", # Title of the video.
          "categoryId": "A String", # Video category the video belongs to.
          "description": "A String", # Description of the video.
        },
        "player": { # JSON template for the player part of a video. # Information used to play the video.
          "embedHtml": "A String", # Iframe embed for the video.
        },
        "etag": "A String", # The eTag of the video.
        "id": "A String", # The unique id of the video.
      },
    },
  }