paladins.js
TypeScript icon, indicating that this package has built-in type declarations

2.2.2 • Public • Published

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.

/paladins.js/

    Package Sidebar

    Install

    npm i paladins.js

    Weekly Downloads

    0

    Version

    2.2.2

    License

    Apache-2.0

    Unpacked Size

    42.2 kB

    Total Files

    17

    Last publish

    Collaborators

    • matthewh