wpi-kkp-crawler

1.0.3 • Public • Published

wpi-kkp-crawler

This is an unofficial module to fetch fisheries prices from KKP, which includes grouping for dates, locations and commodities.

This was built with ES2015 in mind, so you need to use nodejs 6 minimum, or use babel with babel-preset-es2015 preset.

First, a warning.

This module doesn't affiliate with KKP in any way, and you shouldn't treat this module as official way to interact with KKP's API.

Install

## NPM 
$ npm install --save wpi-kkp-crawler

Usage

const wpiCrawler = require('wpi-kkp-crawler');
 
wpiCrawler.fetch({
  start: '2016-02-01',
  end: '2016-02-03',
  groupBy: 'komoditas',
})
.then((data) => {
  console.log(data);
})
.catch(console.log);

API

fetch([params])

params

start (required)

Type: string

Start date of prices data.

end (optional)

Type: string

End range of prices data date. Default to same as start param.

groupBy (optional)

Type: string

Grouping data by tgl, prov, kab, komoditas. Default to tgl.

Release History

see CHANGELOG.md

License

Copyright (c) 2017 Ahmad Anshorimuslim Licensed under the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i wpi-kkp-crawler

Weekly Downloads

4

Version

1.0.3

License

MIT

Last publish

Collaborators

  • ans4175