Add this to composer.json 1. Installation:
"stev/geonames-bundle": "0.1.*@dev"
new Stev\GeonamesBundle\StevGeonamesBundle()
stev_geonames:
username: your_username
token: ~
use_public: true
2. Usage
/* @var $geonames \Geonames\Geonames */
$geonames = $this->get('stev.geonames')->getGeonames();
$result = $geonames->findNearbyPostalCodes(array(
'postalcode' => 712122
));
3. Endpoints
A list of full endpoints can be found in the library https://github.com/nikkobautista/geonames, or on Geonames website http://www.geonames.org/export/ws-overview.html