hearthstonejson-client
TypeScript icon, indicating that this package has built-in type declarations

1.16.0 • Public • Published

HearthstoneJSON Client

GitHub Workflow Status (branch) npm

Fetches data from HearthstoneJSON. Builds are cached in LocalStorage if available.

Install

Install the package from npm using your favourite package manager:

$ yarn add hearthstonejson-client

In order to use this package in a browser you'll need something like Webpack or Browserify.

Examples

import HearthstoneJSON from "hearthstonejson-client";

var hsjson = new HearthstoneJSON();

// get the latest data
hsjson.getLatest().then(cards => {
  console.log(cards);
});

// specify a language
hsjson.getLatest("deDE").then(cards => {/*...*/});

// specify a certain Hearthstone build number
hsjson.get(54613).then(cards => {/*...*/});

Typings

Typescript typings are included as index.d.ts and should automatically be picked up by Typescript.

/hearthstonejson-client/

    Package Sidebar

    Install

    npm i hearthstonejson-client

    Weekly Downloads

    16

    Version

    1.16.0

    License

    ISC

    Unpacked Size

    111 kB

    Total Files

    20

    Last publish

    Collaborators

    • azeier
    • beheh
    • hearthsim-admin