contactmyreps/sunlight-php

Sunlight Foundation API的PHP封装器

v1.0 2016-03-03 00:14 UTC

This package is not auto-updated.

Last update: 2024-09-14 18:47:41 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

为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)。请参阅许可文件以获取更多信息。