Helper to do the login/token management for interactions with Rotamap Ltd's CLWrota/Medirota Public API.
This tool is not affiliated with or endorsed by Rotamap Ltd and has been developed to facilitate my own interactions with their API. It is released 'as is' in the public spirit of open source software with a permissive MIT license.
Needs 3 environment variables set (or will look for a .env file in root of repo) with:
CLW_URL=https://instance-here.clwrota.com
CLW_USERNAME=username-here
CLW_PASSWORD=password-here
Progress/To do:
- env variables/.env configuration
- instatiate a class
- -> test
- login and get a token
- -> test
- set a token expiry date
- -> test
- re-use a token where able
- -> test
- don't reattempt to login if a token is still valid
- -> test
- rate limit API calls to 1/20 sec
- -> test
- max API call use per token (??superfluous with rate limiting)
- -> test
- configure JSON/XML response requested for API calls where this is an option
- -> test
- test bundling
- ?fix axios dependency
- deploy to NPM