1.2.2 • Published 7 years ago

gouv-api v1.2.2

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

gouv-api

NPM

npm version

A Node module to connect all wrapper for the api.gouv.fr.

Installation

$ npm install gouv-api

or

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

Example

var GouvAPI = require('gouv-api');

var Gouv = new GouvAPI();

console.log(Gouv.version);

// gouv-geo-api
Gouv.geo.getTowns({codePostal: 94000}, function(error, result) {
  console.log(error, result);
});

// gouv-medic-api
Gouv.medic.getByName('doliprane', function(error, results) {
  console.log(error, results);
});

// gouv-national-address-api
Gouv.nationalAddress.search({text: '1 avenue république'}, function(error, result) {
  console.log(error, result);
});

// gouv-openfisca-api
Gouv.openfisca.entities(null, function(error, result) {
  console.log(error, result);
});

Supported API (Currently)