Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use countryCode instead of country in examples #74

Merged
merged 1 commit into from
Nov 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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