Project Overview1:26 with Andrew Chalkley
In this final section you’re going to lean on all the things you’ve learned so far by creating a weather command line application.
In the video, the following APIs are recommended:
Unfortunately, since this video was recorded, Weather Underground has ceased providing developers free access to their API. Given that, you'll need to use the OpenWeatherMap API (or another weather API) if you're following along.
The code shown throughout this stage was written specifically with the Weather Underground API in mind. See the Teacher's Notes for code that works with the OpenWeatherMap API.
Please note: API keys can take approximately 10 minutes to be activated. So, if your API requests fail due to an invalid key, make sure that you've waited the appropriate amount of time for them to be activated.
[MUSIC] 0:00 In this final section, you're going to lean on all the things you've learned so 0:04 far by creating a weather command line application. 0:08 If I type in node app.js 90210, 0:12 I should get the current temperature in Beverly Hills. 0:18 I should also be able to type in the city and state like Cleveland, Ohio. 0:25 There are several weather APIs out there including Weather Underground, 0:35 OpenWeatherMap API and many more. 0:39 Most APIs have a free developer tier to evaluate their service. 0:42 When you sign up to an API provider like Weather Underground, 0:47 they give you what is called an API key. 0:50 This identifies you to them when you use their API. 0:52 This allows them to monitor and throttle usage. 0:58 API keys can be used in different ways depending on the REST API provider. 1:02 For example, it may be used as part of the URL or as a query parameter. 1:07 You'll be building this weather application bit by bit. 1:13 Before the next video, sign up for an API, retrieve the data, and 1:17 log out the body of the response. 1:21 In the next video, I'll share with you my solution. 1:23
You need to sign up for Treehouse in order to download course files.Sign up