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 = []
d7f74e3 by Arvind at 2013-06-25 11
    sweet_list.append(sweet)
12
    request = requests.api.post(sweet_url, {'data':json.dumps(sweet_list)})
3bf81ca by Arvind at 2013-06-21 13
    if request.status_code == 200:
14
        return True
15
    else:
16
        return False