https://github.com/HearthSim/hearthstonejson-client
📖 HearthstoneJSON client for browsers and Node.
https://github.com/HearthSim/hearthstonejson-client
hearthstone hearthstonejson
Last synced: about 1 year ago
JSON representation
📖 HearthstoneJSON client for browsers and Node.
- Host: GitHub
- URL: https://github.com/HearthSim/hearthstonejson-client
- Owner: HearthSim
- License: isc
- Created: 2016-08-21T12:20:58.000Z (almost 10 years ago)
- Default Branch: main
- Last Pushed: 2024-12-05T11:17:50.000Z (over 1 year ago)
- Last Synced: 2025-04-15T16:56:05.217Z (about 1 year ago)
- Topics: hearthstone, hearthstonejson
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/hearthstonejson-client
- Size: 222 KB
- Stars: 8
- Watchers: 10
- Forks: 3
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# HearthstoneJSON Client
[](https://github.com/HearthSim/npm-hearthstonejson-client/actions/workflows/ci.yml)
[](http://npmjs.com/package/hearthstonejson-client)
Fetches Hearthstone card data from [HearthstoneJSON](https://hearthstonejson.com/).
## 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
```javascript
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.