WordPress make easier to create Alexa Skills

WordPress make easier to create Alexa Skills

Alexa Days 2017/05/17 Slides

75486cbfd37125f121cf4a6c5614601c?s=128

Hidetaka Okamoto

May 17, 2017
Tweet

Transcript

  1. 8PSE1SFTTNBLFFBTJFS UPDSFBUF"MFYB4LJMMT "MFYB%BZT

  2. w 8 P S E $ B N Q 

    ,Z P U P       0 S H B O J [ F S  )JEFUBLB0LBNPUP %JHJUBMDVCF%FWFMPQFS
  3.  "MFYB4LJMMTOFFETEBUBTPVSDF"1*  8PSE1SFTTFBTZDBONBLFDPOUFOUEBUB  81NBLFFBTJFSUPDSFBUFZPVS"MFYB4LJMMT $PODMVTJPO

  4. A u d i o C a p t u

    re A u d i o P l a y b a c k C a l l s o m e A P I Ta l k s o m t h i n g R e s p o n c e S p e e c h t o Te x t Te x t t o S p e e c h
  5. A u d i o C a p t u

    re A u d i o P l a y b a c k C a l l s o m e A P I Ta l k s o m t h i n g R e s p o n c e S p e e c h t o Te x t Te x t t o S p e e c h A L E X A S K I L L S K I T
  6. A u d i o C a p t u

    re A u d i o P l a y b a c k C a l l s o m e A P I Ta l k s o m t h i n g R e s p o n c e S p e e c h t o Te x t Te x t t o S p e e c h AW S L A M B D A W E B A P I A L E X A S K I L L S K I T
  7.  344GFFE  813&45"1*  OQNJ4BMFYBTEL XBZTUPHFU8PSE1SFTTDPOUFOUT

  8.  344GFFE  813&45"1*  OQNJ4BMFYBTEL XBZTUPHFU8PSE1SFTTDPOUFOUT

  9. Flash Briefing supports JSON and/or RSS IUUQTEFWFMPQFSBNB[PODPNQVCMJDTPMVUJPOTBMFYBBMFYBTLJMMTLJU EPDTqBTICSJFpOHTLJMMBQJGFFESFGFSFODF <item> <guid>urn:uuid:1335c695-cfb8-4ebb-abbd-80da3</guid>

    <title>News Title</title> <description>Content description</description> <link>Post URL</link> <pubDate>Published date</pubDate> </item>
  10. WordPress can make RSS IUUQTXXXXJSFEDPNGFFE <item> <guid>https://www.wired.com/?p=2236905</guid> <title>The ‘Chilling Effect’

    of Trump’s Loose …</title> <description> <![CDATA[ Reports that President Trump shared highly classified intelligence with Russian officials .... </description> <link>https://www.wired.com/2017/05/…</link> <pubDate>Tue, 16 May 2017 02:29:13 +0000</pubDate> </item>
  11. &BTZUPDSFBUF GSFTICSJFpOHTLJMMT PGZPVSPXOXFCTJUF

  12.  344GFFE  813&45"1*  OQNJ4BMFYBTEL XBZTUPHFU8PSE1SFTTDPOUFOUT

  13. Alexa needs JSON Response IUUQTEFWFMPQFSBNB[PODPNQVCMJDTPMVUJPOTBMFYBBMFYBTLJMMTLJU EPDTBMFYBTLJMMTLJUJOUFSGBDFSFGFSFODF { "response": { "outputSpeech":

    { "type": "string", "text": "string", "ssml": "string" }, "reprompt": { ...
  14. 813&45"1*DBONBLF+40/"1* IUUQWXQBQJPSH

  15. "MFYB81JTB8PSE1SFTTQMVHJO IUUQTHJUIVCDPNUPNIBSSJHBO"MFYB81CMPCNBTUFS3&"%.&NE

  16.  'MBTI#SJFpOHTLJMM"1* XQKTPOBMFYBXQWTLJMMCSJFpOH  'BDU2VPUF4LJMMT"1* XQKTPOBMFYBXQWTLJMM\QPTU@JE^  /FXTGSPNZPVSQPTUT4LJMM"1* XQKTPOBMFYBXQWTLJMMOFXT "MFYB81NBLFT"1*FOEQPJOU

  17. Easy install by GIt / WP-CLI IUUQTXQLZPUPOFUFOUSZBMFYBXQQMVHJO $ /PATH/TO/WORDPRESS/wp-content/plugins $

    git clone git@github.com:alleyinteractive/wordpress- fieldmanager.git $ wp plugin activate wordpress-fieldmanager $ git clone git@github.com:tomharrigan/AlexaWP.git $ wp plugin get AlexaWP --format=json $ wp plugin activate AlexaWP $ wp rewrite flush
  18. 81"1*DBONBLF ZPVSPXO"1* GPS"MFYB4LJMM

  19.  344GFFE  813&45"1*  OQNJ4BMFYBTEL XBZTUPHFU8PSE1SFTTDPOUFOUT

  20. "MFYB4LJMMT,JU4%,GPS/PEFKT IUUQTXXXOQNKTDPNQBDLBHFBMFYBTEL

  21. Easy to create Alexa Skill backend IUUQTHJUIVCDPNBMFYBBMFYBTLJMMTLJUTELGPSOPEFKTJOTUBMMJOHBOE XPSLJOHXJUIUIFBMFYBTLJMMTLJUTELGPSOPEFKTBMFYBTEL 'use strict';var

    Alexa = require("alexa-sdk"); exports.handler = function(event, context, callback) { var alexa = Alexa.handler(event, context); alexa.registerHandlers(handlers); alexa.execute(); }; var handlers = { 'LaunchRequest': function () { this.emit(‘SayHello'); }, 'HelloWorldIntent': function () { this.emit(‘SayHello') } };
  22. <0⒏DJBM&YBNQMF>$JUZ(VJEFGPS"MFYB IUUQTHJUIVCDPNBMFYBTLJMMTBNQMFOPEFKTDJUZHVJEF

  23. These answer are hard coded into files. IUUQTHJUIVCDPNBMFYBTLJMMTBNQMFOPEFKTDJUZHVJEFCMPCNBTUFS TSDJOEFYKT-- var

    attractions = [ { name: "Woodland Park Zoo", content: "located just 10 minutes north of downtown …”, location: "There are two zoo entrances. \n West Entrance:\n Cross streets: Phinney Ave. N. between N. 55th St. & N. 56th St.\n Street address: 5500 Phinney Ave. …", contact: "zooinfo@zoo.org\n 206 548 2500” }, { name: "EMP Museum”, content: "Dedicated to contemporary …
  24. *GZPVXBOUUP DSFBUFDPOUFOU NPSFEZOBNJD

  25. $BMM81"1*GSPNBMFYBTEL IUUQWXQBQJPSH

  26. DBMM(&5SFRVFTUCZIUUQIUUQTNPEVMF IUUQTHJUIVCDPNIJEFPLBNPUPTFSWFSMFTTBMFYBDJUZHVJEFDPNNJU FGDCDBFCCEEEDF

  27. &BTZUPMPBEZPVSDPOUFOUJOUP"4, IUUQTHJUIVCDPNIJEFPLBNPUPTFSWFSMFTTBMFYBDJUZHVJEF

  28.  "MFYB4LJMMTOFFETEBUBTPVSDF"1*  8PSE1SFTTFBTZDBONBLFDPOUFOUEBUB  81NBLFFBTJFSUPDSFBUFZPVS"MFYB4LJMMT $PODMVTJPO

  29. *GZPVXBOUUP LOPXNPSF FYBNQMF

  30. 8PSE$BNQ,ZPUP! IUUQTLZPUPXPSEDBNQPSH

  31. *GZPVXBOUUP HFUZPVS PXOTLJMM

  32. $POUBDUVT IUUQTXXXEJHJUBMDVCFKQTFSWJDFXFCTFSWJDFBNB[POBMFYBTLJMMT

  33. BOZRVFTUJPO