Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/packages / core / location / fetchGoogleGeoCode.js
Size: Mime:
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