spacedealer/yii2-geonames Yii2 extension for geonames.org webservice api

extensionapirestclientguzzlegeonames

Geonames API client extension for Yii2

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.

Build Status SensioLabsInsight Dependency Status

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

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

  • 0.2.004 February 2015
  • 0.103 December 2014

Comments



0.2.0 is the latest of 2 releases



BSD-3-Clause license
Stats
1 github stars & 3 github forks
0 downloads in the last day
0 downloads in the last 30 days
335 total downloads