Skip to content

Commit

Permalink
Merge pull request #47 from ibmtjbot/dev
Browse files Browse the repository at this point in the history
Updated credentials for Watson services
  • Loading branch information
jweisz authored Oct 9, 2018
2 parents 4370d91 + 52c74a1 commit 3fcfdd4
Show file tree
Hide file tree
Showing 4 changed files with 424 additions and 309 deletions.
17 changes: 17 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
env:
es6: true
node: true
extends: 'eslint:recommended'
rules:
indent:
- error
- 4
linebreak-style:
- error
- unix
quotes:
- error
- single
semi:
- error
- always
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Valid options for `hardware` are defined in `TJBot.prototype.hardware`: `camera`

The `credentials` object expects credentials to be defined for each Watson service needed by your application. Valid Watson services are defined in `TJBot.prototype.services`: `assistant`, `language_translator`, `speech_to_text`, `text_to_speech`, `tone_analyzer`, and `visual_recognition`.

Please see `TJBot.prototype._createServiceAPI()` to understand what kind of credentials are required for each specific service. Most services expect a `username` and `password`, although some (e.g. `visual_recognition`) expect an API `key`.
Please see `TJBot.prototype._createServiceAPI()` to understand what kind of credentials are required for each specific service. Most services expect a `username` and `password`, although some (e.g. `visual_recognition` and `language_translator`) expect an `apikey`.

Example credentials object:

Expand All @@ -134,8 +134,7 @@ var credentials = {
password: 'yyy'
},
language_translator: {
username: 'xxx',
password: 'yyy'
apikey: 'xxx'
},
speech_to_text: {
username: 'xxx',
Expand All @@ -150,7 +149,7 @@ var credentials = {
password: 'yyy'
},
visual_recognition: {
api_key: 'xxx'
apikey: 'xxx'
}
};
```
Expand All @@ -177,7 +176,7 @@ If you do need low-level access to the Watson APIs beyond the level provided by
```
var tj = new TJBot(hardware, configuration, credentials);
tj._assistant; // the AssistantV1 service object
tj._languageTranslator; // the LanguageTranslatorV2 service object
tj._languageTranslator; // the LanguageTranslatorV3 service object
tj._stt; // the SpeechToTextV1 service object
tj._tts; // the TextToSpeechV1 service object
tj._toneAnalyzer; // the ToneAnalyzerV3 service object
Expand Down
Loading

0 comments on commit 3fcfdd4

Please sign in to comment.