Skip to content

Commit 98ec84e

Browse files
author
Ammar Dodin
committed
📝 add JSDoc for methods
1 parent 75fea91 commit 98ec84e

File tree

1 file changed

+23
-9
lines changed
  • personality-insights

1 file changed

+23
-9
lines changed

personality-insights/v2.ts

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,35 @@ import { BaseService } from '../lib/base_service';
2222

2323
class PersonalityInsightsV2 extends BaseService {
2424
static URL: string = 'https://gateway.watsonplatform.net/personality-insights/api';
25-
25+
26+
/**
27+
* Construct a PersonalityInsightsV2 object.
28+
*
29+
* @param {Object} options - Options for the service.
30+
* @param {string} options.version_date - The API version date to use with the service, in "YYYY-MM-DD" format. Whenever the API is changed in a backwards incompatible way, a new minor version of the API is released. The service uses the API version for the date you specify, or the most recent version before that date. Note that you should not programmatically specify the current date at runtime, in case the API has been updated since your application's release. Instead, specify a version date that is compatible with your application, and don't change it until your application is ready for a later version.
31+
* @param {string} [options.url] - The base url to use when contacting the service (e.g. 'https://gateway.watsonplatform.net/personality-insights/api'). The base url may differ between Bluemix regions.
32+
* @param {string} [options.username] - The username used to authenticate with the service. Username and password credentials are only required to run your application locally or outside of Bluemix. When running on Bluemix, the credentials will be automatically loaded from the `VCAP_SERVICES` environment variable.
33+
* @param {string} [options.password] - The password used to authenticate with the service. Username and password credentials are only required to run your application locally or outside of Bluemix. When running on Bluemix, the credentials will be automatically loaded from the `VCAP_SERVICES` environment variable.
34+
* @param {boolean} [options.use_unauthenticated] - Set to `true` to avoid including an authorization header. This option may be useful for requests that are proxied.
35+
* @param {Object} [options.headers] - Default headers that shall be included with every request to the service.
36+
* @param {boolean} [options.headers.X-Watson-Learning-Opt-Out] - Set to `true` to opt-out of data collection. By default, all IBM Watson services log requests and their results. Logging is done only to improve the services for future users. The logged data is not shared or made public. If you are concerned with protecting the privacy of users' personal information or otherwise do not want your requests to be logged, you can opt out of logging.
37+
* @constructor
38+
* @returns {PersonalityInsightsV2}
39+
* @throws {Error}
40+
*/
2641
constructor(options: PersonalityInsightsV2.Options) {
2742
super(options);
2843
}
2944

3045
/**
31-
* @param params {Object} The parameters to call the service
32-
* The accepted parameters are:
33-
* - text: The text to analyze.
34-
* - contentItems: A JSON input (if 'text' not provided).
35-
* - include_raw: include raw results
36-
* - accept_language : The language expected for the output.
37-
* - language: The language of the input.
38-
*
46+
* @param {Object} params - The parameters to call the service
47+
* @param {string} text - The text to analyze.
48+
* @param {Object} contentItems - A JSON input (if 'text' is not provided).
49+
* @param {boolean} include_raw - include raw results
50+
* @param {boolean} accept_language - The language expected for the output.
51+
* @param {string} language - The language of the input.
3952
* @param callback The callback.
53+
* @returns {ReadableStream|void}
4054
*/
4155
profile(
4256
params: PersonalityInsightsV2.ProfileParams,

0 commit comments

Comments
 (0)