UNPKG

gamerocket

Version:

Gamerocket NodeJS Client Library

34 lines (22 loc) 1.04 kB
(function() { var Config, Game, GameGateway, 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; Game = require("./game").Game; Config = require("./config").Config; GameGateway = (function(_super) { __extends(GameGateway, _super); function GameGateway(gateway) { this.gateway = gateway; } GameGateway.prototype.find = function(id, callback) { return this.gateway.http.get("/games/" + id, this.responseHandlerGame(callback)); }; GameGateway.prototype.responseHandler = function(callback) { return this.createResponseHandlerGame("game", Game, callback); }; return GameGateway; })(Gateway); exports.GameGateway = GameGateway; }).call(this);