Class: ActionAlexa::AlexaRequest

Inherits:
Object
  • Object
show all
Includes:
RequestPayload::Request, RequestPayload::Session
Defined in:
lib/action_alexa/alexa_request.rb

Overview

ActionAlexa::AlexaRequest is a wrapper around the actual request hash sent

by the Alexa service. It provides utility accessor methods to extrapolate
the request structure from Alexa from the application code that consumes
this gem

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from RequestPayload::Request

#intent_name, #link_result_should_be_returned?, #locale, #request_id, #slot, #slot?, #slots, #slots?, #timestamp, #type

Methods included from RequestPayload::Session

#access_token, #application_id, #new?, #session_id, #user_access_token_present?, #user_id

Constructor Details

#initialize(alexa_payload) ⇒ AlexaRequest

Returns a new instance of AlexaRequest.



15
16
17
# File 'lib/action_alexa/alexa_request.rb', line 15

def initialize(alexa_payload)
  @alexa_payload = alexa_payload
end

Instance Attribute Details

#alexa_payloadObject (readonly)

Returns the value of attribute alexa_payload.



13
14
15
# File 'lib/action_alexa/alexa_request.rb', line 13

def alexa_payload
  @alexa_payload
end