Skip to content

Instantly share code, notes, and snippets.

@hanipcode
Created September 26, 2017 10:53
Show Gist options
  • Select an option

  • Save hanipcode/7cf3de06e4ae8a80b27cf331a4ca1a5a to your computer and use it in GitHub Desktop.

Select an option

Save hanipcode/7cf3de06e4ae8a80b27cf331a4ca1a5a to your computer and use it in GitHub Desktop.
const request = require('request-promise');
function getPredictionList(searchQuery, key) {
const url = `https://maps.googleapis.com/maps/api/place/autocomplete/json?input=${searchQuery}&type=geocode&key=${key}`;
return request(url)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment