nyt-top (The Top Stories API)
A Node.js wrapper for The New York Times Top Stories API v1.
Installation
npm install nyt-top
Usage Example
var nytTop = ;nytTop; // set your Top Stories API developer key nytTop;
API
.key(apiKey)
Sets developer API key.
apiKey
Type: string
NYT's Top Stories API key.
.section(sectionName, callback)
Get a list of articles
sectionName
Type: string
NYT's article section.
callback(err, data)
Type: function
Returns a list of articles in JSON format.
List of section values:
- home
- world
- national
- politics
- nyregion
- business
- opinion
- technology
- science
- health
- sports
- arts
- fashion
- dining
- travel
- magazine
- realestate
Notes:
- Visit http://developer.nytimes.com/docs/read/top_stories_api for more information about the official API.