google-locations
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -34,2 +34,3 @@ var https = require('https'), | ||
radius: 10, | ||
name: 'A', | ||
language: 'en', | ||
@@ -49,3 +50,3 @@ rankby: 'prominence', | ||
this._makeRequest(this._generateUrl(options, 'place', 'search'), cb); | ||
this._makeRequest(this._generateUrl(options, 'place', 'nearbysearch'), cb); | ||
}; | ||
@@ -152,3 +153,3 @@ | ||
GoogleLocations.prototype._generateUrl = function(query, type, method) { | ||
//https://maps.googleapis.com/maps/api/place/search/json? | ||
//https://maps.googleapis.com/maps/api/place/nearbysearch/json? | ||
//https://maps.googleapis.com/maps/api/geocode/json? | ||
@@ -155,0 +156,0 @@ _.compact(query); |
{ | ||
"name": "google-locations", | ||
"description": "Address searches via Google Geocoding for the Google Places API", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"homepage": "http://github.com/eastbayjake/google-locations", | ||
@@ -6,0 +6,0 @@ "author": "Jake McGuire <mcguireghs@gmail.com>", |
@@ -59,2 +59,3 @@ [![build status](https://secure.travis-ci.org/eastbayjake/google-locations.png)](http://travis-ci.org/eastbayjake/google-locations) | ||
Copyright (C) 2012 Vermonster LLC | ||
Copyright (C) 2014 Jake McGuire | ||
@@ -61,0 +62,0 @@ |
@@ -10,3 +10,3 @@ var GoogleLocations = require('../lib/google-locations'), | ||
fakeweb.registerUri({ | ||
uri: 'https://maps.googleapis.com/maps/api/place/search/json?location=37.4229181%2C-122.0854212&radius=10&language=en&rankby=prominence&key=fake_key', | ||
uri: 'https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=37.4229181%2C-122.0854212&radius=10&name=A&language=en&rankby=prominence&key=fake_key', | ||
body: '{"results" : [{"name": "Google", "place_id":"ABC123"}], "status" : "OK"}' | ||
@@ -16,3 +16,3 @@ }); | ||
fakeweb.registerUri({ | ||
uri: 'https://maps.googleapis.com/maps/api/place/search/json?location=37.4229181%2C-122.0854212&rankby=distance&radius=&language=en&key=fake_key', | ||
uri: 'https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=37.4229181%2C-122.0854212&rankby=distance&radius=&name=A&language=en&key=fake_key', | ||
body: '{"results" : [{"name": "Google", "place_id":"ABC123"}], "status" : "OK"}' | ||
@@ -19,0 +19,0 @@ }); |
16207
301
80