Kintai API allows you to punch time cards via simple HTTP request.
To deploy Kintai API, you must set following kintai variables.
- KINTAI_URL
- The URL to record your time card. like this:
https://****H.HTML
- KINTAI_STAFF_ID
- Your Staff ID.
- KINTAI_PASSWORD
- The password to login.
- API_TOKEN
- The API token for authorization (basically auto-generated).
With deploy to heroku button, the API token is auto-generated. You can get it at Heroku's application settings → Config Variables → Reveal Config Vars.
GET /up?api_token=*** : Start working
GET /down?api_token=*** : Stop working
GET /report.json?api_token=*** : Print the report (JSON)
GET /report.txt?api_token=*** : Print the monthly report (plain text)
With IFTTT's DO Button and Maker Channel, you can punch time card from the smartphone's home screen.
npm install
npm run build
brew install phantomjs
KINTAI_URL='***' KINTAI_STAFF_ID='***' KINTAI_PASSWORD='***' API_TOKEN='***' PORT=3001 phantomjs lib/kintai.js