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

Alexa-SDK-V2基礎講座@大阪

chao2suke
October 19, 2018

 Alexa-SDK-V2基礎講座@大阪

2018/10/17 Alexa Salon vol.3@大阪 登壇資料

chao2suke

October 19, 2018
Tweet

More Decks by chao2suke

Other Decks in Technology

Transcript

  1. !3 ( ) A I A l e x a

    & V U I / O /
  2. ί ϛ ϡ χ ς Ο [ A l e

    x a S a l o n ] ओ ࠵ A m a z o n ެ ࣜ ϋ ϯ ζ Φ ϯ τ Ϩ ʔ χ ϯ ά ς Ϋ χ Χ ϧ α ϙ ʔ τ A m a z o n ެ ࣜ τ Ϩ ʔ χ ϯ άϖ ʔ δ ੍ ࡞ A l e x a S k i l l A w a r d s ެ ࣜ ϋ ο Χ ι ϯ : ς Ϋ χ Χ ϧ α ϙ ʔ τ ܾ উ ৹ ࠪ һ ॳ ৺ ऀ ޲ ͚ A l e x a ຊ ࣥ ච !4
  3. Hello World 7 const MyHandler = { canHandle(handlerInput) { return

    true; }, handle(handlerInput) { return handlerInput.responseBuilder .speak('͜Μʹͪ͸') .getResponse(); } };
  4. 8

  5. 9

  6. 10

  7. Ex.CustomでDynamoDBを使う 24 'use strict'; const aws = require('aws-sdk-core'); const Adapter

    = require('ask-sdk-dynamodb- persistence-adapter'); コード冒頭でrequired
  8. Ex.CustomでDynamoDBを使う 25 const config = {tableName: 'alexa-salon-vol3', createTable: true}; const

    DynamoDBAdapter = new Adapter.DynamoDbPersistenceAdapter(config); Skill Builderにメソッド追加
  9. Ex.CustomでDynamoDBを使う 26 const skillBuilder = Alexa.SkillBuilders.custom(); exports.handler = skillBuilder .addRequestHandlers(

    LaunchRequestHandler, ) .withPersistenceAdapter(DynamoDBAdapter) .addErrorHandlers(ErrorHandler) .lambda(); Skill Builderにメソッド追加
  10. Response Builder 41 発話系 speak/response カード系 withXXXcard Dialog Model系 delegate/ElicitXXX/addConfirmXXX

    AudioPlayer系 addAudioPlayerXXX Display系 addRenderTemplateDirective Video系 addVideoAppLaunchDirective セッション管理系 withShouldEndSession