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
GASをハンズオンのAPIサーバーに使ってみた
Search
4geru sakisaka
September 28, 2021
1
30
GASをハンズオンのAPIサーバーに使ってみた
LT満員御礼!】サーバーレス LT #r_serverlesslt で発表した資料です
https://rakus.connpass.com/event/221200/
4geru sakisaka
September 28, 2021
Tweet
Share
More Decks by 4geru sakisaka
See All by 4geru sakisaka
趣味コーディングってやっぱ楽しいんだから
4geru
1
88
横断組織として考える共通DBの課題解決 〜 桃園の誓いアーキテクチャ 〜 / Addressing Shared Database Challenges as Cross-Team: “Peach Garden Oath” Architecture
4geru
2
860
Supabase x Ruby on Rails
4geru
0
270
Supabase Edge Functions で最近追加された AI 機能を使ってみた
4geru
0
340
福山ネーター LINE DC ハッカソン 2023 @福山
4geru
0
130
Google Form とちょっと 仲良くなった話。
4geru
0
53
Flutter x Graph
4geru
0
240
Github Discussions がイケてる
4geru
0
800
Flutter Academy final presentatoin
4geru
0
38
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
137
6.7k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Statistics for Hackers
jakevdp
796
220k
4 Signs Your Business is Dying
shpigford
181
21k
Mobile First: as difficult as doing things right
swwweet
222
9k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
The Language of Interfaces
destraynor
154
24k
How STYLIGHT went responsive
nonsquared
95
5.2k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Building Applications with DynamoDB
mza
91
6.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Transcript
GASΛϋϯζΦϯͷ APIαʔόʔʹͬͯΈͨ 2021/09/29 @4geru
ࣗݾհ !@HFSV !HFSV גࣜձࣾϚωʔϑΥϫʔυ 🤿🖥 🐼🍣🍺 ࣾձਓɺΤϯδχΞ
ɾ৽͍͠GASॻ͖͍͢ ɾϞοΫΞϓϦΛ4Ͱ࡞ͬͨϊϋ ɾdoGetͷΈͰͲ͏͢Δ͔ ͍͑ͨ͜ͱ
2͚ͭͩ ࠂ͍ͤͯͩ͘͞͞
ࠓिͷ༵(10/02 13:30-) LINE CommunityͷΠϕϯτΛ ։࠵͠·͢
དྷिͷਫ༵(10/06 19:00-) LIFFͷϋϯζΦϯΛ͠·͢
LIFFͱ ɾLIne Frontend Framework ͷུͰ͢ ɾϒϥβͰLINEͷػೳ͕͑ΔϑϨʔϜϫʔΫ ɹɾϢʔβʔใ ɹɾOS/ݴޠใ ɹɾBotͱͷ༑ୡใ
ɹɾϝοηʔδૹ৴ʢLINEϒϥβͷΈʣ ɹɾQRεΩϟϯʢLINEϒϥβͷΈʣ
ϋϯζΦϯͰ ΞϯέʔτΞϓϦ Λ࡞Γ·͢
Ξϯέʔτ Ճ બࢶ Ճ ථத ථޙ ༑ୡʹ γΣΞ
APIαʔόʔͲ͏͢Δʁ
ϋϯζΦϯͷಛੑ ɾ͍ΖΜͳਓ͕ࢀՃ͢Δ ɹɾWindows/Mac etc… ɹɾϓϩάϥϛϯά/LINE APIॳ৺ऀɾ্ڃऀ ɾຊ࣭Ͱͳ͍ࣄલ४උΛݮΒ͍ͨ͠ ɹɾAWS/GCP͍ͨ͘ͳ͍ ɾ͍ͨ͠τϐοΫʹूத͍ͨ͠ ɹɾࢀՃ͕ΰʔϧͰͳ͘ɺཱ࣮ࣗͯ͠Ͱ͖ΔΑ͏ʹͳΔ
ʂʂGASͳΒ୭Ͱ৮ΕΔʂʂ
SpreadSheetͷදݱํ๏ ฤू FEJU ςϯϓϨʔτ UFNQMBUFQSFWJFX ίϐʔ DPQZ 1%'$47ग़ྗ FYQPSU GPSNBUDTWPSQEG
)5.-WJFX IUNMWJFX
ٱʑʹGASΛ৮ͬͯΈΔ
GASͷΞοϓσʔτ
2020/12/07 ʹ৽͍͠IDEʹͳ͍ͬͯΔ
Before After IUUQTUFDIBDUJOEJOFU UIͷҧ͍
༧ଌม͕͍͢͝
όοΫΤϯυͷ࣮
GASͷendpoint2͚ͭͩ get → doGet() post → doPost()
ෳendpointΛฦ͍ͨ͠ͱ͖ → parameter ʹ type Λར༻
main.gs Ͱ doGetͰparameter.type͔Β ֤endpointʹৼΓ͚
endpoint͝ͱʹ ϑΝΠϧΛ࡞
ॲཧΛׂͰ͖Δ
ͬͯΈͯ 👍 ΊͪΌͪ͘Όखܰʹ࣮͕Ͱ͖Δ 👍 ༧ଌม͕ࠓ·Ͱͱൺͯ࠷ߴ 👍 ϑΝΠϧׂͯ͠ཧ͕͍͢͠ 👎 get ϦΫΤετʹ্ݶ͕͋Δ
ͥͻὃ͞Εͨͱࢥͬͯ GASͰ༡ΜͰΈ͍ͯͩ͘͞
͋ͱɺLINEͷΠϕϯτ ڵຯ͋ΕɺࢀՃ͍ͯͩ͘͠͞ɻ