lobostome / furry-bear
各种公开数据的PHP包装器
0.7.2
2017-01-03 00:43 UTC
Requires
- php: >=5.3.0
Suggests
- guzzle/guzzle: Adds support for the Guzzle HTTP client
- kriswallsmith/buzz: Adds support for the Buzz HTTP client
This package is not auto-updated.
Last update: 2024-09-14 12:59:47 UTC
README
Sunlight Foundation API的PHP包装器
快速开始
指定http适配器、API提供商和输出格式。
$adapter = new FurryBear\Http\Adapter\Curl(); $provider = new FurryBear\Provider\Source\SunlightCongress($adapter, $apiKey); $output = new FurryBear\Output\Strategy\JsonToArray(); $fb = new FurryBear\FurryBear(); $fb->registerProvider($provider)->registerOutput($output); var_dump( $fb->bills_search->fields('official_title', 'chamber', 'introduced_on', 'search') ->search('"health care" medicine') ->filter('history.enacted', true) ->order('introduced_on') ->get() );
文档
有关详细文档和示例,请访问 Wiki。
路线图
0.9.0
- 添加Sunlight Influence Explorer API
0.8.0
- 对现有代码库进行重大改进
- 添加事件管理
- 直接访问HTTP客户端
- 并行处理多个请求
- 100%单元测试
变更日志
0.7.1
- 切换到国会API的HTTPS端点
0.7.0
- 添加依赖注入容器
0.6.0
- 添加Sunlight Political Party Time API
0.5.2
- 添加国会API地区定位助手
0.5.1
- 别名Open States API资源
- 添加Geocode Chain提供商
0.5.0
- 添加Sunlight Open States API
0.4.0
- 添加Sunlight Capitol Words API