Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/HearthSim/hearthstonejson-client
📖 HearthstoneJSON client for browsers and Node.
https://github.com/HearthSim/hearthstonejson-client
hearthstone hearthstonejson
Last synced: about 2 months 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 (about 8 years ago)
- Default Branch: main
- Last Pushed: 2023-08-29T11:50:15.000Z (about 1 year ago)
- Last Synced: 2024-07-13T14:04:30.418Z (2 months ago)
- Topics: hearthstone, hearthstonejson
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/hearthstonejson-client
- Size: 241 KB
- Stars: 7
- Watchers: 11
- Forks: 3
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# HearthstoneJSON Client
[![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/HearthSim/hearthstonejson-client/ci.yml?branch=main)](https://github.com/HearthSim/npm-hearthstonejson-client/actions/workflows/ci.yml)
[![npm](https://img.shields.io/npm/v/hearthstonejson-client.svg)](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.