node-techcrunch

0.2.2 • Public • Published

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
  });

Package Sidebar

Install

npm i node-techcrunch

Weekly Downloads

8

Version

0.2.2

License

MIT

Last publish

Collaborators

  • sachinb94