Skip to content

Latest commit

 

History

History
86 lines (60 loc) · 2.15 KB

README.md

File metadata and controls

86 lines (60 loc) · 2.15 KB

News challenge

A Guardian API app made as part of the Makers Academy Software Development course.

Project overview

The app grabs all the headlines from the Guardian newspaper API and displays them on a page. Clicking on a headline will link the user to the actual article page on the Guardian's website.

Note: this JavaScript program runs solely on the client (frontend) side, within a web browser. All the variables and state in the program are kept in the web browser's memory.

Learning objectives

  • TDD a Javascript program running in a web browser, using modern JS build tools.
  • Use the DOM to manipulate the web page structure and content.
  • Use fetch to send HTTP requests to an API.
  • Use jest mocking functionality to test drive an API class.

How to run

Install dependencies:

; npm install

Open the HTML file in your browser:

# You can run this from your terminal,
# or alternatively double-click on the HTML file
# from the file explorer.

; open index.html

Technologies

User Stories

As a busy politician
So I know what the big stories of the day are
I can see all of today's headlines in one place
As a busy politician
So that I have something nice to look at
I can see a relevant picture to illustrate each news article when I browse headlines
As a busy politician
So I can get a few more details about an important story
I can click a news article title which links to the original article
As a busy politician
So I can search what I want to read about
I can specify a search query on the page and get articles matching this search

Headlines page

Headlines screenshot

API

API authentication

Need to register and get an API key to use the Guardian API.

Resources