battlenet-api
Version:
A Node.JS library for the Battle.net Community Platform API
25 lines (18 loc) • 570 B
JavaScript
/**
* Diablo III Profile API.
*/
module.exports = function(battlenet) {
'use strict';
return {
career: function() {
var args = battlenet.args.apply(null, arguments);
args.params.path = '/d3/profile/' + args.params.tag + '/';
battlenet.fetch(args.params, args.config, args.callback);
},
hero: function() {
var args = battlenet.args.apply(null, arguments);
args.params.path = '/d3/profile/' + args.params.tag + '/hero/' + args.params.hero;
battlenet.fetch(args.params, args.config, args.callback);
}
};
};