Skip to content

Commit

Permalink
docs: update list calls to Async (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
irataxy authored Jul 15, 2022
1 parent a638c1e commit 02e9ec6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions media/transcoder/listJobTemplates.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ function main(projectId, location) {
const transcoderServiceClient = new TranscoderServiceClient();

async function listJobTemplates() {
const [jobTemplates] = await transcoderServiceClient.listJobTemplates({
const iterable = await transcoderServiceClient.listJobTemplatesAsync({
parent: transcoderServiceClient.locationPath(projectId, location),
});
console.info('Job templates:');
for (const jobTemplate of jobTemplates) {
console.info(jobTemplate.name);
for await (const response of iterable) {
console.log(response.name);
}
}

Expand Down
6 changes: 3 additions & 3 deletions media/transcoder/listJobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ function main(projectId, location) {
const transcoderServiceClient = new TranscoderServiceClient();

async function listJobs() {
const [jobs] = await transcoderServiceClient.listJobs({
const iterable = await transcoderServiceClient.listJobsAsync({
parent: transcoderServiceClient.locationPath(projectId, location),
});
console.info('Jobs:');
for (const job of jobs) {
console.info(job.name);
for await (const response of iterable) {
console.log(response.name);
}
}

Expand Down

0 comments on commit 02e9ec6

Please sign in to comment.