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-12-27 18:31:05 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.