1
我的代碼有問題。我不知道如何繼續。從我的網站發送價值到亞馬遜Echo技能的Lambda函數
我想問一個Alexa的東西,她應該回答我在我的網站上的價值。 什麼是最簡單的解決方案。 HTTP請求,API或數據庫?
這是網站,HTTP請求將是:http://plasmaboy.org/tspush.php 請求名稱:「值」
我有什麼至今:
case "LaunchRequest":
// Launch Request
console.log(`LAUNCH REQUEST`)
context.succeed(
generateResponse(
buildSpeechletResponse(`Welcome to my skill`, true),
{}
)
)
break;
case "IntentRequest":
// Intent Request
console.log(`INTENT REQUEST`)
switch(event.request.intent.name) {
case "GetValueFromWebsite":
// !!!
// Implement the "getValueCode"
// !!!
})
break;
default:
throw "Invalid intent"
}
break;
case "SessionEndedRequest":
// Session Ended Request
console.log(`SESSION ENDED REQUEST`)
break;
default:
context.fail(`INVALID REQUEST TYPE: ${event.request.type}`)
}