Skip to content

Commit bb59a0c

Browse files
authored
docs: update auth example file to use correct format (#997)
1 parent 34e4d09 commit bb59a0c

1 file changed

Lines changed: 39 additions & 145 deletions

File tree

test/resources/auth.example.js

Lines changed: 39 additions & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corp. 2015, 2018.
2+
* Copyright 2015, 2019 IBM Corp. All Rights Reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,160 +16,54 @@
1616

1717
'use strict';
1818

19+
const testingHeaders = {
20+
'X-Watson-Learning-Opt-Out': 1,
21+
'X-Watson-Test': 1,
22+
};
23+
1924
module.exports = {
20-
relationship_extraction: {
21-
url: 'https://gateway.watsonplatform.net/relationship-extraction-beta/api',
22-
username: '',
23-
password: '',
24-
headers: {
25-
'X-Watson-Learning-Opt-Out': 1,
26-
'X-Watson-Test': 1,
27-
},
28-
},
29-
concept_insights: {
30-
url: 'https://gateway.watsonplatform.net/concept-insights/api',
31-
username: '',
32-
password: '',
33-
headers: {
34-
'X-Watson-Learning-Opt-Out': 1,
35-
'X-Watson-Test': 1,
36-
},
37-
account_id: 'larmu8up2pa3',
38-
},
39-
speech_to_text: {
40-
url: 'https://stream.watsonplatform.net/speech-to-text/api',
41-
username: '',
42-
password: '',
43-
headers: {
44-
'X-Watson-Learning-Opt-Out': 1,
45-
'X-Watson-Test': 1,
46-
},
47-
},
48-
text_to_speech: {
49-
url: 'https://stream.watsonplatform.net/text-to-speech/api',
50-
username: '',
51-
password: '',
52-
headers: {
53-
'X-Watson-Learning-Opt-Out': 1,
54-
'X-Watson-Test': 1,
55-
},
56-
},
57-
tradeoff_analytics: {
58-
url: 'https://gateway.watsonplatform.net/tradeoff-analytics/api',
59-
username: '',
60-
password: '',
61-
headers: {
62-
'X-Watson-Learning-Opt-Out': 1,
63-
'X-Watson-Test': 1,
64-
},
25+
assistant: {
26+
headers: testingHeaders,
27+
apikey: '',
6528
},
66-
visual_recognition: {
67-
v3: {
68-
url: 'https://gateway-a.watsonplatform.net/visual-recognition/api',
69-
api_key: '',
70-
headers: {
71-
'X-Watson-Learning-Opt-Out': 1,
72-
'X-Watson-Test': 1,
73-
},
74-
},
29+
compareComply: {
30+
apikey: '',
31+
headers: testingHeaders,
7532
},
76-
personality_insights: {
77-
v2: {
78-
url: 'https://gateway.watsonplatform.net/personality-insights/api',
79-
username: '',
80-
password: '',
81-
headers: {
82-
'X-Watson-Learning-Opt-Out': 1,
83-
'X-Watson-Test': 1,
84-
},
85-
},
86-
v3: {
87-
url: 'https://gateway.watsonplatform.net/personality-insights/api',
88-
username: '',
89-
password: '',
90-
headers: {
91-
'X-Watson-Learning-Opt-Out': 1,
92-
'X-Watson-Test': 1,
93-
},
94-
},
33+
discovery: {
34+
apikey: '',
35+
headers: testingHeaders,
9536
},
96-
dialog: {
97-
url: 'https://gateway.watsonplatform.net/dialog/api',
98-
username: '',
99-
password: '',
100-
dialog_id: '',
101-
headers: {
102-
'X-Watson-Learning-Opt-Out': 1,
103-
'X-Watson-Test': 1,
104-
},
37+
languageTranslator: {
38+
apikey: '',
39+
headers: testingHeaders,
10540
},
106-
language_translator: {
107-
url: 'https://gateway.watsonplatform.net/language-translator/api',
108-
username: '',
109-
password: '',
110-
headers: {
111-
'X-Watson-Learning-Opt-Out': 1,
112-
'X-Watson-Test': 1,
113-
},
41+
naturalLanguageClassifier: {
42+
apikey: '',
43+
headers: testingHeaders,
11444
},
115-
tone_analyzer: {
116-
url: 'https://gateway.watsonplatform.net/tone-analyzer/api',
117-
username: '',
118-
password: '',
119-
headers: {
120-
'X-Watson-Learning-Opt-Out': 1,
121-
'X-Watson-Test': 1,
122-
},
45+
naturalLanguageUnderstanding: {
46+
apikey: '',
47+
headers: testingHeaders,
12348
},
124-
alchemy: {
125-
api_key: '',
49+
personalityInsights: {
50+
apikey: '',
51+
headers: testingHeaders,
12652
},
127-
document_conversion: {
128-
url: 'https://gateway.watsonplatform.net/document-conversion/api',
129-
username: '',
130-
password: '',
131-
headers: {
132-
'X-Watson-Learning-Opt-Out': 1,
133-
'X-Watson-Test': 1,
134-
},
53+
speechToText: {
54+
apikey: '',
55+
headers: testingHeaders,
13556
},
136-
retrieve_and_rank: {
137-
url: 'https://gateway.watsonplatform.net/retrieve-and-rank/api',
138-
username: '',
139-
password: '',
140-
headers: {
141-
'X-Watson-Learning-Opt-Out': 1,
142-
'X-Watson-Test': 1,
143-
},
57+
textToSpeech: {
58+
apikey: '',
59+
headers: testingHeaders,
14460
},
145-
natural_language_classifier: {
146-
url: 'https://gateway.watsonplatform.net/natural-language-classifier/api',
147-
username: '',
148-
password: '',
149-
classifier_id: '',
150-
headers: {
151-
'X-Watson-Learning-Opt-Out': 1,
152-
'X-Watson-Test': 1,
153-
},
61+
toneAnalyzer: {
62+
apikey: '',
63+
headers: testingHeaders,
15464
},
155-
assistant: {
156-
url: 'https://gateway.watsonplatform.net/assistant/api',
157-
username: '',
158-
password: '',
159-
workspace_id: '',
160-
headers: {
161-
'X-Watson-Learning-Opt-Out': 1,
162-
'X-Watson-Test': 1,
163-
},
164-
},
165-
discovery: {
166-
username: '',
167-
password: '',
168-
environment_id: '',
169-
configuration_id: '',
170-
headers: {
171-
'X-Watson-Learning-Opt-Out': 1,
172-
'X-Watson-Test': 1,
173-
},
65+
visualRecognition: {
66+
apikey: '',
67+
headers: testingHeaders,
17468
},
17569
};

0 commit comments

Comments
 (0)