Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

geode

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geode

wrapper for www.geonames.org api

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

Geode

locations api in node from www.geonames.org

Install

npm install geode

Use

you will need an account ~ its free #####Signup

//include
var geo = new geode('username', {language: 'en', country : 'US'})

geo.search({name :'Riverside'}, function(err, results){
	console.log([err, results])
})

Demo

Heres a simple Express App throwing up an api

####Demo

The express code is just

var api = new Geode('username', {country: "US", language: 'en'});

app.get('/:collection.:format', function(req, res){
  if(req.params.collection && req.params.format){
    api[req.params.collection](req.query, function(err, collection){
      res[req.params.format]({status : 200, results : collection});
    });
  }else{
    res.send('404');
  }
})

Testing

Make sure to install the development dependecies npm install --dev and then run.

USER=yourusername npm test

FAQs

Package last updated on 28 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc