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) {
3131 const transcoderServiceClient = new TranscoderServiceClient ( ) ;
3232
3333 async function listJobTemplates ( ) {
34- const [ jobTemplates ] = await transcoderServiceClient . listJobTemplates ( {
34+ const iterable = await transcoderServiceClient . listJobTemplatesAsync ( {
3535 parent : transcoderServiceClient . locationPath ( projectId , location ) ,
3636 } ) ;
3737 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 ) ;
4040 }
4141 }
4242
Original file line number Diff line number Diff line change @@ -31,12 +31,12 @@ function main(projectId, location) {
3131 const transcoderServiceClient = new TranscoderServiceClient ( ) ;
3232
3333 async function listJobs ( ) {
34- const [ jobs ] = await transcoderServiceClient . listJobs ( {
34+ const iterable = await transcoderServiceClient . listJobsAsync ( {
3535 parent : transcoderServiceClient . locationPath ( projectId , location ) ,
3636 } ) ;
3737 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 ) ;
4040 }
4141 }
4242
You can’t perform that action at this time.
0 commit comments