Class: AmazonEcho::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/amazon_echo/request.rb

Direct Known Subclasses

IntentRequest, LaunchRequest, SessionEndedRequest

Instance Method Summary collapse

Constructor Details

#initialize(request) ⇒ Request

Returns a new instance of Request.



2
3
4
5
6
7
# File 'lib/amazon_echo/request.rb', line 2

def initialize(request)
  @original_request = request
  @version          = request["version"]
  @session          = request["session"]
  @request          = request["request"]
end

Instance Method Details

#requestObject



21
22
23
# File 'lib/amazon_echo/request.rb', line 21

def request
  @original_request
end

#request_idObject



17
18
19
# File 'lib/amazon_echo/request.rb', line 17

def request_id
  @request["requestId"]
end

#timestampObject



13
14
15
# File 'lib/amazon_echo/request.rb', line 13

def timestamp
  @request["timestamp"]
end

#typeObject



9
10
11
# File 'lib/amazon_echo/request.rb', line 9

def type
  @request["type"]
end