azure_cognitiveservices_entitysearch 0.17.0 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/1.0/generated/azure_cognitiveservices_entitysearch/entities_operations.rb +2 -0
- data/lib/1.0/generated/azure_cognitiveservices_entitysearch/entity_search_client.rb +10 -5
- data/lib/1.0/generated/azure_cognitiveservices_entitysearch/models/postal_address.rb +1 -1
- data/lib/profiles/latest/modules/entitysearch_profile_module.rb +1 -1
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b08da47c7be254b15a8939a240cabf825c23a91
|
4
|
+
data.tar.gz: 68331b7a912d7a3d6b707274f8c13361e7c81d1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70b14dff5e4dab8599e28cdc2f96b324bb76d8effbb88b42567260c2938a3ac2619d37fdc685af2e61882c644b1c87602810378e7e6b8dd73e1fb81bd3389de7
|
7
|
+
data.tar.gz: 7aa88e47680d09d28dfebdff4b1468a30966748e3ad0c9bd1f3767bab90867866dd3ba23354f9649f47bfce402977085295cc3803bd31c00b3bcf1b68277576e
|
@@ -514,6 +514,7 @@ module Azure::CognitiveServices::EntitySearch::V1_0
|
|
514
514
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
515
515
|
#
|
516
516
|
def search_async(query, accept_language:nil, pragma:nil, user_agent:nil, client_id:nil, client_ip:nil, location:nil, country_code:nil, market:'en-us', response_filter:nil, response_format:nil, safe_search:nil, set_lang:nil, custom_headers:nil)
|
517
|
+
fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
|
517
518
|
x_bing_apis_sdk = 'true'
|
518
519
|
fail ArgumentError, 'query is nil' if query.nil?
|
519
520
|
|
@@ -533,6 +534,7 @@ module Azure::CognitiveServices::EntitySearch::V1_0
|
|
533
534
|
path_template = 'entities'
|
534
535
|
|
535
536
|
request_url = @base_url || @client.base_url
|
537
|
+
request_url = request_url.gsub('{Endpoint}', @client.endpoint)
|
536
538
|
|
537
539
|
options = {
|
538
540
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -12,11 +12,16 @@ module Azure::CognitiveServices::EntitySearch::V1_0
|
|
12
12
|
include MsRestAzure::Serialization
|
13
13
|
|
14
14
|
# @return [String] the base URI of the service.
|
15
|
-
|
15
|
+
attr_reader :base_url
|
16
16
|
|
17
17
|
# @return Credentials needed for the client to connect to Azure.
|
18
18
|
attr_reader :credentials1
|
19
19
|
|
20
|
+
# @return [String] Supported Cognitive Services endpoints (protocol and
|
21
|
+
# hostname, for example: "https://westus.api.cognitive.microsoft.com",
|
22
|
+
# "https://api.cognitive.microsoft.com").
|
23
|
+
attr_accessor :endpoint
|
24
|
+
|
20
25
|
# @return Subscription credentials which uniquely identify client
|
21
26
|
# subscription.
|
22
27
|
attr_accessor :credentials
|
@@ -39,17 +44,17 @@ module Azure::CognitiveServices::EntitySearch::V1_0
|
|
39
44
|
#
|
40
45
|
# Creates initializes a new instance of the EntitySearchClient class.
|
41
46
|
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
42
|
-
# @param base_url [String] the base URI of the service.
|
43
47
|
# @param options [Array] filters to be applied to the HTTP requests.
|
44
48
|
#
|
45
|
-
def initialize(credentials = nil,
|
49
|
+
def initialize(credentials = nil, options = nil)
|
46
50
|
super(credentials, options)
|
47
|
-
@base_url =
|
51
|
+
@base_url = '{Endpoint}/bing/v7.0'
|
48
52
|
|
49
53
|
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
50
54
|
@credentials = credentials
|
51
55
|
|
52
56
|
@entities_operations = EntitiesOperations.new(self)
|
57
|
+
@endpoint = 'https://api.cognitive.microsoft.com'
|
53
58
|
@accept_language = 'en-US'
|
54
59
|
@long_running_operation_retry_timeout = 30
|
55
60
|
@generate_client_request_id = true
|
@@ -121,7 +126,7 @@ module Azure::CognitiveServices::EntitySearch::V1_0
|
|
121
126
|
#
|
122
127
|
def add_telemetry
|
123
128
|
sdk_information = 'azure_cognitiveservices_entitysearch'
|
124
|
-
sdk_information = "#{sdk_information}/0.
|
129
|
+
sdk_information = "#{sdk_information}/0.18.0"
|
125
130
|
add_user_agent_information(sdk_information)
|
126
131
|
end
|
127
132
|
end
|
@@ -46,7 +46,7 @@ module Azure::CognitiveServices::EntitySearch::V1_0
|
|
46
46
|
# full name, United States.
|
47
47
|
attr_accessor :address_country
|
48
48
|
|
49
|
-
# @return [String] The two letter ISO code of this
|
49
|
+
# @return [String] The two letter ISO code of this country. For example,
|
50
50
|
# US.
|
51
51
|
attr_accessor :country_iso
|
52
52
|
|
@@ -75,7 +75,7 @@ module Azure::EntitySearch::Profiles::Latest
|
|
75
75
|
@base_url = options[:base_url].nil? ? nil:options[:base_url]
|
76
76
|
@options = options[:options].nil? ? nil:options[:options]
|
77
77
|
|
78
|
-
@client_0 = Azure::CognitiveServices::EntitySearch::V1_0::EntitySearchClient.new(configurable.credentials,
|
78
|
+
@client_0 = Azure::CognitiveServices::EntitySearch::V1_0::EntitySearchClient.new(configurable.credentials, options)
|
79
79
|
if(@client_0.respond_to?(:subscription_id))
|
80
80
|
@client_0.subscription_id = configurable.subscription_id
|
81
81
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: azure_cognitiveservices_entitysearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Microsoft Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|