Created
April 11, 2012 16:04
-
-
Save snahor/2360253 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib | |
URL = 'http://api.tropo.com/1.0/sessions' | |
TOKEN = '' | |
def send_sms(to, shout): | |
params = urllib.urlencode({ | |
'action': 'create', | |
'token': TOKEN, | |
'shout': shout, | |
'to': to, | |
}) | |
opener = urllib.urlopen(URL + '?' + params) | |
response = opener.read() | |
# whatever u want |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
message(shout, {'network': "SMS", 'to': to}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment