delete(id, onBehalfOfContentOwner=None)
Delete a YouTube video.
insert(part, body=None, media_body=None, onBehalfOfContentOwner=None)
Upload a video to YouTube.
list(id, part, onBehalfOfContentOwner=None)
Browse the YouTube video collection.
update(part, body, onBehalfOfContentOwner=None)
Update a video.
delete(id, onBehalfOfContentOwner=None)
Delete a YouTube video. Args: id: string, YouTube ID of the video to be deleted. (required) onBehalfOfContentOwner: string, The authenticated user acts on behalf of this content owner.
insert(part, body=None, media_body=None, onBehalfOfContentOwner=None)
Upload a video to YouTube.
Args:
part: string, One or more parts to return on the current request. (required)
body: object, The request body.
The object takes the form of:
{ # A video resource represents a single YouTube video.
"status": { # The status of a video details the video's upload status and privacy status. # 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.
},
"topicDetails": { # Freebase topic information related to the video. # Topics related to the video
"topicIds": [ # List of topic ids for this video *
"A String",
],
},
"kind": "youtube#video", # The type of this API resource.
"statistics": { # Statistics about the video, such as the number of times the video was viewed or liked. # 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": { # Details about the media content of a YouTube video. # Information about the video content, media file.
"duration": "A String", # Duration of the video.
"regionRestriction": { # Region restriction of the video.
"blocked": [ # List of blocked region codes.
"A String",
],
"allowed": [ # List of allowed region codes.
"A String",
],
},
},
"snippet": { # Basic details about a video, including title, description, uploader, thumbnails and category. # Basic details about the video: title, description, thumbnails.
"thumbnails": { # Video thumbnails.
"a_key": { # A thumbnail is an image representing a YouTube resource. # A map of thumbnails by their name.
"url": "A String", # The URL for the thumbnail.
},
},
"tags": [ # Textual tags associated with the video.
"A String",
],
"channelId": "A String", # Channel publishing the video.
"publishedAt": "A String", # Date and time the video was published at.
"title": "A String", # Title of the video.
"categoryId": "A String", # Video category the video belongs to.
"description": "A String", # Description of the video.
},
"player": { # Player to be used for a video playback. # 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.
}
media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
onBehalfOfContentOwner: string, The authenticated user acts on behalf of this content owner.
Returns:
An object of the form:
{ # A video resource represents a single YouTube video.
"status": { # The status of a video details the video's upload status and privacy status. # 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.
},
"topicDetails": { # Freebase topic information related to the video. # Topics related to the video
"topicIds": [ # List of topic ids for this video *
"A String",
],
},
"kind": "youtube#video", # The type of this API resource.
"statistics": { # Statistics about the video, such as the number of times the video was viewed or liked. # 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": { # Details about the media content of a YouTube video. # Information about the video content, media file.
"duration": "A String", # Duration of the video.
"regionRestriction": { # Region restriction of the video.
"blocked": [ # List of blocked region codes.
"A String",
],
"allowed": [ # List of allowed region codes.
"A String",
],
},
},
"snippet": { # Basic details about a video, including title, description, uploader, thumbnails and category. # Basic details about the video: title, description, thumbnails.
"thumbnails": { # Video thumbnails.
"a_key": { # A thumbnail is an image representing a YouTube resource. # A map of thumbnails by their name.
"url": "A String", # The URL for the thumbnail.
},
},
"tags": [ # Textual tags associated with the video.
"A String",
],
"channelId": "A String", # Channel publishing the video.
"publishedAt": "A String", # Date and time the video was published at.
"title": "A String", # Title of the video.
"categoryId": "A String", # Video category the video belongs to.
"description": "A String", # Description of the video.
},
"player": { # Player to be used for a video playback. # 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.
}
list(id, part, onBehalfOfContentOwner=None)
Browse the YouTube video collection.
Args:
id: string, YouTube IDs of the videos to be returned. (required)
part: string, Video parts to include in the returned response. Valid values are: id, snippet, contentDetails, player, statistics, status and topicDetails. (required)
onBehalfOfContentOwner: string, The authenticated user acts on behalf of this content owner.
Returns:
An object of the form:
{ # A paginated list of videos returned as the response to a youtube.videos.list call.
"items": [ # List of videos matching the request criteria.
{ # A video resource represents a single YouTube video.
"status": { # The status of a video details the video's upload status and privacy status. # 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.
},
"topicDetails": { # Freebase topic information related to the video. # Topics related to the video
"topicIds": [ # List of topic ids for this video *
"A String",
],
},
"kind": "youtube#video", # The type of this API resource.
"statistics": { # Statistics about the video, such as the number of times the video was viewed or liked. # 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": { # Details about the media content of a YouTube video. # Information about the video content, media file.
"duration": "A String", # Duration of the video.
"regionRestriction": { # Region restriction of the video.
"blocked": [ # List of blocked region codes.
"A String",
],
"allowed": [ # List of allowed region codes.
"A String",
],
},
},
"snippet": { # Basic details about a video, including title, description, uploader, thumbnails and category. # Basic details about the video: title, description, thumbnails.
"thumbnails": { # Video thumbnails.
"a_key": { # A thumbnail is an image representing a YouTube resource. # A map of thumbnails by their name.
"url": "A String", # The URL for the thumbnail.
},
},
"tags": [ # Textual tags associated with the video.
"A String",
],
"channelId": "A String", # Channel publishing the video.
"publishedAt": "A String", # Date and time the video was published at.
"title": "A String", # Title of the video.
"categoryId": "A String", # Video category the video belongs to.
"description": "A String", # Description of the video.
},
"player": { # Player to be used for a video playback. # 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.
},
],
"kind": "youtube#videoListResponse", # The type of this API response.
"etag": "A String", # The eTag of the response.
}
update(part, body, onBehalfOfContentOwner=None)
Update a video.
Args:
part: string, One or more parts to return on the current request. (required)
body: object, The request body. (required)
The object takes the form of:
{ # A video resource represents a single YouTube video.
"status": { # The status of a video details the video's upload status and privacy status. # 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.
},
"topicDetails": { # Freebase topic information related to the video. # Topics related to the video
"topicIds": [ # List of topic ids for this video *
"A String",
],
},
"kind": "youtube#video", # The type of this API resource.
"statistics": { # Statistics about the video, such as the number of times the video was viewed or liked. # 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": { # Details about the media content of a YouTube video. # Information about the video content, media file.
"duration": "A String", # Duration of the video.
"regionRestriction": { # Region restriction of the video.
"blocked": [ # List of blocked region codes.
"A String",
],
"allowed": [ # List of allowed region codes.
"A String",
],
},
},
"snippet": { # Basic details about a video, including title, description, uploader, thumbnails and category. # Basic details about the video: title, description, thumbnails.
"thumbnails": { # Video thumbnails.
"a_key": { # A thumbnail is an image representing a YouTube resource. # A map of thumbnails by their name.
"url": "A String", # The URL for the thumbnail.
},
},
"tags": [ # Textual tags associated with the video.
"A String",
],
"channelId": "A String", # Channel publishing the video.
"publishedAt": "A String", # Date and time the video was published at.
"title": "A String", # Title of the video.
"categoryId": "A String", # Video category the video belongs to.
"description": "A String", # Description of the video.
},
"player": { # Player to be used for a video playback. # 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.
}
onBehalfOfContentOwner: string, The authenticated user acts on behalf of this content owner.
Returns:
An object of the form:
{ # A video resource represents a single YouTube video.
"status": { # The status of a video details the video's upload status and privacy status. # 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.
},
"topicDetails": { # Freebase topic information related to the video. # Topics related to the video
"topicIds": [ # List of topic ids for this video *
"A String",
],
},
"kind": "youtube#video", # The type of this API resource.
"statistics": { # Statistics about the video, such as the number of times the video was viewed or liked. # 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": { # Details about the media content of a YouTube video. # Information about the video content, media file.
"duration": "A String", # Duration of the video.
"regionRestriction": { # Region restriction of the video.
"blocked": [ # List of blocked region codes.
"A String",
],
"allowed": [ # List of allowed region codes.
"A String",
],
},
},
"snippet": { # Basic details about a video, including title, description, uploader, thumbnails and category. # Basic details about the video: title, description, thumbnails.
"thumbnails": { # Video thumbnails.
"a_key": { # A thumbnail is an image representing a YouTube resource. # A map of thumbnails by their name.
"url": "A String", # The URL for the thumbnail.
},
},
"tags": [ # Textual tags associated with the video.
"A String",
],
"channelId": "A String", # Channel publishing the video.
"publishedAt": "A String", # Date and time the video was published at.
"title": "A String", # Title of the video.
"categoryId": "A String", # Video category the video belongs to.
"description": "A String", # Description of the video.
},
"player": { # Player to be used for a video playback. # 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.
}