azure_cognitiveservices_newssearch 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_newssearch/news_operations.rb +27 -21
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/news_search_client.rb +10 -5
- data/lib/profiles/latest/modules/newssearch_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: f12a4960dff5666aec476f42cb596813735f757c
|
4
|
+
data.tar.gz: 8f7fb8d2fcc5b1bfed34c8c33867e19556143faf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 126a9cfa721fcf9c94c8689e9c0134ba8735f1984e844e6280255a0b76ba75b095e28228d6bb09848a1eb1346d6c4e0e83fcb954bab849030b46d7e037ca7dc1
|
7
|
+
data.tar.gz: d9f799a00524f535079833020995b5e27e39cdbe27b7781103beb1fba92363789f6f43386ea0890b71329b8e0eefbe2e88bed8247b459fc9afb390d52f5279c4
|
@@ -753,6 +753,7 @@ module Azure::CognitiveServices::NewsSearch::V1_0
|
|
753
753
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
754
754
|
#
|
755
755
|
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, market:nil, offset:nil, original_image:nil, safe_search:nil, set_lang:nil, sort_by:nil, text_decorations:nil, text_format:nil, custom_headers:nil)
|
756
|
+
fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
|
756
757
|
x_bing_apis_sdk = 'true'
|
757
758
|
fail ArgumentError, 'query is nil' if query.nil?
|
758
759
|
|
@@ -771,6 +772,7 @@ module Azure::CognitiveServices::NewsSearch::V1_0
|
|
771
772
|
path_template = 'news/search'
|
772
773
|
|
773
774
|
request_url = @base_url || @client.base_url
|
775
|
+
request_url = request_url.gsub('{Endpoint}', @client.endpoint)
|
774
776
|
|
775
777
|
options = {
|
776
778
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -808,11 +810,11 @@ module Azure::CognitiveServices::NewsSearch::V1_0
|
|
808
810
|
end
|
809
811
|
|
810
812
|
#
|
811
|
-
# The News Category API lets
|
812
|
-
#
|
813
|
-
#
|
814
|
-
#
|
815
|
-
#
|
813
|
+
# The News Category API lets you search on Bing and get back a list of top news
|
814
|
+
# articles by category. This section provides technical details about the query
|
815
|
+
# parameters and headers that you use to request news and the JSON response
|
816
|
+
# objects that contain them. For examples that show how to make requests, see
|
817
|
+
# [Searching the web for
|
816
818
|
# news](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-news-search/search-the-web).
|
817
819
|
#
|
818
820
|
# @param accept_language [String] A comma-delimited list of one or more
|
@@ -1054,11 +1056,11 @@ module Azure::CognitiveServices::NewsSearch::V1_0
|
|
1054
1056
|
end
|
1055
1057
|
|
1056
1058
|
#
|
1057
|
-
# The News Category API lets
|
1058
|
-
#
|
1059
|
-
#
|
1060
|
-
#
|
1061
|
-
#
|
1059
|
+
# The News Category API lets you search on Bing and get back a list of top news
|
1060
|
+
# articles by category. This section provides technical details about the query
|
1061
|
+
# parameters and headers that you use to request news and the JSON response
|
1062
|
+
# objects that contain them. For examples that show how to make requests, see
|
1063
|
+
# [Searching the web for
|
1062
1064
|
# news](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-news-search/search-the-web).
|
1063
1065
|
#
|
1064
1066
|
# @param accept_language [String] A comma-delimited list of one or more
|
@@ -1299,11 +1301,11 @@ module Azure::CognitiveServices::NewsSearch::V1_0
|
|
1299
1301
|
end
|
1300
1302
|
|
1301
1303
|
#
|
1302
|
-
# The News Category API lets
|
1303
|
-
#
|
1304
|
-
#
|
1305
|
-
#
|
1306
|
-
#
|
1304
|
+
# The News Category API lets you search on Bing and get back a list of top news
|
1305
|
+
# articles by category. This section provides technical details about the query
|
1306
|
+
# parameters and headers that you use to request news and the JSON response
|
1307
|
+
# objects that contain them. For examples that show how to make requests, see
|
1308
|
+
# [Searching the web for
|
1307
1309
|
# news](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-news-search/search-the-web).
|
1308
1310
|
#
|
1309
1311
|
# @param accept_language [String] A comma-delimited list of one or more
|
@@ -1540,6 +1542,7 @@ module Azure::CognitiveServices::NewsSearch::V1_0
|
|
1540
1542
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1541
1543
|
#
|
1542
1544
|
def category_async(accept_language:nil, user_agent:nil, client_id:nil, client_ip:nil, location:nil, country_code:nil, category:nil, count:nil, headline_count:nil, market:nil, offset:nil, original_image:nil, safe_search:nil, set_lang:nil, text_decorations:nil, text_format:nil, custom_headers:nil)
|
1545
|
+
fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
|
1543
1546
|
x_bing_apis_sdk = 'true'
|
1544
1547
|
|
1545
1548
|
|
@@ -1557,6 +1560,7 @@ module Azure::CognitiveServices::NewsSearch::V1_0
|
|
1557
1560
|
path_template = 'news'
|
1558
1561
|
|
1559
1562
|
request_url = @base_url || @client.base_url
|
1563
|
+
request_url = request_url.gsub('{Endpoint}', @client.endpoint)
|
1560
1564
|
|
1561
1565
|
options = {
|
1562
1566
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -1594,8 +1598,8 @@ module Azure::CognitiveServices::NewsSearch::V1_0
|
|
1594
1598
|
end
|
1595
1599
|
|
1596
1600
|
#
|
1597
|
-
# The News Trending Topics API lets
|
1598
|
-
#
|
1601
|
+
# The News Trending Topics API lets you search on Bing and get back a list of
|
1602
|
+
# trending news topics that are currently trending on Bing. This section
|
1599
1603
|
# provides technical details about the query parameters and headers that you
|
1600
1604
|
# use to request news and the JSON response objects that contain them. For
|
1601
1605
|
# examples that show how to make requests, see [Searching the web for
|
@@ -1821,8 +1825,8 @@ module Azure::CognitiveServices::NewsSearch::V1_0
|
|
1821
1825
|
end
|
1822
1826
|
|
1823
1827
|
#
|
1824
|
-
# The News Trending Topics API lets
|
1825
|
-
#
|
1828
|
+
# The News Trending Topics API lets you search on Bing and get back a list of
|
1829
|
+
# trending news topics that are currently trending on Bing. This section
|
1826
1830
|
# provides technical details about the query parameters and headers that you
|
1827
1831
|
# use to request news and the JSON response objects that contain them. For
|
1828
1832
|
# examples that show how to make requests, see [Searching the web for
|
@@ -2047,8 +2051,8 @@ module Azure::CognitiveServices::NewsSearch::V1_0
|
|
2047
2051
|
end
|
2048
2052
|
|
2049
2053
|
#
|
2050
|
-
# The News Trending Topics API lets
|
2051
|
-
#
|
2054
|
+
# The News Trending Topics API lets you search on Bing and get back a list of
|
2055
|
+
# trending news topics that are currently trending on Bing. This section
|
2052
2056
|
# provides technical details about the query parameters and headers that you
|
2053
2057
|
# use to request news and the JSON response objects that contain them. For
|
2054
2058
|
# examples that show how to make requests, see [Searching the web for
|
@@ -2269,6 +2273,7 @@ module Azure::CognitiveServices::NewsSearch::V1_0
|
|
2269
2273
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
2270
2274
|
#
|
2271
2275
|
def trending_async(accept_language:nil, user_agent:nil, client_id:nil, client_ip:nil, location:nil, country_code:nil, count:nil, market:nil, offset:nil, safe_search:nil, set_lang:nil, since:nil, sort_by:nil, text_decorations:nil, text_format:nil, custom_headers:nil)
|
2276
|
+
fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
|
2272
2277
|
x_bing_apis_sdk = 'true'
|
2273
2278
|
|
2274
2279
|
|
@@ -2286,6 +2291,7 @@ module Azure::CognitiveServices::NewsSearch::V1_0
|
|
2286
2291
|
path_template = 'news/trendingtopics'
|
2287
2292
|
|
2288
2293
|
request_url = @base_url || @client.base_url
|
2294
|
+
request_url = request_url.gsub('{Endpoint}', @client.endpoint)
|
2289
2295
|
|
2290
2296
|
options = {
|
2291
2297
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -12,11 +12,16 @@ module Azure::CognitiveServices::NewsSearch::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::NewsSearch::V1_0
|
|
39
44
|
#
|
40
45
|
# Creates initializes a new instance of the NewsSearchClient 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
|
@news_operations = NewsOperations.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::NewsSearch::V1_0
|
|
121
126
|
#
|
122
127
|
def add_telemetry
|
123
128
|
sdk_information = 'azure_cognitiveservices_newssearch'
|
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
|
@@ -53,7 +53,7 @@ module Azure::NewsSearch::Profiles::Latest
|
|
53
53
|
@base_url = options[:base_url].nil? ? nil:options[:base_url]
|
54
54
|
@options = options[:options].nil? ? nil:options[:options]
|
55
55
|
|
56
|
-
@client_0 = Azure::CognitiveServices::NewsSearch::V1_0::NewsSearchClient.new(configurable.credentials,
|
56
|
+
@client_0 = Azure::CognitiveServices::NewsSearch::V1_0::NewsSearchClient.new(configurable.credentials, options)
|
57
57
|
if(@client_0.respond_to?(:subscription_id))
|
58
58
|
@client_0.subscription_id = configurable.subscription_id
|
59
59
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: azure_cognitiveservices_newssearch
|
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
|