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 |
|---|
mixedAPI Key.
run_pagespeed(string $url, boolean $filter_third_party= '', string $locale= '', string $rule= '', boolean $screenshot= '', string $strategy= '') : array
| api | GET |
|---|---|
| see | Documentation |
| access | public |
stringThe URL to fetch and analyze.
booleanIndicates if third party resources should be filtered out before PageSpeed analysis. (Default: false).
stringThe locale used to localize formatted results.
stringA PageSpeed rule to run; if none are given, all rules are run.
booleanIndicates if binary data containing a screenshot should be included (Default: false).
stringThe analysis strategy to use. Accepted values: desktop, mobile.
arrayPageSpeed Results.fetch(mixed $request) : \$body
| access | private |
|---|
mixedRequest URL.
\$bodyBody.$api_key : string
$base_uri : string
'https://www.googleapis.com/pagespeedonline/v2/runPagespeed'