2.0.6 • Published 6 years ago

@moondef/hacker-news-api v2.0.6

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

hacker-news-api

JavaScript wrapper for the official Hacker News API

npm package

Usage

$ npm install --save @moondef/hacker-news-api

or

$ yarn add @moondef/hacker-news-api
const hk = require('@moondef/hacker-news-api');

(async () => {
  const popular = await hk.getPopular(); // you will get IDs of popular news
  const newsItem = await hk.getItem(popular[0]);

  console.log(newsItem);
})();

Methods

- getPopular() // Array
- getUser(nickname) // Object
- getItem(id) // Object
- getMaxItem() // Number
- getAskStories() // Array
- getShowStories() // Array
- getJobStories() // Array
- getUpdates() // Object
- getNewStories() // Array
- getTopStories() // Array
- getBestStories() // Array
2.0.6

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago