1.0.0 • Published 5 years ago

news-search-lib v1.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

News Search Library

Installation

Start by running this command in your project's directory

npm install news-search-lib --save

And then requring it on the top of your index.js file

require('news-search-lib')

Methods

Top Five Stories

Returns the top five stories of the day

Coding samples:

const topFive = topFiveStories()
console.log(topFive) // will log an array of story objects

Top Five Headlines

Returns the top five headlines of the day. If you're in a rush and you need the quick scoop on the day this will do it for you.

Coding samples:

const topFive = topFiveHeadlines()
console.log(topFive) // will log an array of story headlines (strings)

Get random story

Returns a random story from the top 10. Good for when you're feeling spontaneous.

Coding samples:

const story = getRandomStory()
console.log(story) // will log a single story object
1.0.0

5 years ago