grayloon / geonames
PHP package for accessing the geonames.org API
Installs: 4 687
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Requires
- php: ^8.0
- php-http/cache-plugin: ^1.4
- php-http/client-common: ^1.6 || ^2.0
- php-http/client-implementation: ^1.0
- php-http/discovery: ^1.0
- php-http/httplug: ^1.1 || ^2.0
- psr/cache: ^1.0
- psr/http-message: ^1.0
Requires (Dev)
- cache/array-adapter: ^1.1.0
- friendsofphp/php-cs-fixer: ^2.16
- guzzlehttp/psr7: ^1.2
- larapack/dd: ^1.1
- php-http/guzzle6-adapter: ^1.0 || ^2.0
- php-http/mock-client: ^1.2
- phpunit/phpunit: ^7.0 || ^8.0
This package is auto-updated.
Last update: 2025-03-25 23:33:05 UTC
README
A simple Object Oriented wrapper for GeoNames API, written with PHP.
This project is a work in progress.
Requirements
- PHP >= 7.1
- GeoNames Account
- (optional) PHPUnit to run tests.
Installation
You can install the package via composer:
composer require grayloon/geonames
Usage
An overview of available API parameters for each endpoint is available here.
$geonames = new \Grayloon\Geonames('your_username'); $result = $geonames->postalCodeSearch([ 'country' => 'US', 'postalcode' => '47579', ]);
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email webmaster@grayloon.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.