A simple node.js wrapper around Blizzard's REST API for World of Warcraft.
npm install --save armory
All methods take an options object and callback as arguments.
If no callback is provided, a Stream will be returned.
Except for the static APIs, all options objects can have the following properties:
apiKey
name
|id
region
locale
(optional)
Note: name
and id
are interchangeable, and locale
does not affect all API methods.
Retrieves object describing a battle pet.
Additional options:
breedId
level
qualityId
Retrieves an array of challenge mode leaderboard information for a realm.
Retrieves an array of challenge mode leaderboard information for a region.
Note: challengeRegion
does not take an id
option.
armory.challengeRegion({ region: 'us' }, function(err, res) { … })
Retrieves an object containing data about a character.
Retrieves an object containing data about a guild.
Additional options:
fields
(optional): must be an arraylastModified
(optional): Date or timestamp to use for If-Modified-Since headerrealm
Retrieves an object containing data about an achievement.
Retrieves an array of auction data URLs.
Retrieves an object containing data about a battle pet species.
Retrieves an object containing data about a battle pet ability.
Retrieves an object containing data about an item.
Retrieves an object containing data about an item set.
Retrieves an object containing data about a quest.
Retrieves an object containing data about a recipe.
Retrieves an object containing data about a spell.
Retrieves an array containing the status of one or more realms.
armory.realmStatus({ region: 'us' }, function(err, realms) { … })
A single realm name or an array of realm names can be passed. If no names are provided, the status of all realms will be returned.
Retrieves a static array of all battlegroup names.
Retrieves a static array of all character achievements.
Retrieves a static array of data about character classes.
Retrieves a static array of all guild achievements.
Retrieves a static array of data about guild perks.
Retrieves a static array of data about character races.
Retrieves a static array of data about guild rewards.
Note: id
and name
are not used by these methods.
- If an error occurs (including API errors), it will be passed as an Error object to the first parameter of the callback with its message in the
message
property. Otherwise, the parsed response body will passed as the second parameter and the full response will be passed as the third parameter. lastModified
must be aDate
instance or a string recognized byDate.parse()
. If the requested resource has not been modified since the time oflastModifed
, the callback will be invoked with the first two parameters empty.