wpi-kkp-crawler
v1.0.3
Published
Fisheries price crawler for wpi.kkp.go.id
Downloads
10
Readme
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.