Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
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.
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.
If I type in node app.js 90210,
I should get the current temperature in Beverly Hills.
I should also be able to type in the city and state like Cleveland, Ohio.
There are several weather APIs out there including Weather Underground,
OpenWeatherMap API and many more.
Most APIs have a free developer tier to evaluate their service.
When you sign up to an API provider like Weather Underground,
they give you what is called an API key.
This identifies you to them when you use their API.
This allows them to monitor and throttle usage.
API keys can be used in different ways depending on the REST API provider.
For example, it may be used as part of the URL or as a query parameter.
You'll be building this weather application bit by bit.
Before the next video, sign up for an API, retrieve the data, and
log out the body of the response.
In the next video, I'll share with you my solution.
You need to sign up for Treehouse in order to download course files.Sign up