alessioalex / frontpage-hn

Retrieves the front page stories from Hacker News in JSON format

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

frontpage-hn

Retrieves the front page stories from Hacker News in JSON format.

Build Status

usage

var getFrontPageHN = require('frontpage-hn');

getFrontPageHN(function(err, posts) {
  if (err) { throw err; }

  console.log(posts);
});

// Example output:
/*
  [{
    id: 10768440,
    title: 'Deep Learning: An MIT Press Book in Preparation',
    postLink: 'http://goodfeli.github.io/dlbook/',
    commentsLink: 'https://news.ycombinator.com/item?id=10768440',
    comments: 20
  },
  ...
  ]
*/

tests

npm test

license

MIT

About

Retrieves the front page stories from Hacker News in JSON format

License:MIT License


Languages

Language:HTML 91.9%Language:JavaScript 8.1%