Skip to content

Commit 248338b

Browse files
fix(versionhistory): update the API
#### versionhistory:v1 The following keys were changed: - documentationLink
1 parent 49aad9a commit 248338b

File tree

2 files changed

+215
-2
lines changed

2 files changed

+215
-2
lines changed

discovery/versionhistory-v1.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"canonicalName": "Version History",
66
"description": "Version History API - Prod",
77
"discoveryVersion": "v1",
8-
"documentationLink": "https://developers.chrome.com/versionhistory",
8+
"documentationLink": "https://developer.chrome.com/docs/web-platform/versionhistory/guide",
99
"fullyEncodeReservedExpansion": true,
1010
"icons": {
1111
"x16": "http://www.google.com/images/icons/product/search-16.gif",
@@ -271,7 +271,7 @@
271271
}
272272
}
273273
},
274-
"revision": "20240528",
274+
"revision": "20250601",
275275
"rootUrl": "https://versionhistory.googleapis.com/",
276276
"schemas": {
277277
"Channel": {

src/apis/versionhistory/v1.ts

Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,57 @@ export namespace versionhistory_v1 {
268268

269269
/**
270270
* Returns list of platforms that are available for a given product. The resource "product" has no resource name in its name.
271+
* @example
272+
* ```js
273+
* // Before running the sample:
274+
* // - Enable the API at:
275+
* // https://console.developers.google.com/apis/api/versionhistory.googleapis.com
276+
* // - Login into gcloud by running:
277+
* // ```sh
278+
* // $ gcloud auth application-default login
279+
* // ```
280+
* // - Install the npm module by running:
281+
* // ```sh
282+
* // $ npm install googleapis
283+
* // ```
284+
*
285+
* const {google} = require('googleapis');
286+
* const versionhistory = google.versionhistory('v1');
287+
*
288+
* async function main() {
289+
* const auth = new google.auth.GoogleAuth({
290+
* // Scopes can be specified either as an array or as a single, space-delimited string.
291+
* scopes: [],
292+
* });
293+
*
294+
* // Acquire an auth client, and bind it to all future calls
295+
* const authClient = await auth.getClient();
296+
* google.options({auth: authClient});
297+
*
298+
* // Do the magic
299+
* const res = await versionhistory.platforms.list({
300+
* // Optional. Optional limit on the number of channels to include in the response. If unspecified, the server will pick an appropriate default.
301+
* pageSize: 'placeholder-value',
302+
* // Optional. A page token, received from a previous `ListChannels` call. Provide this to retrieve the subsequent page.
303+
* pageToken: 'placeholder-value',
304+
* // Required. The product, which owns this collection of platforms. Format: {product\}
305+
* parent: '[^/]+',
306+
* });
307+
* console.log(res.data);
308+
*
309+
* // Example response
310+
* // {
311+
* // "nextPageToken": "my_nextPageToken",
312+
* // "platforms": []
313+
* // }
314+
* }
315+
*
316+
* main().catch(e => {
317+
* console.error(e);
318+
* throw e;
319+
* });
320+
*
321+
* ```
271322
*
272323
* @param params - Parameters for request
273324
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -385,6 +436,57 @@ export namespace versionhistory_v1 {
385436

386437
/**
387438
* Returns list of channels that are available for a given platform.
439+
* @example
440+
* ```js
441+
* // Before running the sample:
442+
* // - Enable the API at:
443+
* // https://console.developers.google.com/apis/api/versionhistory.googleapis.com
444+
* // - Login into gcloud by running:
445+
* // ```sh
446+
* // $ gcloud auth application-default login
447+
* // ```
448+
* // - Install the npm module by running:
449+
* // ```sh
450+
* // $ npm install googleapis
451+
* // ```
452+
*
453+
* const {google} = require('googleapis');
454+
* const versionhistory = google.versionhistory('v1');
455+
*
456+
* async function main() {
457+
* const auth = new google.auth.GoogleAuth({
458+
* // Scopes can be specified either as an array or as a single, space-delimited string.
459+
* scopes: [],
460+
* });
461+
*
462+
* // Acquire an auth client, and bind it to all future calls
463+
* const authClient = await auth.getClient();
464+
* google.options({auth: authClient});
465+
*
466+
* // Do the magic
467+
* const res = await versionhistory.platforms.channels.list({
468+
* // Optional. Optional limit on the number of channels to include in the response. If unspecified, the server will pick an appropriate default.
469+
* pageSize: 'placeholder-value',
470+
* // Optional. A page token, received from a previous `ListChannels` call. Provide this to retrieve the subsequent page.
471+
* pageToken: 'placeholder-value',
472+
* // Required. The platform, which owns this collection of channels. Format: {product\}/platforms/{platform\}
473+
* parent: '[^/]+/platforms/my-platform',
474+
* });
475+
* console.log(res.data);
476+
*
477+
* // Example response
478+
* // {
479+
* // "channels": [],
480+
* // "nextPageToken": "my_nextPageToken"
481+
* // }
482+
* }
483+
*
484+
* main().catch(e => {
485+
* console.error(e);
486+
* throw e;
487+
* });
488+
*
489+
* ```
388490
*
389491
* @param params - Parameters for request
390492
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -506,6 +608,61 @@ export namespace versionhistory_v1 {
506608

507609
/**
508610
* Returns list of version for the given platform/channel.
611+
* @example
612+
* ```js
613+
* // Before running the sample:
614+
* // - Enable the API at:
615+
* // https://console.developers.google.com/apis/api/versionhistory.googleapis.com
616+
* // - Login into gcloud by running:
617+
* // ```sh
618+
* // $ gcloud auth application-default login
619+
* // ```
620+
* // - Install the npm module by running:
621+
* // ```sh
622+
* // $ npm install googleapis
623+
* // ```
624+
*
625+
* const {google} = require('googleapis');
626+
* const versionhistory = google.versionhistory('v1');
627+
*
628+
* async function main() {
629+
* const auth = new google.auth.GoogleAuth({
630+
* // Scopes can be specified either as an array or as a single, space-delimited string.
631+
* scopes: [],
632+
* });
633+
*
634+
* // Acquire an auth client, and bind it to all future calls
635+
* const authClient = await auth.getClient();
636+
* google.options({auth: authClient});
637+
*
638+
* // Do the magic
639+
* const res = await versionhistory.platforms.channels.versions.list({
640+
* // Optional. Filter string. Format is a comma separated list of All comma separated filter clauses are conjoined with a logical "and". Valid field_names are "version", "name", "platform", and "channel". Valid operators are "<", "<=", "=", "\>=", and "\>". Channel comparison is done by distance from stable. Ex) stable < beta, beta < dev, canary < canary_asan. Version comparison is done numerically. If version is not entirely written, the version will be appended with 0 in missing fields. Ex) version \> 80 becoms version \> 80.0.0.0 Name and platform are filtered by string comparison. Ex) "...?filter=channel<=beta, version \>= 80 Ex) "...?filter=version \> 80, version < 81
641+
* filter: 'placeholder-value',
642+
* // Optional. Ordering string. Valid order_by strings are "version", "name", "platform", and "channel". Optionally, you can append " desc" or " asc" to specify the sorting order. Multiple order_by strings can be used in a comma separated list. Ordering by channel will sort by distance from the stable channel (not alphabetically). A list of channels sorted in this order is: stable, beta, dev, canary, and canary_asan. Sorting by name may cause unexpected behaviour as it is a naive string sort. For example, 1.0.0.8 will be before 1.0.0.10 in descending order. If order_by is not specified the response will be sorted by version in descending order. Ex) "...?order_by=version asc" Ex) "...?order_by=platform desc, channel, version"
643+
* orderBy: 'placeholder-value',
644+
* // Optional. Optional limit on the number of versions to include in the response. If unspecified, the server will pick an appropriate default.
645+
* pageSize: 'placeholder-value',
646+
* // Optional. A page token, received from a previous `ListVersions` call. Provide this to retrieve the subsequent page.
647+
* pageToken: 'placeholder-value',
648+
* // Required. The channel, which owns this collection of versions. Format: {product\}/platforms/{platform\}/channels/{channel\}
649+
* parent: '[^/]+/platforms/my-platform/channels/my-channel',
650+
* });
651+
* console.log(res.data);
652+
*
653+
* // Example response
654+
* // {
655+
* // "nextPageToken": "my_nextPageToken",
656+
* // "versions": []
657+
* // }
658+
* }
659+
*
660+
* main().catch(e => {
661+
* console.error(e);
662+
* throw e;
663+
* });
664+
*
665+
* ```
509666
*
510667
* @param params - Parameters for request
511668
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -631,6 +788,62 @@ export namespace versionhistory_v1 {
631788

632789
/**
633790
* Returns list of releases of the given version.
791+
* @example
792+
* ```js
793+
* // Before running the sample:
794+
* // - Enable the API at:
795+
* // https://console.developers.google.com/apis/api/versionhistory.googleapis.com
796+
* // - Login into gcloud by running:
797+
* // ```sh
798+
* // $ gcloud auth application-default login
799+
* // ```
800+
* // - Install the npm module by running:
801+
* // ```sh
802+
* // $ npm install googleapis
803+
* // ```
804+
*
805+
* const {google} = require('googleapis');
806+
* const versionhistory = google.versionhistory('v1');
807+
*
808+
* async function main() {
809+
* const auth = new google.auth.GoogleAuth({
810+
* // Scopes can be specified either as an array or as a single, space-delimited string.
811+
* scopes: [],
812+
* });
813+
*
814+
* // Acquire an auth client, and bind it to all future calls
815+
* const authClient = await auth.getClient();
816+
* google.options({auth: authClient});
817+
*
818+
* // Do the magic
819+
* const res = await versionhistory.platforms.channels.versions.releases.list({
820+
* // Optional. Filter string. Format is a comma separated list of All comma separated filter clauses are conjoined with a logical "and". Valid field_names are "version", "name", "platform", "channel", "fraction" "starttime", and "endtime". Valid operators are "<", "<=", "=", "\>=", and "\>". Channel comparison is done by distance from stable. must be a valid channel when filtering by channel. Ex) stable < beta, beta < dev, canary < canary_asan. Version comparison is done numerically. Ex) 1.0.0.8 < 1.0.0.10. If version is not entirely written, the version will be appended with 0 for the missing fields. Ex) version \> 80 becoms version \> 80.0.0.0 When filtering by starttime or endtime, string must be in RFC 3339 date string format. Name and platform are filtered by string comparison. Ex) "...?filter=channel<=beta, version \>= 80 Ex) "...?filter=version \> 80, version < 81 Ex) "...?filter=starttime\>2020-01-01T00:00:00Z
821+
* filter: 'placeholder-value',
822+
* // Optional. Ordering string. Valid order_by strings are "version", "name", "starttime", "endtime", "platform", "channel", and "fraction". Optionally, you can append "desc" or "asc" to specify the sorting order. Multiple order_by strings can be used in a comma separated list. Ordering by channel will sort by distance from the stable channel (not alphabetically). A list of channels sorted in this order is: stable, beta, dev, canary, and canary_asan. Sorting by name may cause unexpected behaviour as it is a naive string sort. For example, 1.0.0.8 will be before 1.0.0.10 in descending order. If order_by is not specified the response will be sorted by starttime in descending order. Ex) "...?order_by=starttime asc" Ex) "...?order_by=platform desc, channel, startime desc"
823+
* orderBy: 'placeholder-value',
824+
* // Optional. Optional limit on the number of releases to include in the response. If unspecified, the server will pick an appropriate default.
825+
* pageSize: 'placeholder-value',
826+
* // Optional. A page token, received from a previous `ListReleases` call. Provide this to retrieve the subsequent page.
827+
* pageToken: 'placeholder-value',
828+
* // Required. The version, which owns this collection of releases. Format: {product\}/platforms/{platform\}/channels/{channel\}/versions/{version\}
829+
* parent:
830+
* '[^/]+/platforms/my-platform/channels/my-channel/versions/my-version',
831+
* });
832+
* console.log(res.data);
833+
*
834+
* // Example response
835+
* // {
836+
* // "nextPageToken": "my_nextPageToken",
837+
* // "releases": []
838+
* // }
839+
* }
840+
*
841+
* main().catch(e => {
842+
* console.error(e);
843+
* throw e;
844+
* });
845+
*
846+
* ```
634847
*
635848
* @param params - Parameters for request
636849
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.

0 commit comments

Comments
 (0)