Farm Invest CLI
A CLI tool, built to detect updates to the products on:
Installation
with npm
npm i -g farm-invest-cli
with yarn
yarn add global farm-invest-cli
for developers
git clone https://github.com/mykeels/farm-invest-cli
cd farm-invest-cli
npm install
npm link
Usage as a CLI tool
farm-invest-cli
farm-invest-cli agro
farm-invest-cli efarms
farm-invest-cli farm-crowdy
farm-invest-cli thrive-agric
You'll get an output like:
Where the green text shows new products, and text is only shown when there is a difference between the products currently existing and the last time it checked.
Usage in Node environment
const { syncAll, syncAgro, syncEFarms, syncFarmCrowdy, syncThriveAgric } = require('farm-invest-cli')
syncAll().then(diff => {
console.log(diff)
})
syncAgro().then(diff => {
console.log(diff)
})
syncEFarms().then(diff => {
console.log(diff)
})
syncFarmCrowdy().then(diff => {
console.log(diff)
})
syncThriveAgric().then(diff => {
console.log(diff)
})
NB: A fast-array-diff object looks like:
{
removed:[
{ title: 'Foo', link: 'Bar' },
{ title: 'Bar', link: 'Foo' }
],
added: [ { title: 'Baz', link: 'Foo' } ]
}
const { getAgro, getEFarms, getFarmCrowdy, getThriveAgric } = require('farm-invest-cli')
getAgro().then(productList => {
console.log(productList)
})
getEFarms().then(productList => {
console.log(productList)
})
getFarmCrowdy().then(productList => {
console.log(productList)
})
getThriveAgric().then(productList => {
console.log(productList)
})