Skip to content

Commit 8a45e0c

Browse files
authored
docs: use serviceUrl instead of url in README (#1056)
1 parent 779b167 commit 8a45e0c

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ You can set or reset the base URL after constructing the client instance using t
178178
const DiscoveryV1 = require('ibm-watson/discovery/v1');
179179

180180
const discovery = DiscoveryV1({
181-
/* authenticator, version, url, etc... */
181+
/* authenticator, version, etc... */
182182
});
183183

184184
discovery.setServiceUrl('<new url>');
@@ -192,7 +192,7 @@ All SDK methods are asynchronous, as they are making network requests to Watson
192192
const DiscoveryV1 = require('ibm-watson/discovery/v1');
193193

194194
const discovery = new DiscoveryV1({
195-
/* authenticator, version, url, etc... */
195+
/* authenticator, version, serviceUrl, etc... */
196196
});
197197

198198
// using Promises
@@ -227,7 +227,7 @@ For example, this is how you can pass in custom headers to Watson Assistant serv
227227

228228
```js
229229
const assistant = new watson.AssistantV1({
230-
/* authenticator, version, url, etc... */
230+
/* authenticator, version, serviceUrl, etc... */
231231
});
232232

233233
assistant.message({
@@ -254,7 +254,7 @@ Here is an example of how to access the response headers for Watson Assistant:
254254

255255
```js
256256
const assistant = new AssistantV1({
257-
/* authenticator, version, url, etc... */
257+
/* authenticator, version, serviceUrl, etc... */
258258
});
259259

260260
assistant.message(params).then(
@@ -281,7 +281,7 @@ Every SDK call returns a response with a transaction ID in the x-global-transact
281281
#### HTTP Example
282282
```js
283283
const assistant = new AssistantV1({
284-
/* authenticator, version, url, etc... */
284+
/* authenticator, version, serviceUrl, etc... */
285285
});
286286

287287
assistant.message(params).then(
@@ -297,7 +297,7 @@ assistant.message(params).then(
297297
#### WebSocket Example
298298
```js
299299
const speechToText = new SpeechToTextV1({
300-
/* authenticator, version, url, etc... */
300+
/* authenticator, version, serviceUrl, etc... */
301301
});
302302
const recognizeStream = recognizeUsingWebSocket(params);
303303

@@ -314,7 +314,7 @@ By default, [all requests are logged](https://cloud.ibm.com/docs/watson/getting-
314314

315315
```js
316316
const myInstance = new watson.WhateverServiceV1({
317-
/* authenticator, version, url, etc... */
317+
/* authenticator, version, serviceUrl, etc... */
318318
headers: {
319319
"X-Watson-Learning-Opt-Out": true
320320
}
@@ -385,7 +385,7 @@ To do this, set `disableSslVerification` to `true` in the service constructor an
385385

386386
```js
387387
const discovery = new DiscoveryV1({
388-
url: '<service_url>',
388+
serviceUrl: '<service_url>',
389389
version: '<version-date>',
390390
authenticator: new IamAuthenticator({ apikey: '<apikey>', disableSslVerification: true }), // this will disable SSL verification for requests to the token endpoint
391391
disableSslVerification: true, // this will disable SSL verification for any request made with this client instance
@@ -416,7 +416,7 @@ const { IamAuthenticator } = require('ibm-watson/auth');
416416

417417
const assistant = new AssistantV2({
418418
authenticator: new IamAuthenticator({ apikey: '<apikey>' }),
419-
url: 'https://gateway.watsonplatform.net/assistant/api/',
419+
serviceUrl: 'https://gateway.watsonplatform.net/assistant/api/',
420420
version: '2018-09-19'
421421
});
422422

@@ -446,7 +446,7 @@ const { IamAuthenticator } = require('ibm-watson/auth');
446446

447447
const assistant = new AssistantV1({
448448
authenticator: new IamAuthenticator({ apikey: '<apikey>' }),
449-
url: 'https://gateway.watsonplatform.net/assistant/api/',
449+
serviceUrl: 'https://gateway.watsonplatform.net/assistant/api/',
450450
version: '2018-02-16'
451451
});
452452

@@ -474,7 +474,7 @@ const { IamAuthenticator } = require('ibm-watson/auth');
474474

475475
const compareComply = new CompareComplyV1({
476476
authenticator: new IamAuthenticator({ apikey: '<apikey>' }),
477-
url: 'https://gateway.watsonplatform.net/compare-comply/api',
477+
serviceUrl: 'https://gateway.watsonplatform.net/compare-comply/api',
478478
version: '2018-12-06'
479479
});
480480

@@ -505,7 +505,7 @@ const { IamAuthenticator } = require('ibm-watson/auth');
505505

506506
const discovery = new DiscoveryV1({
507507
authenticator: new IamAuthenticator({ apikey: '<apikey>' }),
508-
url: 'https://gateway.watsonplatform.net/discovery/api/',
508+
serviceUrl: 'https://gateway.watsonplatform.net/discovery/api/',
509509
version: '2017-09-01'
510510
});
511511

@@ -533,7 +533,7 @@ const { IamAuthenticator } = require('ibm-watson/auth');
533533

534534
const languageTranslator = new LanguageTranslatorV3({
535535
authenticator: new IamAuthenticator({ apikey: '<apikey>' }),
536-
url: 'https://gateway.watsonplatform.net/language-translator/api/',
536+
serviceUrl: 'https://gateway.watsonplatform.net/language-translator/api/',
537537
version: 'YYYY-MM-DD',
538538
});
539539

@@ -573,7 +573,7 @@ const { IamAuthenticator } = require('ibm-watson/auth');
573573

574574
const classifier = new NaturalLanguageClassifierV1({
575575
authenticator: new IamAuthenticator({ apikey: '<apikey>' }),
576-
url: 'https://gateway.watsonplatform.net/natural-language-classifier/api/'
576+
serviceUrl: 'https://gateway.watsonplatform.net/natural-language-classifier/api/'
577577
});
578578

579579
classifier.classify(
@@ -604,7 +604,7 @@ const { IamAuthenticator } = require('ibm-watson/auth');
604604
const nlu = new NaturalLanguageUnderstandingV1({
605605
authenticator: new IamAuthenticator({ apikey: '<apikey>' }),
606606
version: '2018-04-05',
607-
url: 'https://gateway.watsonplatform.net/natural-language-understanding/api/'
607+
serviceUrl: 'https://gateway.watsonplatform.net/natural-language-understanding/api/'
608608
});
609609

610610
nlu.analyze(
@@ -636,7 +636,7 @@ const { IamAuthenticator } = require('ibm-watson/auth');
636636
const personalityInsights = new PersonalityInsightsV3({
637637
authenticator: new IamAuthenticator({ apikey: '<apikey>' }),
638638
version: '2016-10-19',
639-
url: 'https://gateway.watsonplatform.net/personality-insights/api/'
639+
serviceUrl: 'https://gateway.watsonplatform.net/personality-insights/api/'
640640
});
641641

642642
personalityInsights.profile(
@@ -665,7 +665,7 @@ const { IamAuthenticator } = require('ibm-watson/auth');
665665

666666
const speechToText = new SpeechToTextV1({
667667
authenticator: new IamAuthenticator({ apikey: '<apikey>' }),
668-
url: 'https://stream.watsonplatform.net/speech-to-text/api/'
668+
serviceUrl: 'https://stream.watsonplatform.net/speech-to-text/api/'
669669
});
670670

671671
const params = {
@@ -700,7 +700,7 @@ const { IamAuthenticator } = require('ibm-watson/auth');
700700

701701
const textToSpeech = new TextToSpeechV1({
702702
authenticator: new IamAuthenticator({ apikey: '<apikey>' }),
703-
url: 'https://stream.watsonplatform.net/text-to-speech/api/'
703+
serviceUrl: 'https://stream.watsonplatform.net/text-to-speech/api/'
704704
});
705705

706706
const params = {
@@ -748,7 +748,7 @@ const { IamAuthenticator } = require('ibm-watson/auth');
748748
const toneAnalyzer = new ToneAnalyzerV3({
749749
authenticator: new IamAuthenticator({ apikey: '<apikey>' }),
750750
version: '2016-05-19',
751-
url: 'https://gateway.watsonplatform.net/tone-analyzer/api/'
751+
serviceUrl: 'https://gateway.watsonplatform.net/tone-analyzer/api/'
752752
});
753753

754754
toneAnalyzer.tone(
@@ -778,7 +778,7 @@ const VisualRecognitionV3 = require('ibm-watson/visual-recognition/v3');
778778
const { IamAuthenticator } = require('ibm-watson/auth');
779779

780780
const visualRecognition = new VisualRecognitionV3({
781-
url: '<service_url>',
781+
serviceUrl: '<service_url>',
782782
version: '2018-03-19',
783783
authenticator: new IamAuthenticator({ apikey: '<apikey>' }),
784784
});

0 commit comments

Comments
 (0)