yc-api
Advanced tools
Comparing version 2.0.2 to 2.0.3
{ | ||
"name": "yc-api", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "This is a wrapper module around the Hacker News API. You can filter the news in order to show you only the stories with a minimum score.", | ||
@@ -5,0 +5,0 @@ "main": "yc-api.js", |
@@ -53,10 +53,13 @@ # What is it? | ||
const yc_api = require('yc-api'); | ||
````javascript | ||
const YC = require("yc-api"); | ||
var yc = new yc_api.API; | ||
const api = new YC(); | ||
yc.stories_with_score(200).then(stories => console.log(stories)); | ||
api.stories_with_score(500).then(stories => console.log(stories)); | ||
// using async | ||
const stories = await yc.stories_with_score(200); | ||
console.log(stories) | ||
// using async | ||
const stories = await api.stories_with_score(200); | ||
console.log(stories)``` | ||
```` |
65
3529