Skip to content

This is crawler for fisheries price on wpi.kkp.go.id

License

Notifications You must be signed in to change notification settings

eFishery/wpi-kkp-crawler

Repository files navigation

wpi-kkp-crawler

Build Status
npm version

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.

About

This is crawler for fisheries price on wpi.kkp.go.id

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published