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
590
ネコのために 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
570
コミュニティ運営から 中の人に変わって感じたこと
hideokamoto
0
79
Developerが Developer Advocateになった話 / dev-rel-meetup-tokyo-71
hideokamoto
0
330
Jamstack開発者のための App Runner入門
hideokamoto
1
480
WordPressでの webサイト制作2022 / ngk2022s
hideokamoto
0
430
JavaScript(TypeScript)で メディアサイトを インフラから構築する方法 / jsconf-jp-2021
hideokamoto
2
4.2k
AWS上でStripeを利用したアプリをより安全にデプロイする方法 /jaws-pankration-2021
hideokamoto
1
190
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
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
410
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
1
690
アンドパッドの Go 勉強会「 gopher 会」とその内容の紹介
andpad
0
270
AWS CDKの推しポイント 〜CloudFormationと比較してみた〜
akihisaikeda
3
310
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
1
440
Deep Dive into ~/.claude/projects
hiragram
9
1.5k
Cline指示通りに動かない? AI小説エージェントで学ぶ指示書の書き方と自動アップデートの仕組み
kamomeashizawa
1
580
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
47
31k
ruby.wasmで多人数リアルタイム通信ゲームを作ろう
lnit
2
280
iOSアプリ開発で 関数型プログラミングを実現する The Composable Architectureの紹介
yimajo
2
210
Railsアプリケーションと パフォーマンスチューニング ー 秒間5万リクエストの モバイルオーダーシステムを支える事例 ー Rubyセミナー 大阪
falcon8823
4
960
Elixir で IoT 開発、 Nerves なら簡単にできる!?
pojiro
1
150
Featured
See All Featured
A designer walks into a library…
pauljervisheath
207
24k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
The Invisible Side of Design
smashingmag
300
51k
RailsConf 2023
tenderlove
30
1.1k
How STYLIGHT went responsive
nonsquared
100
5.6k
Side Projects
sachag
455
42k
It's Worth the Effort
3n
185
28k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
800
Making Projects Easy
brettharned
116
6.3k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
19k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
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