You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -137,7 +137,7 @@ Requests can be sent asynchronously. There are two asynchronous methods availabl
137
137
138
138
When `await` is used, the request is made synchronously.
139
139
```ruby
140
-
speech_to_text =WatsonAPIs::SpeechToTextV1.new(
140
+
speech_to_text =IBMWatson::SpeechToTextV1.new(
141
141
username:"username",
142
142
password:"password"
143
143
)
@@ -151,7 +151,7 @@ output = future.value # The response is accessible at future.value
151
151
152
152
When `async` is used, the request is made asynchronously
153
153
```ruby
154
-
speech_to_text =WatsonAPIs::SpeechToTextV1.new(
154
+
speech_to_text =IBMWatson::SpeechToTextV1.new(
155
155
username:"username",
156
156
password:"password"
157
157
)
@@ -168,8 +168,8 @@ output = future.value
168
168
## Sending request headers
169
169
Custom headers can be passed in any request in the form of a `Hash` as a parameter to the `headers` chainable method. For example, to send a header called `Custom-Header` to a call in Watson Assistant, pass the headers as a parameter to the `headers` chainable method:
170
170
```ruby
171
-
require"watson_apis"
172
-
includeWatsonAPIs
171
+
require"ibm_watson"
172
+
includeIBMWatson
173
173
174
174
assistant =AssistantV1.new(
175
175
username:"xxx",
@@ -185,8 +185,8 @@ response = assistant.headers(
185
185
## Parsing HTTP response info
186
186
HTTP requests all return `DetailedResponse` objects that have a `body`, `status`, and `headers`
187
187
```ruby
188
-
require"watson_apis"
189
-
includeWatsonAPIs
188
+
require"ibm_watson"
189
+
includeIBMWatson
190
190
191
191
assistant =AssistantV1.new(
192
192
username:"xxx",
@@ -215,11 +215,11 @@ Body: <response returned by service>
215
215
The Speech-to-Text service supports websockets with the `recognize-with-websockets` method. The method accepts a custom callback class. The `eventmachine` loop that the websocket uses blocks the main thread by default. Here is an example of using the websockets method:
0 commit comments