json-fetcher-cache
v0.0.0-development
Published
Utility for fetching and caching JSON for a configurable amount of time
Downloads
3
Readme
json-fetch-cache
A simple package for fetching JSON from a URL and caching it for a decided amount of time.
Documentation
Installation
$ npm i -S json-fetch-cache
Usage
const Cache = require('json-fetch-cache');
const pcCache = new Cache('http://content.warframe.com/dynamic/worldState.php', 10000);
pcCache.getData()
.then((data) => {
console.log(data);
process.exit(0);
})
.catch((error)=>{
console.error(error);
});