azure_cognitiveservices_websearch 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch.rb +69 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/answer.rb +90 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/answer_type.rb +22 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/article.rb +163 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/computation.rb +119 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/creative_work.rb +160 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/error.rb +116 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/error_code.rb +20 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/error_response.rb +89 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/error_sub_code.rb +25 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/freshness.rb +17 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/identifiable.rb +62 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/image_object.rb +199 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/images.rb +210 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/intangible.rb +115 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/media_object.rb +200 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/news.rb +148 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/news_article.rb +159 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/places.rb +135 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/query.rb +100 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/query_context.rb +126 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/ranking_ranking_group.rb +56 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/ranking_ranking_item.rb +116 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/ranking_ranking_response.rb +79 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/related_searches_related_search_answer.rb +135 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/response.rb +72 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/response_base.rb +71 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/safe_search.rb +17 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/search_response.rb +212 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/search_results_answer.rb +126 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/spell_suggestions.rb +141 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/structured_value.rb +115 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/text_format.rb +16 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/thing.rb +131 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/time_zone.rb +157 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/time_zone_time_zone_information.rb +70 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/video_object.rb +295 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/videos.rb +189 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/web_meta_tag.rb +59 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/web_page.rb +251 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/web_web_answer.rb +149 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/models/web_web_grouping.rb +66 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/module_definition.rb +9 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/web.rb +775 -0
- data/lib/1.0/generated/azure_cognitiveservices_websearch/web_search_client.rb +127 -0
- data/lib/azure_cognitiveservices_websearch.rb +6 -0
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/latest/modules/websearch_profile_module.rb +223 -0
- data/lib/profiles/latest/websearch_latest_profile_client.rb +38 -0
- data/lib/profiles/latest/websearch_module_definition.rb +8 -0
- data/lib/version.rb +7 -0
- metadata +171 -0
@@ -0,0 +1,127 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::CognitiveServices::WebSearch::V1_0
|
7
|
+
#
|
8
|
+
# A service client - single point of access to the REST API.
|
9
|
+
#
|
10
|
+
class WebSearchClient < MsRestAzure::AzureServiceClient
|
11
|
+
include MsRestAzure
|
12
|
+
include MsRestAzure::Serialization
|
13
|
+
|
14
|
+
# @return [String] the base URI of the service.
|
15
|
+
attr_accessor :base_url
|
16
|
+
|
17
|
+
# @return Credentials needed for the client to connect to Azure.
|
18
|
+
attr_reader :credentials1
|
19
|
+
|
20
|
+
# @return Subscription credentials which uniquely identify client
|
21
|
+
# subscription.
|
22
|
+
attr_accessor :credentials
|
23
|
+
|
24
|
+
# @return [String] Gets or sets the preferred language for the response.
|
25
|
+
attr_accessor :accept_language
|
26
|
+
|
27
|
+
# @return [Integer] Gets or sets the retry timeout in seconds for Long
|
28
|
+
# Running Operations. Default value is 30.
|
29
|
+
attr_accessor :long_running_operation_retry_timeout
|
30
|
+
|
31
|
+
# @return [Boolean] When set to true a unique x-ms-client-request-id value
|
32
|
+
# is generated and included in each request. Default is true.
|
33
|
+
attr_accessor :generate_client_request_id
|
34
|
+
|
35
|
+
# @return [Web] web
|
36
|
+
attr_reader :web
|
37
|
+
|
38
|
+
#
|
39
|
+
# Creates initializes a new instance of the WebSearchClient class.
|
40
|
+
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
41
|
+
# @param base_url [String] the base URI of the service.
|
42
|
+
# @param options [Array] filters to be applied to the HTTP requests.
|
43
|
+
#
|
44
|
+
def initialize(credentials = nil, base_url = nil, options = nil)
|
45
|
+
super(credentials, options)
|
46
|
+
@base_url = base_url || 'https://api.cognitive.microsoft.com/bing/v7.0'
|
47
|
+
|
48
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
49
|
+
@credentials = credentials
|
50
|
+
|
51
|
+
@web = Web.new(self)
|
52
|
+
@accept_language = 'en-US'
|
53
|
+
@long_running_operation_retry_timeout = 30
|
54
|
+
@generate_client_request_id = true
|
55
|
+
add_telemetry
|
56
|
+
end
|
57
|
+
|
58
|
+
#
|
59
|
+
# Makes a request and returns the body of the response.
|
60
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
61
|
+
# @param path [String] the path, relative to {base_url}.
|
62
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
63
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
64
|
+
# Example:
|
65
|
+
#
|
66
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
67
|
+
# path = "/path"
|
68
|
+
# options = {
|
69
|
+
# body: request_content,
|
70
|
+
# query_params: {'api-version' => '2016-02-01'}
|
71
|
+
# }
|
72
|
+
# result = @client.make_request(:put, path, options)
|
73
|
+
#
|
74
|
+
def make_request(method, path, options = {})
|
75
|
+
result = make_request_with_http_info(method, path, options)
|
76
|
+
result.body unless result.nil?
|
77
|
+
end
|
78
|
+
|
79
|
+
#
|
80
|
+
# Makes a request and returns the operation response.
|
81
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
82
|
+
# @param path [String] the path, relative to {base_url}.
|
83
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
84
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
85
|
+
#
|
86
|
+
def make_request_with_http_info(method, path, options = {})
|
87
|
+
result = make_request_async(method, path, options).value!
|
88
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
89
|
+
result
|
90
|
+
end
|
91
|
+
|
92
|
+
#
|
93
|
+
# Makes a request asynchronously.
|
94
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
95
|
+
# @param path [String] the path, relative to {base_url}.
|
96
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
97
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
98
|
+
#
|
99
|
+
def make_request_async(method, path, options = {})
|
100
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
101
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
102
|
+
|
103
|
+
request_url = options[:base_url] || @base_url
|
104
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
105
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
106
|
+
end
|
107
|
+
|
108
|
+
request_headers = @request_headers
|
109
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
110
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
111
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
112
|
+
|
113
|
+
super(request_url, method, path, options)
|
114
|
+
end
|
115
|
+
|
116
|
+
|
117
|
+
private
|
118
|
+
#
|
119
|
+
# Adds telemetry information.
|
120
|
+
#
|
121
|
+
def add_telemetry
|
122
|
+
sdk_information = 'azure_cognitiveservices_websearch'
|
123
|
+
sdk_information = "#{sdk_information}/0.16.0"
|
124
|
+
add_user_agent_information(sdk_information)
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
@@ -0,0 +1,6 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
require '1.0/generated/azure_cognitiveservices_websearch'
|
6
|
+
require 'profiles/latest/websearch_latest_profile_client'
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
module Azure end
|
6
|
+
module Azure::CognitiveServices end
|
7
|
+
module Azure::CognitiveServices::WebSearch end
|
@@ -0,0 +1,223 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
require 'azure_cognitiveservices_websearch'
|
6
|
+
|
7
|
+
module Azure::WebSearch::Profiles::Latest
|
8
|
+
Web = Azure::CognitiveServices::WebSearch::V1_0::Web
|
9
|
+
|
10
|
+
module Models
|
11
|
+
RankingRankingItem = Azure::CognitiveServices::WebSearch::V1_0::Models::RankingRankingItem
|
12
|
+
RankingRankingGroup = Azure::CognitiveServices::WebSearch::V1_0::Models::RankingRankingGroup
|
13
|
+
WebMetaTag = Azure::CognitiveServices::WebSearch::V1_0::Models::WebMetaTag
|
14
|
+
RankingRankingResponse = Azure::CognitiveServices::WebSearch::V1_0::Models::RankingRankingResponse
|
15
|
+
WebWebGrouping = Azure::CognitiveServices::WebSearch::V1_0::Models::WebWebGrouping
|
16
|
+
Error = Azure::CognitiveServices::WebSearch::V1_0::Models::Error
|
17
|
+
Query = Azure::CognitiveServices::WebSearch::V1_0::Models::Query
|
18
|
+
TimeZoneTimeZoneInformation = Azure::CognitiveServices::WebSearch::V1_0::Models::TimeZoneTimeZoneInformation
|
19
|
+
ResponseBase = Azure::CognitiveServices::WebSearch::V1_0::Models::ResponseBase
|
20
|
+
QueryContext = Azure::CognitiveServices::WebSearch::V1_0::Models::QueryContext
|
21
|
+
ImageObject = Azure::CognitiveServices::WebSearch::V1_0::Models::ImageObject
|
22
|
+
CreativeWork = Azure::CognitiveServices::WebSearch::V1_0::Models::CreativeWork
|
23
|
+
WebPage = Azure::CognitiveServices::WebSearch::V1_0::Models::WebPage
|
24
|
+
NewsArticle = Azure::CognitiveServices::WebSearch::V1_0::Models::NewsArticle
|
25
|
+
VideoObject = Azure::CognitiveServices::WebSearch::V1_0::Models::VideoObject
|
26
|
+
Identifiable = Azure::CognitiveServices::WebSearch::V1_0::Models::Identifiable
|
27
|
+
Response = Azure::CognitiveServices::WebSearch::V1_0::Models::Response
|
28
|
+
SearchResponse = Azure::CognitiveServices::WebSearch::V1_0::Models::SearchResponse
|
29
|
+
Thing = Azure::CognitiveServices::WebSearch::V1_0::Models::Thing
|
30
|
+
Answer = Azure::CognitiveServices::WebSearch::V1_0::Models::Answer
|
31
|
+
Computation = Azure::CognitiveServices::WebSearch::V1_0::Models::Computation
|
32
|
+
SearchResultsAnswer = Azure::CognitiveServices::WebSearch::V1_0::Models::SearchResultsAnswer
|
33
|
+
WebWebAnswer = Azure::CognitiveServices::WebSearch::V1_0::Models::WebWebAnswer
|
34
|
+
Images = Azure::CognitiveServices::WebSearch::V1_0::Models::Images
|
35
|
+
News = Azure::CognitiveServices::WebSearch::V1_0::Models::News
|
36
|
+
RelatedSearchesRelatedSearchAnswer = Azure::CognitiveServices::WebSearch::V1_0::Models::RelatedSearchesRelatedSearchAnswer
|
37
|
+
SpellSuggestions = Azure::CognitiveServices::WebSearch::V1_0::Models::SpellSuggestions
|
38
|
+
TimeZone = Azure::CognitiveServices::WebSearch::V1_0::Models::TimeZone
|
39
|
+
Videos = Azure::CognitiveServices::WebSearch::V1_0::Models::Videos
|
40
|
+
Places = Azure::CognitiveServices::WebSearch::V1_0::Models::Places
|
41
|
+
ErrorResponse = Azure::CognitiveServices::WebSearch::V1_0::Models::ErrorResponse
|
42
|
+
Intangible = Azure::CognitiveServices::WebSearch::V1_0::Models::Intangible
|
43
|
+
MediaObject = Azure::CognitiveServices::WebSearch::V1_0::Models::MediaObject
|
44
|
+
Article = Azure::CognitiveServices::WebSearch::V1_0::Models::Article
|
45
|
+
StructuredValue = Azure::CognitiveServices::WebSearch::V1_0::Models::StructuredValue
|
46
|
+
AnswerType = Azure::CognitiveServices::WebSearch::V1_0::Models::AnswerType
|
47
|
+
ErrorCode = Azure::CognitiveServices::WebSearch::V1_0::Models::ErrorCode
|
48
|
+
ErrorSubCode = Azure::CognitiveServices::WebSearch::V1_0::Models::ErrorSubCode
|
49
|
+
Freshness = Azure::CognitiveServices::WebSearch::V1_0::Models::Freshness
|
50
|
+
SafeSearch = Azure::CognitiveServices::WebSearch::V1_0::Models::SafeSearch
|
51
|
+
TextFormat = Azure::CognitiveServices::WebSearch::V1_0::Models::TextFormat
|
52
|
+
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# WebSearchDataClass
|
56
|
+
#
|
57
|
+
class WebSearchDataClass
|
58
|
+
attr_reader :web, :configurable, :base_url, :options, :model_classes
|
59
|
+
|
60
|
+
def initialize(options = {})
|
61
|
+
if options.is_a?(Hash) && options.length == 0
|
62
|
+
@options = setup_default_options
|
63
|
+
else
|
64
|
+
@options = options
|
65
|
+
end
|
66
|
+
|
67
|
+
reset!(options)
|
68
|
+
|
69
|
+
@configurable = self
|
70
|
+
@base_url = options[:base_url].nil? ? nil:options[:base_url]
|
71
|
+
@options = options[:options].nil? ? nil:options[:options]
|
72
|
+
|
73
|
+
@client_0 = Azure::CognitiveServices::WebSearch::V1_0::WebSearchClient.new(configurable.credentials, base_url, options)
|
74
|
+
if(@client_0.respond_to?(:subscription_id))
|
75
|
+
@client_0.subscription_id = configurable.subscription_id
|
76
|
+
end
|
77
|
+
add_telemetry(@client_0)
|
78
|
+
@web = @client_0.web
|
79
|
+
|
80
|
+
@model_classes = ModelClasses.new
|
81
|
+
end
|
82
|
+
|
83
|
+
def add_telemetry(client)
|
84
|
+
profile_information = 'Profiles/Latest/WebSearch'
|
85
|
+
client.add_user_agent_information(profile_information)
|
86
|
+
end
|
87
|
+
|
88
|
+
def method_missing(method, *args)
|
89
|
+
if @client_0.respond_to?method
|
90
|
+
@client_0.send(method, *args)
|
91
|
+
else
|
92
|
+
super
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
end
|
97
|
+
|
98
|
+
class ModelClasses
|
99
|
+
def ranking_ranking_item
|
100
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::RankingRankingItem
|
101
|
+
end
|
102
|
+
def ranking_ranking_group
|
103
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::RankingRankingGroup
|
104
|
+
end
|
105
|
+
def web_meta_tag
|
106
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::WebMetaTag
|
107
|
+
end
|
108
|
+
def ranking_ranking_response
|
109
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::RankingRankingResponse
|
110
|
+
end
|
111
|
+
def web_web_grouping
|
112
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::WebWebGrouping
|
113
|
+
end
|
114
|
+
def error
|
115
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::Error
|
116
|
+
end
|
117
|
+
def query
|
118
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::Query
|
119
|
+
end
|
120
|
+
def time_zone_time_zone_information
|
121
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::TimeZoneTimeZoneInformation
|
122
|
+
end
|
123
|
+
def response_base
|
124
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::ResponseBase
|
125
|
+
end
|
126
|
+
def query_context
|
127
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::QueryContext
|
128
|
+
end
|
129
|
+
def image_object
|
130
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::ImageObject
|
131
|
+
end
|
132
|
+
def creative_work
|
133
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::CreativeWork
|
134
|
+
end
|
135
|
+
def web_page
|
136
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::WebPage
|
137
|
+
end
|
138
|
+
def news_article
|
139
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::NewsArticle
|
140
|
+
end
|
141
|
+
def video_object
|
142
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::VideoObject
|
143
|
+
end
|
144
|
+
def identifiable
|
145
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::Identifiable
|
146
|
+
end
|
147
|
+
def response
|
148
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::Response
|
149
|
+
end
|
150
|
+
def search_response
|
151
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::SearchResponse
|
152
|
+
end
|
153
|
+
def thing
|
154
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::Thing
|
155
|
+
end
|
156
|
+
def answer
|
157
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::Answer
|
158
|
+
end
|
159
|
+
def computation
|
160
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::Computation
|
161
|
+
end
|
162
|
+
def search_results_answer
|
163
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::SearchResultsAnswer
|
164
|
+
end
|
165
|
+
def web_web_answer
|
166
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::WebWebAnswer
|
167
|
+
end
|
168
|
+
def images
|
169
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::Images
|
170
|
+
end
|
171
|
+
def news
|
172
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::News
|
173
|
+
end
|
174
|
+
def related_searches_related_search_answer
|
175
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::RelatedSearchesRelatedSearchAnswer
|
176
|
+
end
|
177
|
+
def spell_suggestions
|
178
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::SpellSuggestions
|
179
|
+
end
|
180
|
+
def time_zone
|
181
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::TimeZone
|
182
|
+
end
|
183
|
+
def videos
|
184
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::Videos
|
185
|
+
end
|
186
|
+
def places
|
187
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::Places
|
188
|
+
end
|
189
|
+
def error_response
|
190
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::ErrorResponse
|
191
|
+
end
|
192
|
+
def intangible
|
193
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::Intangible
|
194
|
+
end
|
195
|
+
def media_object
|
196
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::MediaObject
|
197
|
+
end
|
198
|
+
def article
|
199
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::Article
|
200
|
+
end
|
201
|
+
def structured_value
|
202
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::StructuredValue
|
203
|
+
end
|
204
|
+
def answer_type
|
205
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::AnswerType
|
206
|
+
end
|
207
|
+
def error_code
|
208
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::ErrorCode
|
209
|
+
end
|
210
|
+
def error_sub_code
|
211
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::ErrorSubCode
|
212
|
+
end
|
213
|
+
def freshness
|
214
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::Freshness
|
215
|
+
end
|
216
|
+
def safe_search
|
217
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::SafeSearch
|
218
|
+
end
|
219
|
+
def text_format
|
220
|
+
Azure::CognitiveServices::WebSearch::V1_0::Models::TextFormat
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
require 'profiles/latest/websearch_module_definition'
|
6
|
+
require 'profiles/latest/modules/websearch_profile_module'
|
7
|
+
|
8
|
+
module Azure::WebSearch::Profiles::Latest
|
9
|
+
#
|
10
|
+
# Client class for the Latest profile SDK.
|
11
|
+
#
|
12
|
+
class Client < WebSearchDataClass
|
13
|
+
include MsRestAzure::Common::Configurable
|
14
|
+
|
15
|
+
#
|
16
|
+
# Initializes a new instance of the Client class.
|
17
|
+
# @param options [Hash] hash of client options.
|
18
|
+
# options = {
|
19
|
+
# tenant_id: 'YOUR TENANT ID',
|
20
|
+
# client_id: 'YOUR CLIENT ID',
|
21
|
+
# client_secret: 'YOUR CLIENT SECRET',
|
22
|
+
# subscription_id: 'YOUR SUBSCRIPTION ID',
|
23
|
+
# credentials: credentials,
|
24
|
+
# active_directory_settings: active_directory_settings,
|
25
|
+
# base_url: 'YOUR BASE URL',
|
26
|
+
# options: options
|
27
|
+
# }
|
28
|
+
# 'credentials' are optional and if not passed in the hash, will be obtained
|
29
|
+
# from MsRest::TokenCredentials using MsRestAzure::ApplicationTokenProvider.
|
30
|
+
#
|
31
|
+
# Also, base_url, active_directory_settings & options are optional.
|
32
|
+
#
|
33
|
+
def initialize(options = {})
|
34
|
+
super(options)
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
module Azure end
|
6
|
+
module Azure::WebSearch end
|
7
|
+
module Azure::WebSearch::Profiles end
|
8
|
+
module Azure::WebSearch::Profiles::Latest end
|
data/lib/version.rb
ADDED
metadata
ADDED
@@ -0,0 +1,171 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: azure_cognitiveservices_websearch
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.16.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Microsoft Corporation
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-02-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.9'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.9'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: dotenv
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: ms_rest_azure
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.10.0
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.10.0
|
83
|
+
description: Microsoft Azure Cognitive Services Web Search Client Library for Ruby
|
84
|
+
email: azrubyteam@microsoft.com
|
85
|
+
executables: []
|
86
|
+
extensions: []
|
87
|
+
extra_rdoc_files: []
|
88
|
+
files:
|
89
|
+
- LICENSE.txt
|
90
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch.rb
|
91
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/answer.rb
|
92
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/answer_type.rb
|
93
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/article.rb
|
94
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/computation.rb
|
95
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/creative_work.rb
|
96
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/error.rb
|
97
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/error_code.rb
|
98
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/error_response.rb
|
99
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/error_sub_code.rb
|
100
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/freshness.rb
|
101
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/identifiable.rb
|
102
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/image_object.rb
|
103
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/images.rb
|
104
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/intangible.rb
|
105
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/media_object.rb
|
106
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/news.rb
|
107
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/news_article.rb
|
108
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/places.rb
|
109
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/query.rb
|
110
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/query_context.rb
|
111
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/ranking_ranking_group.rb
|
112
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/ranking_ranking_item.rb
|
113
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/ranking_ranking_response.rb
|
114
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/related_searches_related_search_answer.rb
|
115
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/response.rb
|
116
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/response_base.rb
|
117
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/safe_search.rb
|
118
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/search_response.rb
|
119
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/search_results_answer.rb
|
120
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/spell_suggestions.rb
|
121
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/structured_value.rb
|
122
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/text_format.rb
|
123
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/thing.rb
|
124
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/time_zone.rb
|
125
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/time_zone_time_zone_information.rb
|
126
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/video_object.rb
|
127
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/videos.rb
|
128
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/web_meta_tag.rb
|
129
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/web_page.rb
|
130
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/web_web_answer.rb
|
131
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/models/web_web_grouping.rb
|
132
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/module_definition.rb
|
133
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/web.rb
|
134
|
+
- lib/1.0/generated/azure_cognitiveservices_websearch/web_search_client.rb
|
135
|
+
- lib/azure_cognitiveservices_websearch.rb
|
136
|
+
- lib/module_definition.rb
|
137
|
+
- lib/profiles/latest/modules/websearch_profile_module.rb
|
138
|
+
- lib/profiles/latest/websearch_latest_profile_client.rb
|
139
|
+
- lib/profiles/latest/websearch_module_definition.rb
|
140
|
+
- lib/version.rb
|
141
|
+
homepage: https://aka.ms/azure-sdk-for-ruby
|
142
|
+
licenses:
|
143
|
+
- MIT
|
144
|
+
metadata:
|
145
|
+
bug_tracker_uri: https://github.com/Azure/azure-sdk-for-ruby/issues
|
146
|
+
changelog_uri: https://github.com/Azure/azure-sdk-for-ruby/blob/master/ChangeLog.md
|
147
|
+
documentation_uri: https://azure.microsoft.com/en-us/develop/ruby/
|
148
|
+
homepage_uri: https://aka.ms/azure-sdk-for-ruby
|
149
|
+
source_code_uri: https://github.com/Azure/azure-sdk-for-ruby/tree/master/data/azure_cognitiveservices_websearch
|
150
|
+
post_install_message:
|
151
|
+
rdoc_options: []
|
152
|
+
require_paths:
|
153
|
+
- lib
|
154
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: 2.0.0
|
159
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
|
+
requirements:
|
161
|
+
- - ">="
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: '0'
|
164
|
+
requirements: []
|
165
|
+
rubyforge_project:
|
166
|
+
rubygems_version: 2.5.1
|
167
|
+
signing_key:
|
168
|
+
specification_version: 4
|
169
|
+
summary: Official Ruby client library to consume Microsoft Azure Cognitive Services
|
170
|
+
Web Search.
|
171
|
+
test_files: []
|