Class: Google::Apis::CustomsearchV1::Result
- Inherits:
-
Object
- Object
- Google::Apis::CustomsearchV1::Result
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/customsearch_v1/classes.rb,
lib/google/apis/customsearch_v1/representations.rb,
lib/google/apis/customsearch_v1/representations.rb
Overview
A custom search result.
Defined Under Namespace
Instance Attribute Summary collapse
-
#cache_id ⇒ String
Indicates the ID of Google's cached version of the search result.
-
#display_link ⇒ String
An abridged version of this search result’s URL, e.g.
-
#file_format ⇒ String
The file format of the search result.
-
#formatted_url ⇒ String
The URL displayed after the snippet for each search result.
-
#html_formatted_url ⇒ String
The HTML-formatted URL displayed after the snippet for each search result.
-
#html_snippet ⇒ String
The snippet of the search result, in HTML.
-
#html_title ⇒ String
The title of the search result, in HTML.
-
#image ⇒ Google::Apis::CustomsearchV1::Result::Image
Image belonging to a custom search result.
-
#kind ⇒ String
A unique identifier for the type of current object.
-
#labels ⇒ Array<Google::Apis::CustomsearchV1::Result::Label>
Encapsulates all information about refinement labels.
-
#link ⇒ String
The full URL to which the search result is pointing, e.g.
-
#mime ⇒ String
The MIME type of the search result.
-
#pagemap ⇒ Hash<String,Object>
Contains PageMap information for this search result.
-
#snippet ⇒ String
The snippet of the search result, in plain text.
-
#title ⇒ String
The title of the search result, in plain text.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Result
constructor
A new instance of Result.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Result
Returns a new instance of Result.
224 225 226 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 224 def initialize(**args) update!(**args) end |
Instance Attribute Details
#cache_id ⇒ String
Indicates the ID of Google's cached version of the search result.
Corresponds to the JSON property cacheId
149 150 151 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 149 def cache_id @cache_id end |
#display_link ⇒ String
An abridged version of this search result’s URL, e.g. www.example.com.
Corresponds to the JSON property displayLink
154 155 156 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 154 def display_link @display_link end |
#file_format ⇒ String
The file format of the search result.
Corresponds to the JSON property fileFormat
159 160 161 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 159 def file_format @file_format end |
#formatted_url ⇒ String
The URL displayed after the snippet for each search result.
Corresponds to the JSON property formattedUrl
164 165 166 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 164 def formatted_url @formatted_url end |
#html_formatted_url ⇒ String
The HTML-formatted URL displayed after the snippet for each search result.
Corresponds to the JSON property htmlFormattedUrl
169 170 171 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 169 def html_formatted_url @html_formatted_url end |
#html_snippet ⇒ String
The snippet of the search result, in HTML.
Corresponds to the JSON property htmlSnippet
174 175 176 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 174 def html_snippet @html_snippet end |
#html_title ⇒ String
The title of the search result, in HTML.
Corresponds to the JSON property htmlTitle
179 180 181 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 179 def html_title @html_title end |
#image ⇒ Google::Apis::CustomsearchV1::Result::Image
Image belonging to a custom search result.
Corresponds to the JSON property image
184 185 186 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 184 def image @image end |
#kind ⇒ String
A unique identifier for the type of current object. For this API, it is
customsearch#result.
Corresponds to the JSON property kind
190 191 192 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 190 def kind @kind end |
#labels ⇒ Array<Google::Apis::CustomsearchV1::Result::Label>
Encapsulates all information about refinement labels.
Corresponds to the JSON property labels
195 196 197 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 195 def labels @labels end |
#link ⇒ String
The full URL to which the search result is pointing, e.g. http://www.example.
com/foo/bar.
Corresponds to the JSON property link
201 202 203 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 201 def link @link end |
#mime ⇒ String
The MIME type of the search result.
Corresponds to the JSON property mime
206 207 208 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 206 def mime @mime end |
#pagemap ⇒ Hash<String,Object>
Contains PageMap information for this search result.
Corresponds to the JSON property pagemap
212 213 214 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 212 def pagemap @pagemap end |
#snippet ⇒ String
The snippet of the search result, in plain text.
Corresponds to the JSON property snippet
217 218 219 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 217 def snippet @snippet end |
#title ⇒ String
The title of the search result, in plain text.
Corresponds to the JSON property title
222 223 224 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 222 def title @title end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 229 def update!(**args) @cache_id = args[:cache_id] if args.key?(:cache_id) @display_link = args[:display_link] if args.key?(:display_link) @file_format = args[:file_format] if args.key?(:file_format) @formatted_url = args[:formatted_url] if args.key?(:formatted_url) @html_formatted_url = args[:html_formatted_url] if args.key?(:html_formatted_url) @html_snippet = args[:html_snippet] if args.key?(:html_snippet) @html_title = args[:html_title] if args.key?(:html_title) @image = args[:image] if args.key?(:image) @kind = args[:kind] if args.key?(:kind) @labels = args[:labels] if args.key?(:labels) @link = args[:link] if args.key?(:link) @mime = args[:mime] if args.key?(:mime) @pagemap = args[:pagemap] if args.key?(:pagemap) @snippet = args[:snippet] if args.key?(:snippet) @title = args[:title] if args.key?(:title) end |