예제 #1
0
 def get(self):
     wish = json.loads(self.request.get('wish'))
     name = wish['name']
     try:
         wishargs = wish['wishargs']
     except:
         wishargs = None
     if name == 'lPIXEL':
         if wishargs:
             if isinstance(wishargs, dict):
                 wReturn = edo.lPIXEL(wishargs['pixel'])
             else:
                 wReturn = edo.lPIXEL(wishargs)
         else:
             wReturn = edo.lPIXEL()
     elif name == 'lORB':
         wReturn = edo.lORB()
     elif name == 'aORB':
         if wishargs:
             if isinstance(wishargs, dict):
                 wReturn = edo.aORB(wishargs['info'])
             else:
                 wReturn = edo.aORB(wishargs)
         else:
             wReturn = edo.lORB()
     else:
         wReturn = cpix
     #cpix.grant = wish#['name']
     #cpix.anothertest = 'anothertest'
     self.response.out.write(edo.jsonify(wReturn))
예제 #2
0
    def Customs(self):
        cPIXEL = edo.lPIXEL()
        #cORB = lORB()
        if cPIXEL:
            #cpix.data = cPIXEL.to_dict()
            self.response.out.write(edo.jsonify(cpix))
            #self.response.write('test')
#            pulse = PULSE.get()
#            pulse.content = 'stuff'
#            pulse.console = 'it worked'
#            pulse.send('system')
#            self.response.out.write(edo.dictsonify(cMUSE))
        else:
            pixel = euc.aPIXEL()
            self.response.out.write(edo.jsonify(pixel))
예제 #3
0
 def NODE1(self):
     node1 = ndb.Key('NODE','1').get()
     if node1:
         self.response.out.write(edo.dictsonify(node1))
     else:
         node1 = NODE(id='1',name='MetaEden Central Node',info='The center of it all.')
         node1.put()
예제 #4
0
 def ORB1(self):
     orb1 = ndb.Key('ORB','1').get()
     if orb1:
         self.response.out.write(edo.dictsonify(orb1))
     else:
         orb1 = ORB(id='1',name='Pandora\'s Box')
         orb1.put()
예제 #5
0
 def ECHO1(self):
     echo1 = ndb.Key('ECHO','1').get()
     if echo1:
         self.response.out.write(edo.dictsonify(echo1))
     else:
         echo1 = ECHO(id='1',name='Eden Crystal Helix Operator One',info='The Tree of Wisdom.',uCount=0,evekey='adam',oCount=0)
         echo1.put()
예제 #6
0
 def __init__(self):
     cPIXEL = edo.lPIXEL()
     if cPIXEL:
         pass
     else:
         cPIXEL = euc.aPIXEL()
     self.xid =  users.get_current_user().user_id() #External ID = Google ID
     self.name = cPIXEL.name
     self.data = cPIXEL.to_dict()
예제 #7
0
 def send(self,scope):
     if scope == 'system':
         chanTargets = edo.fetchAllMuseIDs()
     for chanTarget in chanTargets:
         channel.send_message(str(chanTarget),edo.dictsonify(self))
예제 #8
0
 def get(self):
     #self.response.out.write(json.dumps(self.cpix.__dict__))
     self.response.out.write(edo.obsonify(self.cpix))