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
290
サーバサイドを 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
82
.NET MAUI+Blazor を使ってみた
tinymouse
0
79
【LT会】この技術書がすごい
tinymouse
1
130
蔵書管理アプリを作り直した
tinymouse
1
600
Windows アプリの開発手段の選択肢をまとめてみた
tinymouse
0
35
蔵書管理アプリを作りました
tinymouse
0
490
Google Apps Script アプリを配付する
tinymouse
0
62
蔵書管理アプリを作っています
tinymouse
1
400
JavaScript アプリで使うデータベースを考える
tinymouse
0
290
Other Decks in Programming
See All in Programming
Komplexe Oberflächen mit SVG und der Web Animation API
joergneumann
0
670
GitHub Actionsで泣かないためにやっておきたい設定 / Recommended GHA settings to avoid crying
pinkumohikan
3
530
Rubyでたのしむクリエイティブコーディング/Enjoy Creative coding with Ruby
chobishiba
1
180
HUIT新歓2024「競技プログラミング、やってみませんか?」
slephy2784
1
270
サイコロで理解する統計的仮説検定の考え方
tatamiya
4
920
Behind VS Code Extensions for JavaScript / TypeScript Linnting and Formatting
unvalley
5
910
冗長なエラーログを削減し、スタックトレースを手に入れる / Reducing Verbose Error Logs and Obtaining Stack Traces
upamune
0
530
코틀린으로 멀티플랫폼 만들기
pangmoo
0
150
ONE WEDGE_company_guide
1wedge_one
0
470
Milestoner
bkuhlmann
1
410
Tailwind CSSを本気でカスタマイズする方法
fsubal
13
5.2k
Scalable Customer Journey Orchestration (CJO)
lewuathe
0
210
Featured
See All Featured
Scaling GitHub
holman
457
140k
We Have a Design System, Now What?
morganepeng
43
6.7k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
241
1.2M
Typedesign – Prime Four
hannesfritz
36
2.1k
Product Roadmaps are Hard
iamctodd
44
9.7k
Unsuck your backbone
ammeep
663
57k
No one is an island. Learnings from fostering a developers community.
thoeni
16
2.1k
Fantastic passwords and where to find them - at NoRuKo
philnash
37
2.5k
Building Better People: How to give real-time feedback that sticks.
wjessup
355
18k
Imperfection Machines: The Place of Print at Facebook
scottboms
260
12k
Stop Working from a Prison Cell
hatefulcrawdad
266
19k
Optimizing for Happiness
mojombo
370
69k
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 呼出は開発者のリソースを使うしかないか ところが・・
なかなか大変だ! ということで・・