Created
August 7, 2012 21:58
-
-
Save RobSpectre/3289740 to your computer and use it in GitHub Desktop.
Karaoke Music
This file contains hidden or 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 flask | |
from twilio import twiml | |
app = flask.Flask(__name__) | |
@app.route('/tunes', methods=['POST']) | |
def tunes(): | |
response = twiml.Response() | |
response.play('http://example.com/tastytunes.mp3') | |
return str(response) |
This file contains hidden or 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
from local_settings import * | |
from twilio.rest import TwilioRestClient | |
ACCOUNT_SID = "ACxxxxxxxxxxxx" | |
AUTH_TOKEN = "yyyyyyyyyyyyyyy" | |
CALLER_ID = "+15556667777" | |
KARAOKE_NUMBER = "+15558675309" | |
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN) | |
client.calls.create(from_=CALLER_ID, KARAOKE_NUMBER, | |
url="http://example.com/tunes") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment