vinkas/singapore-api
最新稳定版本:v0.4.0
Composer 安装命令:
composer require vinkas/singapore-api
包简介
PHP SDK for Singapore's open data API
README 文档
README
PHP SDK for Singapore's open data API https://data.gov.sg/datasets?formats=API
Installation
The package vinkas/singapore can be installed using composer via Packagist.
composer require vinkas/singapore
Usage
You can simply call the API endpoints by using the Connector class.
use Vinkas\Singapore\Api\Connector; $connector = new Connector(); $response = $connector->weather()->rainfall(); $data = $response->object()->data; $stations = $data->stations; $readings = $data->readings;
Also, you can get all the details of Singapore regions, areas, subzones, and postal districts from the classes below. Some of these lists are created from the MIT Node package https://github.com/horensen/sg-areas
use Vinkas\Singapore\Data\Regions; use Vinkas\Singapore\Data\Areas; use Vinkas\Singapore\Data\Subzones; use Vinkas\Singapore\Data\PostalDistricts; Regions::all(); Areas::all(); Subzones::all(); PostalDistricts::all();
统计信息
- 总下载量: 27
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-24