2017 © Pedro Peláez
 

library geonames-api

Geonames.org api client library based on guzzle 5

image

spacedealer/geonames-api

Geonames.org api client library based on guzzle 5

  • Monday, May 4, 2015
  • by dirx
  • Repository
  • 3 Watchers
  • 2 Stars
  • 392 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 2 Open issues
  • 6 Versions
  • 3 % Grown

The README.md

Geonames.org REST api client PHP library

Attention: Please do not use in production environments. It‘s WIP., (*1)

This is a simple geonames API client based on Guzzle 5., (*2)

Build Status SensioLabsInsight Dependency Status, (*3)

Requirements

  • php >= 5.4
  • guzzle 5
  • guzzle services 0.5
  • guzzle command 0.7

Installation

The preferred way to install this extension is through composer., (*4)

Either run, (*5)

php composer.phar require --prefer-dist spacedealer/geonames-api "*"

or add, (*6)

"spacedealer/geonames-api": "*"

to the require section of your composer.json file., (*7)

Usage

$client = new \spacedealer\geonames\api\Geonames('your_username');
try {
    $response = $client->postalCodeSearch([
        'postalcode' => '10997',
        'country' => 'de',
    ]);

    if ($response->isOk()) {
        $count = $response->count();
        echo "Found entries: $count" . PHP_EOL;
        $placeName = $response->getPath('0/placeName');
        echo "Place name   : " . $placeName . PHP_EOL;
    } else {
        echo $response->getPath('message') . PHP_EOL;
    }
} catch (\RuntimeException $e) {
    echo $e->getMessage() . PHP_EOL;
}

Todos

  • complete unit tests
  • improve response model handling
  • add support for xml only command: extendedFindNearby

Resources

The Versions

04/05 2015

dev-master

9999999-dev https://github.com/spacedealer/geonames-api

Geonames.org api client library based on guzzle 5

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

api rest client guzzle geonames

04/05 2015

0.2.2

0.2.2.0 https://github.com/spacedealer/geonames-api

Geonames.org api client library based on guzzle 5

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

api rest client guzzle geonames

02/03 2015

0.2.1

0.2.1.0 https://github.com/spacedealer/geonames-api

Geonames.org api client library based on guzzle 5

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

api rest client guzzle geonames

04/02 2015

0.2.0

0.2.0.0 https://github.com/spacedealer/geonames-api

Geonames.org api client library based on guzzle 5

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

api rest client guzzle geonames

03/12 2014

0.1.0

0.1.0.0 https://github.com/spacedealer/geonames-api

Geonames.org api client library based on guzzle 4

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

api rest client guzzle geonames

04/09 2014

0.1

0.1.0.0

Guzzle based geonames.org api client

  Sources   Download

The Requires

 

The Development Requires