Exemple #1
0
    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))
Exemple #2
0
    def getAll(self):
        scoutingQueryList = Scouting.query()

        scoutingList = scoutingQueryList.map(self.callback)

        self.response.content_type = 'application/json'
        self.response.write(json.dumps(scoutingList))
Exemple #3
0
    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
Exemple #4
0
    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