azure_cognitiveservices_websearch 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/1.0/generated/azure_cognitiveservices_websearch.rb +69 -0
  4. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/answer.rb +90 -0
  5. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/answer_type.rb +22 -0
  6. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/article.rb +163 -0
  7. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/computation.rb +119 -0
  8. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/creative_work.rb +160 -0
  9. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/error.rb +116 -0
  10. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/error_code.rb +20 -0
  11. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/error_response.rb +89 -0
  12. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/error_sub_code.rb +25 -0
  13. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/freshness.rb +17 -0
  14. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/identifiable.rb +62 -0
  15. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/image_object.rb +199 -0
  16. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/images.rb +210 -0
  17. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/intangible.rb +115 -0
  18. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/media_object.rb +200 -0
  19. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/news.rb +148 -0
  20. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/news_article.rb +159 -0
  21. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/places.rb +135 -0
  22. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/query.rb +100 -0
  23. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/query_context.rb +126 -0
  24. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/ranking_ranking_group.rb +56 -0
  25. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/ranking_ranking_item.rb +116 -0
  26. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/ranking_ranking_response.rb +79 -0
  27. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/related_searches_related_search_answer.rb +135 -0
  28. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/response.rb +72 -0
  29. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/response_base.rb +71 -0
  30. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/safe_search.rb +17 -0
  31. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/search_response.rb +212 -0
  32. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/search_results_answer.rb +126 -0
  33. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/spell_suggestions.rb +141 -0
  34. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/structured_value.rb +115 -0
  35. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/text_format.rb +16 -0
  36. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/thing.rb +131 -0
  37. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/time_zone.rb +157 -0
  38. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/time_zone_time_zone_information.rb +70 -0
  39. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/video_object.rb +295 -0
  40. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/videos.rb +189 -0
  41. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/web_meta_tag.rb +59 -0
  42. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/web_page.rb +251 -0
  43. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/web_web_answer.rb +149 -0
  44. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/web_web_grouping.rb +66 -0
  45. data/lib/1.0/generated/azure_cognitiveservices_websearch/module_definition.rb +9 -0
  46. data/lib/1.0/generated/azure_cognitiveservices_websearch/web.rb +775 -0
  47. data/lib/1.0/generated/azure_cognitiveservices_websearch/web_search_client.rb +127 -0
  48. data/lib/azure_cognitiveservices_websearch.rb +6 -0
  49. data/lib/module_definition.rb +7 -0
  50. data/lib/profiles/latest/modules/websearch_profile_module.rb +223 -0
  51. data/lib/profiles/latest/websearch_latest_profile_client.rb +38 -0
  52. data/lib/profiles/latest/websearch_module_definition.rb +8 -0
  53. data/lib/version.rb +7 -0
  54. metadata +171 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4e9851541d4c7416d9d9fe3289b57087ab41cca7
4
+ data.tar.gz: ee22b9a3af9f2ccda08d43cbb796a800115e3501
5
+ SHA512:
6
+ metadata.gz: 8645400c82c9c029baa3868c354bff671b384588f91b5ea4db94a78abd4ca00bbbacfaa1a8755fa833a2841af893b206ef5b08339e2319a38497aba7a7fd27b3
7
+ data.tar.gz: ebee77375a2c3bc7c5ee702ff59f1fa63e03b7947255bba4638e46507d96df94d6b7367535c45bef86462bfd46cf70fe388ef305933e68e3a211ab23bca51e0c
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Microsoft Corporation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,69 @@
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
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '1.0/generated/azure_cognitiveservices_websearch/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::CognitiveServices::WebSearch::V1_0
23
+ autoload :Web, '1.0/generated/azure_cognitiveservices_websearch/web.rb'
24
+ autoload :WebSearchClient, '1.0/generated/azure_cognitiveservices_websearch/web_search_client.rb'
25
+
26
+ module Models
27
+ autoload :RankingRankingItem, '1.0/generated/azure_cognitiveservices_websearch/models/ranking_ranking_item.rb'
28
+ autoload :RankingRankingGroup, '1.0/generated/azure_cognitiveservices_websearch/models/ranking_ranking_group.rb'
29
+ autoload :WebMetaTag, '1.0/generated/azure_cognitiveservices_websearch/models/web_meta_tag.rb'
30
+ autoload :RankingRankingResponse, '1.0/generated/azure_cognitiveservices_websearch/models/ranking_ranking_response.rb'
31
+ autoload :WebWebGrouping, '1.0/generated/azure_cognitiveservices_websearch/models/web_web_grouping.rb'
32
+ autoload :Error, '1.0/generated/azure_cognitiveservices_websearch/models/error.rb'
33
+ autoload :Query, '1.0/generated/azure_cognitiveservices_websearch/models/query.rb'
34
+ autoload :TimeZoneTimeZoneInformation, '1.0/generated/azure_cognitiveservices_websearch/models/time_zone_time_zone_information.rb'
35
+ autoload :ResponseBase, '1.0/generated/azure_cognitiveservices_websearch/models/response_base.rb'
36
+ autoload :QueryContext, '1.0/generated/azure_cognitiveservices_websearch/models/query_context.rb'
37
+ autoload :ImageObject, '1.0/generated/azure_cognitiveservices_websearch/models/image_object.rb'
38
+ autoload :CreativeWork, '1.0/generated/azure_cognitiveservices_websearch/models/creative_work.rb'
39
+ autoload :WebPage, '1.0/generated/azure_cognitiveservices_websearch/models/web_page.rb'
40
+ autoload :NewsArticle, '1.0/generated/azure_cognitiveservices_websearch/models/news_article.rb'
41
+ autoload :VideoObject, '1.0/generated/azure_cognitiveservices_websearch/models/video_object.rb'
42
+ autoload :Identifiable, '1.0/generated/azure_cognitiveservices_websearch/models/identifiable.rb'
43
+ autoload :Response, '1.0/generated/azure_cognitiveservices_websearch/models/response.rb'
44
+ autoload :SearchResponse, '1.0/generated/azure_cognitiveservices_websearch/models/search_response.rb'
45
+ autoload :Thing, '1.0/generated/azure_cognitiveservices_websearch/models/thing.rb'
46
+ autoload :Answer, '1.0/generated/azure_cognitiveservices_websearch/models/answer.rb'
47
+ autoload :Computation, '1.0/generated/azure_cognitiveservices_websearch/models/computation.rb'
48
+ autoload :SearchResultsAnswer, '1.0/generated/azure_cognitiveservices_websearch/models/search_results_answer.rb'
49
+ autoload :WebWebAnswer, '1.0/generated/azure_cognitiveservices_websearch/models/web_web_answer.rb'
50
+ autoload :Images, '1.0/generated/azure_cognitiveservices_websearch/models/images.rb'
51
+ autoload :News, '1.0/generated/azure_cognitiveservices_websearch/models/news.rb'
52
+ autoload :RelatedSearchesRelatedSearchAnswer, '1.0/generated/azure_cognitiveservices_websearch/models/related_searches_related_search_answer.rb'
53
+ autoload :SpellSuggestions, '1.0/generated/azure_cognitiveservices_websearch/models/spell_suggestions.rb'
54
+ autoload :TimeZone, '1.0/generated/azure_cognitiveservices_websearch/models/time_zone.rb'
55
+ autoload :Videos, '1.0/generated/azure_cognitiveservices_websearch/models/videos.rb'
56
+ autoload :Places, '1.0/generated/azure_cognitiveservices_websearch/models/places.rb'
57
+ autoload :ErrorResponse, '1.0/generated/azure_cognitiveservices_websearch/models/error_response.rb'
58
+ autoload :Intangible, '1.0/generated/azure_cognitiveservices_websearch/models/intangible.rb'
59
+ autoload :MediaObject, '1.0/generated/azure_cognitiveservices_websearch/models/media_object.rb'
60
+ autoload :Article, '1.0/generated/azure_cognitiveservices_websearch/models/article.rb'
61
+ autoload :StructuredValue, '1.0/generated/azure_cognitiveservices_websearch/models/structured_value.rb'
62
+ autoload :AnswerType, '1.0/generated/azure_cognitiveservices_websearch/models/answer_type.rb'
63
+ autoload :ErrorCode, '1.0/generated/azure_cognitiveservices_websearch/models/error_code.rb'
64
+ autoload :ErrorSubCode, '1.0/generated/azure_cognitiveservices_websearch/models/error_sub_code.rb'
65
+ autoload :Freshness, '1.0/generated/azure_cognitiveservices_websearch/models/freshness.rb'
66
+ autoload :SafeSearch, '1.0/generated/azure_cognitiveservices_websearch/models/safe_search.rb'
67
+ autoload :TextFormat, '1.0/generated/azure_cognitiveservices_websearch/models/text_format.rb'
68
+ end
69
+ end
@@ -0,0 +1,90 @@
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
+ module Models
8
+ #
9
+ # Model object.
10
+ #
11
+ #
12
+ class Answer < Response
13
+
14
+ include MsRestAzure
15
+
16
+
17
+ def initialize
18
+ @_type = "Answer"
19
+ end
20
+
21
+ attr_accessor :_type
22
+
23
+ # @return [Array<Query>]
24
+ attr_accessor :follow_up_queries
25
+
26
+
27
+ #
28
+ # Mapper for Answer class as Ruby Hash.
29
+ # This will be used for serialization/deserialization.
30
+ #
31
+ def self.mapper()
32
+ {
33
+ client_side_validation: true,
34
+ required: false,
35
+ serialized_name: 'Answer',
36
+ type: {
37
+ name: 'Composite',
38
+ class_name: 'Answer',
39
+ model_properties: {
40
+ _type: {
41
+ client_side_validation: true,
42
+ required: true,
43
+ serialized_name: '_type',
44
+ type: {
45
+ name: 'String'
46
+ }
47
+ },
48
+ id: {
49
+ client_side_validation: true,
50
+ required: false,
51
+ read_only: true,
52
+ serialized_name: 'id',
53
+ type: {
54
+ name: 'String'
55
+ }
56
+ },
57
+ web_search_url: {
58
+ client_side_validation: true,
59
+ required: false,
60
+ read_only: true,
61
+ serialized_name: 'webSearchUrl',
62
+ type: {
63
+ name: 'String'
64
+ }
65
+ },
66
+ follow_up_queries: {
67
+ client_side_validation: true,
68
+ required: false,
69
+ read_only: true,
70
+ serialized_name: 'followUpQueries',
71
+ type: {
72
+ name: 'Sequence',
73
+ element: {
74
+ client_side_validation: true,
75
+ required: false,
76
+ serialized_name: 'QueryElementType',
77
+ type: {
78
+ name: 'Composite',
79
+ class_name: 'Query'
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
85
+ }
86
+ }
87
+ end
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,22 @@
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
+ module Models
8
+ #
9
+ # Defines values for AnswerType
10
+ #
11
+ module AnswerType
12
+ WebPages = "WebPages"
13
+ Images = "Images"
14
+ SpellSuggestions = "SpellSuggestions"
15
+ News = "News"
16
+ RelatedSearches = "RelatedSearches"
17
+ Videos = "Videos"
18
+ Computation = "Computation"
19
+ TimeZone = "TimeZone"
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,163 @@
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
+ module Models
8
+ #
9
+ # Model object.
10
+ #
11
+ #
12
+ class Article < CreativeWork
13
+
14
+ include MsRestAzure
15
+
16
+
17
+ def initialize
18
+ @_type = "Article"
19
+ end
20
+
21
+ attr_accessor :_type
22
+
23
+ # @return [Integer] The number of words in the text of the Article.
24
+ attr_accessor :word_count
25
+
26
+
27
+ #
28
+ # Mapper for Article class as Ruby Hash.
29
+ # This will be used for serialization/deserialization.
30
+ #
31
+ def self.mapper()
32
+ {
33
+ client_side_validation: true,
34
+ required: false,
35
+ serialized_name: 'Article',
36
+ type: {
37
+ name: 'Composite',
38
+ class_name: 'Article',
39
+ model_properties: {
40
+ _type: {
41
+ client_side_validation: true,
42
+ required: true,
43
+ serialized_name: '_type',
44
+ type: {
45
+ name: 'String'
46
+ }
47
+ },
48
+ id: {
49
+ client_side_validation: true,
50
+ required: false,
51
+ read_only: true,
52
+ serialized_name: 'id',
53
+ type: {
54
+ name: 'String'
55
+ }
56
+ },
57
+ web_search_url: {
58
+ client_side_validation: true,
59
+ required: false,
60
+ read_only: true,
61
+ serialized_name: 'webSearchUrl',
62
+ type: {
63
+ name: 'String'
64
+ }
65
+ },
66
+ name: {
67
+ client_side_validation: true,
68
+ required: false,
69
+ read_only: true,
70
+ serialized_name: 'name',
71
+ type: {
72
+ name: 'String'
73
+ }
74
+ },
75
+ url: {
76
+ client_side_validation: true,
77
+ required: false,
78
+ read_only: true,
79
+ serialized_name: 'url',
80
+ type: {
81
+ name: 'String'
82
+ }
83
+ },
84
+ image: {
85
+ client_side_validation: true,
86
+ required: false,
87
+ read_only: true,
88
+ serialized_name: 'image',
89
+ type: {
90
+ name: 'Composite',
91
+ class_name: 'ImageObject'
92
+ }
93
+ },
94
+ description: {
95
+ client_side_validation: true,
96
+ required: false,
97
+ read_only: true,
98
+ serialized_name: 'description',
99
+ type: {
100
+ name: 'String'
101
+ }
102
+ },
103
+ bing_id: {
104
+ client_side_validation: true,
105
+ required: false,
106
+ read_only: true,
107
+ serialized_name: 'bingId',
108
+ type: {
109
+ name: 'String'
110
+ }
111
+ },
112
+ thumbnail_url: {
113
+ client_side_validation: true,
114
+ required: false,
115
+ read_only: true,
116
+ serialized_name: 'thumbnailUrl',
117
+ type: {
118
+ name: 'String'
119
+ }
120
+ },
121
+ provider: {
122
+ client_side_validation: true,
123
+ required: false,
124
+ read_only: true,
125
+ serialized_name: 'provider',
126
+ type: {
127
+ name: 'Sequence',
128
+ element: {
129
+ client_side_validation: true,
130
+ required: false,
131
+ serialized_name: 'ThingElementType',
132
+ type: {
133
+ name: 'Composite',
134
+ class_name: 'Thing'
135
+ }
136
+ }
137
+ }
138
+ },
139
+ text: {
140
+ client_side_validation: true,
141
+ required: false,
142
+ read_only: true,
143
+ serialized_name: 'text',
144
+ type: {
145
+ name: 'String'
146
+ }
147
+ },
148
+ word_count: {
149
+ client_side_validation: true,
150
+ required: false,
151
+ read_only: true,
152
+ serialized_name: 'wordCount',
153
+ type: {
154
+ name: 'Number'
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }
160
+ end
161
+ end
162
+ end
163
+ end
@@ -0,0 +1,119 @@
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
+ module Models
8
+ #
9
+ # Defines an expression and its answer
10
+ #
11
+ class Computation < Answer
12
+
13
+ include MsRestAzure
14
+
15
+
16
+ def initialize
17
+ @_type = "Computation"
18
+ end
19
+
20
+ attr_accessor :_type
21
+
22
+ # @return [String] The math or conversion expression. If the query
23
+ # contains a request to convert units of measure (for example, meters to
24
+ # feet), this field contains the from units and value contains the to
25
+ # units. If the query contains a mathematical expression such as 2+2,
26
+ # this field contains the expression and value contains the answer. Note
27
+ # that mathematical expressions may be normalized. For example, if the
28
+ # query was sqrt(4^2+8^2), the normalized expression may be
29
+ # sqrt((4^2)+(8^2)). If the user's query is a math question and the
30
+ # textDecorations query parameter is set to true, the expression string
31
+ # may include formatting markers. For example, if the user's query is
32
+ # log(2), the normalized expression includes the subscript markers. For
33
+ # more information, see Hit Highlighting.
34
+ attr_accessor :expression
35
+
36
+ # @return [String] The expression's answer.
37
+ attr_accessor :value
38
+
39
+
40
+ #
41
+ # Mapper for Computation class as Ruby Hash.
42
+ # This will be used for serialization/deserialization.
43
+ #
44
+ def self.mapper()
45
+ {
46
+ client_side_validation: true,
47
+ required: false,
48
+ serialized_name: 'Computation',
49
+ type: {
50
+ name: 'Composite',
51
+ class_name: 'Computation',
52
+ model_properties: {
53
+ _type: {
54
+ client_side_validation: true,
55
+ required: true,
56
+ serialized_name: '_type',
57
+ type: {
58
+ name: 'String'
59
+ }
60
+ },
61
+ id: {
62
+ client_side_validation: true,
63
+ required: false,
64
+ read_only: true,
65
+ serialized_name: 'id',
66
+ type: {
67
+ name: 'String'
68
+ }
69
+ },
70
+ web_search_url: {
71
+ client_side_validation: true,
72
+ required: false,
73
+ read_only: true,
74
+ serialized_name: 'webSearchUrl',
75
+ type: {
76
+ name: 'String'
77
+ }
78
+ },
79
+ follow_up_queries: {
80
+ client_side_validation: true,
81
+ required: false,
82
+ read_only: true,
83
+ serialized_name: 'followUpQueries',
84
+ type: {
85
+ name: 'Sequence',
86
+ element: {
87
+ client_side_validation: true,
88
+ required: false,
89
+ serialized_name: 'QueryElementType',
90
+ type: {
91
+ name: 'Composite',
92
+ class_name: 'Query'
93
+ }
94
+ }
95
+ }
96
+ },
97
+ expression: {
98
+ client_side_validation: true,
99
+ required: true,
100
+ serialized_name: 'expression',
101
+ type: {
102
+ name: 'String'
103
+ }
104
+ },
105
+ value: {
106
+ client_side_validation: true,
107
+ required: true,
108
+ serialized_name: 'value',
109
+ type: {
110
+ name: 'String'
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
116
+ end
117
+ end
118
+ end
119
+ end