node-techcrunch
v0.2.2
Published
A simple API for accessing techcrunch news
Downloads
8
Maintainers
Readme
node-techcrunch
A simple API for accessing techcrunch news (Built on ES6. Compiled by babel)
Installation
npm install --save node-techcrunch
##Usage
var tc = require('node-techcrunch')
- Get news name by tag name
tc.crunchTag('tag')
.then(function(res) {
// success
// res = [
// {
// title: ,
// link: ,
// tag: ,
// author: ,
// timestamp: ,
// excerpt:
// }
// ]
})
.catch(function(err) {
// error
});
- Get a news as JSON from its link
tc.crunchLink('link')
.then(function(res) {
// success
// res = {
// title: ,
// next: {
// title: ,
// link:
// },
// text:
// }
})
.catch(function(err) {
// error
});
- Get a latest single news as JSON
tc.crunchLast()
.then(function(res) {
// success
// res = {
// title: ,
// next: {
// title: ,
// link:
// },
// text:
// }
})
.catch(function(err) {
// error
});