Module: ActionAlexa::RequestPayload::Session
- Included in:
- AlexaRequest
- Defined in:
- lib/action_alexa/request_payload/session.rb
Overview
Session compontent of the JSON blob from the Alexa request TO the application. This module contains utility methods to access the attributes
Instance Method Summary collapse
- #access_token ⇒ Object
- #application_id ⇒ Object
- #new? ⇒ Boolean
- #session_id ⇒ Object
- #user_access_token_present? ⇒ Boolean
- #user_id ⇒ Object
Instance Method Details
#access_token ⇒ Object
28 29 30 |
# File 'lib/action_alexa/request_payload/session.rb', line 28 def access_token session_payload['user']['accessToken'] end |
#application_id ⇒ Object
16 17 18 |
# File 'lib/action_alexa/request_payload/session.rb', line 16 def application_id session_payload['application']['applicationId'] end |
#new? ⇒ Boolean
8 9 10 |
# File 'lib/action_alexa/request_payload/session.rb', line 8 def new? session_payload.key?('new') && session_payload['new'] end |
#session_id ⇒ Object
12 13 14 |
# File 'lib/action_alexa/request_payload/session.rb', line 12 def session_id session_payload['sessionId'] end |
#user_access_token_present? ⇒ Boolean
24 25 26 |
# File 'lib/action_alexa/request_payload/session.rb', line 24 def user_access_token_present? session_payload['user'].key?('accessToken') end |
#user_id ⇒ Object
20 21 22 |
# File 'lib/action_alexa/request_payload/session.rb', line 20 def user_id session_payload['user']['userId'] end |