ayctor/geoapifr

Small PHP client library for geo api fr

0.0.2 2019-07-05 09:11 UTC

This package is auto-updated.

Last update: 2024-04-27 17:03:57 UTC


README

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.