Commit 85fe77fe8052ff5c0f23f3449cd3f9fcecbd3f4f

  • avatar
  • arvind
  • Fri Jun 21 20:04:23 IST 2013
Spec for sweet-maker is followed now in the coding style.
  
11import requests
22import json
3def make(what, who, where, how):
3
4def sweet(sweet_url, what, who, where, how):
45 sweet = {}
56 sweet['what'] = what
67 sweet['who'] = who
78 sweet['where'] = where
89 sweet['how'] = how
910 sweet_list = []
10 sweet_list.append(sweet)
11 return sweet_list
12
13
14def send(sweet):
15 request = requests.api.post(SWEET_STORE_URL,{'data':json.dumps(sweet)})
11 request = requests.api.post(sweet_url, {'data':json.dumps(sweet)})
1612 if request.status_code == 200:
1713 return True
1814 else: