Skip to content

Commit 56ae5eb

Browse files
committed
chore(readme): Update readme with latest version dates and url
1 parent 11e5178 commit 56ae5eb

1 file changed

Lines changed: 18 additions & 12 deletions

File tree

README.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -107,40 +107,42 @@ You supply either an IAM service **API key** or an **access token**:
107107

108108
```python
109109
# In the constructor, letting the SDK manage the IAM token
110-
discovery = DiscoveryV1(version='2017-10-16',
110+
discovery = DiscoveryV1(version='2018-08-01',
111+
url='<url_as_per_region>',
111112
iam_apikey='<iam_apikey>',
112113
iam_url='<iam_url>') # optional - the default value is https://iam.bluemix.net/identity/token
113114
```
114115

115116
```python
116117
# after instantiation, letting the SDK manage the IAM token
117-
discovery = DiscoveryV1(version='2017-10-16')
118+
discovery = DiscoveryV1(version='2018-08-01', url='<url_as_per_region>')
118119
discovery.set_iam_apikey('<iam_apikey>')
119120
```
120121

121122
#### Supplying the access token
122123
```python
123124
# in the constructor, assuming control of managing IAM token
124-
discovery = DiscoveryV1(version='2017-10-16',
125+
discovery = DiscoveryV1(version='2018-08-01',
126+
url='<url_as_per_region>',
125127
iam_access_token='<iam_access_token>')
126128
```
127129

128130
```python
129131
# after instantiation, assuming control of managing IAM token
130-
discovery = DiscoveryV1(version='2017-10-16')
132+
discovery = DiscoveryV1(version='2018-08-01', url='<url_as_per_region>')
131133
discovery.set_iam_access_token('<access_token>')
132134
```
133135

134136
### Username and password
135137
```python
136138
from watson_developer_cloud import DiscoveryV1
137139
# In the constructor
138-
discovery = DiscoveryV1(version='2017-10-16', username='<username>', password='<password>')
140+
discovery = DiscoveryV1(version='2018-08-01', url='<url_as_per_region>', username='<username>', password='<password>')
139141
```
140142

141143
```python
142144
# After instantiation
143-
discovery = DiscoveryV1(version='2017-10-16')
145+
discovery = DiscoveryV1(version='2018-08-01', url='<url_as_per_region>')
144146
discovery.set_username_and_password('<username>', '<password>')
145147
```
146148

@@ -151,12 +153,12 @@ discovery.set_username_and_password('<username>', '<password>')
151153
```python
152154
from watson_developer_cloud import VisualRecognitionV3
153155
# In the constructor
154-
visual_recognition = VisualRecognitionV3(version='2018-05-22', api_key='<api_key>')
156+
visual_recognition = VisualRecognitionV3(version='2018-03-19', url='<url_as_per_region>', api_key='<api_key>')
155157
```
156158

157159
```python
158160
# After instantiation
159-
visual_recognition = VisualRecognitionV3(version='2018-05-22')
161+
visual_recognition = VisualRecognitionV3(version='2018-03-19')
160162
visual_recognition.set_api_key('<api_key>')
161163
```
162164

@@ -175,7 +177,8 @@ from watson_developer_cloud import AssistantV1
175177
assistant = AssistantV1(
176178
username='xxx',
177179
password='yyy',
178-
version='2017-04-21')
180+
url='<url_as_per_region>',
181+
version='2018-07-10')
179182

180183
response = assistant.list_workspaces(headers={'Custom-Header': 'custom_value'})
181184
print(response.get_result())
@@ -196,7 +199,8 @@ from watson_developer_cloud import AssistantV1
196199
assistant = AssistantV1(
197200
username='xxx',
198201
password='yyy',
199-
version='2017-04-21')
202+
url='<url_as_per_region>',
203+
version='2018-07-10')
200204

201205
assistant.set_http_config({'timeout': 100})
202206
response = assistant.message(workspace_id=workspace_id, input={
@@ -226,7 +230,8 @@ from watson_developer_cloud import AssistantV1
226230
assistant = AssistantV1(
227231
username='xxx',
228232
password='yyy',
229-
version='2017-04-21')
233+
url='<url_as_per_region>',
234+
version='2018-07-10')
230235

231236
response = assistant.list_workspaces(headers={'Custom-Header': 'custom_value'}).get_result()
232237
```
@@ -239,7 +244,8 @@ from watson_developer_cloud import AssistantV1
239244
assistant = AssistantV1(
240245
username='xxx',
241246
password='yyy',
242-
version='2017-04-21')
247+
url='<url_as_per_region>',
248+
version='2018-07-10')
243249

244250
assistant.set_detailed_response(True)
245251
response = assistant.list_workspaces(headers={'Custom-Header': 'custom_value'}).get_result()

0 commit comments

Comments
 (0)