azure_cognitiveservices_imagesearch 0.17.0 → 0.18.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/1.0/generated/azure_cognitiveservices_imagesearch/image_search_client.rb +10 -5
- data/lib/1.0/generated/azure_cognitiveservices_imagesearch/images_operations.rb +6 -0
- data/lib/1.0/generated/azure_cognitiveservices_imagesearch/models/image_object.rb +1 -1
- data/lib/profiles/latest/modules/imagesearch_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: b50e7e633dc4329ad973a9e84ceb86700473c4ae
|
4
|
+
data.tar.gz: 03c94e320ec6f3335c68dac91e242931a5ce6254
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b24e1b519a762375daf5eca982d6b20a4ccaeebc192b160db862867eeef4f4bec10b3cf1dbcf3d5844694bd938f4cd895c6995c9db1318775c3ea70023ef7da3
|
7
|
+
data.tar.gz: 86fea9b48e745bb91e1bd71d0981056d578a8b80d3f99dff2a09d733be9224de1d104b0ae046d55fd4145d9b6b336af3f5eb6f67da781796ff1a3bcd4cf1b005
|
@@ -12,11 +12,16 @@ module Azure::CognitiveServices::ImageSearch::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::ImageSearch::V1_0
|
|
39
44
|
#
|
40
45
|
# Creates initializes a new instance of the ImageSearchClient 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
|
@images_operations = ImagesOperations.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::ImageSearch::V1_0
|
|
121
126
|
#
|
122
127
|
def add_telemetry
|
123
128
|
sdk_information = 'azure_cognitiveservices_imagesearch'
|
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
|
@@ -963,6 +963,7 @@ module Azure::CognitiveServices::ImageSearch::V1_0
|
|
963
963
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
964
964
|
#
|
965
965
|
def search_async(query, accept_language:nil, user_agent:nil, client_id:nil, client_ip:nil, location:nil, aspect:nil, color:nil, country_code:nil, count:nil, freshness:nil, height:nil, id:nil, image_content:nil, image_type:nil, license:nil, market:nil, max_file_size:nil, max_height:nil, max_width:nil, min_file_size:nil, min_height:nil, min_width:nil, offset:nil, safe_search:nil, size:nil, set_lang:nil, width:nil, custom_headers:nil)
|
966
|
+
fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
|
966
967
|
x_bing_apis_sdk = 'true'
|
967
968
|
fail ArgumentError, 'query is nil' if query.nil?
|
968
969
|
|
@@ -981,6 +982,7 @@ module Azure::CognitiveServices::ImageSearch::V1_0
|
|
981
982
|
path_template = 'images/search'
|
982
983
|
|
983
984
|
request_url = @base_url || @client.base_url
|
985
|
+
request_url = request_url.gsub('{Endpoint}', @client.endpoint)
|
984
986
|
|
985
987
|
options = {
|
986
988
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -1867,6 +1869,7 @@ module Azure::CognitiveServices::ImageSearch::V1_0
|
|
1867
1869
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1868
1870
|
#
|
1869
1871
|
def details_async(query, accept_language:nil, content_type:nil, user_agent:nil, client_id:nil, client_ip:nil, location:nil, crop_bottom:nil, crop_left:nil, crop_right:nil, crop_top:nil, crop_type:nil, country_code:nil, id:nil, image_url:nil, insights_token:nil, modules:nil, market:nil, safe_search:nil, set_lang:nil, custom_headers:nil)
|
1872
|
+
fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
|
1870
1873
|
x_bing_apis_sdk = 'true'
|
1871
1874
|
fail ArgumentError, 'query is nil' if query.nil?
|
1872
1875
|
|
@@ -1886,6 +1889,7 @@ module Azure::CognitiveServices::ImageSearch::V1_0
|
|
1886
1889
|
path_template = 'images/details'
|
1887
1890
|
|
1888
1891
|
request_url = @base_url || @client.base_url
|
1892
|
+
request_url = request_url.gsub('{Endpoint}', @client.endpoint)
|
1889
1893
|
|
1890
1894
|
options = {
|
1891
1895
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -2469,6 +2473,7 @@ module Azure::CognitiveServices::ImageSearch::V1_0
|
|
2469
2473
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
2470
2474
|
#
|
2471
2475
|
def trending_async(accept_language:nil, user_agent:nil, client_id:nil, client_ip:nil, location:nil, country_code:nil, market:nil, safe_search:nil, set_lang:nil, custom_headers:nil)
|
2476
|
+
fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
|
2472
2477
|
x_bing_apis_sdk = 'true'
|
2473
2478
|
|
2474
2479
|
|
@@ -2486,6 +2491,7 @@ module Azure::CognitiveServices::ImageSearch::V1_0
|
|
2486
2491
|
path_template = 'images/trending'
|
2487
2492
|
|
2488
2493
|
request_url = @base_url || @client.base_url
|
2494
|
+
request_url = request_url.gsub('{Endpoint}', @client.endpoint)
|
2489
2495
|
|
2490
2496
|
options = {
|
2491
2497
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -34,7 +34,7 @@ module Azure::CognitiveServices::ImageSearch::V1_0
|
|
34
34
|
# of the number of websites where you can buy an apple pie. To indicate
|
35
35
|
# the number of offers in your UX, include badging such as a shopping
|
36
36
|
# cart icon that contains the count. When the user clicks on the icon,
|
37
|
-
# use
|
37
|
+
# use imageInsightsToken to get the list of websites.
|
38
38
|
attr_accessor :insights_metadata
|
39
39
|
|
40
40
|
# @return [String] Unique Id for the image
|
@@ -87,7 +87,7 @@ module Azure::ImageSearch::Profiles::Latest
|
|
87
87
|
@base_url = options[:base_url].nil? ? nil:options[:base_url]
|
88
88
|
@options = options[:options].nil? ? nil:options[:options]
|
89
89
|
|
90
|
-
@client_0 = Azure::CognitiveServices::ImageSearch::V1_0::ImageSearchClient.new(configurable.credentials,
|
90
|
+
@client_0 = Azure::CognitiveServices::ImageSearch::V1_0::ImageSearchClient.new(configurable.credentials, options)
|
91
91
|
if(@client_0.respond_to?(:subscription_id))
|
92
92
|
@client_0.subscription_id = configurable.subscription_id
|
93
93
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: azure_cognitiveservices_imagesearch
|
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
|