google-places-collector
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -109,3 +109,3 @@ require('dotenv').config(); | ||
*/ | ||
exports.getPlacesByType = async function(locationName, locationPoints) { | ||
const getPlacesByType = async function(locationName, locationPoints) { | ||
const areaCoords = await getAreaCoordinates(locationName); | ||
@@ -153,1 +153,3 @@ const increments = 5; | ||
}; | ||
module.exports.getPlacesByType = getPlacesByType; |
{ | ||
"name": "google-places-collector", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "get all the data for areas", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# Google Places Collector | ||
Harness the power of the Google Maps API to collect information for geographical locations within a city. | ||
Harness the power of the Google Maps API and its [node.js libary](https://github.com/googlemaps/google-maps-services-js) to collect information for geographical locations within a city. | ||
## Installation | ||
This module is distributed via [npm][npm] and should be installed as one of your project's `dependencies`: | ||
``` | ||
npm install --save google-places-collector | ||
``` | ||
## Usage | ||
@@ -9,1 +17,14 @@ | ||
replace the 'YOUR_KEY_HERE' string in the index.js file. | ||
```js | ||
const googlePlacesCollector = require('./index'); | ||
const getPlaces = async () => { | ||
const results = await places.getPlacesByType('Business Bay', 'restaurant'); | ||
console.log(results); | ||
}; | ||
getPlaces(); | ||
``` | ||
Results will be supplied by an async function with an array of place objects (in this case, a listing of all restraunts within Dubai's Business Bay area). |
10
test.js
@@ -1,7 +0,9 @@ | ||
// require getPlacesByType from index; | ||
const places = require('./index'); | ||
const results = places.getPlacesByType('Business Bay', 'restaurant'); | ||
const getPlaces = async () => { | ||
const results = await places.getPlacesByType('Business Bay', 'restaurant'); | ||
console.log(results); | ||
console.log(`${results.length} found`); | ||
}; | ||
console.log(results); | ||
console.log(`${results.length} found`); | ||
getPlaces(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6054
144
30