Skip to content

nesslopz/inegi-denue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

inegi-denue

NodeJs module to serve JSON data from INEGI DENUE API, a 'KEY TOKEN' is required

site: http://www.beta.inegi.org.mx/servicios/api_denue.html

Installation

npm install inegi-denue --save

Usage

var denue = require('inegi-denue')

var client = denue.createClient()

client.places(latitude, longitude, function (err, places) {
  //  Do something places
})

client.places(latitude, longitude, {close: 1500}, function (err, places) {
  // Find all places around 1,500 meters
})

client.search('restaurantes', latitude, longitude, function (err, places) {
  // Do something places
})

client.search('restaurantes', latitude, longitude, {close: 5000} function (err, places) {
  // Search 'restaurantes' in a 5000 meters radio
})

Tests

'env INEGI_API_TOKEN="KEY_TOKEN" npm test'

'KEY_TOKEN' is exactly that String for test Only (using nock)

Coverage

env INEGI_API_TOKEN="KEY_TOKEN" npm run coverage

Production

env INEGI_API_TOKEN="'KEY_TOKEN'" node

'KEY_TOKEN' is a Required String

get it from: http://www.inegi.org.mx/desarrolladores/denue/apidenue.aspx

About

Module to serve data form INEGI Denue API, only available on México

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published