Class: Google::Apis::PagespeedonlineV1::PagespeedonlineService
- Inherits:
- 
      Core::BaseService
      
        - Object
- Core::BaseService
- Google::Apis::PagespeedonlineV1::PagespeedonlineService
 
- Defined in:
- generated/google/apis/pagespeedonline_v1/service.rb
Overview
PageSpeed Insights API
Analyzes the performance of a web page and provides tailored suggestions to make that page faster.
Instance Attribute Summary collapse
- 
  
    
      #key  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    API key. 
- 
  
    
      #quota_user  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    An opaque string that represents a user for quota purposes. 
- 
  
    
      #user_ip  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Deprecated. 
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
- 
  
    
      #initialize  ⇒ PagespeedonlineService 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of PagespeedonlineService. 
- 
  
    
      #runpagespeed_pagespeedapi(url, filter_third_party_resources: nil, locale: nil, rule: nil, screenshot: nil, strategy: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PagespeedonlineV1::Result 
    
    
  
  
  
  
  
  
  
  
  
    Runs PageSpeed analysis on the page at the specified URL, and returns a PageSpeed score, a list of suggestions to make that page faster, and other information. 
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ PagespeedonlineService
Returns a new instance of PagespeedonlineService
| 50 51 52 53 | # File 'generated/google/apis/pagespeedonline_v1/service.rb', line 50 def initialize super('https://www.googleapis.com/', 'pagespeedonline/v1/') @batch_path = 'batch/pagespeedonline/v1' end | 
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
| 39 40 41 | # File 'generated/google/apis/pagespeedonline_v1/service.rb', line 39 def key @key end | 
#quota_user ⇒ String
Returns An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
| 44 45 46 | # File 'generated/google/apis/pagespeedonline_v1/service.rb', line 44 def quota_user @quota_user end | 
#user_ip ⇒ String
Returns Deprecated. Please use quotaUser instead.
| 48 49 50 | # File 'generated/google/apis/pagespeedonline_v1/service.rb', line 48 def user_ip @user_ip end | 
Instance Method Details
#runpagespeed_pagespeedapi(url, filter_third_party_resources: nil, locale: nil, rule: nil, screenshot: nil, strategy: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PagespeedonlineV1::Result
Runs PageSpeed analysis on the page at the specified URL, and returns a PageSpeed score, a list of suggestions to make that page faster, and other information.
| 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | # File 'generated/google/apis/pagespeedonline_v1/service.rb', line 90 def runpagespeed_pagespeedapi(url, filter_third_party_resources: nil, locale: nil, rule: nil, screenshot: nil, strategy: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'runPagespeed', ) command.response_representation = Google::Apis::PagespeedonlineV1::Result::Representation command.response_class = Google::Apis::PagespeedonlineV1::Result command.query['filter_third_party_resources'] = filter_third_party_resources unless filter_third_party_resources.nil? command.query['locale'] = locale unless locale.nil? command.query['rule'] = rule unless rule.nil? command.query['screenshot'] = screenshot unless screenshot.nil? command.query['strategy'] = strategy unless strategy.nil? command.query['url'] = url unless url.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |