3bf81ca by Arvind at 2013-06-21 | 1 | import requests |
2 | import json |
|
85fe77f by Arvind at 2013-06-21 | 3 | |
4 | def sweet(sweet_url, what, who, where, how): |
|
3bf81ca by Arvind at 2013-06-21 | 5 | sweet = {} |
6 | sweet['what'] = what |
|
7 | sweet['who'] = who |
|
8 | sweet['where'] = where |
|
9 | sweet['how'] = how |
|
10 | sweet_list = [] |
|
85fe77f by Arvind at 2013-06-21 | 11 | request = requests.api.post(sweet_url, {'data':json.dumps(sweet)}) |
3bf81ca by Arvind at 2013-06-21 | 12 | if request.status_code == 200: |
13 | return True |
|
14 | else: |
|
15 | return False |