lita-alexa-news-recorder 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lita/handlers/alexa_news_recorder.rb +33 -1
- data/lita-alexa-news-recorder.gemspec +1 -1
- 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: 21344c8bce9575ffa277f536ad8d69df49b99ca8
|
4
|
+
data.tar.gz: 02ecfaefcfcd2fbb4bf00f8cdcf5adc72d3808a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec87aec3ca0eff4b4628d095089af4f3c514bb0a404a8529469aacd7e02124241c0e5d0002632ab188add1ff9fb177cf5567d8d6ec29f2adb7dd269c12a309ce
|
7
|
+
data.tar.gz: 4bf52313edf0a3b166c55d67a32b5cbde8b6a6218eabc8e4f5254ab15e540e1adf414afd4c568f6830aa5c1d0635968f63ff4c485372f681baa5fab16cb0c491
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'pry'
|
2
|
+
require 'json'
|
2
3
|
|
3
4
|
module Lita
|
4
5
|
module Handlers
|
@@ -11,7 +12,38 @@ module Lita
|
|
11
12
|
Lita.logger.debug "Inbound request body: "
|
12
13
|
Lita.logger.debug request.body.string # it's a StringIO
|
13
14
|
|
14
|
-
response.write
|
15
|
+
response.write JSON.dump(sample_response)
|
16
|
+
end
|
17
|
+
|
18
|
+
def sample_response
|
19
|
+
{
|
20
|
+
"version": "1.0",
|
21
|
+
"sessionAttributes": {
|
22
|
+
"supportedHoriscopePeriods": {
|
23
|
+
"daily": true,
|
24
|
+
"weekly": false,
|
25
|
+
"monthly": false
|
26
|
+
}
|
27
|
+
},
|
28
|
+
"response": {
|
29
|
+
"outputSpeech": {
|
30
|
+
"type": "PlainText",
|
31
|
+
"text": "Today will provide you a new learning opportunity. Stick with it and the possibilities will be endless. Can I help you with anything else?"
|
32
|
+
},
|
33
|
+
"card": {
|
34
|
+
"type": "Simple",
|
35
|
+
"title": "Horoscope",
|
36
|
+
"content": "Today will provide you a new learning opportunity. Stick with it and the possibilities will be endless."
|
37
|
+
},
|
38
|
+
"reprompt": {
|
39
|
+
"outputSpeech": {
|
40
|
+
"type": "PlainText",
|
41
|
+
"text": "Can I help you with anything else?"
|
42
|
+
}
|
43
|
+
},
|
44
|
+
"shouldEndSession": false
|
45
|
+
}
|
46
|
+
}
|
15
47
|
end
|
16
48
|
|
17
49
|
Lita.register_handler(self)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "lita-alexa-news-recorder"
|
3
|
-
spec.version = "0.1.
|
3
|
+
spec.version = "0.1.2"
|
4
4
|
spec.authors = ["Daniel J. Pritchett"]
|
5
5
|
spec.email = ["dpritchett@gmail.com"]
|
6
6
|
spec.description = "Records voice memos via Alexa and transcribes them for publishing to an Alexa Flash Briefing"
|