Class: Google::Apis::CustomsearchV1::Result

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/customsearch_v1/classes.rb,
generated/google/apis/customsearch_v1/representations.rb,
generated/google/apis/customsearch_v1/representations.rb

Overview

A custom search result.

Defined Under Namespace

Classes: Image, Label

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Result

Returns a new instance of Result.



227
228
229
# File 'generated/google/apis/customsearch_v1/classes.rb', line 227

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#cache_idString

Indicates the ID of Google's cached version of the search result. Corresponds to the JSON property cacheId

Returns:

  • (String)


151
152
153
# File 'generated/google/apis/customsearch_v1/classes.rb', line 151

def cache_id
  @cache_id
end

An abridged version of this search result’s URL, e.g. www.example.com. Corresponds to the JSON property displayLink

Returns:

  • (String)


156
157
158
# File 'generated/google/apis/customsearch_v1/classes.rb', line 156

def display_link
  @display_link
end

#file_formatString

The file format of the search result. Corresponds to the JSON property fileFormat

Returns:

  • (String)


161
162
163
# File 'generated/google/apis/customsearch_v1/classes.rb', line 161

def file_format
  @file_format
end

#formatted_urlString

The URL displayed after the snippet for each search result. Corresponds to the JSON property formattedUrl

Returns:

  • (String)


166
167
168
# File 'generated/google/apis/customsearch_v1/classes.rb', line 166

def formatted_url
  @formatted_url
end

#html_formatted_urlString

The HTML-formatted URL displayed after the snippet for each search result. Corresponds to the JSON property htmlFormattedUrl

Returns:

  • (String)


171
172
173
# File 'generated/google/apis/customsearch_v1/classes.rb', line 171

def html_formatted_url
  @html_formatted_url
end

#html_snippetString

The snippet of the search result, in HTML. Corresponds to the JSON property htmlSnippet

Returns:

  • (String)


176
177
178
# File 'generated/google/apis/customsearch_v1/classes.rb', line 176

def html_snippet
  @html_snippet
end

#html_titleString

The title of the search result, in HTML. Corresponds to the JSON property htmlTitle

Returns:

  • (String)


181
182
183
# File 'generated/google/apis/customsearch_v1/classes.rb', line 181

def html_title
  @html_title
end

#imageGoogle::Apis::CustomsearchV1::Result::Image

Image belonging to a custom search result. Corresponds to the JSON property image



186
187
188
# File 'generated/google/apis/customsearch_v1/classes.rb', line 186

def image
  @image
end

#kindString

A unique identifier for the type of current object. For this API, it is customsearch#result. Corresponds to the JSON property kind

Returns:

  • (String)


192
193
194
# File 'generated/google/apis/customsearch_v1/classes.rb', line 192

def kind
  @kind
end

#labelsArray<Google::Apis::CustomsearchV1::Result::Label>

Encapsulates all information about refinement labels. Corresponds to the JSON property labels



198
199
200
# File 'generated/google/apis/customsearch_v1/classes.rb', line 198

def labels
  @labels
end

The full URL to which the search result is pointing, e.g. http://www.example. com/foo/bar. Corresponds to the JSON property link

Returns:

  • (String)


204
205
206
# File 'generated/google/apis/customsearch_v1/classes.rb', line 204

def link
  @link
end

#mimeString

The MIME type of the search result. Corresponds to the JSON property mime

Returns:

  • (String)


209
210
211
# File 'generated/google/apis/customsearch_v1/classes.rb', line 209

def mime
  @mime
end

#pagemapHash<String,Object>

Contains PageMap information for this search result. Corresponds to the JSON property pagemap

Returns:

  • (Hash<String,Object>)


215
216
217
# File 'generated/google/apis/customsearch_v1/classes.rb', line 215

def pagemap
  @pagemap
end

#snippetString

The snippet of the search result, in plain text. Corresponds to the JSON property snippet

Returns:

  • (String)


220
221
222
# File 'generated/google/apis/customsearch_v1/classes.rb', line 220

def snippet
  @snippet
end

#titleString

The title of the search result, in plain text. Corresponds to the JSON property title

Returns:

  • (String)


225
226
227
# File 'generated/google/apis/customsearch_v1/classes.rb', line 225

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'generated/google/apis/customsearch_v1/classes.rb', line 232

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