예제 #1
0
 def add_email(self, email, lat=0, lon=0):
     s = Subscribe()
     if not s.exists(email):
         r = json.loads(s.add(email, lat, lon))
         return r['created']
     return False
예제 #2
0
 def remove_email(self, email):
     s = Subscribe()
     r = json.loads(s.remove_by_email(email))
     return r['ok']