Esempio n. 1
0
    def get(self):
        self.response.headers["Content-Type"] = "text/xml"
        op = util.getqsvalue('op', 'scores')
        count = util.getqsvalue('count', 10)

        if (op == 'scores'):
            self.writescores(count)
Esempio n. 2
0
    def get(self):
        self.response.headers["Content-Type"] = "text/xml"
        op = util.getqsvalue("op", "scores")
        count = util.getqsvalue("count", 10)

        if op == "scores":
            self.writescores(count)
Esempio n. 3
0
	def get(self):
		self.response.headers["Content-Type"] = "text/xml"
		op = util.getqsvalue('op')
		hood = util.getqsvalue('hood')
		oldusernames = util.getqsvalue('past')
		username = self.getusername()
		success = None
		if (op == 'add' and username is not None):
			try:
				success = self.adduser(username)
				a=('response',[('username',username),('score',0),('success',success)])
				self.response.out.write(util.toxml(a))
			except Exception, err:
				logging.error(err)
				self.response.out.write(util.toxml(('response',[('success',False)])))
Esempio n. 4
0
 def get(self):
     self.response.headers["Content-Type"] = "text/xml"
     op = util.getqsvalue('op')
     hood = util.getqsvalue('hood')
     oldusernames = util.getqsvalue('past')
     username = self.getusername()
     success = None
     if (op == 'add' and username is not None):
         try:
             success = self.adduser(username)
             a = ('response', [('username', username), ('score', 0),
                               ('success', success)])
             self.response.out.write(util.toxml(a))
         except Exception, err:
             logging.error(err)
             self.response.out.write(
                 util.toxml(('response', [('success', False)])))
Esempio n. 5
0
	def get(self):
		self.response.headers["Content-Type"] = "text/xml"
		op = util.getqsvalue('op')
		imageurl = util.getqsvalue('imageurl')
		hood = util.getqsvalue('hood', 'Mission')
		pageid = util.getqsvalue('pageid')
		latcoord = util.getqsvalue('latcoord')
		longcoord = util.getqsvalue('longcoord')
		username = util.getqsvalue('username', 'Anonymous')
		success = None
		
		if (op == 'get'):
			try:
				(success, pageid, imageurl, text, hood) = self.getimage(hood, username)
				a=('response',[('success',success),('pageid',pageid),('imageurl',imageurl),('imagetext',text),('neighborhood',hood)])
				self.response.out.write(util.toxml(a))
			except Exception, err:
				logging.error(err)
				self.response.out.write(util.toxml(('response',[('success',False)])))	
Esempio n. 6
0
    def get(self):
        self.response.headers["Content-Type"] = "text/xml"
        op = util.getqsvalue('op')
        imageurl = util.getqsvalue('imageurl')
        hood = util.getqsvalue('hood', 'Mission')
        pageid = util.getqsvalue('pageid')
        latcoord = util.getqsvalue('latcoord')
        longcoord = util.getqsvalue('longcoord')
        username = util.getqsvalue('username', 'Anonymous')
        success = None

        if (op == 'get'):
            try:
                (success, pageid, imageurl, text,
                 hood) = self.getimage(hood, username)
                a = ('response', [('success', success), ('pageid', pageid),
                                  ('imageurl', imageurl), ('imagetext', text),
                                  ('neighborhood', hood)])
                self.response.out.write(util.toxml(a))
            except Exception, err:
                logging.error(err)
                self.response.out.write(
                    util.toxml(('response', [('success', False)])))
Esempio n. 7
0
 def get(self):
     self.imagedictionary = {}
     self.populateimagedictionary(util.getqsvalue('hood'))
     self.saveimagedictionary()
	def get(self):
		self.imagedictionary = {}
		self.populateimagedictionary(util.getqsvalue('hood'))
		self.saveimagedictionary()