Skip to content

Ayctor/GeoApiFr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GeoApiFr

It is a small php client library to use the GéoAPI.

See official documentation for availables methods.

Instalation

composer require ayctor/geoapifr

Usage

use GeoApiFr\GeoApiFr;

// Create instance

$instance = new GeoApiFr;

$regions = $instance->get('regions');

// OR

$versailles = GeoApiFr::getInstance()->get('communes', ['nom' => 'versailles']);

Errors

It will return an empty array if the request came up empty.

Return GuzzleHttp\Exception\RequestException object if error 400.