Class: Google::Apis::PagespeedonlineV1::Result::Screenshot

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

Overview

Base64-encoded screenshot of the page that was analyzed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Screenshot

Returns a new instance of Screenshot



502
503
504
# File 'generated/google/apis/pagespeedonline_v1/classes.rb', line 502

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

Instance Attribute Details

#dataString

Image data base64 encoded. Corresponds to the JSON property data NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


485
486
487
# File 'generated/google/apis/pagespeedonline_v1/classes.rb', line 485

def data
  @data
end

#heightFixnum

Height of screenshot in pixels. Corresponds to the JSON property height

Returns:

  • (Fixnum)


490
491
492
# File 'generated/google/apis/pagespeedonline_v1/classes.rb', line 490

def height
  @height
end

#mime_typeString

Mime type of image data. E.g. "image/jpeg". Corresponds to the JSON property mime_type

Returns:

  • (String)


495
496
497
# File 'generated/google/apis/pagespeedonline_v1/classes.rb', line 495

def mime_type
  @mime_type
end

#widthFixnum

Width of screenshot in pixels. Corresponds to the JSON property width

Returns:

  • (Fixnum)


500
501
502
# File 'generated/google/apis/pagespeedonline_v1/classes.rb', line 500

def width
  @width
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



507
508
509
510
511
512
# File 'generated/google/apis/pagespeedonline_v1/classes.rb', line 507

def update!(**args)
  @data = args[:data] if args.key?(:data)
  @height = args[:height] if args.key?(:height)
  @mime_type = args[:mime_type] if args.key?(:mime_type)
  @width = args[:width] if args.key?(:width)
end