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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9da855cf62b84a807cc8ef028cfcc4da11a06ae2
4
- data.tar.gz: aec90903bc75a103b0ab303106adcc5eaf7d9fae
3
+ metadata.gz: 21344c8bce9575ffa277f536ad8d69df49b99ca8
4
+ data.tar.gz: 02ecfaefcfcd2fbb4bf00f8cdcf5adc72d3808a3
5
5
  SHA512:
6
- metadata.gz: dc376556afed2c649d73fc9489080b5a40087fb2bdaf2f793e4fe4380ceb690a88094089f8c3bb5c5f85895af8ae9a044ee833996248701c4ab7856a81d25fed
7
- data.tar.gz: 0f9ea7426741a80ca649ca5eec9aea71a57d510c2dbaa719a6af79804df735b2f6df651719288a1562cfd7f65062e019a06d60a535e905a11fd7dc5df5765fd4
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 request.body
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.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"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-alexa-news-recorder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel J. Pritchett