alexa_couchpotato 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/alexa_couchpotato/version.rb +1 -1
- data/lib/alexa_couchpotato.rb +9 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec156337c1579d1ddb8440d29779f872daf885d9
|
4
|
+
data.tar.gz: 48ec8ce763c0f9ad52e44451bd5264565f37aef7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f6a8f1f843264f39f7151eeb8b718a3e9b306b531ca4598f8de351f36e9ccf4478b18bb74337fa55f9631c17843f12743a0377c6ab4d9f60ebe50de6f98699a
|
7
|
+
data.tar.gz: 88a14635501103217bbfe4cba56c4d6f83a5b38601bdcaf6f2891aa58b8a22dc532d250372d62640e7e76df32e7639eccd5106217cbad3eb8a1fc7d35270f47c
|
data/lib/alexa_couchpotato.rb
CHANGED
@@ -12,6 +12,15 @@ require 'sinatra/base'
|
|
12
12
|
module Sinatra
|
13
13
|
module Couchpotato
|
14
14
|
def self.registered(app)
|
15
|
+
app.before do
|
16
|
+
if request.request_method == "POST"
|
17
|
+
@data = request.body.read
|
18
|
+
params.merge!(JSON.parse(@data))
|
19
|
+
@echo_request = AlexaObjects::EchoRequest.new(JSON.parse(@data))
|
20
|
+
@application_id = @echo_request.application_id
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
15
24
|
app.post '/alexa_cp' do
|
16
25
|
content_type :json
|
17
26
|
|