Skip to content

Commit db3bcd9

Browse files
feat(youtube): update the API
#### youtube:v3 The following keys were added: - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.description - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.flatPath - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.httpMethod - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.id - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameterOrder - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.hl.description - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.hl.location - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.hl.type - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.liveChatId.description - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.liveChatId.location - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.liveChatId.type - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.maxResults.default - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.maxResults.description - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.maxResults.format - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.maxResults.location - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.maxResults.maximum - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.maxResults.minimum - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.maxResults.type - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.pageToken.description - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.pageToken.location - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.pageToken.type - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.part.description - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.part.location - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.part.repeated - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.part.type - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.profileImageSize.description - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.profileImageSize.format - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.profileImageSize.location - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.profileImageSize.maximum - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.profileImageSize.minimum - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.parameters.profileImageSize.type - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.path - resources.youtube.resources.v3.resources.liveChat.resources.messages.methods.stream.response.$ref The following keys were changed: - resources.liveChatMessages.methods.list.parameters.maxResults.description
1 parent d53cc41 commit db3bcd9

File tree

2 files changed

+205
-3
lines changed

2 files changed

+205
-3
lines changed

discovery/youtube-v3.json

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1757,7 +1757,7 @@
17571757
},
17581758
"maxResults": {
17591759
"default": "500",
1760-
"description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.",
1760+
"description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set. Not used in the streaming RPC.",
17611761
"format": "uint32",
17621762
"location": "query",
17631763
"maximum": "2000",
@@ -4067,12 +4067,73 @@
40674067
"$ref": "CommentThread"
40684068
}
40694069
}
4070+
},
4071+
"resources": {
4072+
"liveChat": {
4073+
"resources": {
4074+
"messages": {
4075+
"methods": {
4076+
"stream": {
4077+
"description": "Allows a user to load live chat through a server-streamed RPC.",
4078+
"flatPath": "youtube/v3/liveChat/messages/stream",
4079+
"httpMethod": "GET",
4080+
"id": "youtube.youtube.v3.liveChat.messages.stream",
4081+
"parameterOrder": [],
4082+
"parameters": {
4083+
"hl": {
4084+
"description": "Specifies the localization language in which the system messages should be returned.",
4085+
"location": "query",
4086+
"type": "string"
4087+
},
4088+
"liveChatId": {
4089+
"description": "The id of the live chat for which comments should be returned.",
4090+
"location": "query",
4091+
"type": "string"
4092+
},
4093+
"maxResults": {
4094+
"default": "500",
4095+
"description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set. Not used in the streaming RPC.",
4096+
"format": "uint32",
4097+
"location": "query",
4098+
"maximum": "2000",
4099+
"minimum": "200",
4100+
"type": "integer"
4101+
},
4102+
"pageToken": {
4103+
"description": "The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken property identify other pages that could be retrieved.",
4104+
"location": "query",
4105+
"type": "string"
4106+
},
4107+
"part": {
4108+
"description": "The *part* parameter specifies the liveChatComment resource parts that the API response will include. Supported values are id, snippet, and authorDetails.",
4109+
"location": "query",
4110+
"repeated": true,
4111+
"type": "string"
4112+
},
4113+
"profileImageSize": {
4114+
"description": "Specifies the size of the profile image that should be returned for each user.",
4115+
"format": "uint32",
4116+
"location": "query",
4117+
"maximum": "720",
4118+
"minimum": "16",
4119+
"type": "integer"
4120+
}
4121+
},
4122+
"path": "youtube/v3/liveChat/messages/stream",
4123+
"response": {
4124+
"$ref": "LiveChatMessageListResponse"
4125+
}
4126+
}
4127+
}
4128+
}
4129+
}
4130+
}
40704131
}
40714132
}
40724133
}
40734134
}
40744135
},
4075-
"revision": "20240926",
4136+
"revision": "20241010",
40764137
"rootUrl": "https://youtube.googleapis.com/",
40774138
"schemas": {
40784139
"AbuseReport": {

src/apis/youtube/v3.ts

Lines changed: 142 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8788,7 +8788,7 @@ export namespace youtube_v3 {
87888788
*/
87898789
liveChatId?: string;
87908790
/**
8791-
* The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.
8791+
* The *maxResults* parameter specifies the maximum number of items that should be returned in the result set. Not used in the streaming RPC.
87928792
*/
87938793
maxResults?: number;
87948794
/**
@@ -13780,8 +13780,10 @@ export namespace youtube_v3 {
1378013780

1378113781
export class Resource$Youtube$V3 {
1378213782
context: APIRequestContext;
13783+
liveChat: Resource$Youtube$V3$Livechat;
1378313784
constructor(context: APIRequestContext) {
1378413785
this.context = context;
13786+
this.liveChat = new Resource$Youtube$V3$Livechat(this.context);
1378513787
}
1378613788

1378713789
/**
@@ -13887,4 +13889,143 @@ export namespace youtube_v3 {
1388713889
*/
1388813890
requestBody?: Schema$CommentThread;
1388913891
}
13892+
13893+
export class Resource$Youtube$V3$Livechat {
13894+
context: APIRequestContext;
13895+
messages: Resource$Youtube$V3$Livechat$Messages;
13896+
constructor(context: APIRequestContext) {
13897+
this.context = context;
13898+
this.messages = new Resource$Youtube$V3$Livechat$Messages(this.context);
13899+
}
13900+
}
13901+
13902+
export class Resource$Youtube$V3$Livechat$Messages {
13903+
context: APIRequestContext;
13904+
constructor(context: APIRequestContext) {
13905+
this.context = context;
13906+
}
13907+
13908+
/**
13909+
* Allows a user to load live chat through a server-streamed RPC.
13910+
*
13911+
* @param params - Parameters for request
13912+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
13913+
* @param callback - Optional callback that handles the response.
13914+
* @returns A promise if used with async/await, or void if used with a callback.
13915+
*/
13916+
stream(
13917+
params: Params$Resource$Youtube$V3$Livechat$Messages$Stream,
13918+
options: StreamMethodOptions
13919+
): GaxiosPromise<Readable>;
13920+
stream(
13921+
params?: Params$Resource$Youtube$V3$Livechat$Messages$Stream,
13922+
options?: MethodOptions
13923+
): GaxiosPromise<Schema$LiveChatMessageListResponse>;
13924+
stream(
13925+
params: Params$Resource$Youtube$V3$Livechat$Messages$Stream,
13926+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
13927+
callback: BodyResponseCallback<Readable>
13928+
): void;
13929+
stream(
13930+
params: Params$Resource$Youtube$V3$Livechat$Messages$Stream,
13931+
options:
13932+
| MethodOptions
13933+
| BodyResponseCallback<Schema$LiveChatMessageListResponse>,
13934+
callback: BodyResponseCallback<Schema$LiveChatMessageListResponse>
13935+
): void;
13936+
stream(
13937+
params: Params$Resource$Youtube$V3$Livechat$Messages$Stream,
13938+
callback: BodyResponseCallback<Schema$LiveChatMessageListResponse>
13939+
): void;
13940+
stream(
13941+
callback: BodyResponseCallback<Schema$LiveChatMessageListResponse>
13942+
): void;
13943+
stream(
13944+
paramsOrCallback?:
13945+
| Params$Resource$Youtube$V3$Livechat$Messages$Stream
13946+
| BodyResponseCallback<Schema$LiveChatMessageListResponse>
13947+
| BodyResponseCallback<Readable>,
13948+
optionsOrCallback?:
13949+
| MethodOptions
13950+
| StreamMethodOptions
13951+
| BodyResponseCallback<Schema$LiveChatMessageListResponse>
13952+
| BodyResponseCallback<Readable>,
13953+
callback?:
13954+
| BodyResponseCallback<Schema$LiveChatMessageListResponse>
13955+
| BodyResponseCallback<Readable>
13956+
):
13957+
| void
13958+
| GaxiosPromise<Schema$LiveChatMessageListResponse>
13959+
| GaxiosPromise<Readable> {
13960+
let params = (paramsOrCallback ||
13961+
{}) as Params$Resource$Youtube$V3$Livechat$Messages$Stream;
13962+
let options = (optionsOrCallback || {}) as MethodOptions;
13963+
13964+
if (typeof paramsOrCallback === 'function') {
13965+
callback = paramsOrCallback;
13966+
params = {} as Params$Resource$Youtube$V3$Livechat$Messages$Stream;
13967+
options = {};
13968+
}
13969+
13970+
if (typeof optionsOrCallback === 'function') {
13971+
callback = optionsOrCallback;
13972+
options = {};
13973+
}
13974+
13975+
const rootUrl = options.rootUrl || 'https://youtube.googleapis.com/';
13976+
const parameters = {
13977+
options: Object.assign(
13978+
{
13979+
url: (rootUrl + '/youtube/v3/liveChat/messages/stream').replace(
13980+
/([^:]\/)\/+/g,
13981+
'$1'
13982+
),
13983+
method: 'GET',
13984+
apiVersion: '',
13985+
},
13986+
options
13987+
),
13988+
params,
13989+
requiredParams: [],
13990+
pathParams: [],
13991+
context: this.context,
13992+
};
13993+
if (callback) {
13994+
createAPIRequest<Schema$LiveChatMessageListResponse>(
13995+
parameters,
13996+
callback as BodyResponseCallback<unknown>
13997+
);
13998+
} else {
13999+
return createAPIRequest<Schema$LiveChatMessageListResponse>(parameters);
14000+
}
14001+
}
14002+
}
14003+
14004+
export interface Params$Resource$Youtube$V3$Livechat$Messages$Stream
14005+
extends StandardParameters {
14006+
/**
14007+
* Specifies the localization language in which the system messages should be returned.
14008+
*/
14009+
hl?: string;
14010+
/**
14011+
* The id of the live chat for which comments should be returned.
14012+
*/
14013+
liveChatId?: string;
14014+
/**
14015+
* The *maxResults* parameter specifies the maximum number of items that should be returned in the result set. Not used in the streaming RPC.
14016+
*/
14017+
maxResults?: number;
14018+
/**
14019+
* The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken property identify other pages that could be retrieved.
14020+
*/
14021+
pageToken?: string;
14022+
/**
14023+
* The *part* parameter specifies the liveChatComment resource parts that the API response will include. Supported values are id, snippet, and authorDetails.
14024+
*/
14025+
part?: string[];
14026+
/**
14027+
* Specifies the size of the profile image that should be returned for each user.
14028+
*/
14029+
profileImageSize?: number;
14030+
}
1389014031
}

0 commit comments

Comments
 (0)