Skip to content

Commit

Permalink
docs: update all examples to use ibm-watson package
Browse files Browse the repository at this point in the history
  • Loading branch information
dpopp07 committed Apr 9, 2019
1 parent a5761f2 commit cbec4f6
Show file tree
Hide file tree
Showing 32 changed files with 17,301 additions and 3,538 deletions.
2 changes: 1 addition & 1 deletion examples/assistant.v1.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

var AssistantV1 = require('watson-developer-cloud/assistant/v1');
var AssistantV1 = require('ibm-watson/assistant/v1');

/**
* Instantiate the Watson Assistant Service
Expand Down
3,938 changes: 3,556 additions & 382 deletions examples/assistant_tone_analyzer_integration/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/assistant_tone_analyzer_integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"dependencies": {
"bluebird": "^3.4.1",
"dotenv": "^2.0.0",
"watson-developer-cloud": "latest"
"ibm-watson": "latest"
},
"engines": {
"node": ">=6"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
'use strict';
/* eslint-env es6*/

var AssistantV1 = require('watson-developer-cloud/assistant/v1');
var ToneAnalyzerV3 = require('watson-developer-cloud/tone-analyzer/v3');
var AssistantV1 = require('ibm-watson/assistant/v1');
var ToneAnalyzerV3 = require('ibm-watson/tone-analyzer/v3');
var tone_detection = require('./tone_detection.js');
require('dotenv').config({ silent: true });

Expand Down
5,245 changes: 3,703 additions & 1,542 deletions examples/browserify/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/browserify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dotenv": "^2.0.0",
"express": "^4.14.0",
"express-browserify": "^1.0.2",
"watson-developer-cloud": "latest"
"ibm-watson": "latest"
},
"devDependencies": {},
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions examples/browserify/public/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
//
// * This file is bundled by exprss-browserify into bundle.js
//
// * The require('watson-developer-cloud/language_translator/v3') could also be written as require('watson-developer-cloud').LanguageTranslatorV3,
// * The require('ibm-watson/language_translator/v3') could also be written as require('ibm-watson').LanguageTranslatorV3,
// but that version results in a much larger bundle size.
//
// * Tokens expire after 1 hour. This demo simply fetches a new one for each translation rather than keeping a fresh one.
//
// * fetch() is a modern version of XMLHttpRequest. A pollyfill is available for older browsers: https://github.com/github/fetch

var ToneAnalyzerV3 = require('watson-developer-cloud/tone-analyzer/v3');
var ToneAnalyzerV3 = require('ibm-watson/tone-analyzer/v3');

var btn = document.getElementById('analyze-btn');
var input = document.getElementById('input');
Expand Down
4 changes: 2 additions & 2 deletions examples/browserify/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ var express = require('express'); // eslint-disable-line node/no-missing-require
var app = express();
var expressBrowserify = require('express-browserify'); // eslint-disable-line node/no-missing-require
var dotenv = require('dotenv');
var AuthorizationV1 = require('watson-developer-cloud/authorization/v1');
var ToneAnalyzerV3 = require('watson-developer-cloud/tone-analyzer/v3');
var AuthorizationV1 = require('ibm-watson/authorization/v1');
var ToneAnalyzerV3 = require('ibm-watson/tone-analyzer/v3');

var isDev = app.get('env') === 'development';
app.get(
Expand Down
2 changes: 1 addition & 1 deletion examples/compare-comply.v1.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const fs = require('fs');
const CompareComplyV1 = require('watson-developer-cloud/compare-comply/v1');
const CompareComplyV1 = require('ibm-watson/compare-comply/v1');

const compareComply = new CompareComplyV1({
// if left unspecified here, the SDK will fall back to the COMPARE_COMPLY_IAM_APIKEY
Expand Down
2 changes: 1 addition & 1 deletion examples/discovery.v1.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

var DiscoveryV1 = require('watson-developer-cloud/discovery/v1');
var DiscoveryV1 = require('ibm-watson/discovery/v1');
var fs = require('fs');

var discovery = new DiscoveryV1({
Expand Down
2 changes: 1 addition & 1 deletion examples/language_translator.v3.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
require('dotenv').config();

const LanguageTranslatorV3 = require('watson-developer-cloud/language-translator/v3');
const LanguageTranslatorV3 = require('ibm-watson/language-translator/v3');

/**
* Instantiate the Watson Language Translator Service
Expand Down
2 changes: 1 addition & 1 deletion examples/natural_language_classifier.v1.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

var NaturalLanguageClassifierV1 = require('watson-developer-cloud/natural-language-classifier/v1');
var NaturalLanguageClassifierV1 = require('ibm-watson/natural-language-classifier/v1');
var fs = require('fs');

var classifier = new NaturalLanguageClassifierV1({
Expand Down
2 changes: 1 addition & 1 deletion examples/natural_language_understanding.v1.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

var fs = require('fs');
var NaturalLanguageUnderstandingV1 = require('watson-developer-cloud/natural-language-understanding/v1.js');
var NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1.js');
require('dotenv').config({ silent: true }); // optional

var nlu = new NaturalLanguageUnderstandingV1({
Expand Down
Loading

0 comments on commit cbec4f6

Please sign in to comment.