ibm_watson 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ibm_watson/assistant_v1.rb +84 -85
- data/lib/ibm_watson/assistant_v2.rb +8 -9
- data/lib/ibm_watson/common.rb +1 -1
- data/lib/ibm_watson/compare_comply_v1.rb +27 -28
- data/lib/ibm_watson/discovery_v1.rb +124 -125
- data/lib/ibm_watson/language_translator_v3.rb +17 -18
- data/lib/ibm_watson/natural_language_classifier_v1.rb +14 -15
- data/lib/ibm_watson/natural_language_understanding_v1.rb +9 -10
- data/lib/ibm_watson/personality_insights_v3.rb +5 -6
- data/lib/ibm_watson/speech_to_text_v1.rb +68 -69
- data/lib/ibm_watson/text_to_speech_v1.rb +27 -28
- data/lib/ibm_watson/tone_analyzer_v3.rb +7 -8
- data/lib/ibm_watson/version.rb +1 -1
- data/lib/ibm_watson/visual_recognition_v3.rb +24 -23
- data/test/integration/test_iam_assistant_v1.rb +1 -1
- data/test/integration/test_speech_to_text_v1.rb +1 -1
- data/test/unit/test_assistant_v1.rb +2 -2
- data/test/unit/test_configure_http_client.rb +1 -1
- data/test/unit/test_personality_insights_v3.rb +4 -4
- data/test/unit/test_tone_analyzer_v3.rb +4 -5
- data/test/unit/test_vcap_using_personality_insights.rb +4 -4
- metadata +16 -7
- data/lib/ibm_watson/detailed_response.rb +0 -21
- data/lib/ibm_watson/iam_token_manager.rb +0 -152
- data/lib/ibm_watson/watson_api_exception.rb +0 -41
- data/lib/ibm_watson/watson_service.rb +0 -285
- data/test/unit/test_iam_token_manager.rb +0 -175
@@ -23,16 +23,15 @@
|
|
23
23
|
require "concurrent"
|
24
24
|
require "erb"
|
25
25
|
require "json"
|
26
|
-
require_relative "./detailed_response"
|
27
|
-
require_relative "./common.rb"
|
28
26
|
|
29
|
-
|
27
|
+
require "ibm_cloud_sdk_core"
|
28
|
+
require_relative "./common.rb"
|
30
29
|
|
31
30
|
# Module for the Watson APIs
|
32
31
|
module IBMWatson
|
33
32
|
##
|
34
33
|
# The Discovery V1 service.
|
35
|
-
class DiscoveryV1 <
|
34
|
+
class DiscoveryV1 < IBMCloudSdkCore::BaseService
|
36
35
|
include Concurrent::Async
|
37
36
|
##
|
38
37
|
# @!method initialize(args)
|
@@ -104,13 +103,13 @@ module IBMWatson
|
|
104
103
|
# @param description [String] Description of the environment.
|
105
104
|
# @param size [String] Size of the environment. In the Lite plan the default and only accepted value is
|
106
105
|
# `LT`, in all other plans the default is `S`.
|
107
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
106
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
108
107
|
def create_environment(name:, description: nil, size: nil)
|
109
108
|
raise ArgumentError.new("name must be provided") if name.nil?
|
110
109
|
|
111
110
|
headers = {
|
112
111
|
}
|
113
|
-
headers = Common.new.
|
112
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "create_environment")
|
114
113
|
|
115
114
|
params = {
|
116
115
|
"version" => @version
|
@@ -140,11 +139,11 @@ module IBMWatson
|
|
140
139
|
# List environments.
|
141
140
|
# List existing environments for the service instance.
|
142
141
|
# @param name [String] Show only the environment with the given name.
|
143
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
142
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
144
143
|
def list_environments(name: nil)
|
145
144
|
headers = {
|
146
145
|
}
|
147
|
-
headers = Common.new.
|
146
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "list_environments")
|
148
147
|
|
149
148
|
params = {
|
150
149
|
"version" => @version,
|
@@ -167,13 +166,13 @@ module IBMWatson
|
|
167
166
|
# @!method get_environment(environment_id:)
|
168
167
|
# Get environment info.
|
169
168
|
# @param environment_id [String] The ID of the environment.
|
170
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
169
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
171
170
|
def get_environment(environment_id:)
|
172
171
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
173
172
|
|
174
173
|
headers = {
|
175
174
|
}
|
176
|
-
headers = Common.new.
|
175
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_environment")
|
177
176
|
|
178
177
|
params = {
|
179
178
|
"version" => @version
|
@@ -202,13 +201,13 @@ module IBMWatson
|
|
202
201
|
# @param size [String] Size that the environment should be increased to. Environment size cannot be
|
203
202
|
# modified when using a Lite plan. Environment size can only increased and not
|
204
203
|
# decreased.
|
205
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
204
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
206
205
|
def update_environment(environment_id:, name: nil, description: nil, size: nil)
|
207
206
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
208
207
|
|
209
208
|
headers = {
|
210
209
|
}
|
211
|
-
headers = Common.new.
|
210
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "update_environment")
|
212
211
|
|
213
212
|
params = {
|
214
213
|
"version" => @version
|
@@ -237,13 +236,13 @@ module IBMWatson
|
|
237
236
|
# @!method delete_environment(environment_id:)
|
238
237
|
# Delete environment.
|
239
238
|
# @param environment_id [String] The ID of the environment.
|
240
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
239
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
241
240
|
def delete_environment(environment_id:)
|
242
241
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
243
242
|
|
244
243
|
headers = {
|
245
244
|
}
|
246
|
-
headers = Common.new.
|
245
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_environment")
|
247
246
|
|
248
247
|
params = {
|
249
248
|
"version" => @version
|
@@ -268,7 +267,7 @@ module IBMWatson
|
|
268
267
|
# specified collections.
|
269
268
|
# @param environment_id [String] The ID of the environment.
|
270
269
|
# @param collection_ids [Array[String]] A comma-separated list of collection IDs to be queried against.
|
271
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
270
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
272
271
|
def list_fields(environment_id:, collection_ids:)
|
273
272
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
274
273
|
|
@@ -276,7 +275,7 @@ module IBMWatson
|
|
276
275
|
|
277
276
|
headers = {
|
278
277
|
}
|
279
|
-
headers = Common.new.
|
278
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "list_fields")
|
280
279
|
|
281
280
|
params = {
|
282
281
|
"version" => @version,
|
@@ -322,7 +321,7 @@ module IBMWatson
|
|
322
321
|
# normalized form. Operations are executed in the order that they appear in the
|
323
322
|
# array.
|
324
323
|
# @param source [Source] Object containing source parameters for the configuration.
|
325
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
324
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
326
325
|
def create_configuration(environment_id:, name:, description: nil, conversions: nil, enrichments: nil, normalizations: nil, source: nil)
|
327
326
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
328
327
|
|
@@ -330,7 +329,7 @@ module IBMWatson
|
|
330
329
|
|
331
330
|
headers = {
|
332
331
|
}
|
333
|
-
headers = Common.new.
|
332
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "create_configuration")
|
334
333
|
|
335
334
|
params = {
|
336
335
|
"version" => @version
|
@@ -364,13 +363,13 @@ module IBMWatson
|
|
364
363
|
# Lists existing configurations for the service instance.
|
365
364
|
# @param environment_id [String] The ID of the environment.
|
366
365
|
# @param name [String] Find configurations with the given name.
|
367
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
366
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
368
367
|
def list_configurations(environment_id:, name: nil)
|
369
368
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
370
369
|
|
371
370
|
headers = {
|
372
371
|
}
|
373
|
-
headers = Common.new.
|
372
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "list_configurations")
|
374
373
|
|
375
374
|
params = {
|
376
375
|
"version" => @version,
|
@@ -394,7 +393,7 @@ module IBMWatson
|
|
394
393
|
# Get configuration details.
|
395
394
|
# @param environment_id [String] The ID of the environment.
|
396
395
|
# @param configuration_id [String] The ID of the configuration.
|
397
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
396
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
398
397
|
def get_configuration(environment_id:, configuration_id:)
|
399
398
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
400
399
|
|
@@ -402,7 +401,7 @@ module IBMWatson
|
|
402
401
|
|
403
402
|
headers = {
|
404
403
|
}
|
405
|
-
headers = Common.new.
|
404
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_configuration")
|
406
405
|
|
407
406
|
params = {
|
408
407
|
"version" => @version
|
@@ -442,7 +441,7 @@ module IBMWatson
|
|
442
441
|
# normalized form. Operations are executed in the order that they appear in the
|
443
442
|
# array.
|
444
443
|
# @param source [Source] Object containing source parameters for the configuration.
|
445
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
444
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
446
445
|
def update_configuration(environment_id:, configuration_id:, name:, description: nil, conversions: nil, enrichments: nil, normalizations: nil, source: nil)
|
447
446
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
448
447
|
|
@@ -452,7 +451,7 @@ module IBMWatson
|
|
452
451
|
|
453
452
|
headers = {
|
454
453
|
}
|
455
|
-
headers = Common.new.
|
454
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "update_configuration")
|
456
455
|
|
457
456
|
params = {
|
458
457
|
"version" => @version
|
@@ -491,7 +490,7 @@ module IBMWatson
|
|
491
490
|
# submitted.
|
492
491
|
# @param environment_id [String] The ID of the environment.
|
493
492
|
# @param configuration_id [String] The ID of the configuration.
|
494
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
493
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
495
494
|
def delete_configuration(environment_id:, configuration_id:)
|
496
495
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
497
496
|
|
@@ -499,7 +498,7 @@ module IBMWatson
|
|
499
498
|
|
500
499
|
headers = {
|
501
500
|
}
|
502
|
-
headers = Common.new.
|
501
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_configuration")
|
503
502
|
|
504
503
|
params = {
|
505
504
|
"version" => @version
|
@@ -552,13 +551,13 @@ module IBMWatson
|
|
552
551
|
# } ```.
|
553
552
|
# @param file_content_type [String] The content type of file.
|
554
553
|
# @param filename [String] The filename for file.
|
555
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
554
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
556
555
|
def test_configuration_in_environment(environment_id:, configuration: nil, step: nil, configuration_id: nil, file: nil, metadata: nil, file_content_type: nil, filename: nil)
|
557
556
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
558
557
|
|
559
558
|
headers = {
|
560
559
|
}
|
561
|
-
headers = Common.new.
|
560
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "test_configuration_in_environment")
|
562
561
|
|
563
562
|
params = {
|
564
563
|
"version" => @version,
|
@@ -605,7 +604,7 @@ module IBMWatson
|
|
605
604
|
# @param configuration_id [String] The ID of the configuration in which the collection is to be created.
|
606
605
|
# @param language [String] The language of the documents stored in the collection, in the form of an ISO
|
607
606
|
# 639-1 language code.
|
608
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
607
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
609
608
|
def create_collection(environment_id:, name:, description: nil, configuration_id: nil, language: nil)
|
610
609
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
611
610
|
|
@@ -613,7 +612,7 @@ module IBMWatson
|
|
613
612
|
|
614
613
|
headers = {
|
615
614
|
}
|
616
|
-
headers = Common.new.
|
615
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "create_collection")
|
617
616
|
|
618
617
|
params = {
|
619
618
|
"version" => @version
|
@@ -645,13 +644,13 @@ module IBMWatson
|
|
645
644
|
# Lists existing collections for the service instance.
|
646
645
|
# @param environment_id [String] The ID of the environment.
|
647
646
|
# @param name [String] Find collections with the given name.
|
648
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
647
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
649
648
|
def list_collections(environment_id:, name: nil)
|
650
649
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
651
650
|
|
652
651
|
headers = {
|
653
652
|
}
|
654
|
-
headers = Common.new.
|
653
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "list_collections")
|
655
654
|
|
656
655
|
params = {
|
657
656
|
"version" => @version,
|
@@ -675,7 +674,7 @@ module IBMWatson
|
|
675
674
|
# Get collection details.
|
676
675
|
# @param environment_id [String] The ID of the environment.
|
677
676
|
# @param collection_id [String] The ID of the collection.
|
678
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
677
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
679
678
|
def get_collection(environment_id:, collection_id:)
|
680
679
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
681
680
|
|
@@ -683,7 +682,7 @@ module IBMWatson
|
|
683
682
|
|
684
683
|
headers = {
|
685
684
|
}
|
686
|
-
headers = Common.new.
|
685
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_collection")
|
687
686
|
|
688
687
|
params = {
|
689
688
|
"version" => @version
|
@@ -709,7 +708,7 @@ module IBMWatson
|
|
709
708
|
# @param name [String] The name of the collection.
|
710
709
|
# @param description [String] A description of the collection.
|
711
710
|
# @param configuration_id [String] The ID of the configuration in which the collection is to be updated.
|
712
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
711
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
713
712
|
def update_collection(environment_id:, collection_id:, name:, description: nil, configuration_id: nil)
|
714
713
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
715
714
|
|
@@ -717,7 +716,7 @@ module IBMWatson
|
|
717
716
|
|
718
717
|
headers = {
|
719
718
|
}
|
720
|
-
headers = Common.new.
|
719
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "update_collection")
|
721
720
|
|
722
721
|
params = {
|
723
722
|
"version" => @version
|
@@ -747,7 +746,7 @@ module IBMWatson
|
|
747
746
|
# Delete a collection.
|
748
747
|
# @param environment_id [String] The ID of the environment.
|
749
748
|
# @param collection_id [String] The ID of the collection.
|
750
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
749
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
751
750
|
def delete_collection(environment_id:, collection_id:)
|
752
751
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
753
752
|
|
@@ -755,7 +754,7 @@ module IBMWatson
|
|
755
754
|
|
756
755
|
headers = {
|
757
756
|
}
|
758
|
-
headers = Common.new.
|
757
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_collection")
|
759
758
|
|
760
759
|
params = {
|
761
760
|
"version" => @version
|
@@ -779,7 +778,7 @@ module IBMWatson
|
|
779
778
|
# Gets a list of the unique fields (and their types) stored in the index.
|
780
779
|
# @param environment_id [String] The ID of the environment.
|
781
780
|
# @param collection_id [String] The ID of the collection.
|
782
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
781
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
783
782
|
def list_collection_fields(environment_id:, collection_id:)
|
784
783
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
785
784
|
|
@@ -787,7 +786,7 @@ module IBMWatson
|
|
787
786
|
|
788
787
|
headers = {
|
789
788
|
}
|
790
|
-
headers = Common.new.
|
789
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "list_collection_fields")
|
791
790
|
|
792
791
|
params = {
|
793
792
|
"version" => @version
|
@@ -815,7 +814,7 @@ module IBMWatson
|
|
815
814
|
# list is not specified, an object with empty expansion arrays is returned.
|
816
815
|
# @param environment_id [String] The ID of the environment.
|
817
816
|
# @param collection_id [String] The ID of the collection.
|
818
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
817
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
819
818
|
def list_expansions(environment_id:, collection_id:)
|
820
819
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
821
820
|
|
@@ -823,7 +822,7 @@ module IBMWatson
|
|
823
822
|
|
824
823
|
headers = {
|
825
824
|
}
|
826
|
-
headers = Common.new.
|
825
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "list_expansions")
|
827
826
|
|
828
827
|
params = {
|
829
828
|
"version" => @version
|
@@ -865,7 +864,7 @@ module IBMWatson
|
|
865
864
|
# and an array of **expanded_terms**. When items in the **input_terms** array are
|
866
865
|
# present in a query, they are expanded using the items listed in the
|
867
866
|
# **expanded_terms** array.
|
868
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
867
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
869
868
|
def create_expansions(environment_id:, collection_id:, expansions:)
|
870
869
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
871
870
|
|
@@ -875,7 +874,7 @@ module IBMWatson
|
|
875
874
|
|
876
875
|
headers = {
|
877
876
|
}
|
878
|
-
headers = Common.new.
|
877
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "create_expansions")
|
879
878
|
|
880
879
|
params = {
|
881
880
|
"version" => @version
|
@@ -913,7 +912,7 @@ module IBMWatson
|
|
913
912
|
|
914
913
|
headers = {
|
915
914
|
}
|
916
|
-
headers = Common.new.
|
915
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_expansions")
|
917
916
|
|
918
917
|
params = {
|
919
918
|
"version" => @version
|
@@ -938,7 +937,7 @@ module IBMWatson
|
|
938
937
|
# collection.
|
939
938
|
# @param environment_id [String] The ID of the environment.
|
940
939
|
# @param collection_id [String] The ID of the collection.
|
941
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
940
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
942
941
|
def get_tokenization_dictionary_status(environment_id:, collection_id:)
|
943
942
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
944
943
|
|
@@ -946,7 +945,7 @@ module IBMWatson
|
|
946
945
|
|
947
946
|
headers = {
|
948
947
|
}
|
949
|
-
headers = Common.new.
|
948
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_tokenization_dictionary_status")
|
950
949
|
|
951
950
|
params = {
|
952
951
|
"version" => @version
|
@@ -973,7 +972,7 @@ module IBMWatson
|
|
973
972
|
# @param tokenization_rules [Array[TokenDictRule]] An array of tokenization rules. Each rule contains, the original `text` string,
|
974
973
|
# component `tokens`, any alternate character set `readings`, and which
|
975
974
|
# `part_of_speech` the text is from.
|
976
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
975
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
977
976
|
def create_tokenization_dictionary(environment_id:, collection_id:, tokenization_rules: nil)
|
978
977
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
979
978
|
|
@@ -981,7 +980,7 @@ module IBMWatson
|
|
981
980
|
|
982
981
|
headers = {
|
983
982
|
}
|
984
|
-
headers = Common.new.
|
983
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "create_tokenization_dictionary")
|
985
984
|
|
986
985
|
params = {
|
987
986
|
"version" => @version
|
@@ -1018,7 +1017,7 @@ module IBMWatson
|
|
1018
1017
|
|
1019
1018
|
headers = {
|
1020
1019
|
}
|
1021
|
-
headers = Common.new.
|
1020
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_tokenization_dictionary")
|
1022
1021
|
|
1023
1022
|
params = {
|
1024
1023
|
"version" => @version
|
@@ -1042,7 +1041,7 @@ module IBMWatson
|
|
1042
1041
|
# Returns the current status of the stopword list for the specified collection.
|
1043
1042
|
# @param environment_id [String] The ID of the environment.
|
1044
1043
|
# @param collection_id [String] The ID of the collection.
|
1045
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
1044
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1046
1045
|
def get_stopword_list_status(environment_id:, collection_id:)
|
1047
1046
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
1048
1047
|
|
@@ -1050,7 +1049,7 @@ module IBMWatson
|
|
1050
1049
|
|
1051
1050
|
headers = {
|
1052
1051
|
}
|
1053
|
-
headers = Common.new.
|
1052
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_stopword_list_status")
|
1054
1053
|
|
1055
1054
|
params = {
|
1056
1055
|
"version" => @version
|
@@ -1076,7 +1075,7 @@ module IBMWatson
|
|
1076
1075
|
# @param collection_id [String] The ID of the collection.
|
1077
1076
|
# @param stopword_file [File] The content of the stopword list to ingest.
|
1078
1077
|
# @param stopword_filename [String] The filename for stopword_file.
|
1079
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
1078
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1080
1079
|
def create_stopword_list(environment_id:, collection_id:, stopword_file:, stopword_filename: nil)
|
1081
1080
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
1082
1081
|
|
@@ -1086,7 +1085,7 @@ module IBMWatson
|
|
1086
1085
|
|
1087
1086
|
headers = {
|
1088
1087
|
}
|
1089
|
-
headers = Common.new.
|
1088
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "create_stopword_list")
|
1090
1089
|
|
1091
1090
|
params = {
|
1092
1091
|
"version" => @version
|
@@ -1128,7 +1127,7 @@ module IBMWatson
|
|
1128
1127
|
|
1129
1128
|
headers = {
|
1130
1129
|
}
|
1131
|
-
headers = Common.new.
|
1130
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_stopword_list")
|
1132
1131
|
|
1133
1132
|
params = {
|
1134
1133
|
"version" => @version
|
@@ -1190,7 +1189,7 @@ module IBMWatson
|
|
1190
1189
|
# } ```.
|
1191
1190
|
# @param file_content_type [String] The content type of file.
|
1192
1191
|
# @param filename [String] The filename for file.
|
1193
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
1192
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1194
1193
|
def add_document(environment_id:, collection_id:, file: nil, metadata: nil, file_content_type: nil, filename: nil)
|
1195
1194
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
1196
1195
|
|
@@ -1198,7 +1197,7 @@ module IBMWatson
|
|
1198
1197
|
|
1199
1198
|
headers = {
|
1200
1199
|
}
|
1201
|
-
headers = Common.new.
|
1200
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "add_document")
|
1202
1201
|
|
1203
1202
|
params = {
|
1204
1203
|
"version" => @version
|
@@ -1239,7 +1238,7 @@ module IBMWatson
|
|
1239
1238
|
# @param environment_id [String] The ID of the environment.
|
1240
1239
|
# @param collection_id [String] The ID of the collection.
|
1241
1240
|
# @param document_id [String] The ID of the document.
|
1242
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
1241
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1243
1242
|
def get_document_status(environment_id:, collection_id:, document_id:)
|
1244
1243
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
1245
1244
|
|
@@ -1249,7 +1248,7 @@ module IBMWatson
|
|
1249
1248
|
|
1250
1249
|
headers = {
|
1251
1250
|
}
|
1252
|
-
headers = Common.new.
|
1251
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_document_status")
|
1253
1252
|
|
1254
1253
|
params = {
|
1255
1254
|
"version" => @version
|
@@ -1286,7 +1285,7 @@ module IBMWatson
|
|
1286
1285
|
# } ```.
|
1287
1286
|
# @param file_content_type [String] The content type of file.
|
1288
1287
|
# @param filename [String] The filename for file.
|
1289
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
1288
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1290
1289
|
def update_document(environment_id:, collection_id:, document_id:, file: nil, metadata: nil, file_content_type: nil, filename: nil)
|
1291
1290
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
1292
1291
|
|
@@ -1296,7 +1295,7 @@ module IBMWatson
|
|
1296
1295
|
|
1297
1296
|
headers = {
|
1298
1297
|
}
|
1299
|
-
headers = Common.new.
|
1298
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "update_document")
|
1300
1299
|
|
1301
1300
|
params = {
|
1302
1301
|
"version" => @version
|
@@ -1336,7 +1335,7 @@ module IBMWatson
|
|
1336
1335
|
# @param environment_id [String] The ID of the environment.
|
1337
1336
|
# @param collection_id [String] The ID of the collection.
|
1338
1337
|
# @param document_id [String] The ID of the document.
|
1339
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
1338
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1340
1339
|
def delete_document(environment_id:, collection_id:, document_id:)
|
1341
1340
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
1342
1341
|
|
@@ -1346,7 +1345,7 @@ module IBMWatson
|
|
1346
1345
|
|
1347
1346
|
headers = {
|
1348
1347
|
}
|
1349
|
-
headers = Common.new.
|
1348
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_document")
|
1350
1349
|
|
1351
1350
|
params = {
|
1352
1351
|
"version" => @version
|
@@ -1433,7 +1432,7 @@ module IBMWatson
|
|
1433
1432
|
# field values. This parameter cannot be used in the same query as the **sort**
|
1434
1433
|
# parameter.
|
1435
1434
|
# @param logging_opt_out [Boolean] If `true`, queries are not stored in the Discovery **Logs** endpoint.
|
1436
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
1435
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1437
1436
|
def query(environment_id:, collection_id:, filter: nil, query: nil, natural_language_query: nil, passages: nil, aggregation: nil, count: nil, return_fields: nil, offset: nil, sort: nil, highlight: nil, passages_fields: nil, passages_count: nil, passages_characters: nil, deduplicate: nil, deduplicate_field: nil, collection_ids: nil, similar: nil, similar_document_ids: nil, similar_fields: nil, bias: nil, logging_opt_out: nil)
|
1438
1437
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
1439
1438
|
|
@@ -1442,7 +1441,7 @@ module IBMWatson
|
|
1442
1441
|
headers = {
|
1443
1442
|
"X-Watson-Logging-Opt-Out" => logging_opt_out
|
1444
1443
|
}
|
1445
|
-
headers = Common.new.
|
1444
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "query")
|
1446
1445
|
|
1447
1446
|
params = {
|
1448
1447
|
"version" => @version
|
@@ -1537,7 +1536,7 @@ module IBMWatson
|
|
1537
1536
|
# @param similar_fields [Array[String]] A comma-separated list of field names that are used as a basis for comparison to
|
1538
1537
|
# identify similar documents. If not specified, the entire document is used for
|
1539
1538
|
# comparison.
|
1540
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
1539
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1541
1540
|
def query_notices(environment_id:, collection_id:, filter: nil, query: nil, natural_language_query: nil, passages: nil, aggregation: nil, count: nil, return_fields: nil, offset: nil, sort: nil, highlight: nil, passages_fields: nil, passages_count: nil, passages_characters: nil, deduplicate_field: nil, similar: nil, similar_document_ids: nil, similar_fields: nil)
|
1542
1541
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
1543
1542
|
|
@@ -1545,7 +1544,7 @@ module IBMWatson
|
|
1545
1544
|
|
1546
1545
|
headers = {
|
1547
1546
|
}
|
1548
|
-
headers = Common.new.
|
1547
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "query_notices")
|
1549
1548
|
|
1550
1549
|
params = {
|
1551
1550
|
"version" => @version,
|
@@ -1645,14 +1644,14 @@ module IBMWatson
|
|
1645
1644
|
# field values. This parameter cannot be used in the same query as the **sort**
|
1646
1645
|
# parameter.
|
1647
1646
|
# @param logging_opt_out [Boolean] If `true`, queries are not stored in the Discovery **Logs** endpoint.
|
1648
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
1647
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1649
1648
|
def federated_query(environment_id:, filter: nil, query: nil, natural_language_query: nil, passages: nil, aggregation: nil, count: nil, return_fields: nil, offset: nil, sort: nil, highlight: nil, passages_fields: nil, passages_count: nil, passages_characters: nil, deduplicate: nil, deduplicate_field: nil, collection_ids: nil, similar: nil, similar_document_ids: nil, similar_fields: nil, bias: nil, logging_opt_out: nil)
|
1650
1649
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
1651
1650
|
|
1652
1651
|
headers = {
|
1653
1652
|
"X-Watson-Logging-Opt-Out" => logging_opt_out
|
1654
1653
|
}
|
1655
|
-
headers = Common.new.
|
1654
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "federated_query")
|
1656
1655
|
|
1657
1656
|
params = {
|
1658
1657
|
"version" => @version
|
@@ -1741,7 +1740,7 @@ module IBMWatson
|
|
1741
1740
|
# @param similar_fields [Array[String]] A comma-separated list of field names that are used as a basis for comparison to
|
1742
1741
|
# identify similar documents. If not specified, the entire document is used for
|
1743
1742
|
# comparison.
|
1744
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
1743
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1745
1744
|
def federated_query_notices(environment_id:, collection_ids:, filter: nil, query: nil, natural_language_query: nil, aggregation: nil, count: nil, return_fields: nil, offset: nil, sort: nil, highlight: nil, deduplicate_field: nil, similar: nil, similar_document_ids: nil, similar_fields: nil)
|
1746
1745
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
1747
1746
|
|
@@ -1749,7 +1748,7 @@ module IBMWatson
|
|
1749
1748
|
|
1750
1749
|
headers = {
|
1751
1750
|
}
|
1752
|
-
headers = Common.new.
|
1751
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "federated_query_notices")
|
1753
1752
|
|
1754
1753
|
params = {
|
1755
1754
|
"version" => @version,
|
@@ -1798,7 +1797,7 @@ module IBMWatson
|
|
1798
1797
|
# @param count [Fixnum] The number of results to return. The default is `10`. The maximum is `1000`.
|
1799
1798
|
# @param evidence_count [Fixnum] The number of evidence items to return for each result. The default is `0`. The
|
1800
1799
|
# maximum number of evidence items per query is 10,000.
|
1801
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
1800
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1802
1801
|
def query_entities(environment_id:, collection_id:, feature: nil, entity: nil, context: nil, count: nil, evidence_count: nil)
|
1803
1802
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
1804
1803
|
|
@@ -1806,7 +1805,7 @@ module IBMWatson
|
|
1806
1805
|
|
1807
1806
|
headers = {
|
1808
1807
|
}
|
1809
|
-
headers = Common.new.
|
1808
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "query_entities")
|
1810
1809
|
|
1811
1810
|
params = {
|
1812
1811
|
"version" => @version
|
@@ -1853,7 +1852,7 @@ module IBMWatson
|
|
1853
1852
|
# @param count [Fixnum] The number of results to return. The default is `10`. The maximum is `1000`.
|
1854
1853
|
# @param evidence_count [Fixnum] The number of evidence items to return for each result. The default is `0`. The
|
1855
1854
|
# maximum number of evidence items per query is 10,000.
|
1856
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
1855
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1857
1856
|
def query_relations(environment_id:, collection_id:, entities: nil, context: nil, sort: nil, filter: nil, count: nil, evidence_count: nil)
|
1858
1857
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
1859
1858
|
|
@@ -1861,7 +1860,7 @@ module IBMWatson
|
|
1861
1860
|
|
1862
1861
|
headers = {
|
1863
1862
|
}
|
1864
|
-
headers = Common.new.
|
1863
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "query_relations")
|
1865
1864
|
|
1866
1865
|
params = {
|
1867
1866
|
"version" => @version
|
@@ -1898,7 +1897,7 @@ module IBMWatson
|
|
1898
1897
|
# Lists the training data for the specified collection.
|
1899
1898
|
# @param environment_id [String] The ID of the environment.
|
1900
1899
|
# @param collection_id [String] The ID of the collection.
|
1901
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
1900
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1902
1901
|
def list_training_data(environment_id:, collection_id:)
|
1903
1902
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
1904
1903
|
|
@@ -1906,7 +1905,7 @@ module IBMWatson
|
|
1906
1905
|
|
1907
1906
|
headers = {
|
1908
1907
|
}
|
1909
|
-
headers = Common.new.
|
1908
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "list_training_data")
|
1910
1909
|
|
1911
1910
|
params = {
|
1912
1911
|
"version" => @version
|
@@ -1934,7 +1933,7 @@ module IBMWatson
|
|
1934
1933
|
# @param natural_language_query [String]
|
1935
1934
|
# @param filter [String]
|
1936
1935
|
# @param examples [Array[TrainingExample]]
|
1937
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
1936
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1938
1937
|
def add_training_data(environment_id:, collection_id:, natural_language_query: nil, filter: nil, examples: nil)
|
1939
1938
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
1940
1939
|
|
@@ -1942,7 +1941,7 @@ module IBMWatson
|
|
1942
1941
|
|
1943
1942
|
headers = {
|
1944
1943
|
}
|
1945
|
-
headers = Common.new.
|
1944
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "add_training_data")
|
1946
1945
|
|
1947
1946
|
params = {
|
1948
1947
|
"version" => @version
|
@@ -1981,7 +1980,7 @@ module IBMWatson
|
|
1981
1980
|
|
1982
1981
|
headers = {
|
1983
1982
|
}
|
1984
|
-
headers = Common.new.
|
1983
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_all_training_data")
|
1985
1984
|
|
1986
1985
|
params = {
|
1987
1986
|
"version" => @version
|
@@ -2007,7 +2006,7 @@ module IBMWatson
|
|
2007
2006
|
# @param environment_id [String] The ID of the environment.
|
2008
2007
|
# @param collection_id [String] The ID of the collection.
|
2009
2008
|
# @param query_id [String] The ID of the query used for training.
|
2010
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
2009
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2011
2010
|
def get_training_data(environment_id:, collection_id:, query_id:)
|
2012
2011
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
2013
2012
|
|
@@ -2017,7 +2016,7 @@ module IBMWatson
|
|
2017
2016
|
|
2018
2017
|
headers = {
|
2019
2018
|
}
|
2020
|
-
headers = Common.new.
|
2019
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_training_data")
|
2021
2020
|
|
2022
2021
|
params = {
|
2023
2022
|
"version" => @version
|
@@ -2053,7 +2052,7 @@ module IBMWatson
|
|
2053
2052
|
|
2054
2053
|
headers = {
|
2055
2054
|
}
|
2056
|
-
headers = Common.new.
|
2055
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_training_data")
|
2057
2056
|
|
2058
2057
|
params = {
|
2059
2058
|
"version" => @version
|
@@ -2078,7 +2077,7 @@ module IBMWatson
|
|
2078
2077
|
# @param environment_id [String] The ID of the environment.
|
2079
2078
|
# @param collection_id [String] The ID of the collection.
|
2080
2079
|
# @param query_id [String] The ID of the query used for training.
|
2081
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
2080
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2082
2081
|
def list_training_examples(environment_id:, collection_id:, query_id:)
|
2083
2082
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
2084
2083
|
|
@@ -2088,7 +2087,7 @@ module IBMWatson
|
|
2088
2087
|
|
2089
2088
|
headers = {
|
2090
2089
|
}
|
2091
|
-
headers = Common.new.
|
2090
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "list_training_examples")
|
2092
2091
|
|
2093
2092
|
params = {
|
2094
2093
|
"version" => @version
|
@@ -2116,7 +2115,7 @@ module IBMWatson
|
|
2116
2115
|
# @param document_id [String]
|
2117
2116
|
# @param cross_reference [String]
|
2118
2117
|
# @param relevance [Fixnum]
|
2119
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
2118
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2120
2119
|
def create_training_example(environment_id:, collection_id:, query_id:, document_id: nil, cross_reference: nil, relevance: nil)
|
2121
2120
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
2122
2121
|
|
@@ -2126,7 +2125,7 @@ module IBMWatson
|
|
2126
2125
|
|
2127
2126
|
headers = {
|
2128
2127
|
}
|
2129
|
-
headers = Common.new.
|
2128
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "create_training_example")
|
2130
2129
|
|
2131
2130
|
params = {
|
2132
2131
|
"version" => @version
|
@@ -2171,7 +2170,7 @@ module IBMWatson
|
|
2171
2170
|
|
2172
2171
|
headers = {
|
2173
2172
|
}
|
2174
|
-
headers = Common.new.
|
2173
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_training_example")
|
2175
2174
|
|
2176
2175
|
params = {
|
2177
2176
|
"version" => @version
|
@@ -2199,7 +2198,7 @@ module IBMWatson
|
|
2199
2198
|
# @param example_id [String] The ID of the document as it is indexed.
|
2200
2199
|
# @param cross_reference [String]
|
2201
2200
|
# @param relevance [Fixnum]
|
2202
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
2201
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2203
2202
|
def update_training_example(environment_id:, collection_id:, query_id:, example_id:, cross_reference: nil, relevance: nil)
|
2204
2203
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
2205
2204
|
|
@@ -2211,7 +2210,7 @@ module IBMWatson
|
|
2211
2210
|
|
2212
2211
|
headers = {
|
2213
2212
|
}
|
2214
|
-
headers = Common.new.
|
2213
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "update_training_example")
|
2215
2214
|
|
2216
2215
|
params = {
|
2217
2216
|
"version" => @version
|
@@ -2243,7 +2242,7 @@ module IBMWatson
|
|
2243
2242
|
# @param collection_id [String] The ID of the collection.
|
2244
2243
|
# @param query_id [String] The ID of the query used for training.
|
2245
2244
|
# @param example_id [String] The ID of the document as it is indexed.
|
2246
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
2245
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2247
2246
|
def get_training_example(environment_id:, collection_id:, query_id:, example_id:)
|
2248
2247
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
2249
2248
|
|
@@ -2255,7 +2254,7 @@ module IBMWatson
|
|
2255
2254
|
|
2256
2255
|
headers = {
|
2257
2256
|
}
|
2258
|
-
headers = Common.new.
|
2257
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_training_example")
|
2259
2258
|
|
2260
2259
|
params = {
|
2261
2260
|
"version" => @version
|
@@ -2293,7 +2292,7 @@ module IBMWatson
|
|
2293
2292
|
|
2294
2293
|
headers = {
|
2295
2294
|
}
|
2296
|
-
headers = Common.new.
|
2295
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_user_data")
|
2297
2296
|
|
2298
2297
|
params = {
|
2299
2298
|
"version" => @version,
|
@@ -2323,7 +2322,7 @@ module IBMWatson
|
|
2323
2322
|
# were \"clicked\" by a user and when that click occured.
|
2324
2323
|
# @param type [String] The event type to be created.
|
2325
2324
|
# @param data [EventData] Query event data object.
|
2326
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
2325
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2327
2326
|
def create_event(type:, data:)
|
2328
2327
|
raise ArgumentError.new("type must be provided") if type.nil?
|
2329
2328
|
|
@@ -2331,7 +2330,7 @@ module IBMWatson
|
|
2331
2330
|
|
2332
2331
|
headers = {
|
2333
2332
|
}
|
2334
|
-
headers = Common.new.
|
2333
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "create_event")
|
2335
2334
|
|
2336
2335
|
params = {
|
2337
2336
|
"version" => @version
|
@@ -2375,11 +2374,11 @@ module IBMWatson
|
|
2375
2374
|
# @param sort [Array[String]] A comma-separated list of fields in the document to sort on. You can optionally
|
2376
2375
|
# specify a sort direction by prefixing the field with `-` for descending or `+` for
|
2377
2376
|
# ascending. Ascending is the default sort direction if no prefix is specified.
|
2378
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
2377
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2379
2378
|
def query_log(filter: nil, query: nil, count: nil, offset: nil, sort: nil)
|
2380
2379
|
headers = {
|
2381
2380
|
}
|
2382
|
-
headers = Common.new.
|
2381
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "query_log")
|
2383
2382
|
|
2384
2383
|
params = {
|
2385
2384
|
"version" => @version,
|
@@ -2412,11 +2411,11 @@ module IBMWatson
|
|
2412
2411
|
# @param end_time [Time] Metric is computed from data recorded before this timestamp; must be in
|
2413
2412
|
# `YYYY-MM-DDThh:mm:ssZ` format.
|
2414
2413
|
# @param result_type [String] The type of result to consider when calculating the metric.
|
2415
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
2414
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2416
2415
|
def get_metrics_query(start_time: nil, end_time: nil, result_type: nil)
|
2417
2416
|
headers = {
|
2418
2417
|
}
|
2419
|
-
headers = Common.new.
|
2418
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_metrics_query")
|
2420
2419
|
|
2421
2420
|
params = {
|
2422
2421
|
"version" => @version,
|
@@ -2448,11 +2447,11 @@ module IBMWatson
|
|
2448
2447
|
# @param end_time [Time] Metric is computed from data recorded before this timestamp; must be in
|
2449
2448
|
# `YYYY-MM-DDThh:mm:ssZ` format.
|
2450
2449
|
# @param result_type [String] The type of result to consider when calculating the metric.
|
2451
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
2450
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2452
2451
|
def get_metrics_query_event(start_time: nil, end_time: nil, result_type: nil)
|
2453
2452
|
headers = {
|
2454
2453
|
}
|
2455
|
-
headers = Common.new.
|
2454
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_metrics_query_event")
|
2456
2455
|
|
2457
2456
|
params = {
|
2458
2457
|
"version" => @version,
|
@@ -2483,11 +2482,11 @@ module IBMWatson
|
|
2483
2482
|
# @param end_time [Time] Metric is computed from data recorded before this timestamp; must be in
|
2484
2483
|
# `YYYY-MM-DDThh:mm:ssZ` format.
|
2485
2484
|
# @param result_type [String] The type of result to consider when calculating the metric.
|
2486
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
2485
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2487
2486
|
def get_metrics_query_no_results(start_time: nil, end_time: nil, result_type: nil)
|
2488
2487
|
headers = {
|
2489
2488
|
}
|
2490
|
-
headers = Common.new.
|
2489
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_metrics_query_no_results")
|
2491
2490
|
|
2492
2491
|
params = {
|
2493
2492
|
"version" => @version,
|
@@ -2520,11 +2519,11 @@ module IBMWatson
|
|
2520
2519
|
# @param end_time [Time] Metric is computed from data recorded before this timestamp; must be in
|
2521
2520
|
# `YYYY-MM-DDThh:mm:ssZ` format.
|
2522
2521
|
# @param result_type [String] The type of result to consider when calculating the metric.
|
2523
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
2522
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2524
2523
|
def get_metrics_event_rate(start_time: nil, end_time: nil, result_type: nil)
|
2525
2524
|
headers = {
|
2526
2525
|
}
|
2527
|
-
headers = Common.new.
|
2526
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_metrics_event_rate")
|
2528
2527
|
|
2529
2528
|
params = {
|
2530
2529
|
"version" => @version,
|
@@ -2553,11 +2552,11 @@ module IBMWatson
|
|
2553
2552
|
# (queries and events are stored for 30 days). A query token is an individual word
|
2554
2553
|
# or unigram within the query string.
|
2555
2554
|
# @param count [Fixnum] Number of results to return.
|
2556
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
2555
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2557
2556
|
def get_metrics_query_token_event(count: nil)
|
2558
2557
|
headers = {
|
2559
2558
|
}
|
2560
|
-
headers = Common.new.
|
2559
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_metrics_query_token_event")
|
2561
2560
|
|
2562
2561
|
params = {
|
2563
2562
|
"version" => @version,
|
@@ -2587,13 +2586,13 @@ module IBMWatson
|
|
2587
2586
|
# **Note:** All credentials are sent over an encrypted connection and encrypted at
|
2588
2587
|
# rest.
|
2589
2588
|
# @param environment_id [String] The ID of the environment.
|
2590
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
2589
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2591
2590
|
def list_credentials(environment_id:)
|
2592
2591
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
2593
2592
|
|
2594
2593
|
headers = {
|
2595
2594
|
}
|
2596
|
-
headers = Common.new.
|
2595
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "list_credentials")
|
2597
2596
|
|
2598
2597
|
params = {
|
2599
2598
|
"version" => @version
|
@@ -2630,13 +2629,13 @@ module IBMWatson
|
|
2630
2629
|
# @param credential_details [CredentialDetails] Object containing details of the stored credentials.
|
2631
2630
|
#
|
2632
2631
|
# Obtain credentials for your source from the administrator of the source.
|
2633
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
2632
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2634
2633
|
def create_credentials(environment_id:, source_type: nil, credential_details: nil)
|
2635
2634
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
2636
2635
|
|
2637
2636
|
headers = {
|
2638
2637
|
}
|
2639
|
-
headers = Common.new.
|
2638
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "create_credentials")
|
2640
2639
|
|
2641
2640
|
params = {
|
2642
2641
|
"version" => @version
|
@@ -2669,7 +2668,7 @@ module IBMWatson
|
|
2669
2668
|
# returned and must be obtained from the source system.
|
2670
2669
|
# @param environment_id [String] The ID of the environment.
|
2671
2670
|
# @param credential_id [String] The unique identifier for a set of source credentials.
|
2672
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
2671
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2673
2672
|
def get_credentials(environment_id:, credential_id:)
|
2674
2673
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
2675
2674
|
|
@@ -2677,7 +2676,7 @@ module IBMWatson
|
|
2677
2676
|
|
2678
2677
|
headers = {
|
2679
2678
|
}
|
2680
|
-
headers = Common.new.
|
2679
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_credentials")
|
2681
2680
|
|
2682
2681
|
params = {
|
2683
2682
|
"version" => @version
|
@@ -2714,7 +2713,7 @@ module IBMWatson
|
|
2714
2713
|
# @param credential_details [CredentialDetails] Object containing details of the stored credentials.
|
2715
2714
|
#
|
2716
2715
|
# Obtain credentials for your source from the administrator of the source.
|
2717
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
2716
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2718
2717
|
def update_credentials(environment_id:, credential_id:, source_type: nil, credential_details: nil)
|
2719
2718
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
2720
2719
|
|
@@ -2722,7 +2721,7 @@ module IBMWatson
|
|
2722
2721
|
|
2723
2722
|
headers = {
|
2724
2723
|
}
|
2725
|
-
headers = Common.new.
|
2724
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "update_credentials")
|
2726
2725
|
|
2727
2726
|
params = {
|
2728
2727
|
"version" => @version
|
@@ -2752,7 +2751,7 @@ module IBMWatson
|
|
2752
2751
|
# Deletes a set of stored credentials from your Discovery instance.
|
2753
2752
|
# @param environment_id [String] The ID of the environment.
|
2754
2753
|
# @param credential_id [String] The unique identifier for a set of source credentials.
|
2755
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
2754
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2756
2755
|
def delete_credentials(environment_id:, credential_id:)
|
2757
2756
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
2758
2757
|
|
@@ -2760,7 +2759,7 @@ module IBMWatson
|
|
2760
2759
|
|
2761
2760
|
headers = {
|
2762
2761
|
}
|
2763
|
-
headers = Common.new.
|
2762
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_credentials")
|
2764
2763
|
|
2765
2764
|
params = {
|
2766
2765
|
"version" => @version
|
@@ -2786,13 +2785,13 @@ module IBMWatson
|
|
2786
2785
|
# List Gateways.
|
2787
2786
|
# List the currently configured gateways.
|
2788
2787
|
# @param environment_id [String] The ID of the environment.
|
2789
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
2788
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2790
2789
|
def list_gateways(environment_id:)
|
2791
2790
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
2792
2791
|
|
2793
2792
|
headers = {
|
2794
2793
|
}
|
2795
|
-
headers = Common.new.
|
2794
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "list_gateways")
|
2796
2795
|
|
2797
2796
|
params = {
|
2798
2797
|
"version" => @version
|
@@ -2816,13 +2815,13 @@ module IBMWatson
|
|
2816
2815
|
# Create a gateway configuration to use with a remotely installed gateway.
|
2817
2816
|
# @param environment_id [String] The ID of the environment.
|
2818
2817
|
# @param name [String] User-defined name.
|
2819
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
2818
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2820
2819
|
def create_gateway(environment_id:, name: nil)
|
2821
2820
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
2822
2821
|
|
2823
2822
|
headers = {
|
2824
2823
|
}
|
2825
|
-
headers = Common.new.
|
2824
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "create_gateway")
|
2826
2825
|
|
2827
2826
|
params = {
|
2828
2827
|
"version" => @version
|
@@ -2851,7 +2850,7 @@ module IBMWatson
|
|
2851
2850
|
# List information about the specified gateway.
|
2852
2851
|
# @param environment_id [String] The ID of the environment.
|
2853
2852
|
# @param gateway_id [String] The requested gateway ID.
|
2854
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
2853
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2855
2854
|
def get_gateway(environment_id:, gateway_id:)
|
2856
2855
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
2857
2856
|
|
@@ -2859,7 +2858,7 @@ module IBMWatson
|
|
2859
2858
|
|
2860
2859
|
headers = {
|
2861
2860
|
}
|
2862
|
-
headers = Common.new.
|
2861
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_gateway")
|
2863
2862
|
|
2864
2863
|
params = {
|
2865
2864
|
"version" => @version
|
@@ -2883,7 +2882,7 @@ module IBMWatson
|
|
2883
2882
|
# Delete the specified gateway configuration.
|
2884
2883
|
# @param environment_id [String] The ID of the environment.
|
2885
2884
|
# @param gateway_id [String] The requested gateway ID.
|
2886
|
-
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
2885
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2887
2886
|
def delete_gateway(environment_id:, gateway_id:)
|
2888
2887
|
raise ArgumentError.new("environment_id must be provided") if environment_id.nil?
|
2889
2888
|
|
@@ -2891,7 +2890,7 @@ module IBMWatson
|
|
2891
2890
|
|
2892
2891
|
headers = {
|
2893
2892
|
}
|
2894
|
-
headers = Common.new.
|
2893
|
+
headers = Common.new.get_sdk_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_gateway")
|
2895
2894
|
|
2896
2895
|
params = {
|
2897
2896
|
"version" => @version
|