Skip to content

Commit 2af7d86

Browse files
author
Ammar Dodin
committed
📝 add JSDoc for DialogV1 constructor
1 parent 34c1d03 commit 2af7d86

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

dialog/v1.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,22 @@ import { FileObject } from '../lib/helper';
2525

2626
class DialogV1 extends BaseService {
2727
static URL: string = 'https://gateway.watsonplatform.net/dialog/api';
28-
28+
29+
/**
30+
* Construct a DialogV1 object.
31+
*
32+
* @param {DialogV1.Options} options - Options for the service.
33+
* @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.
34+
* @param {string} [options.url] - The base url to use when contacting the service (e.g. 'https://gateway.watsonplatform.net/conversation/api'). The base url may differ between Bluemix regions.
35+
* @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.
36+
* @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.
37+
* @param {boolean} [options.use_unauthenticated] - Set to `true` to avoid including an authorization header. This option may be useful for requests that are proxied.
38+
* @param {Object} [options.headers] - Default headers that shall be included with every request to the service.
39+
* @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.
40+
* @constructor
41+
* @returns {DialogV1}
42+
* @throws {Error}
43+
*/
2944
constructor(options: DialogV1.Options) {
3045
super(options);
3146
if (!options['silent']) {

0 commit comments

Comments
 (0)