Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Google Nest HubでVue.jsを使った話、LINE Thingsでちょっとだけセ...

gaomar
July 24, 2019

Google Nest HubでVue.jsを使った話、LINE Thingsでちょっとだけセキュアなシステム作った話 / v-kansai-0724

Google Nest HubでVue.jsを使った話、LINE Thingsでちょっとだけセキュアなシステム作った話

gaomar

July 24, 2019
Tweet

More Decks by gaomar

Other Decks in Technology

Transcript

  1. JOUFSBDUJWF@DBOWBT@NJOKTΛJOEFYIUNMͰݺͼग़͢ <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible"

    content="IE=edge"> <meta name="viewport" content="width=device-width,initial-scale=1.0"> <link rel="icon" href="<%= BASE_URL %>favicon.ico"> <title>nesthub-demo</title> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons"> <!-- Load Assistant Canvas CSS and JavaScript --> <link rel="stylesheet" href="https://www.gstatic.com/assistant/immersivecanvas/css/styles.css"> <script src="https://www.gstatic.com/assistant/interactivecanvas/api/interactive_canvas.min.js"></script> </head> <body> <noscript> <strong>We're sorry but nesthub-demo doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> </noscript> <div id="app"></div> <!-- built files will be auto injected --> </body> </html>
  2. <script> export default { methods: { bmiStart () { //

    Google Assistantʹ ʮbmiʯ ͱ͍͏จࣈྻΛૹΔ interactiveCanvas.sendTextQuery('bmi'); } } } </script> JOUFSBDUJWF$BOWBTTFOE5FYU2VFSZͰ (PPHMF"TTJTUBOUʹૹΔ
  3. <script> export default { data () { return { result:

    '' } }, created () { var me = this const callbacks = { onUpdate(state) { // bmiͷ஋͕ඈΜͰ͖ͨΒऔಘ͢Δ if ('bmi' in state) { me.result = state.bmi } }, } interactiveCanvas.ready(callbacks) } } </script> JOUFSBDUJWF$BOWBTSFBEZͰ (PPHMF"TTJTUBOU͔ΒͷԠ౴Λ଴ͭ