Skip to content

Commit 0a8417a

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 - schemas.InvideoBranding.properties.position.deprecated - schemas.TestItem.properties.etag.description - schemas.TestItem.properties.etag.type The following keys were changed: - resources.liveChatMessages.methods.list.parameters.maxResults.description - schemas.InvideoBranding.description
1 parent fd276dd commit 0a8417a

File tree

2 files changed

+216
-5
lines changed

2 files changed

+216
-5
lines changed

discovery/youtube-v3.json

Lines changed: 69 additions & 3 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": "20241022",
40764137
"rootUrl": "https://youtube.googleapis.com/",
40774138
"schemas": {
40784139
"AbuseReport": {
@@ -8057,7 +8118,7 @@
80578118
"type": "object"
80588119
},
80598120
"InvideoBranding": {
8060-
"description": "LINT.IfChange Describes an invideo branding.",
8121+
"description": "Describes an invideo branding.",
80618122
"id": "InvideoBranding",
80628123
"properties": {
80638124
"imageBytes": {
@@ -8071,6 +8132,7 @@
80718132
},
80728133
"position": {
80738134
"$ref": "InvideoPosition",
8135+
"deprecated": true,
80748136
"description": "The spatial position within the video where the branding watermark will be displayed."
80758137
},
80768138
"targetChannelId": {
@@ -10762,6 +10824,10 @@
1076210824
"TestItem": {
1076310825
"id": "TestItem",
1076410826
"properties": {
10827+
"etag": {
10828+
"description": "Etag for the resource. See https://en.wikipedia.org/wiki/HTTP_ETag.",
10829+
"type": "string"
10830+
},
1076510831
"featuredPart": {
1076610832
"type": "boolean"
1076710833
},

src/apis/youtube/v3.ts

Lines changed: 147 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1965,7 +1965,7 @@ export namespace youtube_v3 {
19651965
streamName?: string | null;
19661966
}
19671967
/**
1968-
* LINT.IfChange Describes an invideo branding.
1968+
* Describes an invideo branding.
19691969
*/
19701970
export interface Schema$InvideoBranding {
19711971
/**
@@ -3721,6 +3721,10 @@ export namespace youtube_v3 {
37213721
stickerId?: string | null;
37223722
}
37233723
export interface Schema$TestItem {
3724+
/**
3725+
* Etag for the resource. See https://en.wikipedia.org/wiki/HTTP_ETag.
3726+
*/
3727+
etag?: string | null;
37243728
featuredPart?: boolean | null;
37253729
gaia?: string | null;
37263730
id?: string | null;
@@ -8788,7 +8792,7 @@ export namespace youtube_v3 {
87888792
*/
87898793
liveChatId?: string;
87908794
/**
8791-
* The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.
8795+
* The *maxResults* parameter specifies the maximum number of items that should be returned in the result set. Not used in the streaming RPC.
87928796
*/
87938797
maxResults?: number;
87948798
/**
@@ -13780,8 +13784,10 @@ export namespace youtube_v3 {
1378013784

1378113785
export class Resource$Youtube$V3 {
1378213786
context: APIRequestContext;
13787+
liveChat: Resource$Youtube$V3$Livechat;
1378313788
constructor(context: APIRequestContext) {
1378413789
this.context = context;
13790+
this.liveChat = new Resource$Youtube$V3$Livechat(this.context);
1378513791
}
1378613792

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

0 commit comments

Comments
 (0)