dollar/google-php-sdk
Composer 安装命令:
composer require dollar/google-php-sdk
包简介
Client library for Google APIs
关键字:
README 文档
README
Google APIs Client Library for PHP
Description
The Google API Client Library enables you to work with Google APIs such as Google+, Drive, or YouTube on your server.
Beta
This library is in Beta. We're comfortable enough with the stability and features of the library that we want you to build real production applications on it. We will make an effort to support the public and protected surface of the library and maintain backwards compatibility in the future. While we are still in Beta, we reserve the right to make incompatible changes. If we do remove some functionality (typically because better functionality exists or if the feature proved infeasible), our intention is to deprecate and provide ample time for developers to update their code.
Requirements
Note: some features (service accounts and id token verification) require PHP 5.3.0 and above due to cryptographic algorithm requirements.
Developer Documentation
http://developers.google.com/api-client-library/php
Installation
For the latest installation and setup instructions, see the documentation.
Basic Example
See the examples/ directory for examples of the key client features.
<?php require_once 'Google/Client.php'; require_once 'Google/Service/Books.php'; $client = new Google_Client(); $client->setApplicationName("Client_Library_Examples"); $client->setDeveloperKey("YOUR_APP_KEY"); $service = new Google_Service_Books($client); $optParams = array('filter' => 'free-ebooks'); $results = $service->volumes->listVolumes('Henry David Thoreau', $optParams); foreach ($results as $item) { echo $item['volumeInfo']['title'], "<br /> \n"; }
Frequently Asked Questions
What do I do if something isn't working?
For support with the library the best place to ask is via the google-api-php-client tag on StackOverflow: http://stackoverflow.com/questions/tagged/google-api-php-client
If there is a specific bug with the library, please file a issue in the Github issues tracker, including a (minimal) example of the failing code and any specific errors retrieved. Feature requests can also be filed, as long as they are core library requests, and not-API specific: for those, refer to the documentation for the individual APIs for the best place to file requests. Please try to provide a clear statement of the problem that the feature would address.
How do I contribute?
We accept contributions via Github Pull Requests, but all contributors need to be covered by the standard Google Contributor License Agreement. You can find links, and more instructions, in the documentation: https://developers.google.com/api-client-library/php/contribute
Why do you still support 5.2?
When we started working on the 1.0.0 branch we knew there were several fundamental issues to fix with the 0.6 releases of the library. At that time we looked at the usage of the library, and other related projects, and determined that there was still a large and active base of PHP 5.2 installs. You can see this in statistics such as the PHP versions chart in the WordPress stats: http://wordpress.org/about/stats/. We will keep looking at the types of usage we see, and try to take advantage of newer PHP features where possible.
Why does Google_..._Service have weird names?
The _Service classes are generally automatically generated from the API discovery documents: https://developers.google.com/discovery/. Sometimes new features are added to APIs with unusual names, which can cause some unexpected or non-standard style naming in the PHP classes.
How do I deal with non-JSON response types
Some servives return XML or similar by default, rather than JSON, which is what the library supports. You can request a JSON response by adding an 'alt' argument to optional params that is normally the last argument to a method call:
$opt_params = array(
'alt' => "json"
);
Code Quality
Copy the ruleset.xml in style/ into a new directory named GAPI/ in your /usr/share/php/PHP/CodeSniffer/Standards (or appropriate equivalent directory), and run code sniffs with:
phpcs --standard=GAPI src/
dollar/google-php-sdk 适用场景与选型建议
dollar/google-php-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 23 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 03 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「google」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 dollar/google-php-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dollar/google-php-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 dollar/google-php-sdk 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Magento 2 Social Login extension is designed for quick login to your Magento 2 store without procesing complex register steps
Client for Google Directions API to add interpolated points to a route consisting of given coordinates.
Google Recaptcha Package For PHP front and backend.
Google Tag Manager container management and UI components for ArtisanPack UI, built on the google base package.
A package to easily make use of Googles Material Design Symbols (700) in your Laravel Blade views.
A package to easily make use of Googles Material Design Symbols (600) in your Laravel Blade views.
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2015-03-30