-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit for the Soundcloud Alexa Skill
Open Source version, squashed into one commit.
- Loading branch information
moritz.schulze
committed
May 11, 2017
0 parents
commit 40bd4ba
Showing
18 changed files
with
1,305 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,3 @@ | ||
/build/ | ||
.idea/ | ||
.gradle/ |
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,42 @@ | ||
buildscript { | ||
ext.kotlin_version = '1.1.2' | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
dependencies { | ||
classpath group: 'org.jetbrains.kotlin', name: 'kotlin-gradle-plugin', version: "$kotlin_version" | ||
} | ||
} | ||
|
||
group 'de.techdev.alexa.soundcloud' | ||
version '1.0.0-RELEASE' | ||
|
||
apply plugin: 'kotlin' | ||
|
||
sourceCompatibility = 1.8 | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jre8', version: "$kotlin_version" | ||
|
||
compile group: 'com.amazon.alexa', name: 'alexa-skills-kit', version: '1.3.0' | ||
compile group: 'com.amazonaws', name: 'aws-lambda-java-core', version: '1.1.0' | ||
runtime group: 'com.amazonaws', name: 'aws-lambda-java-log4j', version: '1.0.0' | ||
|
||
compile group: 'com.amazonaws', name: 'aws-java-sdk-dynamodb', version: '1.11.125' | ||
|
||
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.0' | ||
compile group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.7.0' | ||
} | ||
|
||
task fatJar(type: Jar) { | ||
baseName = project.name + '-fat' | ||
from { configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) } } | ||
with jar | ||
} | ||
|
||
build.dependsOn fatJar |
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,83 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>Alexa Cloud Music for SoundCloud by techdev</title> | ||
<link rel="stylesheet" href="bootstrap.min.css"> | ||
|
||
<script type="text/javascript"> | ||
function redirectToSoundCloud(ev) { | ||
ev.preventDefault(); | ||
// Redirects to /sc/connect/do keeping all request parameters | ||
document.location.href = 'do' + document.location.search; | ||
} | ||
</script> | ||
|
||
<style> | ||
.centered-button { | ||
margin: 0 auto; | ||
display: block; | ||
} | ||
|
||
h2 { | ||
font-size: 25px; | ||
} | ||
|
||
.spacer { | ||
height: 10em; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-md-8 col-md-offset-2"> | ||
<h1 class="page-header"> | ||
<img src="techdev_logo60.png" alt="Techdev logo"><br> | ||
Alexa Cloud Music for SoundCloud | ||
</h1> | ||
<h2>Deutsch</h2> | ||
<p> | ||
Der Alexa Cloud Music Skill wird bereitgestellt von <a href="https://techdev.de/" target="_blank">techdev Solutions GmbH</a>. | ||
Um ihn zu nutzen müssen Sie ihn mit SoundCloud verknüpfen. | ||
</p> | ||
<p> | ||
Bitte beachten Sie, dass eine Verknüpfung derzeit nicht möglich ist wenn Sie Google nutzen um sich bei SoundCloud einzuloggen. | ||
<p> | ||
Sie können unsere <a href="https://techdev.de/alexa-privacy-policy/" target="_blank">Datenschutzbestimmungen hier einsehen</a>. | ||
</p> | ||
|
||
<form onsubmit="redirectToSoundCloud(event)"> | ||
<button type="submit" class="btn btn-success centered-button">Mit SoundCloud verküpfen</button> | ||
</form> | ||
<h2>English</h2> | ||
<p> | ||
The Alexa Cloud Music skill is provided by <a href="https://techdev.de/" target="_blank">techdev Solutions GmbH</a>. To use it | ||
you have to connect it with SoundCloud. | ||
</p> | ||
<p> | ||
Please be aware that connecting to SoundCloud is currently not possible if you use Google to log in to SoundCloud. | ||
<p> | ||
<p> | ||
You can read our <a href="https://techdev.de/alexa-privacy-policy/" target="_blank">privacy policy here</a>. | ||
</p> | ||
|
||
<form onsubmit="redirectToSoundCloud(event)"> | ||
<button type="submit" class="btn btn-success centered-button">Connect with SoundCloud</button> | ||
</form> | ||
|
||
</div> | ||
</div> | ||
<div class="spacer"></div> | ||
<div class="row"> | ||
<div class="col-md-8 col-md-offset-2"> | ||
<p> | ||
<a href="https://techdev.de/impressum" target="_blank">Impressum / Imprint</a> | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
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,49 @@ | ||
server { | ||
server { | ||
listen 443 ssl http2 default_server; | ||
listen [::]:443 ssl http2 default_server; | ||
|
||
error_log /var/log/nginx/error.log notice; | ||
|
||
ssl_certificate /PATH/TO/YOUR/CERTIFICATE; | ||
ssl_certificate_key /PATH/TO/YOUR/PRIVATE_KEY; | ||
|
||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | ||
ssl_prefer_server_ciphers on; | ||
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"; | ||
ssl_ecdh_curve secp384r1; | ||
ssl_session_cache shared:SSL:10m; | ||
ssl_session_tickets off; | ||
ssl_stapling on; | ||
ssl_stapling_verify on; | ||
resolver 8.8.8.8 8.8.4.4 valid=300s; | ||
resolver_timeout 5s; | ||
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"; | ||
add_header X-Frame-Options DENY; | ||
add_header X-Content-Type-Options nosniff; | ||
|
||
ssl_dhparam /etc/ssl/certs/dhparam.pem; | ||
|
||
server_name YOUR_SERVER_NAME.SOME.DOMAIN; | ||
|
||
location /sc/connect/do { | ||
set $args client_id=$arg_client_id&response_type=$arg_response_type&state=$arg_state&redirect_uri=ENTER_YOUR_REDIRECT_URI_YOU_CONFIGURED_WITH_SOUNDCLOUD | ||
rewrite ^.+$ https://soundcloud.com/connect redirect; | ||
} | ||
|
||
location /sc/connect { | ||
# Display the landing page required by Amazon. | ||
alias /var/www/alexa-soundcloud; | ||
} | ||
|
||
# Required by Let's Encrypt | ||
location ~/.well-known { | ||
allow all; | ||
} | ||
|
||
location / { | ||
return 404; | ||
} | ||
} | ||
|
||
} |
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 @@ | ||
rootProject.name = 'alexa-soundcloud-skill' | ||
|
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 @@ | ||
{ | ||
"intents": [ | ||
{ | ||
"intent": "PlayMyFavoritesIntent" | ||
}, | ||
{ | ||
"intent": "PlayMyStreamIntent" | ||
}, | ||
{ | ||
"intent": "LikeTrackIntent" | ||
}, | ||
{ | ||
"intent": "TellCurrentTrackIntent" | ||
}, | ||
{ | ||
"intent": "FollowUserIntent" | ||
}, | ||
{ | ||
"intent": "AMAZON.HelpIntent" | ||
}, | ||
{ | ||
"intent": "AMAZON.PauseIntent" | ||
}, | ||
{ | ||
"intent": "AMAZON.CancelIntent" | ||
}, | ||
{ | ||
"intent": "AMAZON.StopIntent" | ||
}, | ||
{ | ||
"intent": "AMAZON.ResumeIntent" | ||
}, | ||
{ | ||
"intent": "AMAZON.NextIntent" | ||
}, | ||
{ | ||
"intent": "AMAZON.PreviousIntent" | ||
}, | ||
{ | ||
"intent": "AMAZON.LoopOnIntent" | ||
}, | ||
{ | ||
"intent": "AMAZON.LoopOffIntent" | ||
}, | ||
{ | ||
"intent": "AMAZON.ShuffleOnIntent" | ||
}, | ||
{ | ||
"intent": "AMAZON.ShuffleOffIntent" | ||
} | ||
] | ||
} |
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,28 @@ | ||
PlayMyFavoritesIntent Spiele meine Favoriten | ||
PlayMyFavoritesIntent Meine Favoriten | ||
|
||
PlayMyStreamIntent Spiele meinen Stream | ||
PlayMyStreamIntent Meinen Stream | ||
PlayMyStreamIntent Spiele Musik | ||
PlayMyStreamIntent Spiele neue Musik | ||
|
||
LikeTrackIntent Like dieses Lied | ||
LikeTrackIntent Like diesen Song | ||
LikeTrackIntent Like diesen Track | ||
LikeTrackIntent Like this | ||
LikeTrackIntent Mir gefällt das | ||
LikeTrackIntent Mir gefällt das Lied | ||
LikeTrackIntent Mir gefällt der Song | ||
LikeTrackIntent Mir gefällt der Track | ||
|
||
FollowUserIntent Folge dem User | ||
|
||
TellCurrentTrackIntent Was gerade läuft | ||
TellCurrentTrackIntent Was läuft gerade | ||
TellCurrentTrackIntent Welcher Song ist das | ||
TellCurrentTrackIntent Welcher Track ist das | ||
TellCurrentTrackIntent Welches Lied ist das | ||
TellCurrentTrackIntent Which track is that | ||
TellCurrentTrackIntent Welcher Track läuft gerade | ||
TellCurrentTrackIntent Welcher Song läuft gerade | ||
TellCurrentTrackIntent Welches Lied läuft gerade |
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,25 @@ | ||
PlayMyFavoritesIntent Play my favourites | ||
PlayMyFavoritesIntent My favourites | ||
|
||
PlayMyStreamIntent Play my stream | ||
PlayMyStreamIntent My stream | ||
PlayMyStreamIntent Play some music | ||
PlayMyStreamIntent Play music | ||
PlayMyStreamIntent Play new music | ||
|
||
LikeTrackIntent Like this track | ||
LikeTrackIntent Like this song | ||
LikeTrackIntent Like this | ||
|
||
FollowUserIntent Follow the user | ||
|
||
TellCurrentTrackIntent What is currently playing | ||
TellCurrentTrackIntent What track is this | ||
TellCurrentTrackIntent What song is this | ||
TellCurrentTrackIntent What track is playing | ||
TellCurrentTrackIntent What song is playing | ||
TellCurrentTrackIntent What is playing | ||
TellCurrentTrackIntent Which track is that | ||
TellCurrentTrackIntent Which song is that | ||
TellCurrentTrackIntent Which track is playing | ||
TellCurrentTrackIntent Which song is playing |
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,25 @@ | ||
PlayMyFavoritesIntent Play my favorites | ||
PlayMyFavoritesIntent My favorites | ||
|
||
PlayMyStreamIntent Play my stream | ||
PlayMyStreamIntent My stream | ||
PlayMyStreamIntent Play some music | ||
PlayMyStreamIntent Play music | ||
PlayMyStreamIntent Play new music | ||
|
||
LikeTrackIntent Like this track | ||
LikeTrackIntent Like this song | ||
LikeTrackIntent Like this | ||
|
||
FollowUserIntent Follow the user | ||
|
||
TellCurrentTrackIntent What is currently playing | ||
TellCurrentTrackIntent What track is this | ||
TellCurrentTrackIntent What song is this | ||
TellCurrentTrackIntent What track is playing | ||
TellCurrentTrackIntent What song is playing | ||
TellCurrentTrackIntent What is playing | ||
TellCurrentTrackIntent Which track is that | ||
TellCurrentTrackIntent Which song is that | ||
TellCurrentTrackIntent Which track is playing | ||
TellCurrentTrackIntent Which song is playing |
Oops, something went wrong.