gamerocket
Version:
Gamerocket NodeJS Client Library
34 lines (22 loc) • 1.23 kB
JavaScript
(function() {
var Achievement, AchievementGateway, Config, Gateway,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Gateway = require("./gateway").Gateway;
Achievement = require("./achievement").Achievement;
Config = require("./config").Config;
AchievementGateway = (function(_super) {
__extends(AchievementGateway, _super);
function AchievementGateway(gateway) {
this.gateway = gateway;
}
AchievementGateway.prototype.find = function(player, id, attributes, callback) {
return this.gateway.http.get("/players/" + player + "/achievements/" + id, attributes, this.responseHandlerAchievement(callback));
};
AchievementGateway.prototype.responseHandlerAchievement = function(callback) {
return this.createResponseHandler("achievement", AchievementPlayer, callback);
};
return AchievementGateway;
})(Gateway);
exports.AchievementGateway = AchievementGateway;
}).call(this);