Last active
October 11, 2017 15:47
-
-
Save rbren/a259eb7b06e049fd1bb5774733c80eee to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let hn = require('@datafire/hacker_news').create(); | |
(async () => { | |
let storyIDs = await hn.getStories({storyType: 'top'}); | |
let topStory = await hn.getItem({itemID: storyIDs[0]}); | |
console.log(`Top story: ${topStory.title} - ${topStory.url}`); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment