Install node.js
-
Clone the repo
-
Run:
$ npm install -
Create API keys for your planmill by visiting
https://online.planmill.com/{instance}/api/registrations.jsp. Give it a Client ID and usehttp://localhostas alowed redirect URIs -
Create config file
config.jsonand fill in the missing information:{ "apiEndpoint": "https://online.planmill.com/{instance}/api/1.5", "tokenUrl": "https://online.planmill.com/{instance}/api/oauth2/token", "user": "{Client ID}", "pass": "{Client Secret}" }You can place the config.json wherever you like and point to it using
--configflag. Default search locations include current directory and~/.config/planmill/ -
Run
npm startand enjoy! -
Make a symlink to a script that runs this app to your
/usr/local/binor similar to make this CLI available everywhere e.g.#!/bin/bash node /var/www/planmill-fetch/index.js