|
17 | 17 | module.exports = function (RED) { |
18 | 18 |
|
19 | 19 | const SERVICE_IDENTIFIER = 'discovery'; |
20 | | - var pkg = require('../../package.json'), |
21 | | - discoveryutils = require('./discovery-utils'), |
22 | | - DiscoveryV1 = require('watson-developer-cloud/discovery/v1'), |
| 20 | + var discoveryutils = require('./discovery-utils'), |
23 | 21 | serviceutils = require('../../utilities/service-utils'), |
24 | 22 | payloadutils = require('../../utilities/payload-utils'), |
25 | 23 | dservice = serviceutils.getServiceCreds(SERVICE_IDENTIFIER), |
@@ -84,7 +82,7 @@ module.exports = function (RED) { |
84 | 82 |
|
85 | 83 | function executeListEnvrionments(node, discovery, params, msg) { |
86 | 84 | var p = new Promise(function resolver(resolve, reject){ |
87 | | - discovery.getEnvironments(params, function (err, response) { |
| 85 | + discovery.listEnvironments(params, function (err, response) { |
88 | 86 | if (err) { |
89 | 87 | reject(err); |
90 | 88 | } else { |
@@ -162,7 +160,7 @@ module.exports = function (RED) { |
162 | 160 |
|
163 | 161 | function executeListCollections(node, discovery, params, msg) { |
164 | 162 | var p = new Promise(function resolver(resolve, reject){ |
165 | | - discovery.getCollections(params, function (err, response) { |
| 163 | + discovery.listCollections(params, function (err, response) { |
166 | 164 | if (err) { |
167 | 165 | reject(err); |
168 | 166 | } else { |
@@ -204,7 +202,7 @@ module.exports = function (RED) { |
204 | 202 |
|
205 | 203 | function executeListConfigurations(node, discovery, params, msg) { |
206 | 204 | var p = new Promise(function resolver(resolve, reject){ |
207 | | - discovery.getConfigurations(params, function (err, response) { |
| 205 | + discovery.listConfigurations(params, function (err, response) { |
208 | 206 | if (err) { |
209 | 207 | reject(err); |
210 | 208 | } else { |
|
0 commit comments