Paladins.js is a package that helps Hi-Rez/Paladins developers communicate with the API.
v2.0 is a complete rewrite of the current paladins.js library. It is not backwards compatible with any version prior.
Differences between 1.x / 2.x:
- The complicated cache process has been redone
- You can pass through more options
- Proper error handling
- Returns promises with proper JSON
- and more...
$ npm install paladins.js
import { API } from 'paladins.js';
let api = new API({
devId: '1234',
authKey: 'abcd1234'
}); // API loaded and ready to go.
api.getDataUsage()
.then((response: any) => {
// Do something with response
})
.catch((err: any) => {
// Handle the error
});
const paladinsJS = require('paladins.js');
let api = new paladinsJS.API({
devId: '1234',
authKey: 'abcd1234'
}); // API loaded and ready to go.
api.getDataUsage()
.then((response: any) => {
// Do something with response
})
.catch((err: any) => {
// Handle the error
});
You can view all the available methods and documentation on the PaladinsDev website.