Need help setting up API and having it display

I need help with this problem in the link. I need help setting up the API and having it display. Ive tried a few different steps with but I cant get it to work. The link has two different components it wants me to make and connect to the api in the link.