MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / main

Function main

dialogflow-cx/list-page.js:19–42  ·  view source on GitHub ↗
(projectId, agentId, flowId, location)

Source from the content-addressed store, hash-verified

17const {PagesClient} = require('@google-cloud/dialogflow-cx');
18
19async function main(projectId, agentId, flowId, location) {
20 /**
21 * TODO(developer): Uncomment these variables before running the sample.
22 */
23 // const projectId = 'my-project';
24 // const agentId = 'my-agent';
25 // const flowId = 'my-flow';
26 // const location = 'global';
27
28 // [START dialogflow_cx_list_page_sample]
29 async function listPages(projectId, agentId, flowId, location) {
30 const pagesClient = new PagesClient();
31 const listPageRequest = {
32 parent: `projects/${projectId}/locations/${location}/agents/${agentId}/flows/${flowId}`,
33 languageCode: 'en',
34 };
35
36 const response = await pagesClient.listPages(listPageRequest);
37 console.log(response);
38 }
39 // [END dialogflow_cx_list_page_sample]
40
41 await listPages(projectId, agentId, flowId, location);
42}
43
44main(...process.argv.slice(2)).catch(err => {
45 console.error(err);

Callers 1

list-page.jsFile · 0.70

Calls 1

listPagesFunction · 0.85

Tested by

no test coverage detected