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
September 04, 2018
Programming
0
600
ネコのために webアプリと連携する スキルを作ってみた/alexa-for-cat-2018
AAJUG Offline meetup vol.2
Hidetaka Okamoto
September 04, 2018
Tweet
Share
More Decks by Hidetaka Okamoto
See All by Hidetaka Okamoto
OpenAI APIで API Changelogを要約してみた話 / chatgpt-osaka-1
hideokamoto
0
600
コミュニティ運営から 中の人に変わって感じたこと
hideokamoto
0
87
Developerが Developer Advocateになった話 / dev-rel-meetup-tokyo-71
hideokamoto
0
340
Jamstack開発者のための App Runner入門
hideokamoto
1
490
WordPressでの webサイト制作2022 / ngk2022s
hideokamoto
0
440
JavaScript(TypeScript)で メディアサイトを インフラから構築する方法 / jsconf-jp-2021
hideokamoto
2
4.2k
AWS上でStripeを利用したアプリをより安全にデプロイする方法 /jaws-pankration-2021
hideokamoto
1
200
Shifter Headlessと Headless WordPressの紹介
hideokamoto
0
1.8k
Stripe & Next.js + AWS Amplify で会員 + 定期課金機能 / JP_Stripes20210903
hideokamoto
7
3.2k
Other Decks in Programming
See All in Programming
CJK and Unicode From a PHP Committer
youkidearitai
PRO
0
110
go test -json そして testing.T.Attr / Kyoto.go #63
utgwkk
3
300
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
370
Cache Me If You Can
ryunen344
2
740
「待たせ上手」なスケルトンスクリーン、 そのUXの裏側
teamlab
PRO
0
530
Vue・React マルチプロダクト開発を支える Vite
andpad
0
110
Laravel Boost 超入門
fire_arlo
3
220
[FEConf 2025] 모노레포 절망편, 14개 레포로 부활하기까지 걸린 1년
mmmaxkim
0
1.6k
請來的 AI Agent 同事們在寫程式時,怎麼用 pytest 去除各種幻想與盲點
keitheis
0
120
MCPでVibe Working。そして、結局はContext Eng(略)/ Working with Vibe on MCP And Context Eng
rkaga
5
2.3k
旅行プランAIエージェント開発の裏側
ippo012
2
910
そのAPI、誰のため? Androidライブラリ設計における利用者目線の実践テクニック
mkeeda
2
310
Featured
See All Featured
A designer walks into a library…
pauljervisheath
207
24k
Done Done
chrislema
185
16k
Bash Introduction
62gerente
615
210k
A Modern Web Designer's Workflow
chriscoyier
696
190k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.1k
Embracing the Ebb and Flow
colly
87
4.8k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Power of CSS Pseudo Elements
geoffreycrofte
77
6k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
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