1.1.1 • Published 7 years ago

hearthstone-rest-client v1.1.1

Weekly downloads
10
License
MIT
Repository
github
Last release
7 years ago

Hearthstone REST Client

Hearhstone

Installation

npm install hearthstone-rest-client --save
# OR
yarn add hearthstone-rest-client --save

Usage

var api_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxx';
var client = require('hearthstone-rest-client')(api_key);

client.getCardByName("Alexstrasza", function(card){
  console.log(card.flavor); //outputs: Alexstrasza the Life-Binder brings life and hope to everyone.  Except Deathwing.  And Malygos.  And Nekros.
});

Full Json Return:

{ cardId: 'EX1_561',
  name: 'Alexstrasza',
  cardSet: 'Classic',
  type: 'Minion',
  faction: 'Neutral',
  rarity: 'Legendary',
  cost: 9,
  attack: 8,
  health: 8,
  text: '<b>Battlecry:</b> Set a hero\'s remaining Health to 15.',
  flavor: 'Alexstrasza the Life-Binder brings life and hope to everyone.  Except Deathwing.  And Malygos.  And Nekros.',
  artist: 'Raymond Swanland',
  collectible: true,
  elite: true,
  race: 'Dragon',
  img: 'http://wow.zamimg.com/images/hearthstone/cards/enus/original/EX1_561.png',
  imgGold: 'http://wow.zamimg.com/images/hearthstone/cards/enus/animated/EX1_561_premium.gif',
  locale: 'enUS',
  mechanics: [ { name: 'Battlecry' } ] }

Methods available:

  • getCardByName
  • getCardsByClass

Contributing

Feel free to fork and create a PR.

Made with :heart: by Hudson

1.1.1

7 years ago

1.1.0

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.0

7 years ago