hearthstone-mashape
Hearthstone Mashape provide a Node.js wrapper for hearthstoneapi.com
Table of Contents
Install
npm install hearthstone-mashape
Get your API key on mashape.com
Example
var Hearthstone = 'YOUR_API_KEY' 'frFR';// if locale is empty, the value by default is 'enUS' Hearthstone; Hearthstone;
Documentation
Available locales
enUS, enGB, deDE, esES, esMX, frFR, itIT, koKR, plPL, ptBR, ruRU, zhCN, zhTW
Method available
cards(params, callback)
Returns all available Hearthstone cards including non collectible cards.
var params = attack: NUMBER collectible: NUMBER // 1 only return collectible cards cost: NUMBER durability: NUMBER health: NUMBER locale: STRING;Hearthstone
card(params, callback)
Returns card by name or ID. This may return more then one card if they share the same name. Loatheb returns both the card and the boss.
var params = name: STRING // Mandatory collectible: NUMBER locale: STRING;Hearthstone
backs(params, callback)
Return a list of all the card backs.
var params = locale: STRING;Hearthstone
search(params, callback)
Returns cards by partial name.
var params = name: STRING // Mandatory collectible: NUMBER locale: STRING;Hearthstone
set(params, callback)
Returns all cards in a set. Example values: Blackrock Mountain, Classic.
var params = set: STRING // Mandatory attack: NUMBER collectible: NUMBER cost: NUMBER durability: NUMBER health: NUMBER locale: STRING;Hearthstone
hero(params, callback)
Returns all the cards of a class. Example values: Mage, Paladin.
var params = hero: STRING // Mandatory, attack: NUMBER collectible: NUMBER cost: NUMBER durability: NUMBER health: NUMBER locale: STRING;Hearthstone
faction(params, callback)
Returns all the cards of a certain faction. Example values: Horde, Neutral.
var params = faction: STRING // Mandatory, attack: NUMBER collectible: NUMBER cost: NUMBER durability: NUMBER health: NUMBER locale: STRING;Hearthstone
quality(params, callback)
Returns all the cards of a certain quality. Example values: Legendary, Common.
var params = quality: STRING // Mandatory attack: NUMBER collectible: NUMBER cost: NUMBER durability: NUMBER health: NUMBER locale: STRING;Hearthstone
race(params, callback)
Returns all the cards of a certain race. Example values: Mech, Murloc.
var params = race: STRING // Mandatory attack: NUMBER collectible: NUMBER cost: NUMBER durability: NUMBER health: NUMBER locale: STRING;Hearthstone
type(params, callback)
Returns all the cards of a certain type. Example values: Spell, Weapon.
var params = type: STRING // Mandatory attack: NUMBER collectible: NUMBER cost: NUMBER durability: NUMBER health: NUMBER locale: STRING;Hearthstonetypeparams {}
info(params, callback)
Returns a list of current patch, classes, sets, types, factions, qualities, races and locales.
var params = locale: STRING;Hearthstone
Contribution
Feel free to fork or PR.
Laravel
This package exists for Laravel 5