Closed sonners closed 5 years ago
Did you replace the const API_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
xs with your actual API key?
@sonners from what I can see, you are missing a semi-colon there. I just tested it and it worked.
const FORECAST_DELAY = 0;
const API_KEY = "xxxxxxxxxxxxxx";
const BASE_URL =
https://api.darksky.net/forecast;`
Closing due to no activity.
// CODELAB: If running locally, set your Dark Sky API key here
I have registered a key but don't know how to set it here. I've tried the following, e.g. const API_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" //const API_KEY = process.env.DARKSKY_API_KEY; const BASE_URL =
https://api.darksky.net/forecast
;but still get Dark Sky API Error: invalid json response body at https://api.darksky.net/forecast/undefined/40.7720232,-73.9732319 reason: Unexpected token F in JSON at position 0
Any help greatly appreciated.