Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added music/lyrics. Added requirements / procfile Draft of app.
- Loading branch information
0 parents
commit 2455fb2
Showing
7 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
bin | ||
build | ||
include | ||
lib | ||
.Python | ||
*.pyc | ||
*.project | ||
*.pydevproject | ||
*.pyo |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: python app.py |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import flask | ||
from twilio import twiml | ||
import os | ||
|
||
app = flask.Flask(__name__) | ||
|
||
@app.route('/karaoke') | ||
def karaoke(): | ||
response = twiml.Response() | ||
with response.dial() as dial: | ||
dial.conference("Penn Apps Karaoke Party") | ||
return str(response) | ||
|
||
if __name__ == "__main__": | ||
app.run('0.0.0.0', 5000) |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Hey ho, let's go | ||
Hey ho, let's go | ||
Hey ho, let's go | ||
Hey ho, let's go | ||
They're forming in straight line | ||
They're going through a tight wind | ||
The kids are losing their minds | ||
The Blitzkrieg Bop |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Flask==0.7.2 | ||
Twilio==3.3.2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Twilio Karaoke</title> | ||
<script type="text/javascript" | ||
src="http://static.twilio.com/libs/twiliojs/1.0/twilio.min.js"></script> | ||
<script type="text/javascript" | ||
src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"> | ||
</script> | ||
<link href="http://static0.twilio.com/packages/quickstart/client.css" | ||
type="text/css" rel="stylesheet" /> | ||
<script type="text/javascript"> | ||
|
||
Twilio.Device.setup("{{token}}"); | ||
|
||
Twilio.Device.ready(function (device) { | ||
$("#log").text("Ready"); | ||
}); | ||
|
||
Twilio.Device.error(function (error) { | ||
$("#log").text("Error: " + error.message); | ||
}); | ||
|
||
Twilio.Device.connect(function (conn) { | ||
$("#log").text("Successfully established call"); | ||
}); | ||
|
||
Twilio.Device.disconnect(function (conn) { | ||
$("#log").text("Call ended"); | ||
}); | ||
|
||
function call() { | ||
Twilio.Device.connect(); | ||
} | ||
|
||
function hangup() { | ||
Twilio.Device.disconnectAll(); | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<button class="call" onclick="call();"> | ||
Call | ||
</button> | ||
|
||
<button class="hangup" onclick="hangup();"> | ||
Hangup | ||
</button> | ||
|
||
<div id="log">Loading pigeons...</div> | ||
</body> | ||
</html> |