Permalink
Browse files

follow Lingr API change.

  • Loading branch information...
1 parent 3cbf30a commit 55e0c5c90144b1bd06beee48a821f6ce0cc8a2ef @tyru committed Feb 14, 2011
Showing with 4 additions and 4 deletions.
  1. +1 −1 pongbots.py
  2. +3 −3 zimbubots.py
View
2 pongbots.py
@@ -17,7 +17,7 @@ def get(self, path):
def post(self, path):
r = re.compile(r"^\s*ping\s*$", re.IGNORECASE)
- json = simplejson.loads(self.request.get('json'))
+ json = simplejson.loads(self.request.body)
self.response.headers['Content-Type'] = 'text/plain'
for e in json['events']:
View
6 zimbubots.py
@@ -16,9 +16,9 @@ def get(self, path):
self.response.out.write('<img src="http://www.a-a-p.org/images/zimbu_cutout.jpg" />')
def post(self, path):
- r_right_brace = re.compile(r"^\s*}\s*$")
- r_left_brace = re.compile(r"^\s*{\s*$")
- json = simplejson.loads(self.request.get('json'))
+ r_right_brace = re.compile(r"^[ \t]*}[ \t]*$")
+ r_left_brace = re.compile(r"^[ \t]*{[ \t]*$")
+ json = simplejson.loads(self.request.body)
self.response.headers['Content-Type'] = 'text/plain'
for e in json['events']:

0 comments on commit 55e0c5c

Please sign in to comment.