def getTeamLevel(self, team_key): scoutingQueryList = Scouting.query(Scouting.teamKey == team_key) scoutingList = scoutingQueryList.map(self.callback) self.response.content_type = 'application/json' self.response.write(json.dumps(scoutingList))
def getAll(self): scoutingQueryList = Scouting.query() scoutingList = scoutingQueryList.map(self.callback) self.response.content_type = 'application/json' self.response.write(json.dumps(scoutingList))
def post(self): logging.info('%s', self.request.body) jsonRoot = json.loads(self.request.body) scouting = Scouting() scouting.populate(**jsonRoot) scouting.key = ndb.Key( Scouting, scouting.teamKey + '-' + scouting.eventKey + '-' + scouting.matchKey + '-' + scouting.nameOfScouter) scouting.put() self.response.status = 200
def post(self): logging.info('%s', self.request.body) jsonRoot = json.loads(self.request.body) scouting = Scouting() scouting.populate(**jsonRoot) scouting.put() self.response.status = 200