paladins.js

A JavaScript package to help make communication with the Paladins API from Hi-Rez/Evil Mojo easier.

Usage no npm install needed!

<script type="module">
  import paladinsJs from 'https://cdn.skypack.dev/paladins.js';
</script>

README

paladins.js

NPM License Downloads

Paladins.js is a package that helps Hi-Rez/Paladins developers communicate with the API.

2.0

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...

Install

$ npm install paladins.js

Usage

TypeScript

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
    });

JavaScript

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
    });

Documentation / Methods

You can view all the available methods and documentation on the PaladinsDev website.