contactmyreps / sunlight-php
Sunlight Foundation API的PHP封装器
v1.0
2016-03-03 00:14 UTC
Requires
- php: ~5.5|~7.0
- guzzlehttp/guzzle: ^6.1
Requires (Dev)
- fzaninotto/faker: ^1.5
- phpunit/phpunit: 4.*
- scrutinizer/ocular: ~1.1
- squizlabs/php_codesniffer: ~2.3
This package is not auto-updated.
Last update: 2024-09-14 18:47:41 UTC
README
为contactmyreps.org设计的一个用于Sunlight Foundation API的有限PHP封装器
安装
通过Composer
$ composer require contactmyreps/sunlight-php
使用方法
$sunlight = new Sunlight($apikey); $openStates = $sunlight->openStates(); $congress = $sunlight->congress(); //get all Alabama's state legislators $states->legislators( [ 'state' => 'AL' ], ); //get all State reps serving a gps coordinate $states->geoLookup($lat, $lng); //get all Congressional representatives serving an area $congress->locateByZip(11111); $congress->locateByGeo($lat, $lng); $request methods can be passed an optional extra array argument of display fields to return (last_name, first_name, etc.)
变更日志
请参阅变更日志以获取更多关于最近更改的信息。
测试
$ composer test
贡献
安全
如果您发现任何与安全相关的问题,请通过电子邮件edfialk@gmail.com而不是使用问题跟踪器。
致谢
许可
MIT许可(MIT)。请参阅许可文件以获取更多信息。