Skip to content

Commit 1be06e1

Browse files
committed
Migrate to ibm-watson dependancy
1 parent 61ccc82 commit 1be06e1

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@ and migrated off watson-developer-cloud to ibm-watson as a npm dependancy.
1515
Migrated nodes will not be compatible with pre 1.0.0 versions of node-red.
1616
During the migration there will be a dependancy on both modules.
1717
- Bump dependancy on node to >=10.0.0
18-
- Bump dependancy on cfenv, request, file-type
19-
- Remove dependancy on ibm-cloud-sdk-core.
18+
- Bump dependancy on cfenv, request, file-type, ibm-cloud-sdk-core
2019
- Node-RED & IBM-Watson & Use of promises on API invokation & IAM URL construct migration & Removal of default endpoint of
2120
- Tone Analyzer node.
2221
- Personality Insights node.
2322
- Visual Recognition V3 node
2423
- Text to Speech node
25-
- Text to Speech Corpus Builder node.
24+
- Text to Speech Corpus Builder node
2625
- New Visual Recognition V4 node.
2726
- Drop faces detect option from Visual Recognition V3 node.
2827
- Fix to URL parsing for bound services.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"qs": "6.x",
1212
"image-type": "^2.0.2",
1313
"watson-developer-cloud": "^3.18.3",
14+
"ibm-cloud-sdk-core": "^2.0.1",
1415
"ibm-watson": "^5.2.1",
1516
"word-count": "^0.2.2",
1617
"is-docx": "^0.0.3",

services/speech_to_text/v1.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ module.exports = function (RED) {
2828
iamutils = require('../../utilities/iam-utils'),
2929
sttutils = require('./stt-utils'),
3030
AuthV1 = require('watson-developer-cloud/authorization/v1'),
31-
AuthIAMV1 = require('ibm-watson/authorization/v1'),
31+
//AuthIAMV1 = require('ibm-cloud-sdk-core/iam-token-manager/v1'),
32+
{ IamTokenManager } = require('ibm-watson/auth');
3233
muteMode = true, discardMode = false, autoConnect = true,
3334
username = '', password = '', sUsername = '', sPassword = '',
3435
apikey = '', sApikey = '',
@@ -325,7 +326,7 @@ module.exports = function (RED) {
325326
// console.log('Creating token with endpoint ', endpoint);
326327
// tokenService = new AuthIAMV1.IamTokenManagerV1({iamApikey : apikey, iamUrl: endpoint});
327328

328-
tokenService = new AuthIAMV1({apikey : apikey});
329+
tokenService = new IamTokenManager({apikey : apikey});
329330
//tokenService = new iamutils(apikey);
330331

331332
} else {

0 commit comments

Comments
 (0)