Closed codemaster closed 11 years ago
Double-checked that I am using armory v0.6.1 installed straight from npm
Hm, I can't reproduce this.
~/Projects/node-armory (master)$ node
> var a = require('./')
> a.guildAchievements({ region: 'us' }, function(err, res) { console.log(res[1]) })
> { id: 15077,
achievements:
[ { id: 5421,
...
> a.characterAchievements({ region: 'us' }, function(err, res) { console.log(res[0]) })
> { id: 92,
achievements:
[ { id: 6,
...
I am trying with the first parameter being the following object: {"name":"Dargonaut","realm":"Shadowmoon","region":"us"}
still produces {"status":"nok","reason":"When in doubt, blow it up. (page not found)"}
Oh, sorry. The guildAchievements
and characterAchievements
methods correspond to data endpoints.
They provide a list of all possible achievements for guilds or characters. Check out the Blizzard API docs for more info.
What you want is:
var armory = require('armory')
var options =
{ name: 'Dargonaut'
, realm: 'Shadowmoon'
, region: 'us'
, fields: ['achievements']
}
armory.character(options, function(err, character) {
if (err) { return }
console.log(character.achievements)
})
That'll give you an object with this structure: https://gist.github.com/Peratryn/3772776/raw/character-achievements.json
My docs and/or API should probably be clearer about that distinction.
A-ha! Thank you :D
No problem!
Attempting to poll achievement, characterAchievements, or guildAchievements all fail:
[Error: When in doubt, blow it up. (page not found)] {"status":"nok","reason":"When in doubt, blow it up. (page not found)"}