A WordPress API library for using the Google PageSpeed API.
link | Documentation |
---|---|
see | WP API Libraries |
package | WP-API-Libraries\WP-Google-PageSpeed-API |
author | imFORZA |
__construct(mixed $api_key) : void
access | public |
---|
mixed
API Key.
run_pagespeed(string $url, boolean $filter_third_party= ''
, string $locale= ''
, string $rule= ''
, boolean $screenshot= ''
, string $strategy= ''
) : array
api | GET |
---|---|
see | Documentation |
access | public |
string
The URL to fetch and analyze.
boolean
Indicates if third party resources should be filtered out before PageSpeed analysis. (Default: false).
string
The locale used to localize formatted results.
string
A PageSpeed rule to run; if none are given, all rules are run.
boolean
Indicates if binary data containing a screenshot should be included (Default: false).
string
The analysis strategy to use. Accepted values: desktop, mobile.
array
PageSpeed Results.fetch(mixed $request) : \$body
access | private |
---|
mixed
Request URL.
\$body
Body.$api_key : string
$base_uri : string
'https://www.googleapis.com/pagespeedonline/v2/runPagespeed'