Skip to content

Commit

Permalink
follow Lingr API change.
Browse files Browse the repository at this point in the history
  • Loading branch information
tyru committed Feb 14, 2011
1 parent 3cbf30a commit 55e0c5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pongbots.py
Expand Up @@ -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']:
Expand Down
6 changes: 3 additions & 3 deletions zimbubots.py
Expand Up @@ -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']:
Expand Down

0 comments on commit 55e0c5c

Please sign in to comment.