Skip to content

Commit

Permalink
use countryCode instead of country in examples (#74)
Browse files Browse the repository at this point in the history
I think using country is not right.
  • Loading branch information
palmerabollo committed Nov 17, 2020
1 parent 41ee4cf commit 108ef40
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![Build Status](https://travis-ci.org/jcblw/geode.svg?branch=master)](https://travis-ci.org/jcblw/geode)[![Coverage Status](https://coveralls.io/repos/github/jcblw/geode/badge.svg?branch=master)](https://coveralls.io/github/jcblw/geode?branch=master)

locations api in node from www.geonames.org
Locations API in node from www.geonames.org

## Install

Expand All @@ -14,12 +14,11 @@ npm install geode

## Use

you will need an account ~ *its free*
#####[Signup](http://www.geonames.org/login)
You will need an account ~ *its free* ([signup](http://www.geonames.org/login)).

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

geo.search({name :'Riverside'}, function(err, results){
console.log([err, results])
Expand All @@ -28,14 +27,12 @@ geo.search({name :'Riverside'}, function(err, results){

## Demo

Heres a simple Express App throwing up an api

####[Demo](http://geode-demo.herokuapp.com/search.json?q=riverside&maxRows=2)
Here is a simple Express App throwing up an API. (see [demo](http://geode-demo.herokuapp.com/search.json?q=riverside&maxRows=2)).

The express code is just

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

app.get('/:collection.:format', function(req, res){
if(req.params.collection && req.params.format){
Expand Down

0 comments on commit 108ef40

Please sign in to comment.