(projectId, location)
| 16 | 'use strict'; |
| 17 | |
| 18 | function main(projectId, location) { |
| 19 | // [START videostitcher_list_slates] |
| 20 | /** |
| 21 | * TODO(developer): Uncomment these variables before running the sample. |
| 22 | */ |
| 23 | // projectId = 'my-project-id'; |
| 24 | // location = 'us-central1'; |
| 25 | |
| 26 | // Imports the Video Stitcher library |
| 27 | const {VideoStitcherServiceClient} = |
| 28 | require('@google-cloud/video-stitcher').v1; |
| 29 | // Instantiates a client |
| 30 | const stitcherClient = new VideoStitcherServiceClient(); |
| 31 | |
| 32 | async function listSlates() { |
| 33 | const iterable = await stitcherClient.listSlatesAsync({ |
| 34 | parent: stitcherClient.locationPath(projectId, location), |
| 35 | }); |
| 36 | console.info('Slates:'); |
| 37 | for await (const response of iterable) { |
| 38 | console.log(response.name); |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | listSlates().catch(err => { |
| 43 | console.error(err.message); |
| 44 | process.exitCode = 1; |
| 45 | }); |
| 46 | // [END videostitcher_list_slates] |
| 47 | } |
| 48 | |
| 49 | // node listSlates.js <projectId> <location> |
| 50 | main(...process.argv.slice(2)); |
no test coverage detected