@datafire/hacker_news

5.0.0 • Public • Published

@datafire/hacker_news

Client library for Hacker News

Installation and Usage

npm install --save @datafire/hacker_news
let hacker_news = require('@datafire/hacker_news').create();

.then(data => {
  console.log(data);
});

Description

Hacker News is a social news website focusing on computer science and entrepreneurship

Actions

getStories

Get an up-to-date list of stories for the given type

hacker_news.getStories({}, context)

Input

  • input object
    • storyType string (values: top, new, job, show, ask): The type of stories to retrieve

Output

  • output array
    • items integer

getItem

Get details for a given item

hacker_news.getItem({
  "itemID": 0
}, context)

Input

  • input object
    • itemID required integer: The ID of the item to retrieve

Output

getUser

Get details for a given user

hacker_news.getUser({
  "username": ""
}, context)

Input

  • input object
    • username required string: The unique username for this user

Output

Definitions

Item

  • Item object
    • id integer
    • title string
    • deleted boolean
    • by string
    • time string
    • text string
    • dead boolean
    • parent integer
    • kids array
      • items integer
    • url string
    • score integer
    • parts array
      • items integer
    • descendants array
      • items integer

User

  • User object
    • id string
    • created integer
    • delay integer
    • karma integer
    • about string
    • submitted array
      • items integer

Readme

Keywords

none

Package Sidebar

Install

npm i @datafire/hacker_news

Weekly Downloads

3

Version

5.0.0

License

MIT

Unpacked Size

7.7 kB

Total Files

4

Last publish

Collaborators

  • datafire