Click here to load reader

Twilio bluemix hands-on 資料

  • View
    1.461

  • Download
    0

Embed Size (px)

Text of Twilio bluemix hands-on 資料

PowerPoint

TwilioJP-UGBluemix

!!2015914

2015 IBM Corporation#

1

Hands-on

Watson Speech to TextUser

API Call

API Call12 !?TwilioBluemix

2015 IBM Corporation#Hands-on Bluemix & PHP WebTwilioHands-onNode-Red &

2015 IBM Corporation# : Bluemix Masaya FujitaBluemixBluemix

ProjectPM

BluemixNode-Red

2015 IBM Corporation#IBM Bluemix

2015914

2015 IBM Corporation#

5

IBM BluemixSoftLayerCloud FoundryPaaS

APIDevOps

2015 IBM Corporation#BluemixIBMPlatform as a ServicePaaSWebBluemixPaaSCloud FoundryPaaSIBMIaaSSoftlayer6

IT

- - - - : -

~ ~ CodeDataRuntimeMiddlewareOSVirtualizationServersStorageNetworking~ - 1/3

2015 IBM Corporation#7BluemixPaaS

HWOS1

- -

IaaS

~ : - - OS IBM SoftLayer

~ CodeDataRuntimeMiddlewareOSVirtualizationServersStorageNetworking~ IT - 2/3

2015 IBM Corporation#8SoftlayerAWSIaaSHWOSIaaSOS

~ PaaSIaaS

- : ~

IBM Bluemix

~ CodeDataRuntimeMiddlewareOSVirtualizationServersStorageNetworkingIT - 3/3

2015 IBM Corporation#9PaaSOS301DeveloperApplication

10IBM Bluemix

( )( DB )( 30 )

2015 IBM Corporation#10

10

11

Bluemix30

-

2015 IBM Corporation#11OSInstallWeb Server3011

12buildpackBluemix

Cloud Foundry

GitHubbuildpack

GitHubGithttps://github.com/cloudfoundry-community/cf-docs-contrib/wiki/Buildpacks

2015 IBM Corporation#12BluemixBuildpackWebBluemix12

13

RDB30 ()-

2015 IBM Corporation#13

13

14IBM Bluemix OS

2015 IBM Corporation#14

14

Bluemix

1001468520154WebInternet of Things

WatsonDevOps

2015 IBM Corporation#

15

16

IBM DevOps Services

IBM Rational Team ConcertSaaS

Eclipse OrionWebIDE

Eclipse

Plug-in

/

2015 IBM Corporation#16

16

17Cloud FoundryPaaS

Cloud FoundryPaaS

Cloud FoundryPaaS

2015 IBM Corporation#17

17

18Bluemix

IBMHigh Value SolutionOSS

PaaS Cloud Foundry/

2015 IBM Corporation#18

18

19End

2015 IBM Corporation#

19

Hands-on 1: PHP Web

2015914

2015 IBM Corporation#

20

Hands-on 1: PHP WebTwiMLphpWebBluemixPHPWeb

BluemixPHP Web Local PCHello! Twilio & Bluemix!!phpBluemixcf

2015 IBM Corporation#PHP WebStepPHPBluemix

1. PHP

3. 2. CreateBluemix

Bluemix

2015 IBM Corporation#

22

PHPStepphptest.php)

2015 IBM Corporation#

23

cf StepGithubhttps://github.com/cloudfoundry/cliOS Xcf -vcf BluemixLocalBluemix

OK Mac >>

2015 IBM Corporation#

24

cf BluemixStepphpcf login Bluemix> cf login -a https://api.ng.bluemix.net

Bluemix IDPass

2015 IBM Corporation#

25

BluemixphpStepcf push BluemixPush> cf push (

Base URL/test.php

2015 IBM Corporation#

26

TwilioHands-on

2015914

2015 IBM Corporation#

27

Node-Red2015914

2015 IBM Corporation#

28

Node-RED UInode.js NodeNodeBluemix

UIIoT FoundationBluemix

2015 IBM Corporation#

29

&

Node-RED

DeployNode-RED

2015 IBM Corporation#

30

NodeInputOutputFunction SocialTwitter/Mail/ircStorageDBDBAnalysisAdvancedRSS/atom

///DB/Node-RED ()

2015 IBM Corporation#

31

JavaScript

node

http://nodered.org/docs/writing-functions.html

function return msg; node

2015 IBM Corporation#

32

Hands-on 3 & 2015914

2015 IBM Corporation#

33

RecordAction URLPOST Request FileURL WatsonText TwiML TwilioTwiMLhttp Response

2015 IBM Corporation#

34

Node-RED StepNode-RED StarterNode-RED

Node-REDNode.jsWebNode-RED Starter KitNode.jsWeb Node-RED

Node-RED StarterCreateBluemix

2015 IBM Corporation#

35

Node-REDStepBluemixLinkNode-RED

2015 IBM Corporation#

36

HTTP Post Request

StephttpDrag & DropMethodPOSTURL/callcenter

TwilioActionURLHttp RequestURL

2015 IBM Corporation#

37

Post ParameterStepDebughttp responseTwilioDebug

Action URLPostDebugJsonPostURLRecordingUrl

2015 IBM Corporation#

38

PostURLStepFunctionJavascriptRecordingUrl

msgPostmsg.payloadmsg.payload.RecordingURLmsg.payloadmsg.payload = msg.payload.RecordingUrl;return msg;

2015 IBM Corporation#

39

Watson Speech to TextStepAPISpeech to Text

Speech to Textusername/passwordCredentials

2015 IBM Corporation#

40

Watson Speech to TextStepSpeech to TextJapanese / Narrowbandmsg.transcriptDebug

Speech to TextURL

2015 IBM Corporation#

41

1(1, 2)StepFunctionJavascriptmsg.payload.num

var transcript = msg.transcription;var category, num;if(transcript.indexOf("") != -1){ category = ""; num = 1;} else if (transcript.indexOf("") != -1){ category = ""; num = 2;} else { category = ""; num = 3;}msg.payload = {"category": category, "num": num};return msg;

2015 IBM Corporation#

42

2Stepswitchmsg.payload.num:1 / :2 / :3Debugswitch

Inject

2015 IBM Corporation#

43

TwiMLTwiliohttp

StepTemplate3TwilioTwiMLnone

http response

+81399998877

2015 IBM Corporation#

44

Import[{"id":"c847afba.0d1398","type":"http in","name":"","url":"/callcenter","method":"post","swaggerDoc":"","x":101,"y":86,"z":"56afc5ad.18aa4c","wires":[["591e308a.450058"]]},{"id":"c93c119f.59058","type":"debug","name":"","active":true,"console":"false","complete":"transcription","x":371,"y":170,"z":"56afc5ad.18aa4c","wires":[]},{"id":"591e308a.450058","type":"function","name":"","func":"msg.payload = msg.payload.RecordingUrl;\nreturn msg;","outputs":1,"noerr":0,"x":265,"y":86,"z":"56afc5ad.18aa4c","wires":[["249464a8.7fa46c"]]},{"id":"249464a8.7fa46c","type":"watson-speech-to-text","name":"","lang":"ja-JP","band":"NarrowbandModel","x":159,"y":170,"z":"56afc5ad.18aa4c","wires":[["c93c119f.59058","cdbcf6f7.b7ad58"]]},{"id":"cdbcf6f7.b7ad58","type":"function","name":"","func":"var transcript = msg.transcription;\nvar category, num;\nif(transcript.indexOf(\"\") != -1){\n category = \"\";\n num = 1;\n} else if (transcript.indexOf(\"\") != -1){\n category = \"\";\n num = 2;\n} else {\n category = \"\";\n num = 3;\n}\nmsg.payload = {\"category\": category, \"num\": num};\nreturn msg;","outputs":"1","noerr":0,"x":206,"y":260,"z":"56afc5ad.18aa4c","wires":[["7da1f949.0140e8","67898745.7d97a"]]},{"id":"7da1f949.0140e8","type":"debug","name":"","active":true,"console":"false","complete":"payload","x":381,"y":259,"z":"56afc5ad.18aa4c","wires":[]},{"id":"67898745.7d97a","type":"switch","name":"","property":"payload.num","rules":[{"t":"eq","v":"1"},{"t":"eq","v":"2"},{"t":"eq","v":"3"}],"checkall":"true","outputs":3,"x":255,"y":337,"z":"56afc5ad.18aa4c","wires":[["f9cd4589.d3b4c"],["ce9b00ce.9a77b8"],["87be0d17.5f84c"]]},{"id":"f9cd4589.d3b4c","type":"template","name":"","field":"payload","format":"text","template":"\n +81399998877\n","x":426,"y":314,"z":"56afc5ad.18aa4c","wires":[["50647340.ae7144"]]},{"id":"ce9b00ce.9a77b8","type":"template","name":"","field":"payload","format":"text","template":"\n +81399998877\n","x":430,"y":359,"z":"56afc5ad.18aa4c","wires":[["50647340.ae7144"]]},{"id":"87be0d17.5f84c","type":"template","name":"","field":"payload","format":"text","template":"\n +81399998877\n","x":431,"y":405,"z":"56afc5ad.18aa4c","wires":[["50647340.ae7144"]]},{"id":"50647340.ae7144","type":"http response","name":"","x":618,"y":355,"z":"56afc5ad.18aa4c","wires":[]}]

2015 IBM Corporation#

45

Import

2015 IBM Corporation#

46

TwilioBluemix

TwilioTwiML/APIBluemixSpeech to Text

2015 IBM Corporation#

47

2015 IBM Corporation#

48

Bluemix

2015 IBM Corporation#49

http://ibm.biz/bmxug-facebook

2015 IBM Corporation#

50