Package Exports
- pubg-api-redis
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pubg-api-redis) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
pubg-api-redis
Playerunknown's Battlegrounds API Wrapper with Redis caching
Installation
npm install -S pubg-api-redisUsage
const {PubgAPI, PubgAPIErrors} = require('pubg-api-redis');
// If no Redis configuration it wont be cached
const api = new PubgAPI({
apikey: 'XXXXX',
redisConfig: {
host: '127.0.0.1',
port: 6379,
},
});
api.profile.byNickname('javilobo8')
.then((data) => {
console.log(data);
});
api.profile.bySteamId('76561198084956266')
.then((data) => {
console.log(data);
});
Tests
You can run tests with your development API KEY stored in environment variable
PUBGTRACKERAPIKEY=<your-api-key> npm t