Git Product home page Git Product logo

inegi-denue's Introduction

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

inegi-denue's People

Contributors

nesslopz avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.