azure_cognitiveservices_videosearch 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2cc5f0ef12442e25e8ce0ca3199dfa24f24e91e6
4
- data.tar.gz: 4365b517513bc91cdeebaf11d2fa6ac000aa6222
3
+ metadata.gz: 78f66b1ca41774202970b3b263443ab0b06b4d31
4
+ data.tar.gz: 78b61f99e6b9b42132efa2cf093f6d81eb4fa023
5
5
  SHA512:
6
- metadata.gz: cab9d23a12aea2fc08467330200f4510f539dee376f887a8bf0653d8609abfcc42044abcd651581cbd3d0252c4e77971dc7be6160c24cb4cf5752f0c9586f423
7
- data.tar.gz: 2ff328f35016e521cd5b0a3ff8a851c03d2a15e859cd01b337e67a6a23b0414d16fe18f450c3da8858b5febb914b0f21ce2a1f56c9347caee727cbf6e20f70f1
6
+ metadata.gz: 78f4670f6d95c339cb82d2aac7a2a6c75a788bf03aec335ff15b19512a697d4943801502155249ea02d7d3ad72df13d0aaa3aaf85e0565cf2b7ba2cf3091d9c3
7
+ data.tar.gz: 82fabfb808c7659c84997549dea30aa90ad19242c3051157a623b6641a895510685137ec711a98fa711c7277ef7e8a97dad5b241d05824befbd6cc3366f94b03
@@ -12,11 +12,16 @@ module Azure::CognitiveServices::VideoSearch::V1_0
12
12
  include MsRestAzure::Serialization
13
13
 
14
14
  # @return [String] the base URI of the service.
15
- attr_accessor :base_url
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::VideoSearch::V1_0
39
44
  #
40
45
  # Creates initializes a new instance of the VideoSearchClient 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, base_url = nil, options = nil)
49
+ def initialize(credentials = nil, options = nil)
46
50
  super(credentials, options)
47
- @base_url = base_url || 'https://api.cognitive.microsoft.com/bing/v7.0'
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
  @videos_operations = VideosOperations.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::VideoSearch::V1_0
121
126
  #
122
127
  def add_telemetry
123
128
  sdk_information = 'azure_cognitiveservices_videosearch'
124
- sdk_information = "#{sdk_information}/0.17.0"
129
+ sdk_information = "#{sdk_information}/0.18.0"
125
130
  add_user_agent_information(sdk_information)
126
131
  end
127
132
  end
@@ -793,6 +793,7 @@ module Azure::CognitiveServices::VideoSearch::V1_0
793
793
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
794
794
  #
795
795
  def search_async(query, accept_language:nil, user_agent:nil, client_id:nil, client_ip:nil, location:nil, country_code:nil, count:nil, freshness:nil, id:nil, length:nil, market:nil, offset:nil, pricing:nil, resolution:nil, safe_search:nil, set_lang:nil, text_decorations:nil, text_format:nil, custom_headers:nil)
796
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
796
797
  x_bing_apis_sdk = 'true'
797
798
  fail ArgumentError, 'query is nil' if query.nil?
798
799
 
@@ -811,6 +812,7 @@ module Azure::CognitiveServices::VideoSearch::V1_0
811
812
  path_template = 'videos/search'
812
813
 
813
814
  request_url = @base_url || @client.base_url
815
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
814
816
 
815
817
  options = {
816
818
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -1538,6 +1540,7 @@ module Azure::CognitiveServices::VideoSearch::V1_0
1538
1540
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1539
1541
  #
1540
1542
  def details_async(query, accept_language:nil, user_agent:nil, client_id:nil, client_ip:nil, location:nil, country_code:nil, id:nil, modules:nil, market:nil, resolution:nil, safe_search:nil, set_lang:nil, text_decorations:nil, text_format:nil, custom_headers:nil)
1543
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
1541
1544
  x_bing_apis_sdk = 'true'
1542
1545
  fail ArgumentError, 'query is nil' if query.nil?
1543
1546
 
@@ -1556,6 +1559,7 @@ module Azure::CognitiveServices::VideoSearch::V1_0
1556
1559
  path_template = 'videos/details'
1557
1560
 
1558
1561
  request_url = @base_url || @client.base_url
1562
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
1559
1563
 
1560
1564
  options = {
1561
1565
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -2196,6 +2200,7 @@ module Azure::CognitiveServices::VideoSearch::V1_0
2196
2200
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2197
2201
  #
2198
2202
  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, text_decorations:nil, text_format:nil, custom_headers:nil)
2203
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
2199
2204
  x_bing_apis_sdk = 'true'
2200
2205
 
2201
2206
 
@@ -2213,6 +2218,7 @@ module Azure::CognitiveServices::VideoSearch::V1_0
2213
2218
  path_template = 'videos/trending'
2214
2219
 
2215
2220
  request_url = @base_url || @client.base_url
2221
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
2216
2222
 
2217
2223
  options = {
2218
2224
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -61,7 +61,7 @@ module Azure::VideoSearch::Profiles::Latest
61
61
  @base_url = options[:base_url].nil? ? nil:options[:base_url]
62
62
  @options = options[:options].nil? ? nil:options[:options]
63
63
 
64
- @client_0 = Azure::CognitiveServices::VideoSearch::V1_0::VideoSearchClient.new(configurable.credentials, base_url, options)
64
+ @client_0 = Azure::CognitiveServices::VideoSearch::V1_0::VideoSearchClient.new(configurable.credentials, options)
65
65
  if(@client_0.respond_to?(:subscription_id))
66
66
  @client_0.subscription_id = configurable.subscription_id
67
67
  end
@@ -3,5 +3,5 @@
3
3
  # Licensed under the MIT License. See License.txt in the project root for license information.
4
4
 
5
5
  module Azure::CognitiveServices::VideoSearch
6
- VERSION = '0.17.0'
6
+ VERSION = '0.18.0'
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure_cognitiveservices_videosearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.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-07-31 00:00:00.000000000 Z
11
+ date: 2018-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler