Created
April 30, 2018 21:59
-
-
Save pbzona/0374e0d8eb9339a919a0db65bc884e67 to your computer and use it in GitHub Desktop.
Serverless Weather pt 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Make the request using axios, a promise-based HTTP library | |
axios.get(weatherURL).then((response) => { | |
// Once the response is received, pull the different parameters we'll need and save them as variables | |
const tomorrow = response.data.daily.data[1]; | |
const high = Math.round(tomorrow.temperatureHigh); | |
const low = Math.round(tomorrow.temperatureLow); | |
const precip = Math.round(tomorrow.precipProbability * 100); | |
const summary = tomorrow.summary; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment