Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Latest commit

 

History

History
39 lines (20 loc) · 1.91 KB

README.md

File metadata and controls

39 lines (20 loc) · 1.91 KB

NYT Article Viewer

This app allows a user to search for current and historical news articles from the New York Times API.

Usage

When the app loads, the user will see a form with a date picker for start date, date picker for end date, a search text field and a disabled submit button. The user must enter a start date, end date, and search text in the form in order for the submit button to be enabled.

An image will show under the form, initially, but will be replaced with a list of news articles based on the search criteria entered.

When articles are found, each news article will contain an image, a snippet of the article, and the author, if available. If there is no image, a placeholder image will display. The user can click on the image that is displayed and it will open a new tab in the browser so the user can read the full article.

After the news articles display, a drop down will display for sorting the articles in the list. The default sort order is set to sort by publication date so that the most current articles will display first in the list. The user can select to sort the articles list by word count as well so that the articles with the lowest word count will display first in the list.

If no articles are found, the image that is seen when the app loads will display.

Setup

This app was bootstrapped with Create React App.

This app uses the New York Times API.

  • Refer to the site above on obtaining your own API key.
  • Once obtained, replace the apiKey in the /actions/articles.js file.