/gouv-geo-api

A Node wrapper for the geo api

Primary LanguageJavaScriptMIT LicenseMIT

gouv-geo-api

NPM

npm version

A Node wrapper for the geo api.

Installation

$ npm install gouv-geo-api

or

$ npm install git://github.com/Raesta/gouv-geo-api.git

Example

var GeoAPI = require('gouv-geo-api');

var Geo = new GeoAPI();

// get all towns with parameters
Geo.getTowns({codePostal: 94000}, function(error, result) {
  console.log(error, result);
});

// fetch all departments
Geo.getDepartments(null, function(error, result) {
  console.log(error, result);
});