概要
enebularで、alexaスキルのwebhookを返してみた。
herokuに、デプロイしてみた。
サービスリクエストをスクラッチで組み立てて、plunkerから、叩いてみた。
参考にしたページ
node-redのフロー
投入したjson
{
"session": {
"new": true,
"sessionId": "SessionId.hogehoge",
"application": {
"applicationId": "amzn.hogehoge"
},
"attributes": {},
"user": {
"userId": "amzn.hogehoge"
}
},
"request": {
"type": "IntentRequest",
"requestId": "EdwRequestId.hogehoge",
"intent": {
"name": "hogehoge",
"slots": {
"gohanNames": {
"name": "gohanNames",
"value": "カツカレー"
}
}
},
"locale": "ja-JP",
"timestamp": "2017-11-20T07:43:46Z"
},
"context": {
"AudioPlayer": {
"playerActivity": "IDLE"
},
"System": {
"application": {
"applicationId": "hogehoge"
},
"user": {
"userId": "hogehoge"
},
"device": {
"supportedInterfaces": {}
}
}
},
"version": "1.0"
}
実行結果
{"version":"1.0","sessionAttributes":{"count":1},"response":{"outputSpeech":{"type":"PlainText","text":"発言がぬるぽでした。もういちどおねがいします。"},"card":{"type":"Simple","title":"GenkIntentに入ったけど、GenkiSlot=nullですぜって表示される","content":"発言がぬるぽでした。もういちどおねがいします。"},"reprompt":{"outputSpeech":{"type":"PlainText","text":"他にも質問はありますか?"}},"shouldEndSession":false}}
成果物
以上