Google_PagespeedapiServiceResource

The "pagespeedapi" collection of methods.

Defined (1)

The class is defined in the following location(s).

/src/contrib/Google_PagespeedonlineService.php  
  1. class Google_PagespeedapiServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Runs Page Speed analysis on the page at the specified URL, and returns a Page Speed score, a list 
  5. * of suggestions to make that page faster, and other information. (pagespeedapi.runpagespeed) 
  6. * @param string $url The URL to fetch and analyze 
  7. * @param array $optParams Optional parameters. 
  8. * @opt_param string locale The locale used to localize formatted results 
  9. * @opt_param string rule A Page Speed rule to run; if none are given, all rules are run 
  10. * @opt_param bool screenshot Indicates if binary data containing a screenshot should be included 
  11. * @opt_param string strategy The analysis strategy to use 
  12. * @return Google_Result 
  13. */ 
  14. public function runpagespeed($url, $optParams = array()) { 
  15. $params = array('url' => $url); 
  16. $params = array_merge($params, $optParams); 
  17. $data = $this->__call('runpagespeed', array($params)); 
  18. if ($this->useObjects()) { 
  19. return new Google_Result($data); 
  20. } else { 
  21. return $data;