Skip to content

Commit

Permalink
feat(youtube): update the API
Browse files Browse the repository at this point in the history
#### 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
  • Loading branch information
yoshi-automation committed Oct 14, 2024
1 parent 44266a7 commit b382792
Show file tree
Hide file tree
Showing 2 changed files with 205 additions and 3 deletions.
65 changes: 63 additions & 2 deletions discovery/youtube-v3.json
Original file line number Diff line number Diff line change
Expand Up @@ -1757,7 +1757,7 @@
},
"maxResults": {
"default": "500",
"description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.",
"description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set. Not used in the streaming RPC.",
"format": "uint32",
"location": "query",
"maximum": "2000",
Expand Down Expand Up @@ -4067,12 +4067,73 @@
"$ref": "CommentThread"
}
}
},
"resources": {
"liveChat": {
"resources": {
"messages": {
"methods": {
"stream": {
"description": "Allows a user to load live chat through a server-streamed RPC.",
"flatPath": "youtube/v3/liveChat/messages/stream",
"httpMethod": "GET",
"id": "youtube.youtube.v3.liveChat.messages.stream",
"parameterOrder": [],
"parameters": {
"hl": {
"description": "Specifies the localization language in which the system messages should be returned.",
"location": "query",
"type": "string"
},
"liveChatId": {
"description": "The id of the live chat for which comments should be returned.",
"location": "query",
"type": "string"
},
"maxResults": {
"default": "500",
"description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set. Not used in the streaming RPC.",
"format": "uint32",
"location": "query",
"maximum": "2000",
"minimum": "200",
"type": "integer"
},
"pageToken": {
"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.",
"location": "query",
"type": "string"
},
"part": {
"description": "The *part* parameter specifies the liveChatComment resource parts that the API response will include. Supported values are id, snippet, and authorDetails.",
"location": "query",
"repeated": true,
"type": "string"
},
"profileImageSize": {
"description": "Specifies the size of the profile image that should be returned for each user.",
"format": "uint32",
"location": "query",
"maximum": "720",
"minimum": "16",
"type": "integer"
}
},
"path": "youtube/v3/liveChat/messages/stream",
"response": {
"$ref": "LiveChatMessageListResponse"
}
}
}
}
}
}
}
}
}
}
},
"revision": "20240926",
"revision": "20241010",
"rootUrl": "https://youtube.googleapis.com/",
"schemas": {
"AbuseReport": {
Expand Down
143 changes: 142 additions & 1 deletion src/apis/youtube/v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8788,7 +8788,7 @@ export namespace youtube_v3 {
*/
liveChatId?: string;
/**
* The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.
* The *maxResults* parameter specifies the maximum number of items that should be returned in the result set. Not used in the streaming RPC.
*/
maxResults?: number;
/**
Expand Down Expand Up @@ -13780,8 +13780,10 @@ export namespace youtube_v3 {

export class Resource$Youtube$V3 {
context: APIRequestContext;
liveChat: Resource$Youtube$V3$Livechat;
constructor(context: APIRequestContext) {
this.context = context;
this.liveChat = new Resource$Youtube$V3$Livechat(this.context);
}

/**
Expand Down Expand Up @@ -13887,4 +13889,143 @@ export namespace youtube_v3 {
*/
requestBody?: Schema$CommentThread;
}

export class Resource$Youtube$V3$Livechat {
context: APIRequestContext;
messages: Resource$Youtube$V3$Livechat$Messages;
constructor(context: APIRequestContext) {
this.context = context;
this.messages = new Resource$Youtube$V3$Livechat$Messages(this.context);
}
}

export class Resource$Youtube$V3$Livechat$Messages {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}

/**
* Allows a user to load live chat through a server-streamed RPC.
*
* @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.
*/
stream(
params: Params$Resource$Youtube$V3$Livechat$Messages$Stream,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
stream(
params?: Params$Resource$Youtube$V3$Livechat$Messages$Stream,
options?: MethodOptions
): GaxiosPromise<Schema$LiveChatMessageListResponse>;
stream(
params: Params$Resource$Youtube$V3$Livechat$Messages$Stream,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
stream(
params: Params$Resource$Youtube$V3$Livechat$Messages$Stream,
options:
| MethodOptions
| BodyResponseCallback<Schema$LiveChatMessageListResponse>,
callback: BodyResponseCallback<Schema$LiveChatMessageListResponse>
): void;
stream(
params: Params$Resource$Youtube$V3$Livechat$Messages$Stream,
callback: BodyResponseCallback<Schema$LiveChatMessageListResponse>
): void;
stream(
callback: BodyResponseCallback<Schema$LiveChatMessageListResponse>
): void;
stream(
paramsOrCallback?:
| Params$Resource$Youtube$V3$Livechat$Messages$Stream
| BodyResponseCallback<Schema$LiveChatMessageListResponse>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$LiveChatMessageListResponse>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$LiveChatMessageListResponse>
| BodyResponseCallback<Readable>
):
| void
| GaxiosPromise<Schema$LiveChatMessageListResponse>
| GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Youtube$V3$Livechat$Messages$Stream;
let options = (optionsOrCallback || {}) as MethodOptions;

if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Youtube$V3$Livechat$Messages$Stream;
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/liveChat/messages/stream').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'GET',
apiVersion: '',
},
options
),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$LiveChatMessageListResponse>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$LiveChatMessageListResponse>(parameters);
}
}
}

export interface Params$Resource$Youtube$V3$Livechat$Messages$Stream
extends StandardParameters {
/**
* Specifies the localization language in which the system messages should be returned.
*/
hl?: string;
/**
* The id of the live chat for which comments should be returned.
*/
liveChatId?: string;
/**
* The *maxResults* parameter specifies the maximum number of items that should be returned in the result set. Not used in the streaming RPC.
*/
maxResults?: number;
/**
* 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.
*/
pageToken?: string;
/**
* The *part* parameter specifies the liveChatComment resource parts that the API response will include. Supported values are id, snippet, and authorDetails.
*/
part?: string[];
/**
* Specifies the size of the profile image that should be returned for each user.
*/
profileImageSize?: number;
}
}

0 comments on commit b382792

Please sign in to comment.