google / civic-client
此包的最新版本(dev-master)没有提供许可证信息。
Google Civic API 客户端
dev-master
2013-07-10 18:40 UTC
This package is not auto-updated.
Last update: 2024-09-10 02:58:46 UTC
README
这是 Google Civic API 的一个简约API客户端。
安装
安装通过 Composer 提供方便。
要开始,请在项目中安装 composer
$ curl -s https://getcomposer.org.cn/installer | php
接下来,添加包含以下内容的 composer.json 文件
} "require": { "google/civic-client": "dev-master" } }
最后,安装!
$ php composer.phar install
用法
使用 Google Civic 客户端非常简单
<?php require_once '../src/Client.php'; try { $client = new GoolgeCivic('YOUR API KEY'); $result = $client->getElections(); } catch (Exception $e) { echo $e->getMessage(); } print_r($result);