Skip to content

Commit d01494c

Browse files
committed
docs: fixed page titles, constructor command, casing
1 parent a439f00 commit d01494c

File tree

5 files changed

+34
-27
lines changed

5 files changed

+34
-27
lines changed

jsdoc/template/tmpl/layout.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
5-
<title>JSDoc: <?js= title ?></title>
5+
<title><?js= title ?> | Watson Developer Cloud Node.js SDK Documentation</title>
66

77
<script src="scripts/prettify/prettify.js"> </script>
88
<script src="scripts/prettify/lang-css.js"> </script>

jsdoc/template/tmpl/method.tmpl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,15 @@ var self = this;
77
<h2>Constructor</h2>
88
<?js } ?>
99

10-
<h4 class="name" id="<?js= id ?>"><?js= data.attribs + (kind === 'class' ? 'new ' : '') +
11-
name + (data.signature || '') ?></h4>
10+
<?js if (kind === 'class' && meta.shortpath) {
11+
var version = data.version || meta.filename.substr(0, meta.filename.length-3);
12+
var factory_name = meta.path.split(/\//g).pop();
13+
?>
14+
<h4 class="name" id="<?js= id ?>">watson.<?js=factory_name?>({version: '<?js=version?>', ...});</h4>
15+
<?js } else { ?>
16+
<h4 class="name" id="<?js= id ?>"><?js= data.attribs + (kind === 'class' ? 'new ' : '') +
17+
name + (data.signature || '') ?></h4>
18+
<?js } ?>
1219

1320
<?js if (data.summary) { ?>
1421
<p class="summary"><?js= summary ?></p>

lib/index.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -143,119 +143,119 @@ var watson = {
143143
* @param {{}} options
144144
* @returns {ConceptExpansion}
145145
*/
146-
concept_expansion: createServiceApi('concept_expansion'),
146+
concept_expansion: createServiceAPI('concept_expansion'),
147147

148148
/**
149149
* @function
150150
* @param {{}} options
151151
* @returns {QuestionAndAnswer}
152152
*/
153-
question_and_answer: createServiceApi('question_and_answer'),
153+
question_and_answer: createServiceAPI('question_and_answer'),
154154

155155
/**
156156
* @function
157157
* @param {{}} options
158158
* @returns {RelationshipExtraction}
159159
*/
160-
relationship_extraction: createServiceApi('relationship_extraction'),
160+
relationship_extraction: createServiceAPI('relationship_extraction'),
161161

162162
/**
163163
* @function
164164
* @param {{}} options
165165
* @returns {VisualRecognitionV1Beta|VisualRecognitionV2Beta}
166166
*/
167-
visual_recognition: createServiceApi('visual_recognition'),
167+
visual_recognition: createServiceAPI('visual_recognition'),
168168

169169
/**
170170
* @function
171171
* @param {{}} options
172172
* @returns {SpeechToText}
173173
*/
174-
speech_to_text: createServiceApi('speech_to_text'),
174+
speech_to_text: createServiceAPI('speech_to_text'),
175175

176176
/**
177177
* @function
178178
* @param {{}} options
179179
* @returns {TextToSpeech}
180180
*/
181-
text_to_speech: createServiceApi('text_to_speech'),
181+
text_to_speech: createServiceAPI('text_to_speech'),
182182

183183
/**
184184
* @function
185185
* @param {{}} options
186186
* @returns {ConceptInsights}
187187
*/
188-
concept_insights: createServiceApi('concept_insights'),
188+
concept_insights: createServiceAPI('concept_insights'),
189189

190190
/**
191191
* @function
192192
* @param {{}} options
193193
* @returns {TradeoffAnalytics}
194194
*/
195-
tradeoff_analytics: createServiceApi('tradeoff_analytics'),
195+
tradeoff_analytics: createServiceAPI('tradeoff_analytics'),
196196

197197
/**
198198
* @function
199199
* @param {{}} options
200200
* @returns {PersonalityInsights}
201201
*/
202-
personality_insights: createServiceApi('personality_insights'),
202+
personality_insights: createServiceAPI('personality_insights'),
203203

204204
/**
205205
* @function
206206
* @param {{}} options
207207
* @returns {NaturalLanguageClassifier}
208208
*/
209-
natural_language_classifier: createServiceApi('natural_language_classifier'),
209+
natural_language_classifier: createServiceAPI('natural_language_classifier'),
210210

211211
/**
212212
* @function
213213
* @param {{}} options
214214
* @returns {Authorization}
215215
*/
216-
authorization: createServiceApi('authorization'),
216+
authorization: createServiceAPI('authorization'),
217217

218218
/**
219219
* @function
220220
* @param {{}} options
221221
* @returns {LanguageTranslation}
222222
*/
223-
language_translation: createServiceApi('language_translation'),
223+
language_translation: createServiceAPI('language_translation'),
224224

225225
/**
226226
* @function
227227
* @param {{}} options
228228
* @returns {ToneAnalyzer}
229229
*/
230-
tone_analyzer: createServiceApi('tone_analyzer'),
230+
tone_analyzer: createServiceAPI('tone_analyzer'),
231231

232232
/**
233233
* @function
234234
* @param {{}} options
235235
* @returns {Dialog}
236236
*/
237-
dialog: createServiceApi('dialog'),
237+
dialog: createServiceAPI('dialog'),
238238

239239
/**
240240
* @function
241241
* @param {{}} options
242242
* @returns {RetrieveAndRank}
243243
*/
244-
retrieve_and_rank: createServiceApi('retrieve_and_rank'),
244+
retrieve_and_rank: createServiceAPI('retrieve_and_rank'),
245245

246246
/**
247247
* @function
248248
* @param {{}} options
249249
* @returns {DocumentConversion}
250250
*/
251-
document_conversion: createServiceApi('document_conversion'),
251+
document_conversion: createServiceAPI('document_conversion'),
252252

253253
/**
254254
* @function
255255
* @param {{}} options
256256
* @returns {VisualInsights}
257257
*/
258-
visual_insights: createServiceApi('visual_insights'),
258+
visual_insights: createServiceAPI('visual_insights'),
259259

260260
// deprecated
261261
/**
@@ -264,37 +264,37 @@ var watson = {
264264
* @returns {Search}
265265
* @deprecated Replaced by {@link RetrieveAndRank}
266266
*/
267-
search: createServiceApi('search'),
267+
search: createServiceAPI('search'),
268268

269269
/**
270270
* @function
271271
* @param {{}} options
272272
* @returns {MessageResonance}
273273
* @deprecated
274274
*/
275-
message_resonance: createServiceApi('message_resonance'),
275+
message_resonance: createServiceAPI('message_resonance'),
276276

277277
// alchemy
278278
/**
279279
* @function
280280
* @param {{}} options
281281
* @returns {AlchemyLanguage}
282282
*/
283-
alchemy_language: createServiceApi('alchemy_language'),
283+
alchemy_language: createServiceAPI('alchemy_language'),
284284

285285
/**
286286
* @function
287287
* @param {{}} options
288288
* @returns {AlchemyVision}
289289
*/
290-
alchemy_vision: createServiceApi('alchemy_vision'),
290+
alchemy_vision: createServiceAPI('alchemy_vision'),
291291

292292
/**
293293
* @function
294294
* @param {{}} options
295295
* @returns {AlchemyDataNews}
296296
*/
297-
alchemy_data_news: createServiceApi('alchemy_data_news')
297+
alchemy_data_news: createServiceAPI('alchemy_data_news')
298298
};
299299

300300

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"test": "jshint --exclude ./node_modules/ && mocha --reporter spec --timeout 4000",
8989
"prepare": "npm test && npm version patch",
9090
"doc": "jsdoc -c jsdoc/config.json",
91-
"watch-doc": "nodemon --watch lib/ --watch services/ --watch .jsdoc.json --watch package.json --exec npm run doc",
91+
"watch-doc": "nodemon --watch lib/ --watch services/ --watch jsdoc/ --watch package.json --ext js,tmpl --exec npm run doc",
9292
"coverage": "istanbul cover ./node_modules/mocha/bin/_mocha --reporter spec --timeout 4000",
9393
"coveralls": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
9494
}

services/alchemy_vision/v1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function createRequest(method) {
8585
}
8686

8787
/**
88-
*
88+
*
8989
* @param options
9090
* @constructor
9191
*/

0 commit comments

Comments
 (0)