ibm_watson 0.16.1 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +34 -12
- data/lib/ibm_watson/assistant_v1.rb +745 -720
- data/lib/ibm_watson/assistant_v2.rb +23 -19
- data/lib/ibm_watson/compare_comply_v1.rb +94 -89
- data/lib/ibm_watson/discovery_v1.rb +684 -687
- data/lib/ibm_watson/language_translator_v3.rb +234 -33
- data/lib/ibm_watson/natural_language_classifier_v1.rb +33 -29
- data/lib/ibm_watson/natural_language_understanding_v1.rb +33 -29
- data/lib/ibm_watson/personality_insights_v3.rb +18 -14
- data/lib/ibm_watson/speech_to_text_v1.rb +799 -725
- data/lib/ibm_watson/text_to_speech_v1.rb +201 -196
- data/lib/ibm_watson/tone_analyzer_v3.rb +15 -11
- data/lib/ibm_watson/version.rb +1 -1
- data/lib/ibm_watson/visual_recognition_v3.rb +52 -48
- data/test/integration/test_language_translator_v3.rb +37 -1
- data/test/unit/test_language_translator_v3.rb +201 -16
- data/test/unit/test_speech_to_text_v1.rb +2 -2
- metadata +5 -5
@@ -26,9 +26,9 @@
|
|
26
26
|
# is timestamped, can report temporal behavior.
|
27
27
|
# * For information about the meaning of the models that the service uses to describe
|
28
28
|
# personality characteristics, see [Personality
|
29
|
-
# models](https://cloud.ibm.com/docs/services/personality-insights
|
29
|
+
# models](https://cloud.ibm.com/docs/services/personality-insights?topic=personality-insights-models#models).
|
30
30
|
# * For information about the meaning of the consumption preferences, see [Consumption
|
31
|
-
# preferences](https://cloud.ibm.com/docs/services/personality-insights
|
31
|
+
# preferences](https://cloud.ibm.com/docs/services/personality-insights?topic=personality-insights-preferences#preferences).
|
32
32
|
#
|
33
33
|
#
|
34
34
|
# **Note:** Request logging is disabled for the Personality Insights service. Regardless
|
@@ -64,16 +64,16 @@ module IBMWatson
|
|
64
64
|
# ready for a later version.
|
65
65
|
# @option args url [String] The base url to use when contacting the service (e.g.
|
66
66
|
# "https://gateway.watsonplatform.net/personality-insights/api").
|
67
|
-
# The base url may differ between
|
67
|
+
# The base url may differ between IBM Cloud regions.
|
68
68
|
# @option args username [String] The username used to authenticate with the service.
|
69
69
|
# Username and password credentials are only required to run your
|
70
|
-
# application locally or outside of
|
71
|
-
#
|
70
|
+
# application locally or outside of IBM Cloud. When running on
|
71
|
+
# IBM Cloud, the credentials will be automatically loaded from the
|
72
72
|
# `VCAP_SERVICES` environment variable.
|
73
73
|
# @option args password [String] The password used to authenticate with the service.
|
74
74
|
# Username and password credentials are only required to run your
|
75
|
-
# application locally or outside of
|
76
|
-
#
|
75
|
+
# application locally or outside of IBM Cloud. When running on
|
76
|
+
# IBM Cloud, the credentials will be automatically loaded from the
|
77
77
|
# `VCAP_SERVICES` environment variable.
|
78
78
|
# @option args iam_apikey [String] An API key that can be used to request IAM tokens. If
|
79
79
|
# this API key is provided, the SDK will manage the token and handle the
|
@@ -83,7 +83,9 @@ module IBMWatson
|
|
83
83
|
# it expires or reactively upon receiving a 401 from the service as any requests
|
84
84
|
# made with an expired token will fail.
|
85
85
|
# @option args iam_url [String] An optional URL for the IAM service API. Defaults to
|
86
|
-
# 'https://iam.
|
86
|
+
# 'https://iam.cloud.ibm.com/identity/token'.
|
87
|
+
# @option args iam_client_id [String] An optional client id for the IAM service API.
|
88
|
+
# @option args iam_client_secret [String] An optional client secret for the IAM service API.
|
87
89
|
def initialize(args = {})
|
88
90
|
@__async_initialized__ = false
|
89
91
|
defaults = {}
|
@@ -94,6 +96,8 @@ module IBMWatson
|
|
94
96
|
defaults[:iam_apikey] = nil
|
95
97
|
defaults[:iam_access_token] = nil
|
96
98
|
defaults[:iam_url] = nil
|
99
|
+
defaults[:iam_client_id] = nil
|
100
|
+
defaults[:iam_client_secret] = nil
|
97
101
|
args = defaults.merge(args)
|
98
102
|
args[:vcap_services_name] = "personality_insights"
|
99
103
|
super
|
@@ -116,9 +120,9 @@ module IBMWatson
|
|
116
120
|
#
|
117
121
|
# **See also:**
|
118
122
|
# * [Requesting a
|
119
|
-
# profile](https://cloud.ibm.com/docs/services/personality-insights
|
123
|
+
# profile](https://cloud.ibm.com/docs/services/personality-insights?topic=personality-insights-input#input)
|
120
124
|
# * [Providing sufficient
|
121
|
-
# input](https://cloud.ibm.com/docs/services/personality-insights
|
125
|
+
# input](https://cloud.ibm.com/docs/services/personality-insights?topic=personality-insights-input#sufficient)
|
122
126
|
#
|
123
127
|
#
|
124
128
|
# ### Content types
|
@@ -136,7 +140,7 @@ module IBMWatson
|
|
136
140
|
# `Content-Type: text/plain;charset=utf-8`.
|
137
141
|
#
|
138
142
|
# **See also:** [Specifying request and response
|
139
|
-
# formats](https://cloud.ibm.com/docs/services/personality-insights
|
143
|
+
# formats](https://cloud.ibm.com/docs/services/personality-insights?topic=personality-insights-input#formats)
|
140
144
|
#
|
141
145
|
#
|
142
146
|
# ### Accept types
|
@@ -148,12 +152,12 @@ module IBMWatson
|
|
148
152
|
#
|
149
153
|
# **See also:**
|
150
154
|
# * [Understanding a JSON
|
151
|
-
# profile](https://cloud.ibm.com/docs/services/personality-insights
|
155
|
+
# profile](https://cloud.ibm.com/docs/services/personality-insights?topic=personality-insights-output#output)
|
152
156
|
# * [Understanding a CSV
|
153
|
-
# profile](https://cloud.ibm.com/docs/services/personality-insights
|
157
|
+
# profile](https://cloud.ibm.com/docs/services/personality-insights?topic=personality-insights-outputCSV#outputCSV).
|
154
158
|
# @param content [Content] A maximum of 20 MB of content to analyze, though the service requires much less
|
155
159
|
# text; for more information, see [Providing sufficient
|
156
|
-
# input](https://cloud.ibm.com/docs/services/personality-insights
|
160
|
+
# input](https://cloud.ibm.com/docs/services/personality-insights?topic=personality-insights-input#sufficient).
|
157
161
|
# For JSON input, provide an object of type `Content`.
|
158
162
|
# @param accept [String] The type of the response. For more information, see **Accept types** in the method
|
159
163
|
# description.
|