@dhnapi/news-api

1.0.10--up-v • Public • Published

News-API

Simple News-API scrapper library

@@ Created on 1-12-21 | Dehanjing @@
+ Updated on 3-12-21 | Dehanjing

Installation

using npm package manager

npm install @dhnapi/news-api

using yarn package manager

yarn add @dhnapi/news-api

Features

NO NAME DESCRIPTION
1 Antara Get news on Antara
2 BBC Get news on BBC
3 CNBC Get news on CNBC
4 CNN Get news on CNN
5 Daily Get news on Daily
6 Detik Get news on Detik
7 Fajar Get news on Fajar
8 IDN Get news on IDN
9 Indozone Get news on Indozone
10 INews Get news on INews
11 Kompas Get news on Kompas
12 Kontan Get news on Kontan

Example

"use strict";
let NewsAPI = require("@dhnapi/news-api");
let dapi = new NewsAPI();

// @return {Object} class
// console.log(dapi);

/**
 *
 * CNN - ID
 * @param callback {Function}
 *
**/

dapi.cnn((response, error) => {
   if (error) return console.error(error.stack);
   
   /**
    * @return {Object} response
    * @object AxiosResponse
   **/
   
   return console.info("success scrapping ~~", JSON.stringify(response.data, null, 2));
});

Information

+ dont forget to star <3
! contribute to this project! ~~~
- please add issue if you having problem with installation

! github: https://github.com/Dehanjing/news-api

Package Sidebar

Install

npm i @dhnapi/news-api

Weekly Downloads

0

Version

1.0.10--up-v

License

MIT

Unpacked Size

14.7 kB

Total Files

16

Last publish

Collaborators

  • dehan-j1ng
  • dhnapi