scragg0x/google-api-php-client

PHP的Google API库

dev-master 2013-06-12 18:17 UTC

This package is not auto-updated.

Last update: 2024-09-14 14:34:47 UTC


README

重要提示

我从未完成这项工作,并且没有兴趣进一步维护它。请不要基于此开始任何新的工作。我保留这个仓库是为了那些可能仍然需要它的人。

描述

Google API客户端库允许您在服务器上使用Google API,如Buzz、Moderator、Tasks或Latitude。

这是从以下版本分叉的:

当前版本托管于此

分支信息

本项目分叉以稍微现代化Google API代码库。以下是一些所做的更改:

  • 去掉了所有require()语句。现在需要自动加载器
  • 重命名了所有类。现在所有内容都在GoogleApi命名空间中。
  • 添加了composer包信息(待完成)
  • 去掉了自动执行的代码。

现有文档适用,但请注意,现在必须使用\GoogleApi\Io\HttpRequest类而不是像apiHttpRequest这样的类。

要求

项目页面

OAuth 2指令

在此处报告缺陷或功能请求

在您的Feed阅读器中订阅项目更新

支持的应用程序示例

基本示例

<?php
include 'vendor/autoload.php';

$client = new \GoogleApi\Client();
$service = new \GoogleApi\Contrib\apiBooksService($client);

$optParams = array('filter' => 'free-ebooks');
$results = $service->volumes->listVolumes('Henry David Thoreau', $optParams);

foreach ($results['items'] as $item) {
  print($item['volumeInfo']['title'] . '<br>');
}