Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Preview
Start a free Courses trial
to watch this video
![](https://videos.teamtreehouse.com/stills/FSJS-NodeJS-Refresh-2021-S4V1-stills-1.jpg?token=6994d566_b2874c3e5684c45232d3169f275be1efe8713c2b)
00:00
00:00
00:00
- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Prepare to build your own dictionary app or the command line app of your choice.
Resources
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
[MUSIC]
0:00
Well done so far, in this stage,
I challenge you to take what we've
0:04
practiced, and apply it to building
your own command line application.
0:08
Over time,
the APIs we rely on may deprecate or
0:12
fail to keep up with the functionality
we need for our apps.
0:15
Although APIs may break,
the steps we'll follow for
0:18
this type of app will generally be
the same, regardless of the API you use.
0:22
Just like in your Treehouse profile app,
we need to retrieve and
0:26
print out information to
complete our app in this stage.
0:30
There are lists of APIs in the teacher's
notes, and I encourage you to try building
0:34
out this type of command line app with an
API that sounds interesting or fun to you.
0:39
If you choose another API, you can still
follow along with the steps of this
0:44
project to make sure
you're on the right track.
0:48
Some APIs allow unlimited access,
while others,
0:50
like the one we'll use today,
require membership.
0:54
Members are given special keys that allow
the API to determine the identity of
0:58
the user making the API call,
and limit access.
1:02
Our challenge is to build a command line
application that takes a word as an input
1:05
and prints its definition to the console.
1:10
We'll use the Merriam-Webster Dictionary
API, which requires an API key.
1:12
For this, we'll need to register for
a free account using your email address.
1:17
Once you've signed up, you can navigate
to your keys page to find your API key.
1:22
This key should be included
in each API call in your URL.
1:30
The placement of the key is
determined in the documentation here.
1:45
Remember our most important
step before writing any code,
1:53
understand the requirements and
plan accordingly.
1:56
You can write pseudocode on paper or
in your text editor,
2:00
then try tackling the problem
one step at a time.
2:04
Your app should take a word as a command
line argument, request that word's
2:08
definition from Merriam-Webster, and
print the definition to the console.
2:12
[SOUND] We need to request data, parse
the data, format, and return the data.
2:17
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up