Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ネコのために webアプリと連携する スキルを作ってみた/alexa-for-cat-2018
Search
Hidetaka Okamoto
PRO
September 04, 2018
Programming
0
570
ネコのために webアプリと連携する スキルを作ってみた/alexa-for-cat-2018
AAJUG Offline meetup vol.2
Hidetaka Okamoto
PRO
September 04, 2018
Tweet
Share
More Decks by Hidetaka Okamoto
See All by Hidetaka Okamoto
OpenAI APIで API Changelogを要約してみた話 / chatgpt-osaka-1
hideokamoto
PRO
0
370
コミュニティ運営から 中の人に変わって感じたこと
hideokamoto
PRO
0
45
Shopify / Stripeで 静的サイトでも オンライン決済・物販をはじめよう / shifter-meetu-feb-2022
hideokamoto
PRO
0
690
Developerが Developer Advocateになった話 / dev-rel-meetup-tokyo-71
hideokamoto
PRO
0
210
Stripeでの オンライン決済理解した - エンジニア達の「〇〇完全に理解した」Talk #25
hideokamoto
PRO
0
610
Jamstack開発者のための App Runner入門
hideokamoto
PRO
1
360
WordPressでの webサイト制作2022 / ngk2022s
hideokamoto
PRO
0
350
JavaScript(TypeScript)で メディアサイトを インフラから構築する方法 / jsconf-jp-2021
hideokamoto
PRO
2
3.8k
AWS上でStripeを利用したアプリをより安全にデプロイする方法 /jaws-pankration-2021
hideokamoto
PRO
1
150
Other Decks in Programming
See All in Programming
StoreKit2によるiOSのアプリ内課金のリニューアル
kangnux
0
110
SwiftUIで使いやすいToastの作り方 / How to build a Toast system which is easy to use in SwiftUI
lovee
3
130
Netty Chicago Java User Group 2024-04-17
sullis
0
170
Rails と人魚の話/rails-and-mermaid
sanfrecce_osaka
0
100
From Spring Boot 2 to Spring Boot 3 with Java 22 and Jakarta EE
ivargrimstad
0
1.1k
TYPO3 v13 – The road to LTS: What's new and new APIs
luisasofie_xoxo
0
190
Micro Frontends for Java Microservices - Devnexus 2024
mraible
PRO
0
480
エンターテイメント業界で利用されるAWS
demuyan
0
210
GitHub Copilotのススメ
marcy731
1
190
Komplexe Oberflächen mit SVG und der Web Animation API
joergneumann
0
670
スクラムガイドのスプリントレトロスペクティブを改めて読みかえしてみた / Re-reading the Sprint Retrospective Section in the Scrum Guide
mackey0225
3
410
使ってみよう Azure AI Document Intelligence
kosmosebi
2
280
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
2
1.3k
How GitHub Uses GitHub to Build GitHub
holman
468
290k
Gamification - CAS2011
davidbonilla
76
4.6k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
How To Stay Up To Date on Web Technology
chriscoyier
782
250k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
2
3.4k
The Language of Interfaces
destraynor
151
23k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
120
39k
Fireside Chat
paigeccino
21
2.6k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
14
1.5k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
21
1.6k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
Transcript
ωίͷͨΊʹ webΞϓϦͱ࿈ܞ͢Δ εΩϧΛ࡞ͬͯΈͨ AAJUG 2018/09/03 Ԭຊलߴ
ࣗݾհ • Digitalcube Co. Ltd. • AWS Samurai 2017 •
ؔͷJAWS-UGӡӦϝϯόʔ H i d e t a k a O k a m o t o
େલఏͱͯ͠
Ͷ͔͜Θ͍͍
Ͷ͔͜Θ͍͍
ॅΜͰ͍Δͱ ؾʹͳΔ͜ͱ
ࠓτΠϨͪΌΜͱͨ͠ʁ
ࠓτΠϨͪΌΜͱͨ͠ʁ ͜ͷࢠ࠷ۙ͏Μͪͯ͠ͳ͍ͷͰʁ
࠷େͷ
͍ͭτΠϨߦ͔ͬͨ ֮͑ͯΒΕͳ͍
εϚϗΞϓϦ͏ʁ
ΞϓϦ୳͢ͷ ىಈ͢Δͷ ͪΐͬͱखؒ
͡Ό͋ͳΒʁ
࡞ͬͨ https://www.amazon.co.jp/Hidetaka-Okamoto-Ͷ͜Ζ͙/dp/B07G6ZVCC9/
Ͱ࣌ؒΛهɾ֬ೝͰ͖Δ • ࣗɹɹʮΞϨΫαɺͶ͜Ζ͙Ͱهʯ • ΞϨΫαʮ͓ͬ͜͠Ͱ͔͢ʁ͏ΜͪͰ͔͢ʁʯ • ࣗɹɹʮ͓ͬ͜͠ʯ • ΞϨΫαʮ࣌ؒΛه͠·ͨ͠ɻࠓ2ճͰ͢ʯ
Ͱ࣌ؒΛهɾ֬ೝͰ͖Δ • ࣗɹɹʮΞϨΫαɺͶ͜Ζ͙Ͱ֬ೝʯ • ΞϨΫαʮࠓ2ճͰ͢ɻ9࣌XXʹ͓ͬ͜͠Λʙʯ
͜ΕͰউͯΔ
͜ΕͰউͯΔ ͱݶΒͳ͔ͬͨ
ʮ֬ೝʯ͕ඍົ
Ͱཤྺ֬ೝָ͘͠ͳ͍ • ࣌ؒͱ͓ͬ͜͠ or ͏ΜͪΛಡΈ্͛ΒΕͯɾɾɾ • ʮࠓԿճͯ͠Δ͔ʯ͕࠷ݶΘ͔Ε͍͍ • ͦΕ͘Β͍ͳΒهͨ࣌͠ʹݴ͍͍͑ΑͶ •
-> ֬ೝίϚϯυͷଘࡏҙٛͱɾɾɾ
PlayToiletHistory1/4͘Β͍͔͠ΘΕͯͳ͍
ͰΈ͍ͨ࣌͋Δ
ը໘ͩ
React + Mobile HubͰwebΞϓϦ https://app.getnekolog.com/
ΞϓϦˍεΩϧͷߏਤ
Tips
ΞϓϦɾεΩϧ྆ํల։ͳΒaws-sdkඞਢ • ask-sdkʹDynamoDBͷϔϧύʔ͕͋Δ • ςʔϒϧ࡞PUT / GETͷϥούʔͱͯ͑͠Δ • ͨͩ͠ϓϥΠϚϦ͕AlexaͷϢʔβʔID •
ΞϓϦ͔ΒσʔλΛೖΕΔͷʹۤ࿑͢Δ • ϓϥΠϚϦΛUUIDʹͯ͠ɺGISͰΫΤϦ͕ଟϕλʔ
ΈΜͳ͓͏DynamoDB • ࡞ͬͯΔ࣌ʮผʹอଘ͢Δσʔλͱ͔ͳ͍͠ɾɾɾʯ • ͬͯΔ࣌ʮຖճಉ͜͡ͱݴ͏ͷΊΜͲ͍ʯ • ϔϧύʔ͑؆୯ʹDB͑Δ • ར༻ճͱ͔ɺΑ͘ݴ͏༰Λه͓ͯ͜͠͏ •
Ͳ͏͍͍ͤͩͨແྉͰ͓͞·Δʢͣʣ
ask-sdkͰσʔλΛอଘ͢Δ async handle(handlerInput) { // σʔλͷอଘ const persistentAttributes = {
name: '͓͔ͱ', age: 28 } ɹconst { attributesManager } = handlerInput await attributesManager.setPersistentAttributes(persistentAttributes) await attributesManager.savePersistentAttributes() … // σʔλͷऔΓग़͠ const atts = await attributesManager.getPersistentAttributes() const { name, age } = atts …. }
ask-sdkͰσʔλΛอଘ͢Δ async handle(handlerInput) { // σʔλͷอଘ const persistentAttributes = {
name: '͓͔ͱ', age: 28 } ɹconst { attributesManager } = handlerInput await attributesManager.setPersistentAttributes(persistentAttributes) await attributesManager.savePersistentAttributes() … // σʔλͷऔΓग़͠ const atts = await attributesManager.getPersistentAttributes() const { name, age } = atts …. }
ask-sdkͰσʔλΛอଘ͢Δ async handle(handlerInput) { // σʔλͷอଘ const persistentAttributes = {
name: '͓͔ͱ', age: 28 } ɹconst { attributesManager } = handlerInput await attributesManager.setPersistentAttributes(persistentAttributes) await attributesManager.savePersistentAttributes() … // σʔλͷऔΓग़͠ const atts = await attributesManager.getPersistentAttributes() const { name, age } = atts …. }
aws-sdk & ask-utilsͰσʔλΛอଘ͢Δ const AWS = require('aws-sdk') const { getUserId
} = require('ask-utils') const dynamoDB = new AWS.DynamoDB.DocumentClient() const TableName = 'MyExampleDB' const SaveProfileHandler = { … async handle(handlerInput) { const userId = getUserId(handlerInput) const params = { TableName, Item: { id: userId, } } await dynamoDB.put(params).promise() ... } }
aws-sdk & ask-utilsͰσʔλΛอଘ͢Δ const AWS = require('aws-sdk') const { getUserId
} = require('ask-utils') const dynamoDB = new AWS.DynamoDB.DocumentClient() const TableName = 'MyExampleDB' const SaveProfileHandler = { … async handle(handlerInput) { const userId = getUserId(handlerInput) const params = { TableName, Item: { id: userId, } } await dynamoDB.put(params).promise() ... } }
aws-sdk & ask-utilsͰσʔλΛอଘ͢Δ const AWS = require('aws-sdk') const { getUserId
} = require('ask-utils') const dynamoDB = new AWS.DynamoDB.DocumentClient() const TableName = 'MyExampleDB' const SaveProfileHandler = { … async handle(handlerInput) { const userId = getUserId(handlerInput) const params = { TableName, Item: { id: userId, } } await dynamoDB.put(params).promise() ... } }
DynamoDBΛ͍͜ͳ͢ͳͲ https://developer.amazon.com/alexa-skills-kit/make-money/in-skill-purchasing
2018/10/08 (݄) 11:00ʙ17:00: ٕज़ॻయ̑ https://techbookfest.org/event/tbf05