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
77
【LT会】インプット・アウトプットどうしてる?
tinymouse
0
43
今年がんばったこと
tinymouse
0
170
.NET MAUI+Blazor を使ってみた
tinymouse
0
170
【LT会】この技術書がすごい
tinymouse
1
180
蔵書管理アプリを作り直した
tinymouse
1
960
Windows アプリの開発手段の選択肢をまとめてみた
tinymouse
0
140
蔵書管理アプリを作りました
tinymouse
0
630
Google Apps Script アプリを配付する
tinymouse
0
120
Other Decks in Programming
See All in Programming
XP, Testing and ninja testing ZOZ5
m_seki
3
570
エンジニアとして高みを目指す、 利益を生み出す設計の考え方 / design-for-profit
minodriven
24
12k
株式会社 Sun terras カンパニーデック
sunterras
0
260
Cloudflare AgentsとAI SDKでAIエージェントを作ってみた
briete
0
130
Building, Deploying, and Monitoring Ruby Web Applications with Falcon (Kaigi on Rails 2025)
ioquatix
4
1.8k
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
2
790
Go Conference 2025: Goで体感するMultipath TCP ― Go 1.24 時代の MPTCP Listener を理解する
takehaya
8
1.6k
階層構造を表現するデータ構造とリファクタリング 〜1年で10倍成長したプロダクトの変化と課題〜
yuhisatoxxx
3
960
Devoxx BE - Local Development in the AI Era
kdubois
0
120
iOSアプリの信頼性を向上させる取り組み/ios-app-improve-reliability
shino8rayu9
0
170
なぜGoのジェネリクスはこの形なのか? Featherweight Goが明かす設計の核心
ryotaros
7
1.1k
どの様にAIエージェントと 協業すべきだったのか?
takefumiyoshii
2
630
Featured
See All Featured
Done Done
chrislema
185
16k
Gamification - CAS2011
davidbonilla
81
5.5k
Building Applications with DynamoDB
mza
96
6.7k
How to Think Like a Performance Engineer
csswizardry
27
2k
How GitHub (no longer) Works
holman
315
140k
Documentation Writing (for coders)
carmenintech
75
5k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
45
2.5k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
A designer walks into a library…
pauljervisheath
209
24k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
61k
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 呼出は開発者のリソースを使うしかないか ところが・・
なかなか大変だ! ということで・・