sgrodzicki/pagespeed
最新稳定版本:2.1.0
Composer 安装命令:
composer require sgrodzicki/pagespeed
包简介
A PHP library to interact with the PageSpeed Insights API
README 文档
README
A PHP module to interact with the PageSpeed Insights API.
Installation
The best way to install the library is by using Composer. Add the following to composer.json in the root of your project:
{ "require": { "sgrodzicki/pagespeed": "~2.0" } }
Then, on the command line:
curl -s http://getcomposer.org/installer | php php composer.phar install Use the generated vendor/.composer/autoload.php file to autoload the library classes.
Basic usage
<?php $pageSpeed = new \PageSpeed\Insights\Service(); $pageSpeed->getResults('http://www.example.com');
Tests
The client is tested with phpunit; you can run the tests, from the repository's root, by doing:
phpunit
Some tests may fail, due to requiring an internet connection (to test against a real API response). Make sure that you are connected to the internet before running the full test suite.
统计信息
- 总下载量: 127.78k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 48
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-04