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

Inherits:
Object
  • Object
show all
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

Image belonging to a custom search result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Image

Returns a new instance of Image.



286
287
288
# File 'lib/google/apis/customsearch_v1/classes.rb', line 286

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

Instance Attribute Details

#byte_sizeFixnum

The size of the image, in bytes. Corresponds to the JSON property byteSize

Returns:

  • (Fixnum)


254
255
256
# File 'lib/google/apis/customsearch_v1/classes.rb', line 254

def byte_size
  @byte_size
end

A URL pointing to the webpage hosting the image. Corresponds to the JSON property contextLink

Returns:

  • (String)


259
260
261
# File 'lib/google/apis/customsearch_v1/classes.rb', line 259

def context_link
  @context_link
end

#heightFixnum

The height of the image, in pixels. Corresponds to the JSON property height

Returns:

  • (Fixnum)


264
265
266
# File 'lib/google/apis/customsearch_v1/classes.rb', line 264

def height
  @height
end

#thumbnail_heightFixnum

The height of the thumbnail image, in pixels. Corresponds to the JSON property thumbnailHeight

Returns:

  • (Fixnum)


269
270
271
# File 'lib/google/apis/customsearch_v1/classes.rb', line 269

def thumbnail_height
  @thumbnail_height
end

A URL to the thumbnail image. Corresponds to the JSON property thumbnailLink

Returns:

  • (String)


274
275
276
# File 'lib/google/apis/customsearch_v1/classes.rb', line 274

def thumbnail_link
  @thumbnail_link
end

#thumbnail_widthFixnum

The width of the thumbnail image, in pixels. Corresponds to the JSON property thumbnailWidth

Returns:

  • (Fixnum)


279
280
281
# File 'lib/google/apis/customsearch_v1/classes.rb', line 279

def thumbnail_width
  @thumbnail_width
end

#widthFixnum

The width of the image, in pixels. Corresponds to the JSON property width

Returns:

  • (Fixnum)


284
285
286
# File 'lib/google/apis/customsearch_v1/classes.rb', line 284

def width
  @width
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



291
292
293
294
295
296
297
298
299
# File 'lib/google/apis/customsearch_v1/classes.rb', line 291

def update!(**args)
  @byte_size = args[:byte_size] if args.key?(:byte_size)
  @context_link = args[:context_link] if args.key?(:context_link)
  @height = args[:height] if args.key?(:height)
  @thumbnail_height = args[:thumbnail_height] if args.key?(:thumbnail_height)
  @thumbnail_link = args[:thumbnail_link] if args.key?(:thumbnail_link)
  @thumbnail_width = args[:thumbnail_width] if args.key?(:thumbnail_width)
  @width = args[:width] if args.key?(:width)
end