diff --git a/media/video-stitcher/quickstart.js b/media/video-stitcher/quickstart.js deleted file mode 100644 index 3f07eb5165..0000000000 --- a/media/video-stitcher/quickstart.js +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -function main(parent) { - // [START videostitcher_v1_generated_VideoStitcherService_ListCdnKeys_async] - /** - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The project that contains the list of CDN keys, in the form of - * `projects/{project_number}/locations/{location}`. - */ - // const parent = 'abc123' - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - */ - // const pageSize = 1234 - /** - * A token identifying a page of results the server should return. - */ - // const pageToken = 'abc123' - /** - * Filtering results - */ - // const filter = 'abc123' - /** - * Hint for how to order the results - */ - // const orderBy = 'abc123' - - // Imports the Stitcher library - const {VideoStitcherServiceClient} = - require('@google-cloud/video-stitcher').v1; - - // Instantiates a client - const stitcherClient = new VideoStitcherServiceClient(); - - async function callListCdnKeys() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await stitcherClient.listCdnKeysAsync(request); - for await (const response of iterable) { - console.log(response); - } - console.log(iterable); - } - - callListCdnKeys(); - // [END videostitcher_v1_generated_VideoStitcherService_ListCdnKeys_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/media/video-stitcher/test/quickstart.js b/media/video-stitcher/test/quickstart.js deleted file mode 100644 index 073e774bc3..0000000000 --- a/media/video-stitcher/test/quickstart.js +++ /dev/null @@ -1,50 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new VideoStitcherServiceClient(); - -describe('Quickstart', () => { - // eslint-disable-next-line no-unused-vars - let projectId; - - before(async () => { - // eslint-disable-next-line no-unused-vars - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(stdout, stdout !== null); - }); -});