Class: Google::Apis::CustomsearchV1::Result::Image
- Inherits:
-
Object
- Object
- Google::Apis::CustomsearchV1::Result::Image
- 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
-
#byte_size ⇒ Fixnum
The size of the image, in bytes.
-
#context_link ⇒ String
A URL pointing to the webpage hosting the image.
-
#height ⇒ Fixnum
The height of the image, in pixels.
-
#thumbnail_height ⇒ Fixnum
The height of the thumbnail image, in pixels.
-
#thumbnail_link ⇒ String
A URL to the thumbnail image.
-
#thumbnail_width ⇒ Fixnum
The width of the thumbnail image, in pixels.
-
#width ⇒ Fixnum
The width of the image, in pixels.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Image
constructor
A new instance of Image.
-
#update!(**args) ⇒ Object
Update properties of this object.
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_size ⇒ Fixnum
The size of the image, in bytes.
Corresponds to the JSON property byteSize
254 255 256 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 254 def byte_size @byte_size end |
#context_link ⇒ String
A URL pointing to the webpage hosting the image.
Corresponds to the JSON property contextLink
259 260 261 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 259 def context_link @context_link end |
#height ⇒ Fixnum
The height of the image, in pixels.
Corresponds to the JSON property height
264 265 266 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 264 def height @height end |
#thumbnail_height ⇒ Fixnum
The height of the thumbnail image, in pixels.
Corresponds to the JSON property thumbnailHeight
269 270 271 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 269 def thumbnail_height @thumbnail_height end |
#thumbnail_link ⇒ String
A URL to the thumbnail image.
Corresponds to the JSON property thumbnailLink
274 275 276 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 274 def thumbnail_link @thumbnail_link end |
#thumbnail_width ⇒ Fixnum
The width of the thumbnail image, in pixels.
Corresponds to the JSON property thumbnailWidth
279 280 281 |
# File 'lib/google/apis/customsearch_v1/classes.rb', line 279 def thumbnail_width @thumbnail_width end |
#width ⇒ Fixnum
The width of the image, in pixels.
Corresponds to the JSON property width
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 |