0.0.7 • Published 11 years ago

restaurants v0.0.7

Weekly downloads
2
License
-
Repository
github
Last release
11 years ago

restaurants

Search for restaurants given a location and radius across multiple services. Mainly used for aggregating restaurant information about a location. Uses mapquest to geocode the address given into a lat/lng.

Installation

$ npm install -g restaurants

restaurants(1)

The restaurants(1) executable returns a list of restaurants from a web service based on the given address.

$ restaurants 1600 Pennsylvania Ave, Washington, D.C. 20500 > restaurants.json

You can specifiy which service to use, defaults to Google.

$ restaurants 1600 Pennsylvania Ave, Washington, D.C. 20500 --service yelp > restaurants.json

Default returns 10 results, f you want up to 500 results, use the --all parameter. (Depends on the service)

$ restaurants 1600 Pennsylvania Ave, Washington, D.C. 20500 --all > restaurants.json

Default search radius is 1000 meters, specify the radius in meters using --radius.

$ restaurants 1600 Pennsylvania Ave, Washington, D.C. 20500 --radius 500 > restaurants.json

API

restaurants(service, address, radius, all, callback)

Pass a service string, full address, radius in meters, bool for whether or not you want to max out the query and a callback function that receives an error object and an array of all the restaurants found.

Services & API Keys

Each service operates off of API keys or auth tokens defined in environment variables. Below is the list of environment variables that need to be defined to use each corresponding service.

Factual

Keys: FACTUAL_API_KEY

FourSquare

Keys: FOURSQUARE_CLIENT_ID, FOURSQUARE_CLIENT_SECRET

Google

Keys: GOOGLE_API_KEY

OpenTable

Keys: none

Yelp

Keys: YELP_CONSUMER_KEY, YELP_CONSUMER_SECRET, YELP_TOKEN, YELP_TOKEN_SECRET

0.0.7

11 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago