evert / google-api-php-client
此包已弃用且不再维护。没有建议的替代包。
Google API PHP 库
dev-master
2012-12-15 17:08 UTC
Requires
- php: >=5.3.0
- ext-curl: *
This package is not auto-updated.
Last update: 2022-02-01 12:20:30 UTC
README
重要说明
我从未完成它,也没有兴趣进一步维护它。请勿在此基础上开始任何新的工作。我保留这个仓库是为了可能仍然需要它的人。
描述
Google API 客户端库允许您在服务器上使用 Google API,例如 Buzz、Moderator、Tasks 或 Latitude。
这是一个从以下版本分支出来的:
当前版本托管在此:
分支信息
此项目分支出来以稍微现代化 Google API 代码库。以下是一些更改:
- 移除了所有 require() 语句。现在需要自动加载器。
- 重命名了所有类。现在所有内容都在 GoogleApi 命名空间中。
- 添加了 composer 包信息(待完成)
- 移除了自动执行代码。
现有的文档适用,但请注意,您现在必须使用类似于 apiHttpRequest
的类,而不是 \GoogleApi\Io\HttpRequest
。
要求
- PHP 5.3.x 或更高版本(https://php.ac.cn/)
- PHP Curl 扩展(https://php.ac.cn/manual/en/intro.curl.php)
- PHP JSON 扩展(https://php.ac.cn/manual/en/book.json.php)
项目页面
OAuth 2 指令
在此处报告缺陷或功能请求
在您的 RSS 阅读器中订阅项目更新
支持的示例应用程序
基本示例
<?php
include 'vendor/autoload.php';
$client = new \GoogleApi\Client();
$service = new \GoogleApi\Books\Service($client);
$optParams = array('filter' => 'free-ebooks');
$results = $service->volumes->listVolumes('Henry David Thoreau', $optParams);
foreach ($results['items'] as $item) {
print($item['volumeInfo']['title'] . '<br>');
}