Stat

  • module
bitballs/models/stat

{can.Map}

 

can.Map

A can.Map that's connected to the /services/stats with all of can-connect/can/super-map's behaviors.

Use

Use the Stat model to CRUD stats on the server. Use the CRUD methods getList, save, and destroy added to Stat by the can-connect/can/map behavior.

var Stat = require("bitballs/models/stat");
Stat.getList({where: {gameId: 5}}).then(function(stats){ ... });
new Stat({gameId: 6, playerId: 15, type: "1P", time: 60}).save()