def post(self): self.response.headers['Content-Type'] = 'application/json' args = json.loads(self.request.body) gameId = args['gameKeyId'] nickname = args['nickname'] player = GameService.createPlayer(gameId, nickname) players = [player] self.response.out.write(PlayerService.toJSON(players)) logging.info(PlayerService.toJSON(players))
def post(self): args = json.loads(self.request.body) lat = args['lat'] lon = args['lon'] playerId = int(args['id']) PlayerService.updateCachedPosition(playerId, lat, lon) players = GameService.getBuddies(playerId) #GameService.executeGameLogicForPlayer(player) self.response.headers['Content-Type'] = 'application/json' self.response.out.write(PlayerService.toJSON(players)) logging.info(self.response)
def post(self): logging.info(self.request.body) args = json.loads(self.request.body) playerKey = args['id'] PlayerService.deletePlayer(playerKey)