January 2018
Beginner
658 pages
13h 10m
English
In order to generate the weather URL, we'll copy the URL from the weather file, taking it with the ticks in place, and moving it into the app-promise file. We'll make a new variable called weatherUrl, setting it equal to the copied URL:
url: `https://api.forecast.io/forecast/4a04d1c42fd9d32c97a2c291a32d5e2d/${lat},${lng}`,
Now weatherUrl does need a few pieces of information. We need the latitude and longitude. We have two variables lat and lng, so let's create them, getting the appropriate value from that response object, var lat and var lng:
var lat;var lng;url: `https://api.forecast.io/forecast/4a04d1c42fd9d32c97a2c291a32d5e2d/${lat},${lng}`,
Now in order to pull them off, we have to go through that process of ...
Read now
Unlock full access