Skip to content

Commit 7810317

Browse files
chore(examples): update urls
1 parent 9f5283c commit 7810317

13 files changed

+13
-13
lines changed

examples/assistant_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
# Authentication via external config like VCAP_SERVICES
1515
assistant = AssistantV1(version='2018-07-10')
16-
assistant.set_service_url('https://gateway.watsonplatform.net/assistant/api')
16+
assistant.set_service_url('https://api.us-south.assistant.watson.cloud.ibm.com')
1717

1818
#########################
1919
# Workspaces

examples/assistant_v2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
assistant = AssistantV2(
77
version='2018-09-20',
88
authenticator=authenticator)
9-
assistant.set_service_url('https://gateway.watsonplatform.net/assistant/api')
9+
assistant.set_service_url('https://api.us-south.assistant.watson.cloud.ibm.com')
1010

1111
#########################
1212
# Sessions

examples/compare_comply_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
compare_comply = CompareComplyV1(
99
version='2018-03-23',
1010
authenticator=authenticator)
11-
compare_comply.set_service_url('https://gateway.watsonplatform.net/compare-comply/api')
11+
compare_comply.set_service_url('https://api.us-south.compare-comply.watson.cloud.ibm.com')
1212

1313
print('Convert to HTML')
1414
contract = os.path.abspath('resources/contract_A.pdf')

examples/discovery_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
discovery = DiscoveryV1(
77
version='2018-08-01',
88
authenticator=authenticator)
9-
discovery.set_service_url('https://gateway.watsonplatform.net/discovery/api')
9+
discovery.set_service_url('https://api.us-south.discovery.watson.cloud.ibm.com')
1010

1111
environments = discovery.list_environments().get_result()
1212
print(json.dumps(environments, indent=2))

examples/language_translator_v3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
language_translator = LanguageTranslatorV3(
88
version='2018-05-01',
99
authenticator=authenticator)
10-
language_translator.set_service_url('https://gateway.watsonplatform.net/language-translator/api')
10+
language_translator.set_service_url('https://api.us-south.language-translator.watson.cloud.ibm.com')
1111

1212
## Translate
1313
translation = language_translator.translate(

examples/natural_language_classifier_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
authenticator = IAMAuthenticator('your_api_key')
88
service = NaturalLanguageClassifierV1(authenticator=authenticator)
9-
service.set_service_url('https://gateway.watsonplatform.net/natural-language-classifier/api')
9+
service.set_service_url('https://api.us-south.natural-language-classifier.watson.cloud.ibm.com')
1010

1111
classifiers = service.list_classifiers().get_result()
1212
print(json.dumps(classifiers, indent=2))

examples/natural_language_understanding_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# Authentication via external config like VCAP_SERVICES
1414
service = NaturalLanguageUnderstandingV1(
1515
version='2018-03-16')
16-
service.set_service_url('https://gateway.watsonplatform.net/natural-language-understanding/api')
16+
service.set_service_url('https://api.us-south.natural-language-understanding.watson.cloud.ibm.com')
1717

1818
response = service.analyze(
1919
text='Bruce Banner is the Hulk and Bruce Wayne is BATMAN! '

examples/speaker_text_to_speech.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
authenticator = IAMAuthenticator('your_api_key')
1414
service = TextToSpeechV1(authenticator=authenticator)
15-
service.set_service_url('https://stream.watsonplatform.net/speech-to-text/api')
15+
service.set_service_url('https://api.us-south.speech-to-text.watson.cloud.ibm.com')
1616

1717
class Play(object):
1818
"""

examples/speech_to_text_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
authenticator = IAMAuthenticator('your_api_key')
99
service = SpeechToTextV1(authenticator=authenticator)
10-
service.set_service_url('https://stream.watsonplatform.net/speech-to-text/api')
10+
service.set_service_url('https://api.us-south.speech-to-text.watson.cloud.ibm.com')
1111

1212
models = service.list_models().get_result()
1313
print(json.dumps(models, indent=2))

examples/text_to_speech_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
authenticator = IAMAuthenticator('your_api_key')
99
service = TextToSpeechV1(authenticator=authenticator)
10-
service.set_service_url('https://stream.watsonplatform.net/text-to-speech/api')
10+
service.set_service_url('https://api.us-south.text-to-speech.watson.cloud.ibm.com')
1111

1212
voices = service.list_voices().get_result()
1313
print(json.dumps(voices, indent=2))

0 commit comments

Comments
 (0)