Repository URL to install this package:
|
Version:
0.0.2 ▾
|
import { GOOGLE_API_KEY } from 'src/bootstrap/api/config';
const BASE_URL = 'https://maps.googleapis.com/maps/api/geocode/json';
/**
* @todo may want to throttle?
*/
async function fetchGoogleGeoCode(zipCode) {
const url = `${BASE_URL}?address=${zipCode}&key=${GOOGLE_API_KEY}`;
const response = await fetch(url);
const geoResponse = response.json();
console.debug('fetchGoogleGeoCode');
console.dir(geoResponse);
return geoResponse;
}
export { fetchGoogleGeoCode };
//# sourceMappingURL=fetchGoogleGeoCode.js.map