typescript-closure-tools
Version:
Command-line tools to convert closure-style JSDoc annotations to typescript, and to convert typescript sources to closure externs files
845 lines (789 loc) • 111 kB
TypeScript
// Type definitions for YouTube Data API v3
// Project: https://developers.google.com/youtube/v3/
// Definitions by: Frank M <https://github.com/sgtfrankieboy>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../gapi/gapi.d.ts" />
declare module gapi.client.youtube {
export interface activities {
/**
* Posts a bulletin for a specific channel.
*/
insert(object: {
/**
* The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part names that you can include in the parameter value are snippet and contentDetails.
*/
part: string;
/**
* HTTP Request Body
*/
RequestBody?: string;
}): HttpRequest<GoogleApiYouTubeActivityResource>;
/**
* Returns a list of channel activity events that match the request criteria.
*/
list(object: {
/**
* The part parameter specifies a comma-separated list of one or more activity resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, and contentDetails. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a activity resource, the snippet property contains other properties that identify the type of activity, a display title for the activity, and so forth. If you set part=snippet, the API response will also contain all of those nested properties.
*/
part: string;
/**
* The channelId parameter specifies a unique YouTube channel ID. The API will then return a list of that channel's activities.
*/
channelId?: string;
/**
* Set this parameter's value to true to retrieve the activity feed that displays on the YouTube home page for the currently authenticated user.
*/
home?: boolean;
/**
* The maxResults parameter specifies the maximum number of items that should be returned in the result set.
*/
maxResults?: number;
/**
* Set this parameter's value to true to retrieve a feed of the authenticated user's activities.
*/
mine?: boolean;
/**
* The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
*/
pageToken?: string;
/**
* The publishedAfter parameter specifies the earliest date and time that an activity could have occurred for that activity to be included in the API response. If the parameter value specifies a day, but not a time, then any activities that occurred that day will be included in the result set. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
*/
publishedAfter?: string;
/**
* The publishedBefore parameter specifies the date and time before which an activity must have occurred for that activity to be included in the API response. If the parameter value specifies a day, but not a time, then any activities that occurred that day will be excluded from the result set. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
*/
publishedBefore?: string;
/**
* The regionCode parameter instructs the API to return results for the specified country. The parameter value is an ISO 3166-1 alpha-2 country code.
*/
regionCode?: string;
}): HttpRequest<GoogleApiYouTubePaginationInfo<GoogleApiYouTubeActivityResource>>;
}
export interface channelBanners {
/**
* Uploads a channel banner to YouTube.
*/
insert(object: {
/**
* The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
*/
onBehalfOfContentOwner: string;
/**
* HTTP Request Body
*/
RequestBody: string;
}): HttpRequest<GoogleApiYouTubeChannelBannerResource>;
}
export interface channels {
/**
* Returns a collection of zero or more channel resources that match the request criteria.
*/
list(object: {
/**
* The part parameter specifies a comma-separated list of one or more channel resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, statistics, topicDetails, and invideoPromotion. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a channel resource, the contentDetails property contains other properties, such as the uploads properties. As such, if you set part=contentDetails, the API response will also contain all of those nested properties.
*/
part: string;
/**
* The categoryId parameter specifies a YouTube guide category, thereby requesting YouTube channels associated with that category.
*/
categoryId?: string;
/**
* The forUsername parameter specifies a YouTube username, thereby requesting the channel associated with that username.
*/
forUsername?: string;
/**
* The id parameter specifies a comma-separated list of the YouTube channel ID(s) for the resource(s) that are being retrieved. In a channel resource, the id property specifies the channel's YouTube channel ID.
*/
id?: string;
/**
* Set this parameter's value to true to instruct the API to only return channels managed by the content owner that the onBehalfOfContentOwner parameter specifies. The user must be authenticated as a CMS account linked to the specified content owner and onBehalfOfContentOwner must be provided.
*/
managedByMe?: boolean;
/**
* The maxResults parameter specifies the maximum number of items that should be returned in the result set.
*/
maxResults?: number;
/**
* Set this parameter's value to true to instruct the API to only return channels owned by the authenticated user.
*/
mine?: boolean;
/**
* Set this parameter's value to true to retrieve a list of channels that subscribed to the authenticated user's channel.
*/
mySubscribers?: boolean;
/**
* The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
*/
onBehalfOfContentOwner?: string;
/**
* The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
*/
pageToken?: string;
}): HttpRequest<GoogleApiYouTubePaginationInfo<GoogleApiYouTubeChannelResource>>;
/**
* Updates a channel's metadata.
*/
update(object: {
/**
* The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part names that you can include in the parameter value are id and invideoPromotion. Note that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies.
*/
part: string;
/**
* The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
*/
onBehalfOfContentOwner?: string;
/**
* HTTP Request Body
*/
RequestBody?: string;
}): HttpRequest<GoogleApiYouTubeChannelResource>;
}
export interface guideCategories {
/**
* Returns a list of categories that can be associated with YouTube channels.
*/
list(object: {
/**
* The part parameter specifies a comma-separated list of one or more guideCategory resource properties that the API response will include. The part names that you can include in the parameter value are id and snippet. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a guideCategory resource, the snippet property contains other properties, such as the category's title. If you set part=snippet, the API response will also contain all of those nested properties.
*/
part: string;
/**
* The hl parameter specifies the language that will be used for text values in the API response.
*/
hl?: string;
/**
* The id parameter specifies a comma-separated list of the YouTube channel category ID(s) for the resource(s) that are being retrieved. In a guideCategory resource, the id property specifies the YouTube channel category ID.
*/
id?: string;
/**
* The regionCode parameter instructs the API to return the list of guide categories available in the specified country. The parameter value is an ISO 3166-1 alpha-2 country code.
*/
regionCode?: string;
}): HttpRequest<GoogleApiYouTubePageInfo<GoogleApiYouTubeGuideCategoryResource>>;
}
export interface playlistItems {
/**
* Deletes a playlist item.
*/
delete(object: {
/**
* The id parameter specifies the YouTube playlist item ID for the playlist item that is being deleted. In a playlistItem resource, the id property specifies the playlist item's ID.
*/
id: string;
}): HttpRequest<GoogleApiYouTubePlaylistItemResource>;
/**
* Adds a resource to a playlist.
*/
insert(object: {
/**
* The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part names that you can include in the parameter value are snippet and contentDetails.
*/
part: string;
/**
* HTTP Request Body
*/
RequestBody?: string;
}): HttpRequest<GoogleApiYouTubePlaylistItemResource>;
/**
* Returns a collection of playlist items that match the API request parameters. You can retrieve all of the playlist items in a specified playlist or retrieve one or more playlist items by their unique IDs.
*/
list(object: {
/**
* The part parameter specifies a comma-separated list of one or more playlistItem resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, and contentDetails. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a playlistItem resource, the snippet property contains numerous fields, including the title, description, position, and resourceId properties. As such, if you set part=snippet, the API response will contain all of those properties.
*/
part: string;
/**
* The id parameter specifies a comma-separated list of one or more unique playlist item IDs.
*/
id?: string;
/**
* The maxResults parameter specifies the maximum number of items that should be returned in the result set.
*/
maxResults?: number;
/**
* The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
*/
pageToken?: string;
/**
* The playlistId parameter specifies the unique ID of the playlist for which you want to retrieve playlist items. Note that even though this is an optional parameter, every request to retrieve playlist items must specify a value for either the id parameter or the playlistId parameter.
*/
playlistId?: string;
/**
* The videoId parameter specifies that the request should return only the playlist items that contain the specified video.
*/
videoId?: string;
}): HttpRequest<GoogleApiYouTubePaginationInfo<GoogleApiYouTubePlaylistItemResource>>;
/**
* Modifies a playlist item. For example, you could update the item's position in the playlist.
*/
update(object: {
/**
* The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part names that you can include in the parameter value are snippet and status. Note that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. For example, a playlist's privacy setting is contained in the status part. As such, if your request is updating a private playlist, and the request's part parameter value includes the status part, the playlist's privacy setting will be updated to whatever value the request body specifies. If the request body does not specify a value, the existing privacy setting will be removed and the playlist will revert to the default privacy setting.
*/
part: string;
/**
* HTTP Request Body
*/
RequestBody?: string;
}): HttpRequest<GoogleApiYouTubePlaylistItemResource>;
}
export interface playlists {
/**
* Deletes a playlist.
*/
delete(object: {
/**
* The id parameter specifies the YouTube playlist ID for the playlist that is being deleted. In a playlist resource, the id property specifies the playlist's ID.
*/
id: string;
}): HttpRequest<GoogleApiYouTubePlaylistResource>;
/**
* Creates a playlist.
*/
insert(object: {
/**
* The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part names that you can include in the parameter value are snippet and status.
*/
part: string;
/**
* HTTP Request Body
*/
RequestBody?: string;
}): HttpRequest<GoogleApiYouTubePlaylistResource>;
/**
* Returns a collection of playlists that match the API request parameters. For example, you can retrieve all playlists that the authenticated user owns, or you can retrieve one or more playlists by their unique IDs.
*/
list(object: {
/**
* The part parameter specifies a comma-separated list of one or more playlist resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, and status. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a playlist resource, the snippet property contains properties like author, title, description, tags, and timeCreated. As such, if you set part=snippet, the API response will contain all of those properties.
*/
part: string;
/**
* This value indicates that the API should only return the specified channel's playlists.
*/
channelId?: string;
/**
* The id parameter specifies a comma-separated list of the YouTube playlist ID(s) for the resource(s) that are being retrieved. In a playlist resource, the id property specifies the playlist's YouTube playlist ID.
*/
id?: string;
/**
* The maxResults parameter specifies the maximum number of items that should be returned in the result set.
*/
maxResults?: number;
/**
* Set this parameter's value to true to instruct the API to only return playlists owned by the authenticated user.
*/
mine?: boolean;
/**
* The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
*/
pagetoken: string;
}): HttpRequest<GoogleApiYouTubePaginationInfo<GoogleApiYouTubePlaylistResource>>;
/**
* Modifies a playlist. For example, you could change a playlist's title, description, or privacy status.
*/
update(object: {
/**
* The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part names that you can include in the parameter value are snippet and status. Note that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. For example, a playlist's privacy setting is contained in the status part. As such, if your request is updating a private playlist, and the request's part parameter value includes the status part, the playlist's privacy setting will be updated to whatever value the request body specifies. If the request body does not specify a value, the existing privacy setting will be removed and the playlist will revert to the default privacy setting.
*/
part: string;
/**
* HTTP Request Body
*/
RequestBody?: string;
}): HttpRequest<GoogleApiYouTubePlaylistResource>;
}
export interface search {
/**
* Returns a collection of search results that match the query parameters specified in the API request. By default, a search result set identifies matching video, channel, and playlist resources, but you can also configure queries to only retrieve a specific type of resource.
*/
list(object: {
/**
* The part parameter specifies a comma-separated list of one or more search resource properties that the API response will include. The part names that you can include in the parameter value are id and snippet. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a search result, the snippet property contains other properties that identify the result's title, description, and so forth. If you set part=snippet, the API response will also contain all of those nested properties.
*/
part: string;
/**
* The channelId parameter indicates that the API response should only contain resources created by the channel
*/
channelId?: string;
/**
* The channelType parameter lets you restrict a search to a particular type of channel.
*/
channelType?: string;
/**
* The forContentOwner parameter restricts the search to only retrieve resources owned by the content owner specified by the onBehalfOfContentOwner parameter. The user must be authenticated as a CMS account linked to the specified content owner and onBehalfOfContentOwner must be provided.
*/
forContentOwner?: boolean;
/**
* The forMine parameter restricts the search to only retrieve videos owned by the authenticated user.
*/
forMine?: boolean;
/**
* The maxResults parameter specifies the maximum number of items that should be returned in the result set.
*/
maxResults?: number;
/**
* The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
*/
onBehalfOfContentOwner?: string;
/**
* The order parameter specifies the method that will be used to order resources in the API response.
*/
order?: string;
/**
* The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
*/
pageToken?: string;
/**
* The publishedAfter parameter indicates that the API response should only contain resources created after the specified time. The value is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z).
*/
publishedAfter?: string;
/**
* The publishedBefore parameter indicates that the API response should only contain resources created before the specified time. The value is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z).
*/
publishedBefore?: string;
/**
* The q parameter specifies the query term to search for.
*/
q?: string;
/**
* The regionCode parameter instructs the API to return search results for the specified country. The parameter value is an ISO 3166-1 alpha-2 country code.
*/
regionCode?: string;
/**
* The relatedToVideoId parameter retrieves a list of videos that are related to the video that the parameter value identifies. The parameter value must be set to a YouTube video ID and, if you are using this parameter, the type parameter must be set to video.
*/
relatedToVideoId?: string;
/**
* The safeSearch parameter indicates whether the search results should include restricted content as well as standard content.
*/
safeSearch?: string;
/**
* The topicId parameter indicates that the API response should only contain resources associated with the specified topic. The value identifies a Freebase topic ID.
*/
topicId?: string;
/**
* The type parameter restricts a search query to only retrieve a particular type of resource.
*/
type?: string;
/**
* The videoCaption parameter indicates whether the API should filter video search results based on whether they have captions.
*/
videoCaption?: string;
/**
* The videoCategoryId parameter filters video search results based on their category.
*/
videoCategoryId?: string;
/**
* The videoDefinition parameter lets you restrict a search to only include either high definition (HD) or standard definition (SD) videos. HD videos are available for playback in at least 720p, though higher resolutions, like 1080p, might also be available.
*/
videoDefinition?: string;
/**
* The videoDimension parameter lets you restrict a search to only retrieve 2D or 3D videos.
*/
videoDimension?: string;
/**
* The videoDuration parameter filters video search results based on their duration.
*/
videoDuration?: string;
/**
* The videoEmbeddable parameter lets you to restrict a search to only videos that can be embedded into a webpage.
*/
videoEmbeddable?: string;
/**
* The videoLicense parameter filters search results to only include videos with a particular license. YouTube lets video uploaders choose to attach either the Creative Commons license or the standard YouTube license to each of their videos.
*/
videoLicense?: string;
/**
* The videoSyndicated parameter lets you to restrict a search to only videos that can be played outside youtube.com.
*/
videoSyndicated?: string;
/**
* The videoType parameter lets you restrict a search to a particular type of videos.
*/
videoType?: string;
}): HttpRequest<GoogleApiYouTubePaginationInfo<GoogleApiYouTubeSearchResource>>;
}
export interface subscriptions {
/**
* Deletes a subscription.
*/
delete(object: {
/**
* The id parameter specifies the YouTube subscription ID for the resource that is being deleted. In a subscription resource, the id property specifies the YouTube subscription ID.
*/
id: string;
}): HttpRequest<GoogleApiYouTubeSubscriptionResource>;
/**
* Adds a subscription for the authenticated user's channel.
*/
insert(object: {
/**
* The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part names that you can include in the parameter value are snippet and contentDetails.
*/
part: string;
/**
* HTTP Request Body
*/
RequestBody: string;
}): HttpRequest<GoogleApiYouTubeSubscriptionResource>;
/**
* Returns subscription resources that match the API request criteria.
*/
list(object: {
/**
* The part parameter specifies a comma-separated list of one or more subscription resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, and contentDetails. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a subscription resource, the snippet property contains other properties, such as a display title for the subscription. If you set part=snippet, the API response will also contain all of those nested properties.
*/
part: string;
/**
* The channelId parameter specifies a YouTube channel ID. The API will only return that channel's subscriptions.
*/
channelId?: string;
/**
* The forChannelId parameter specifies a comma-separated list of channel IDs. The API response will then only contain subscriptions matching those channels.
*/
forChannelId?: string;
/**
* The id parameter specifies a comma-separated list of the YouTube subscription ID(s) for the resource(s) that are being retrieved. In a subscription resource, the id property specifies the YouTube subscription ID.
*/
id?: string;
/**
* The maxResults parameter specifies the maximum number of items that should be returned in the result set.
*/
maxResults?: number;
/**
* Set this parameter's value to true to retrieve a feed of the authenticated user's subscriptions.
*/
mine?: boolean;
/**
* Set this parameter's value to true to retrieve a feed of the subscribers of the authenticated user.
*/
mySubscripbers?: boolean;
/**
* The order parameter specifies the method that will be used to sort resources in the API response.
*/
order?: string;
/**
* The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
*/
pageToken?: string;
}): HttpRequest<GoogleApiYouTubePaginationInfo<GoogleApiYouTubeSubscriptionResource>>;
}
export interface thumbnails {
/**
* Uploads a custom video thumbnail to YouTube and sets it for a video.
*/
set(object: {
/**
* The videoId parameter specifies a YouTube video ID for which the custom video thumbnail is being provided.
*/
videoId: string;
}): HttpRequest<GoogleApiYouTubePageInfo<GoogleApiYouTubeThumbnailResource>>;
}
export interface videoCategories {
/**
* Returns a list of categories that can be associated with YouTube videos.
*/
list(object: {
/**
* The part parameter specifies the videoCategory resource parts that the API response will include. Supported values are id and snippet.
*/
part: string;
/**
* The hl parameter specifies the language that should be used for text values in the API response.
*/
hl?: string;
/**
* The id parameter specifies a comma-separated list of video category IDs for the resources that you are retrieving.
*/
id?: string;
/**
* The regionCode parameter instructs the API to return the list of video categories available in the specified country. The parameter value is an ISO 3166-1 alpha-2 country code.
*/
regionCode?: string;
}): HttpRequest<GoogleApiYouTubePageInfo<GoogleApiYouTubeVideoCategoryResource>>;
}
export interface videos {
/**
* Deletes a YouTube video.
*/
delete(object: {
/**
* The id parameter specifies the YouTube video ID for the resource that is being deleted. In a video resource, the id property specifies the video's ID.
*/
id: string;
/**
* The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
*/
onBehalfOfContentOwner?: string;
}): HttpRequest<GoogleApiYouTubeVideoResource>;
/**
* Get user ratings for videos.
*/
getRating(object: {
/**
* The id parameter specifies a comma-separated list of the YouTube video ID(s) for the resource(s) that are being retrieved. In a video resource, the id property specifies the video's ID.
*/
id: string;
/**
* The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
*/
onBehalfOfContentOwner?: string;
}): HttpRequest<GoogleApiYouTubeVideoGetRatingResponse>;
/**
* Uploads a video to YouTube and optionally sets the video's metadata.
*/
insert(object: {
/**
* The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part names that you can include in the parameter value are snippet, contentDetails, player, statistics, status, and topicDetails. However, not all of those parts contain properties that can be set when setting or updating a video's metadata. For example, the statistics object encapsulates statistics that YouTube calculates for a video and does not contain values that you can set or modify. If the parameter value specifies a part that does not contain mutable values, that part will still be included in the API response.
*/
part: string;
/**
* The autoLevels parameter specifies whether the video should be auto-leveled by YouTube.
*/
autoLevels?: boolean;
/**
* The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
*/
onBehalfOfContentOwner?: string;
/**
* This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners. The onBehalfOfContentOwnerChannel parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the channel specified in the parameter value. This parameter must be used in conjunction with the onBehalfOfContentOwner parameter, and the user must be authenticated using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. In addition, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.
*/
onBehalfOfContentOwnerChannel?: string;
/**
* The stabilize parameter specifies whether the video should be stabilized by YouTube.
*/
stabilize?: boolean;
/**
* HTTP Request Body
*/
RequestBody?: string;
}): HttpRequest<GoogleApiYouTubeVideoResource>;
/**
* Returns a list of videos that match the API request parameters.
*/
list(object: {
/**
* The part parameter specifies a comma-separated list of one or more video resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, player, statistics, status, and topicDetails. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a video resource, the snippet property contains the channelId, title, description, tags, and categoryId properties. As such, if you set part=snippet, the API response will contain all of those properties.
*/
part: string;
/**
* Set this parameter's value to mostPopular to instruct the API to return videos belonging to the chart of most popular videos.
*/
chart: string;
/**
* The id parameter specifies a comma-separated list of the YouTube video ID(s) for the resource(s) that are being retrieved. In a video resource, the id property specifies the video's ID.
*/
id: string;
/**
* The locale parameter selects a video chart available in the specified locale. If using this parameter, chart must also be set. The parameter value is an BCP 47 locale. Supported locales include ar_AE, ar_DZ, ar_EG, ar_JO, ar_MA, ar_SA, ar_TN, ar_YE, cs_CZ, de_DE, el_GR, en_AU, en_BE, en_CA, en_GB, en_GH, en_IE, en_IL, en_IN, en_KE, en_NG, en_NZ, en_SG, en_UG, en_US, en_ZA, es_AR, es_CL, es_CO, es_ES, es_MX, es_PE, fil_PH, fr_FR, hu_HU, id_ID, it_IT, ja_JP, ko_KR, ms_MY, nl_NL, pl_PL, pt_BR, ru_RU, sv_SE, tr_TR, zh_HK, zh_TW
*/
locale: string;
/**
* The maxResults parameter specifies the maximum number of items that should be returned in the result set.
*/
maxResults: number;
/**
* Set this parameter's value to like or dislike to instruct the API to only return videos liked or disliked by the authenticated user.
*/
myRating: string;
/**
* The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
*/
onBehalfOfContentOwner: string;
/**
* The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
*/
pageToken: string;
/**
* The videoCategoryId parameter selects a video chart based on the category. If using this parameter, chart must also be set.
*/
videoCategoryId: string;
}): HttpRequest<GoogleApiYouTubePaginationInfo<GoogleApiYouTubeVideoResource>>;
/**
* Like, dislike, or remove rating from a video.
*/
rate(object: {
/**
* The id parameter specifies the YouTube video ID.
*/
id: string;
/**
* Specifies the rating to record.
*/
rating: string;
/**
* The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
*/
onBehalfOfContentOwner?: string;
}): HttpRequest<any>;
/**
* Updates a video's metadata.
*/
update(object: {
/**
* The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part names that you can include in the parameter value are snippet, contentDetails, player, statistics, status, and topicDetails. Note that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. For example, a video's privacy setting is contained in the status part. As such, if your request is updating a private video, and the request's part parameter value includes the status part, the video's privacy setting will be updated to whatever value the request body specifies. If the request body does not specify a value, the existing privacy setting will be removed and the video will revert to the default privacy setting. In addition, not all of those parts contain properties that can be set when setting or updating a video's metadata. For example, the statistics object encapsulates statistics that YouTube calculates for a video and does not contain values that you can set or modify. If the parameter value specifies a part that does not contain mutable values, that part will still be included in the API response.
*/
part: string;
/**
* The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
*/
onBehalfOfContentOwner?: string;
/**
* HTTP Request Body
*/
RequestBody?: string;
}): HttpRequest<GoogleApiYouTubeVideoResource>;
}
}
interface GoogleApiYouTubePageInfo<T> {
/**
* The type of the API response. For this operation, the value will be youtube#activityListResponse.
*/
kind: string;
/**
* The ETag of the response.
*/
etag: string;
/**
* A list of activities, or events, that match the request criteria.
*/
items: T[];
}
interface GoogleApiYouTubePaginationInfo<T> {
/**
* The type of the API response. For this operation, the value will be youtube#activityListResponse.
*/
kind: string;
/**
* The ETag of the response.
*/
etag: string;
/**
* The pageInfo object encapsulates paging information for the result set.
*/
pageInfo: {
/**
* The total number of results in the result set.
*/
totalResults: number;
/**
* The number of results included in the API response.
*/
resultsPerPage: number;
};
/**
* The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set.
*/
nextPageToken: string;
/**
* The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set.
*/
prevPageToken: string;
/**
* A list of activities, or events, that match the request criteria.
*/
items: T[];
}
interface GoogleApiYouTubeActivityResource {
/**
* The type of the API resource. For activity resources, the value will be youtube#activity.
*/
kind: string;
/**
* The ETag of the activity resource.
*/
etag: string;
/**
* The ID that YouTube uses to uniquely identify the activity.
*/
id: string;
/**
* The snippet object contains basic details about the activity, including the activitys type and group ID.
*/
snippet: {
/**
* The date and time that the activity occurred. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
*/
publishedAt: string;
/**
* The ID that YouTube uses to uniquely identify the channel associated with the activity.
*/
channelId: string;
/**
* The title of the resource primarily associated with the activity.
*/
title: string;
/**
* The description of the resource primarily associated with the activity.
*/
description: string;
/**
* A map of thumbnail images associated with the resource that is primarily associated with the activity.
*/
thumbnails: GoogleApiYouTubeThumbnailItemResource[];
/**
* Channel title for the channel responsible for this activity
*/
channelTitle: string;
/**
* The type of activity that the resource describes.
*/
type: string;
/**
* The group ID associated with the activity.
*/
groupId: string;
}
/**
* The contentDetails object contains information about the content associated with the activity.
*/
contentDetails: {
/**
* The upload object contains information about the uploaded video. This property is only present if the snippet.type is upload.
*/
upload: {
/**
* The ID that YouTube uses to uniquely identify the uploaded video.
*/
videoId: string;
}
/**
* The like object contains information about a resource that received a positive (like) rating. This property is only present if the snippet.type is like.
*/
like: {
/**
* The resourceId object contains information that identifies the rated resource.
*/
resourceId: {
/**
* The type of the API resource.
*/
kind: string;
/**
* The ID that YouTube uses to uniquely identify the video, if the rated resource is a video. This property is only present if the resourceId.kind is youtube#video
*/
videoId: string;
}
}
/**
* The favorite object contains information about a video that was marked as a favorite video. This property is only present if the snippet.type is favorite.
*/
favorite: {
/**
* The resourceId object contains information that identifies the resource that was marked as a favorite.
*/
resourceId: {
/**
* The type of the API resource.
*/
kind: string;
/**
* The ID that YouTube uses to uniquely identify the favorite video. This property is only present if the resourceId.kind is youtube#video.
*/
videoId: string;
}
}
/**
* The comment object contains information about a resource that received a comment. This property is only present if th