From eca8241967c4d8c24bab1b516b0384f87e9c8087 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Date: Fri, 13 Oct 2023 01:35:58 +0000 Subject: [PATCH] feat(youtube)!: update the API BREAKING CHANGE: This release has breaking changes. #### youtube:v3 The following keys were deleted: - resources.channels.methods.list.parameters.forHandle.description - resources.channels.methods.list.parameters.forHandle.location - resources.channels.methods.list.parameters.forHandle.type - resources.search.methods.list.parameters.relatedToVideoId.description - resources.search.methods.list.parameters.relatedToVideoId.location - resources.search.methods.list.parameters.relatedToVideoId.type The following keys were added: - resources.playlistImages.methods.delete.description - resources.playlistImages.methods.delete.flatPath - resources.playlistImages.methods.delete.httpMethod - resources.playlistImages.methods.delete.id - resources.playlistImages.methods.delete.parameterOrder - resources.playlistImages.methods.delete.parameters.id.description - resources.playlistImages.methods.delete.parameters.id.location - resources.playlistImages.methods.delete.parameters.id.type - resources.playlistImages.methods.delete.parameters.onBehalfOfContentOwner.description - resources.playlistImages.methods.delete.parameters.onBehalfOfContentOwner.location - resources.playlistImages.methods.delete.parameters.onBehalfOfContentOwner.type - resources.playlistImages.methods.delete.path - resources.playlistImages.methods.delete.scopes - resources.playlistImages.methods.insert.description - resources.playlistImages.methods.insert.flatPath - resources.playlistImages.methods.insert.httpMethod - resources.playlistImages.methods.insert.id - resources.playlistImages.methods.insert.parameterOrder - resources.playlistImages.methods.insert.parameters.onBehalfOfContentOwner.description - resources.playlistImages.methods.insert.parameters.onBehalfOfContentOwner.location - resources.playlistImages.methods.insert.parameters.onBehalfOfContentOwner.type - resources.playlistImages.methods.insert.parameters.onBehalfOfContentOwnerChannel.description - resources.playlistImages.methods.insert.parameters.onBehalfOfContentOwnerChannel.location - resources.playlistImages.methods.insert.parameters.onBehalfOfContentOwnerChannel.type - resources.playlistImages.methods.insert.parameters.part.description - resources.playlistImages.methods.insert.parameters.part.location - resources.playlistImages.methods.insert.parameters.part.repeated - resources.playlistImages.methods.insert.parameters.part.type - resources.playlistImages.methods.insert.path - resources.playlistImages.methods.insert.request.$ref - resources.playlistImages.methods.insert.response.$ref - resources.playlistImages.methods.insert.scopes - resources.playlistImages.methods.list.description - resources.playlistImages.methods.list.flatPath - resources.playlistImages.methods.list.httpMethod - resources.playlistImages.methods.list.id - resources.playlistImages.methods.list.parameterOrder - resources.playlistImages.methods.list.parameters.maxResults.default - resources.playlistImages.methods.list.parameters.maxResults.description - resources.playlistImages.methods.list.parameters.maxResults.format - resources.playlistImages.methods.list.parameters.maxResults.location - resources.playlistImages.methods.list.parameters.maxResults.maximum - resources.playlistImages.methods.list.parameters.maxResults.minimum - resources.playlistImages.methods.list.parameters.maxResults.type - resources.playlistImages.methods.list.parameters.onBehalfOfContentOwner.description - resources.playlistImages.methods.list.parameters.onBehalfOfContentOwner.location - resources.playlistImages.methods.list.parameters.onBehalfOfContentOwner.type - resources.playlistImages.methods.list.parameters.onBehalfOfContentOwnerChannel.description - resources.playlistImages.methods.list.parameters.onBehalfOfContentOwnerChannel.location - resources.playlistImages.methods.list.parameters.onBehalfOfContentOwnerChannel.type - resources.playlistImages.methods.list.parameters.pageToken.description - resources.playlistImages.methods.list.parameters.pageToken.location - resources.playlistImages.methods.list.parameters.pageToken.type - resources.playlistImages.methods.list.parameters.parent.description - resources.playlistImages.methods.list.parameters.parent.location - resources.playlistImages.methods.list.parameters.parent.type - resources.playlistImages.methods.list.parameters.part.description - resources.playlistImages.methods.list.parameters.part.location - resources.playlistImages.methods.list.parameters.part.repeated - resources.playlistImages.methods.list.parameters.part.type - resources.playlistImages.methods.list.path - resources.playlistImages.methods.list.response.$ref - resources.playlistImages.methods.list.scopes - resources.playlistImages.methods.update.description - resources.playlistImages.methods.update.flatPath - resources.playlistImages.methods.update.httpMethod - resources.playlistImages.methods.update.id - resources.playlistImages.methods.update.parameterOrder - resources.playlistImages.methods.update.parameters.onBehalfOfContentOwner.description - resources.playlistImages.methods.update.parameters.onBehalfOfContentOwner.location - resources.playlistImages.methods.update.parameters.onBehalfOfContentOwner.type - resources.playlistImages.methods.update.parameters.part.description - resources.playlistImages.methods.update.parameters.part.location - resources.playlistImages.methods.update.parameters.part.repeated - resources.playlistImages.methods.update.parameters.part.type - resources.playlistImages.methods.update.path - resources.playlistImages.methods.update.request.$ref - resources.playlistImages.methods.update.response.$ref - resources.playlistImages.methods.update.scopes - schemas.PlaylistImage.id - schemas.PlaylistImage.properties.id.description - schemas.PlaylistImage.properties.id.type - schemas.PlaylistImage.properties.kind.default - schemas.PlaylistImage.properties.kind.description - schemas.PlaylistImage.properties.kind.type - schemas.PlaylistImage.properties.snippet.$ref - schemas.PlaylistImage.type - schemas.PlaylistImageListResponse.id - schemas.PlaylistImageListResponse.properties.items.items.$ref - schemas.PlaylistImageListResponse.properties.items.type - schemas.PlaylistImageListResponse.properties.kind.default - schemas.PlaylistImageListResponse.properties.kind.description - schemas.PlaylistImageListResponse.properties.kind.type - schemas.PlaylistImageListResponse.properties.nextPageToken.description - schemas.PlaylistImageListResponse.properties.nextPageToken.type - schemas.PlaylistImageListResponse.properties.pageInfo.$ref - schemas.PlaylistImageListResponse.properties.pageInfo.description - schemas.PlaylistImageListResponse.properties.prevPageToken.description - schemas.PlaylistImageListResponse.properties.prevPageToken.type - schemas.PlaylistImageListResponse.type - schemas.PlaylistImageSnippet.description - schemas.PlaylistImageSnippet.id - schemas.PlaylistImageSnippet.properties.height.description - schemas.PlaylistImageSnippet.properties.height.format - schemas.PlaylistImageSnippet.properties.height.type - schemas.PlaylistImageSnippet.properties.playlistId.description - schemas.PlaylistImageSnippet.properties.playlistId.type - schemas.PlaylistImageSnippet.properties.type.description - schemas.PlaylistImageSnippet.properties.type.enum - schemas.PlaylistImageSnippet.properties.type.enumDescriptions - schemas.PlaylistImageSnippet.properties.type.type - schemas.PlaylistImageSnippet.properties.width.description - schemas.PlaylistImageSnippet.properties.width.format - schemas.PlaylistImageSnippet.properties.width.type - schemas.PlaylistImageSnippet.type --- discovery/youtube-v3.json | 242 ++++++++++++++++++- src/apis/youtube/v3.ts | 496 +++++++++++++++++++++++++++++++++++++- 2 files changed, 719 insertions(+), 19 deletions(-) diff --git a/discovery/youtube-v3.json b/discovery/youtube-v3.json index fa47ca4f76..0164fb1c2e 100644 --- a/discovery/youtube-v3.json +++ b/discovery/youtube-v3.json @@ -717,11 +717,6 @@ "location": "query", "type": "string" }, - "forHandle": { - "description": "Return the channel associated with a YouTube handle. UNIMPLEMENTED.", - "location": "query", - "type": "string" - }, "forUsername": { "description": "Return the channel associated with a YouTube username.", "location": "query", @@ -2171,6 +2166,158 @@ } } }, + "playlistImages": { + "methods": { + "delete": { + "description": "Deletes a resource.", + "flatPath": "youtube/v3/playlistImages", + "httpMethod": "DELETE", + "id": "youtube.playlistImages.delete", + "parameterOrder": [], + "parameters": { + "id": { + "description": "Id to identify this image. This is returned from by the List method.", + "location": "query", + "type": "string" + }, + "onBehalfOfContentOwner": { + "description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who 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 CMS account that the user authenticates with must be linked to the specified YouTube content owner.", + "location": "query", + "type": "string" + } + }, + "path": "youtube/v3/playlistImages", + "scopes": [ + "https://www.googleapis.com/auth/youtube", + "https://www.googleapis.com/auth/youtube.force-ssl", + "https://www.googleapis.com/auth/youtubepartner" + ] + }, + "insert": { + "description": "Inserts a new resource into this collection.", + "flatPath": "youtube/v3/playlistImages", + "httpMethod": "POST", + "id": "youtube.playlistImages.insert", + "parameterOrder": [], + "parameters": { + "onBehalfOfContentOwner": { + "description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who 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 CMS account that the user authenticates with must be linked to the specified YouTube content owner.", + "location": "query", + "type": "string" + }, + "onBehalfOfContentOwnerChannel": { + "description": "This parameter can only be used in a properly authorized request. *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, 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.", + "location": "query", + "type": "string" + }, + "part": { + "description": "The *part* parameter specifies the properties that the API response will include.", + "location": "query", + "repeated": true, + "type": "string" + } + }, + "path": "youtube/v3/playlistImages", + "request": { + "$ref": "PlaylistImage" + }, + "response": { + "$ref": "PlaylistImage" + }, + "scopes": [ + "https://www.googleapis.com/auth/youtube", + "https://www.googleapis.com/auth/youtube.force-ssl", + "https://www.googleapis.com/auth/youtubepartner" + ] + }, + "list": { + "description": "Retrieves a list of resources, possibly filtered.", + "flatPath": "youtube/v3/playlistImages", + "httpMethod": "GET", + "id": "youtube.playlistImages.list", + "parameterOrder": [], + "parameters": { + "maxResults": { + "default": "5", + "description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.", + "format": "uint32", + "location": "query", + "maximum": "50", + "minimum": "0", + "type": "integer" + }, + "onBehalfOfContentOwner": { + "description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who 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 CMS account that the user authenticates with must be linked to the specified YouTube content owner.", + "location": "query", + "type": "string" + }, + "onBehalfOfContentOwnerChannel": { + "description": "This parameter can only be used in a properly authorized request. *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, 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.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Return PlaylistImages for this playlist id.", + "location": "query", + "type": "string" + }, + "part": { + "description": "The *part* parameter specifies a comma-separated list of one or more playlistImage resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response.", + "location": "query", + "repeated": true, + "type": "string" + } + }, + "path": "youtube/v3/playlistImages", + "response": { + "$ref": "PlaylistImageListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/youtube", + "https://www.googleapis.com/auth/youtube.force-ssl", + "https://www.googleapis.com/auth/youtube.readonly", + "https://www.googleapis.com/auth/youtubepartner" + ] + }, + "update": { + "description": "Updates an existing resource.", + "flatPath": "youtube/v3/playlistImages", + "httpMethod": "PUT", + "id": "youtube.playlistImages.update", + "parameterOrder": [], + "parameters": { + "onBehalfOfContentOwner": { + "description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who 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 CMS account that the user authenticates with must be linked to the specified YouTube content owner.", + "location": "query", + "type": "string" + }, + "part": { + "description": "The *part* parameter specifies the properties that the API response will include.", + "location": "query", + "repeated": true, + "type": "string" + } + }, + "path": "youtube/v3/playlistImages", + "request": { + "$ref": "PlaylistImage" + }, + "response": { + "$ref": "PlaylistImage" + }, + "scopes": [ + "https://www.googleapis.com/auth/youtube", + "https://www.googleapis.com/auth/youtube.force-ssl", + "https://www.googleapis.com/auth/youtubepartner" + ] + } + } + }, "playlistItems": { "methods": { "delete": { @@ -2658,11 +2805,6 @@ "location": "query", "type": "string" }, - "relatedToVideoId": { - "description": "Search related to a resource.", - "location": "query", - "type": "string" - }, "relevanceLanguage": { "description": "Return results relevant to this language.", "location": "query", @@ -3852,7 +3994,7 @@ } } }, - "revision": "20231009", + "revision": "20231011", "rootUrl": "https://youtube.googleapis.com/", "schemas": { "AbuseReport": { @@ -9544,6 +9686,84 @@ }, "type": "object" }, + "PlaylistImage": { + "id": "PlaylistImage", + "properties": { + "id": { + "description": "Identifies this resource (playlist id and image type).", + "type": "string" + }, + "kind": { + "default": "youtube#playlistImage", + "description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#playlistImages\".", + "type": "string" + }, + "snippet": { + "$ref": "PlaylistImageSnippet" + } + }, + "type": "object" + }, + "PlaylistImageListResponse": { + "id": "PlaylistImageListResponse", + "properties": { + "items": { + "items": { + "$ref": "PlaylistImage" + }, + "type": "array" + }, + "kind": { + "default": "youtube#PlaylistImageListResponse", + "description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#playlistImageListResponse\".", + "type": "string" + }, + "nextPageToken": { + "description": "The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set.", + "type": "string" + }, + "pageInfo": { + "$ref": "PageInfo", + "description": "General pagination information." + }, + "prevPageToken": { + "description": "The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set.", + "type": "string" + } + }, + "type": "object" + }, + "PlaylistImageSnippet": { + "description": "A *playlistImage* resource identifies another resource, such as a image, that is associated with a playlist. In addition, the playlistImage resource contains details about the included resource that pertain specifically to how that resource is used in that playlist. YouTube uses playlists to identify special collections of videos for a channel, such as: - uploaded videos - favorite videos - positively rated (liked) videos - watch history To be more specific, these lists are associated with a channel, which is a collection of a person, group, or company's videos, playlists, and other YouTube information. You can retrieve the playlist IDs for each of these lists from the channel resource for a given channel. You can then use the playlistImages.list method to retrieve image data for any of those playlists. You can also add or remove images from those lists by calling the playlistImages.insert and playlistImages.delete methods.", + "id": "PlaylistImageSnippet", + "properties": { + "height": { + "description": "The image height.", + "format": "int32", + "type": "integer" + }, + "playlistId": { + "description": "The Playlist ID of the playlist this image is associated with.", + "type": "string" + }, + "type": { + "description": "The image type.", + "enum": [ + "hero" + ], + "enumDescriptions": [ + "The main image that will be used for this playlist." + ], + "type": "string" + }, + "width": { + "description": "The image width.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "PlaylistItem": { "description": "A *playlistItem* resource identifies another resource, such as a video, that is included in a playlist. In addition, the playlistItem resource contains details about the included resource that pertain specifically to how that resource is used in that playlist. YouTube uses playlists to identify special collections of videos for a channel, such as: - uploaded videos - favorite videos - positively rated (liked) videos - watch history - watch later To be more specific, these lists are associated with a channel, which is a collection of a person, group, or company's videos, playlists, and other YouTube information. You can retrieve the playlist IDs for each of these lists from the channel resource for a given channel. You can then use the playlistItems.list method to retrieve any of those lists. You can also add or remove items from those lists by calling the playlistItems.insert and playlistItems.delete methods. For example, if a user gives a positive rating to a video, you would insert that video into the liked videos playlist for that user's channel.", "id": "PlaylistItem", diff --git a/src/apis/youtube/v3.ts b/src/apis/youtube/v3.ts index 2265facfee..76ffeae667 100644 --- a/src/apis/youtube/v3.ts +++ b/src/apis/youtube/v3.ts @@ -129,6 +129,7 @@ export namespace youtube_v3 { liveStreams: Resource$Livestreams; members: Resource$Members; membershipsLevels: Resource$Membershipslevels; + playlistImages: Resource$Playlistimages; playlistItems: Resource$Playlistitems; playlists: Resource$Playlists; search: Resource$Search; @@ -166,6 +167,7 @@ export namespace youtube_v3 { this.liveStreams = new Resource$Livestreams(this.context); this.members = new Resource$Members(this.context); this.membershipsLevels = new Resource$Membershipslevels(this.context); + this.playlistImages = new Resource$Playlistimages(this.context); this.playlistItems = new Resource$Playlistitems(this.context); this.playlists = new Resource$Playlists(this.context); this.search = new Resource$Search(this.context); @@ -3021,6 +3023,57 @@ export namespace youtube_v3 { */ itemCount?: number | null; } + export interface Schema$PlaylistImage { + /** + * Identifies this resource (playlist id and image type). + */ + id?: string | null; + /** + * Identifies what kind of resource this is. Value: the fixed string "youtube#playlistImages". + */ + kind?: string | null; + snippet?: Schema$PlaylistImageSnippet; + } + export interface Schema$PlaylistImageListResponse { + items?: Schema$PlaylistImage[]; + /** + * Identifies what kind of resource this is. Value: the fixed string "youtube#playlistImageListResponse". + */ + kind?: string | null; + /** + * The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. + */ + nextPageToken?: string | null; + /** + * General pagination information. + */ + pageInfo?: Schema$PageInfo; + /** + * The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. + */ + prevPageToken?: string | null; + } + /** + * A *playlistImage* resource identifies another resource, such as a image, that is associated with a playlist. In addition, the playlistImage resource contains details about the included resource that pertain specifically to how that resource is used in that playlist. YouTube uses playlists to identify special collections of videos for a channel, such as: - uploaded videos - favorite videos - positively rated (liked) videos - watch history To be more specific, these lists are associated with a channel, which is a collection of a person, group, or company's videos, playlists, and other YouTube information. You can retrieve the playlist IDs for each of these lists from the channel resource for a given channel. You can then use the playlistImages.list method to retrieve image data for any of those playlists. You can also add or remove images from those lists by calling the playlistImages.insert and playlistImages.delete methods. + */ + export interface Schema$PlaylistImageSnippet { + /** + * The image height. + */ + height?: number | null; + /** + * The Playlist ID of the playlist this image is associated with. + */ + playlistId?: string | null; + /** + * The image type. + */ + type?: string | null; + /** + * The image width. + */ + width?: number | null; + } /** * A *playlistItem* resource identifies another resource, such as a video, that is included in a playlist. In addition, the playlistItem resource contains details about the included resource that pertain specifically to how that resource is used in that playlist. YouTube uses playlists to identify special collections of videos for a channel, such as: - uploaded videos - favorite videos - positively rated (liked) videos - watch history - watch later To be more specific, these lists are associated with a channel, which is a collection of a person, group, or company's videos, playlists, and other YouTube information. You can retrieve the playlist IDs for each of these lists from the channel resource for a given channel. You can then use the playlistItems.list method to retrieve any of those lists. You can also add or remove items from those lists by calling the playlistItems.insert and playlistItems.delete methods. For example, if a user gives a positive rating to a video, you would insert that video into the liked videos playlist for that user's channel. */ @@ -5714,10 +5767,6 @@ export namespace youtube_v3 { * Return the channels within the specified guide category ID. */ categoryId?: string; - /** - * Return the channel associated with a YouTube handle. UNIMPLEMENTED. - */ - forHandle?: string; /** * Return the channel associated with a YouTube username. */ @@ -9576,6 +9625,441 @@ export namespace youtube_v3 { part?: string[]; } + export class Resource$Playlistimages { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Deletes a resource. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Playlistimages$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Playlistimages$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Playlistimages$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Playlistimages$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Playlistimages$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Playlistimages$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: BodyResponseCallback | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Playlistimages$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Playlistimages$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://youtube.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/youtube/v3/playlistImages').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'DELETE', + }, + options + ), + params, + requiredParams: [], + pathParams: [], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Inserts a new resource into this collection. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + insert( + params: Params$Resource$Playlistimages$Insert, + options: StreamMethodOptions + ): GaxiosPromise; + insert( + params?: Params$Resource$Playlistimages$Insert, + options?: MethodOptions + ): GaxiosPromise; + insert( + params: Params$Resource$Playlistimages$Insert, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + insert( + params: Params$Resource$Playlistimages$Insert, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + insert( + params: Params$Resource$Playlistimages$Insert, + callback: BodyResponseCallback + ): void; + insert(callback: BodyResponseCallback): void; + insert( + paramsOrCallback?: + | Params$Resource$Playlistimages$Insert + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Playlistimages$Insert; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Playlistimages$Insert; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://youtube.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/youtube/v3/playlistImages').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: [], + pathParams: [], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves a list of resources, possibly filtered. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Playlistimages$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Playlistimages$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Playlistimages$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Playlistimages$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Playlistimages$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Playlistimages$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Playlistimages$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Playlistimages$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://youtube.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/youtube/v3/playlistImages').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: [], + pathParams: [], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates an existing resource. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + update( + params: Params$Resource$Playlistimages$Update, + options: StreamMethodOptions + ): GaxiosPromise; + update( + params?: Params$Resource$Playlistimages$Update, + options?: MethodOptions + ): GaxiosPromise; + update( + params: Params$Resource$Playlistimages$Update, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + update( + params: Params$Resource$Playlistimages$Update, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + update( + params: Params$Resource$Playlistimages$Update, + callback: BodyResponseCallback + ): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: + | Params$Resource$Playlistimages$Update + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Playlistimages$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Playlistimages$Update; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://youtube.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/youtube/v3/playlistImages').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'PUT', + }, + options + ), + params, + requiredParams: [], + pathParams: [], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Playlistimages$Delete + extends StandardParameters { + /** + * Id to identify this image. This is returned from by the List method. + */ + id?: string; + /** + * *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who 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 CMS account that the user authenticates with must be linked to the specified YouTube content owner. + */ + onBehalfOfContentOwner?: string; + } + export interface Params$Resource$Playlistimages$Insert + extends StandardParameters { + /** + * *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who 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 CMS account that the user authenticates with must 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 specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, 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 *part* parameter specifies the properties that the API response will include. + */ + part?: string[]; + + /** + * Request body metadata + */ + requestBody?: Schema$PlaylistImage; + } + export interface Params$Resource$Playlistimages$List + extends StandardParameters { + /** + * The *maxResults* parameter specifies the maximum number of items that should be returned in the result set. + */ + maxResults?: number; + /** + * *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who 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 CMS account that the user authenticates with must 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 specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, 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 *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; + /** + * Return PlaylistImages for this playlist id. + */ + parent?: string; + /** + * The *part* parameter specifies a comma-separated list of one or more playlistImage resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response. + */ + part?: string[]; + } + export interface Params$Resource$Playlistimages$Update + extends StandardParameters { + /** + * *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who 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 CMS account that the user authenticates with must be linked to the specified YouTube content owner. + */ + onBehalfOfContentOwner?: string; + /** + * The *part* parameter specifies the properties that the API response will include. + */ + part?: string[]; + + /** + * Request body metadata + */ + requestBody?: Schema$PlaylistImage; + } + export class Resource$Playlistitems { context: APIRequestContext; constructor(context: APIRequestContext) { @@ -10608,10 +11092,6 @@ export namespace youtube_v3 { * Display the content as seen by viewers in this country. */ regionCode?: string; - /** - * Search related to a resource. - */ - relatedToVideoId?: string; /** * Return results relevant to this language. */