cacheur is a Node.js CLI tool for caching and transforming API results. It is built with modularity and simplicity in mind.
This application should work stable enough, but is still in heavy development.
$ npm install -g cacheur
# Within the project dir cacheur can be called directly:
cacheur
# It is possible to manually set the project directory:
cacheur --dir "/C/Dropbox/Software Projekte/cbmodel/caches/"
cacheur excepts a project directory that contains config files, containing the specific job settings and a project wide global _setting.yaml
file.
See: /examples
http:
url: https://api.github.com/repos/jquery/jquery/issues
queryString:
state: open
This will make a http request to the GitHub API at given url and cache the result. The optional queryString object may contain URL parameters. In this case ?state=open will be appended to the url. The cache will be updated every 10 seconds.
cacheExpiration: 360
timeout: 180
retryDelay: 30
http:
url: https://data.cityofnewyork.us/api/views/5b3a-rs48/rows.csv?accessType=DOWNLOAD
This fetches a bigger CSV file from, renews the cache every 360 seconds. It will wait 180 seconds before timeout (this might however be shortened by your network settings). If the request fails, cacheur will retry after 30 seconds.
- Transform data formats (CSV to JSON object)
- Support JSON Path Queries though an ?q= param
MIT © Simon Heimler