watson-developer-cloud / node-sdk

:comet: Node.js library to access IBM Watson services.
https://www.npmjs.com/package/ibm-watson
Apache License 2.0
1.48k stars 670 forks source link

URL Parameter [speech-to-text] #470

Closed hkgian closed 7 years ago

hkgian commented 7 years ago

Doing a conversation with a customer today, we found out that the URL for Watson Speech-to-text service deployed in Frakfurt is different, which brakes compatibility with the Frakfurt datacenter for this service.

This issue is affecting all the watson services on the Frankfurt region

To recreate:

Suggestion:

My idea would be to hide this complexity to the developer, and provide an optional parameter to select the location of the service, using a standard format. Internally keep track of this relation using an array with services url for each reagion for each service

chughts commented 7 years ago

There already is an optional parameter: url

Eg.

var translator = new LanguageTranslatorV2({
  username: 'LANGUAGE TRANSLATOR USERNAME',
  password: 'LANGUAGE TRANSLATOR PASSWORD',
  version: 'v2',
  url: 'https://gateway.fr.watsonplatform.net/language-translator/api'
});