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
460
コミュニティ運営から 中の人に変わって感じたこと
hideokamoto
0
53
Developerが Developer Advocateになった話 / dev-rel-meetup-tokyo-71
hideokamoto
0
270
Jamstack開発者のための App Runner入門
hideokamoto
1
420
WordPressでの webサイト制作2022 / ngk2022s
hideokamoto
0
380
JavaScript(TypeScript)で メディアサイトを インフラから構築する方法 / jsconf-jp-2021
hideokamoto
2
4k
AWS上でStripeを利用したアプリをより安全にデプロイする方法 /jaws-pankration-2021
hideokamoto
1
170
Shifter Headlessと Headless WordPressの紹介
hideokamoto
0
1.6k
Stripe & Next.js + AWS Amplify で会員 + 定期課金機能 / JP_Stripes20210903
hideokamoto
7
3k
Other Decks in Programming
See All in Programming
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
EventSourcingの理想と現実
wenas
6
2.3k
Macとオーディオ再生 2024/11/02
yusukeito
0
370
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
900
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
600
役立つログに取り組もう
irof
28
9.6k
Jakarta EE meets AI
ivargrimstad
0
150
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
ヤプリ新卒SREの オンボーディング
masaki12
0
130
as(型アサーション)を書く前にできること
marokanatani
10
2.6k
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.1k
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Automating Front-end Workflow
addyosmani
1366
200k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
How STYLIGHT went responsive
nonsquared
95
5.2k
Speed Design
sergeychernyshev
24
610
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Unsuck your backbone
ammeep
668
57k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
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