Ejemplo n.º 1
0
    def get(self, role, character, weapon):
        attributes = []

        query = Attribute.query(ndb.AND(Attribute.role == role,
										Attribute.character.IN(character),
										Attribute.weapon == weapon))

        for attr in query.fetch():
            attributes.append(attr.to_dict())

        self.response.headers['Content-Type'] = 'application/json'
        self.response.write(json.dumps(attributes))
Ejemplo n.º 2
0
    def get(self):
        weapons = []

        query = Attribute.query()