Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(options: UserOptions) {
// If the caller didn't supply an authenticator, construct one from external configuration.
if (!options.authenticator) {
options.authenticator = getAuthenticatorFromEnvironment('tone_analyzer');
}
super(options);
// check if 'version' was provided
if (typeof this.baseOptions.version === 'undefined') {
throw new Error('Argument error: version was not specified');
}
this.baseOptions.qs.version = options.version;
}
constructor(options: UserOptions) {
// If the caller didn't supply an authenticator, construct one from external configuration.
if (!options.authenticator) {
options.authenticator = getAuthenticatorFromEnvironment('watson_vision_combined');
}
super(options);
// check if 'version' was provided
if (typeof this.baseOptions.version === 'undefined') {
throw new Error('Argument error: version was not specified');
}
this.baseOptions.qs.version = options.version;
}
constructor(options: UserOptions) {
// If the caller didn't supply an authenticator, construct one from external configuration.
if (!options.authenticator) {
options.authenticator = getAuthenticatorFromEnvironment('discovery');
}
super(options);
// check if 'version' was provided
if (typeof this.baseOptions.version === 'undefined') {
throw new Error('Argument error: version was not specified');
}
this.baseOptions.qs.version = options.version;
}
constructor(options: UserOptions) {
// If the caller didn't supply an authenticator, construct one from external configuration.
if (!options.authenticator) {
options.authenticator = getAuthenticatorFromEnvironment('compare-comply');
}
super(options);
// check if 'version' was provided
if (typeof this.baseOptions.version === 'undefined') {
throw new Error('Argument error: version was not specified');
}
this.baseOptions.qs.version = options.version;
}
constructor(options: UserOptions) {
// If the caller didn't supply an authenticator, construct one from external configuration.
if (!options.authenticator) {
options.authenticator = getAuthenticatorFromEnvironment('personality_insights');
}
super(options);
// check if 'version' was provided
if (typeof this.baseOptions.version === 'undefined') {
throw new Error('Argument error: version was not specified');
}
this.baseOptions.qs.version = options.version;
}
constructor(options: UserOptions) {
// If the caller didn't supply an authenticator, construct one from external configuration.
if (!options.authenticator) {
options.authenticator = getAuthenticatorFromEnvironment('conversation');
}
super(options);
// check if 'version' was provided
if (typeof this.baseOptions.version === 'undefined') {
throw new Error('Argument error: version was not specified');
}
this.baseOptions.qs.version = options.version;
}
constructor(options: UserOptions) {
// If the caller didn't supply an authenticator, construct one from external configuration.
if (!options.authenticator) {
options.authenticator = getAuthenticatorFromEnvironment('text_to_speech');
}
super(options);
}
constructor(options: UserOptions) {
// If the caller didn't supply an authenticator, construct one from external configuration.
if (!options.authenticator) {
options.authenticator = getAuthenticatorFromEnvironment('language_translator');
}
super(options);
// check if 'version' was provided
if (typeof this.baseOptions.version === 'undefined') {
throw new Error('Argument error: version was not specified');
}
this.baseOptions.qs.version = options.version;
}
constructor(options: UserOptions) {
// If the caller didn't supply an authenticator, construct one from external configuration.
if (!options.authenticator) {
options.authenticator = getAuthenticatorFromEnvironment('watson_vision_combined');
}
super(options);
// check if 'version' was provided
if (typeof this.baseOptions.version === 'undefined') {
throw new Error('Argument error: version was not specified');
}
this.baseOptions.qs.version = options.version;
}
constructor(options: UserOptions) {
// If the caller didn't supply an authenticator, construct one from external configuration.
if (!options.authenticator) {
options.authenticator = getAuthenticatorFromEnvironment('natural_language_classifier');
}
super(options);
}