Class: Google::Apis::PagespeedonlineV5::LighthouseResultV5

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

Overview

The Lighthouse result object.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LighthouseResultV5

Returns a new instance of LighthouseResultV5.



565
566
567
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 565

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

Instance Attribute Details

#auditsHash<String,Google::Apis::PagespeedonlineV5::LighthouseAuditResultV5>

Map of audits in the LHR. Corresponds to the JSON property audits



472
473
474
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 472

def audits
  @audits
end

#categoriesGoogle::Apis::PagespeedonlineV5::Categories

The categories in a Lighthouse run. Corresponds to the JSON property categories



477
478
479
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 477

def categories
  @categories
end

#category_groupsHash<String,Google::Apis::PagespeedonlineV5::CategoryGroupV5>

Map of category groups in the LHR. Corresponds to the JSON property categoryGroups



482
483
484
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 482

def category_groups
  @category_groups
end

#config_settingsGoogle::Apis::PagespeedonlineV5::ConfigSettings

Message containing the configuration settings for the Lighthouse run. Corresponds to the JSON property configSettings



487
488
489
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 487

def config_settings
  @config_settings
end

#entitiesArray<Google::Apis::PagespeedonlineV5::LhrEntity>

Entity classification data. Corresponds to the JSON property entities



492
493
494
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 492

def entities
  @entities
end

#environmentGoogle::Apis::PagespeedonlineV5::Environment

Message containing environment configuration for a Lighthouse run. Corresponds to the JSON property environment



497
498
499
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 497

def environment
  @environment
end

#fetch_timeString

The time that this run was fetched. Corresponds to the JSON property fetchTime

Returns:

  • (String)


502
503
504
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 502

def fetch_time
  @fetch_time
end

#final_displayed_urlString

URL displayed on the page after Lighthouse finishes. Corresponds to the JSON property finalDisplayedUrl

Returns:

  • (String)


507
508
509
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 507

def final_displayed_url
  @final_displayed_url
end

#final_urlString

The final resolved url that was audited. Corresponds to the JSON property finalUrl

Returns:

  • (String)


512
513
514
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 512

def final_url
  @final_url
end

#full_page_screenshotObject

Screenshot data of the full page, along with node rects relevant to the audit results. Corresponds to the JSON property fullPageScreenshot

Returns:

  • (Object)


518
519
520
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 518

def full_page_screenshot
  @full_page_screenshot
end

#i18nGoogle::Apis::PagespeedonlineV5::I18n

Message containing the i18n data for the LHR - Version 1. Corresponds to the JSON property i18n



523
524
525
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 523

def i18n
  @i18n
end

#lighthouse_versionString

The lighthouse version that was used to generate this LHR. Corresponds to the JSON property lighthouseVersion

Returns:

  • (String)


528
529
530
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 528

def lighthouse_version
  @lighthouse_version
end

#main_document_urlString

URL of the main document request of the final navigation. Corresponds to the JSON property mainDocumentUrl

Returns:

  • (String)


533
534
535
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 533

def main_document_url
  @main_document_url
end

#requested_urlString

The original requested url. Corresponds to the JSON property requestedUrl

Returns:

  • (String)


538
539
540
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 538

def requested_url
  @requested_url
end

#run_warningsArray<Object>

List of all run warnings in the LHR. Will always output to at least []. Corresponds to the JSON property runWarnings

Returns:

  • (Array<Object>)


543
544
545
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 543

def run_warnings
  @run_warnings
end

#runtime_errorGoogle::Apis::PagespeedonlineV5::RuntimeError

Message containing a runtime error config. Corresponds to the JSON property runtimeError



548
549
550
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 548

def runtime_error
  @runtime_error
end

#stack_packsArray<Google::Apis::PagespeedonlineV5::StackPack>

The Stack Pack advice strings. Corresponds to the JSON property stackPacks



553
554
555
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 553

def stack_packs
  @stack_packs
end

#timingGoogle::Apis::PagespeedonlineV5::Timing

Message containing the performance timing data for the Lighthouse run. Corresponds to the JSON property timing



558
559
560
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 558

def timing
  @timing
end

#user_agentString

The user agent that was used to run this LHR. Corresponds to the JSON property userAgent

Returns:

  • (String)


563
564
565
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 563

def user_agent
  @user_agent
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 570

def update!(**args)
  @audits = args[:audits] if args.key?(:audits)
  @categories = args[:categories] if args.key?(:categories)
  @category_groups = args[:category_groups] if args.key?(:category_groups)
  @config_settings = args[:config_settings] if args.key?(:config_settings)
  @entities = args[:entities] if args.key?(:entities)
  @environment = args[:environment] if args.key?(:environment)
  @fetch_time = args[:fetch_time] if args.key?(:fetch_time)
  @final_displayed_url = args[:final_displayed_url] if args.key?(:final_displayed_url)
  @final_url = args[:final_url] if args.key?(:final_url)
  @full_page_screenshot = args[:full_page_screenshot] if args.key?(:full_page_screenshot)
  @i18n = args[:i18n] if args.key?(:i18n)
  @lighthouse_version = args[:lighthouse_version] if args.key?(:lighthouse_version)
  @main_document_url = args[:main_document_url] if args.key?(:main_document_url)
  @requested_url = args[:requested_url] if args.key?(:requested_url)
  @run_warnings = args[:run_warnings] if args.key?(:run_warnings)
  @runtime_error = args[:runtime_error] if args.key?(:runtime_error)
  @stack_packs = args[:stack_packs] if args.key?(:stack_packs)
  @timing = args[:timing] if args.key?(:timing)
  @user_agent = args[:user_agent] if args.key?(:user_agent)
end