spacedealer/yii2-geonames
最新稳定版本:0.2.0
Composer 安装命令:
composer require spacedealer/yii2-geonames
包简介
Yii2 extension for geonames.org webservice api
README 文档
README
Attention: Please do not use in production environments. It‘s WIP.
This is a Geonames API client extension for the Yii2 Framework. It wraps around the geonames-api php library.
Requirements
- php >= 5.4
- spacedealer/geonames-api 0.2
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist spacedealer/yii2-geonames "*"
or add
"spacedealer/yii2-geonames": "*"
to the require section of your composer.json file.
Usage
Once the extension is installed, simply modify your application components configuration as follows:
'geonames' => [ 'class' => 'spacedealer\geonames\Geonames', 'username' => 'your_username', 'language' => 'de', ],
Use within your Yii2 application logic:
$geonames = \Yii::$app->get('geonames')->getClient(); $response = $geonames->postalCodeSearch([ 'country' => 'de', 'postalcode' => '10997', ]);
Todos
- add unit tests
Resources
统计信息
- 总下载量: 638
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2014-12-03