1.0.10--up-v • Published 2 years ago

@dhnapi/news-api v1.0.10--up-v

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

News-API

Simple News-API scrapper library

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

Installation

npm install @dhnapi/news-api

yarn add @dhnapi/news-api

Features

NONAMEDESCRIPTION
1AntaraGet news on Antara
2BBCGet news on BBC
3CNBCGet news on CNBC
4CNNGet news on CNN
5DailyGet news on Daily
6DetikGet news on Detik
7FajarGet news on Fajar
8IDNGet news on IDN
9IndozoneGet news on Indozone
10INewsGet news on INews
11KompasGet news on Kompas
12KontanGet 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