This repository was archived by the owner on Jul 20, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -31,12 +31,12 @@ function main(projectId, location) {
31
31
const transcoderServiceClient = new TranscoderServiceClient ( ) ;
32
32
33
33
async function listJobTemplates ( ) {
34
- const [ jobTemplates ] = await transcoderServiceClient . listJobTemplates ( {
34
+ const iterable = await transcoderServiceClient . listJobTemplatesAsync ( {
35
35
parent : transcoderServiceClient . locationPath ( projectId , location ) ,
36
36
} ) ;
37
37
console . info ( 'Job templates:' ) ;
38
- for ( const jobTemplate of jobTemplates ) {
39
- console . info ( jobTemplate . name ) ;
38
+ for await ( const response of iterable ) {
39
+ console . log ( response . name ) ;
40
40
}
41
41
}
42
42
Original file line number Diff line number Diff line change @@ -31,12 +31,12 @@ function main(projectId, location) {
31
31
const transcoderServiceClient = new TranscoderServiceClient ( ) ;
32
32
33
33
async function listJobs ( ) {
34
- const [ jobs ] = await transcoderServiceClient . listJobs ( {
34
+ const iterable = await transcoderServiceClient . listJobsAsync ( {
35
35
parent : transcoderServiceClient . locationPath ( projectId , location ) ,
36
36
} ) ;
37
37
console . info ( 'Jobs:' ) ;
38
- for ( const job of jobs ) {
39
- console . info ( job . name ) ;
38
+ for await ( const response of iterable ) {
39
+ console . log ( response . name ) ;
40
40
}
41
41
}
42
42
You can’t perform that action at this time.
0 commit comments