From d7f74e316428814c4a02f388f1d9d4dacd326c66 Mon Sep 17 00:00:00 2001 From: Arvind Date: Tue, 25 Jun 2013 17:18:57 +0530 Subject: [PATCH] API /add accepts a list of sweet, so send the sweet in a list --- sweetmaker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sweetmaker.py b/sweetmaker.py index 4a4d411..974ed73 100644 --- a/sweetmaker.py +++ b/sweetmaker.py @@ -8,7 +8,8 @@ def sweet(sweet_url, what, who, where, how): sweet['where'] = where sweet['how'] = how sweet_list = [] - request = requests.api.post(sweet_url, {'data':json.dumps(sweet)}) + sweet_list.append(sweet) + request = requests.api.post(sweet_url, {'data':json.dumps(sweet_list)}) if request.status_code == 200: return True else: -- 1.7.10.4