Last active
September 29, 2017 17:51
-
-
Save rbren/6aa1bb21dd3d6304c850d6ea673a7c3b 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
// Note: this code doesn't work! | |
let hn = require('@datafire/hacker_news').create(); | |
let storyIDs = hn.getStories({storyType: 'top'}); | |
let topStory = 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