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
サーバサイドを Google Apps Script で書く
Search
Tiny Mouse
January 25, 2019
Programming
0
360
サーバサイドを Google Apps Script で書く
Mobile Act NAGOYA 2019/1/25
Tiny Mouse
January 25, 2019
Tweet
Share
More Decks by Tiny Mouse
See All by Tiny Mouse
今年がんばったこと
tinymouse
0
73
【LT会】インプット・アウトプットどうしてる?
tinymouse
0
38
今年がんばったこと
tinymouse
0
170
.NET MAUI+Blazor を使ってみた
tinymouse
0
170
【LT会】この技術書がすごい
tinymouse
1
180
蔵書管理アプリを作り直した
tinymouse
1
950
Windows アプリの開発手段の選択肢をまとめてみた
tinymouse
0
140
蔵書管理アプリを作りました
tinymouse
0
630
Google Apps Script アプリを配付する
tinymouse
0
110
Other Decks in Programming
See All in Programming
FindyにおけるTakumi活用と脆弱性管理のこれから
rvirus0817
0
540
Things You Thought You Didn’t Need To Care About That Have a Big Impact On Your Job
hollycummins
0
110
Deep Dive into Kotlin Flow
jmatsu
1
370
今だからこそ入門する Server-Sent Events (SSE)
nearme_tech
PRO
3
260
AI Coding Agentのセキュリティリスク:PRの自己承認とメルカリの対策
s3h
0
240
Azure SRE Agentで運用は楽になるのか?
kkamegawa
0
2.5k
速いWebフレームワークを作る
yusukebe
5
1.7k
基礎から学ぶ大画面対応(Learning Large-Screen Support from the Ground Up)
tomoya0x00
0
4.3k
私の後悔をAWS DMSで解決した話
hiramax
4
210
Improving my own Ruby thereafter
sisshiki1969
1
160
@Environment(\.keyPath)那么好我不允许你们不知道! / atEnvironment keyPath is so good and you should know it!
lovee
0
130
Cache Me If You Can
ryunen344
2
4k
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
KATA
mclloyd
32
14k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
580
Git: the NoSQL Database
bkeepers
PRO
431
66k
We Have a Design System, Now What?
morganepeng
53
7.8k
Site-Speed That Sticks
csswizardry
10
820
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.1k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
A Modern Web Designer's Workflow
chriscoyier
696
190k
4 Signs Your Business is Dying
shpigford
184
22k
Transcript
Tiny Mouse サーバサイドを Google Apps Script で書く Mobile Act NAGOYA
2019/1/25
n @tinymouse_jp n SI 企業の SE n 日曜プログラマ n 二児の父
n 静岡県浜松市出身 n 東京都品川区在住。名古屋市在住。 n Windows 愛用。iPhone Android スマホ n Android の会浜松支部、よちよち Android の会、 Hamamatsu.js Tiny Mouse 自己紹介
よくあるモバイルアプリとサーバサイドアプリ JavaScript が好きな場合 GET メソッド、POST メソッドを受けて JSON などでレスポンスする
Google Apps Script n Google が提供する開発環境 n JavaScript ベース n
Google のサーバ上で開発および実行する n Google Spreadsheet などを操作するオブジェクトが用意さ れている n Google ドキュメントの変更などのイベント、予め指定されたス ケジュール、外部からの指示などで実行できる
サーバサイドに Google Apps Script を使う 「ウェブアプリケーションとして公開」 GET メソッド、POST メソッドを受けて JSON
などでレスポンスできる スプレッドシートをデータベースとして使う
楽でいいね! サーバサイドに Google Apps Script を使う
サーバサイドに Google Apps Script を使う 誰でもアクセス可能 「ウェブアプリケーションとして公開」 GET メソッド、POST メソッドを受けて
JSON などでレスポンスできる
「実行可能 API として公開」 サーバサイドに Google Apps Script を使う 実装はちょっと面倒
GAS の「実行可能 API として公開」の仕組
クライアントを特定できる情報をクライアントアプリ、サーバサイド両方に仕込んでおく OAuth を使って API を呼出する仕組
Cordova アプリで OAuth を使って API を呼出する 認可サーバと遣り取りしてアクセストークンを貰うのが Cordova アプリだと面倒
Cordova アプリで GAS で書いたプログラムを呼出する Qiita に書いた https://qiita.com/tinymouse/items/3d40b17663cea2dfc394
サーバサイドは開発者のリソースを使う よくあるモバイルアプリとサーバサイドアプリ クライアントアプリは配布できる
サーバサイドに Google Apps Script を使う 自分のGoogle ドライブのオブジェクトを他人に使わせるか
GAS のコードやドライブのオブジェクトはコピーできる 実は・・
GAS のコードやドライブのオブジェクトはコピーできる Qiita に書いた https://qiita.com/tinymouse/items/352aa8582b6c2ef1ddf0
クライアント情報がコピーできない 認可と API 呼出は開発者のリソースを使うしかないか ところが・・
なかなか大変だ! ということで・・