0.6.13 • Published 9 years ago

cacheur v0.6.13

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

npm version Dependency Status Build Status Code Climate Test Coverage

About

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.

Install

Install globally

$ npm install -g cacheur

Usage

Run 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/"

Set up project

cacheur excepts a project directory that contains config files, containing the specific job settings and a project wide global _setting.yaml file.

Example Jobs

See: /examples

Cache an generic JSON API

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.

Fetch a CSV file

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.

Cache an SemanticMediaWiki ASK Query

Roadmap

  • Transform data formats (CSV to JSON object)
  • Support JSON Path Queries though an ?q= param

Run cacheur as a linux service

License

MIT © Simon Heimler

0.6.13

9 years ago

0.6.12

9 years ago

0.6.11

9 years ago

0.6.10

9 years ago

0.6.9

9 years ago

0.6.8

9 years ago

0.6.7

9 years ago

0.6.6

9 years ago

0.6.5

9 years ago

0.6.4

9 years ago

0.6.3

9 years ago

0.6.2

9 years ago

0.6.1

9 years ago

0.6.0

9 years ago

0.5.0

9 years ago

0.4.0

9 years ago

0.3.7

9 years ago

0.3.6

9 years ago

0.3.5

9 years ago

0.3.3

9 years ago

0.3.2

9 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.2.6

9 years ago

0.2.5

9 years ago