hearthstone-rest-client
v1.1.1
Published
A hearthstone rest client for mashape API
Downloads
12
Maintainers
Readme
Hearthstone REST Client
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