Create RESTful API from Google Sheet.
For prototypes, we usually need some simple DB and WEB API to CRUD the data. While it is possible to provide real DBMS, isn't it great if we can simply use Google Sheet for storing and serving the data?
Using Google Sheet has following benefits.
- Easy to create table. Just add a sheet and define header column, and you are ready.
- Easy to modify the data. Especially for a teammate who isn't familliar with DBMS.
- You can use formulars for advanced usecases.
- Create a Service Account on Google Developers Console.
- Download the access key of the account in JSON format.
- Enable Google Sheet API on the console.
- Create a spreadsheet on Google Sheet.
- Share the spreadsheet to the account with read & write permissions.
- Encode the access key in Base64
ruby TODO
- Define environment variables.
RESHEET_SPREADSHEET_ID
: The ID of the spreadsheetRESHEET_CREDENTIALS
: The access keyRESHEET_API_KEY
(Optional) : Set key you like if you want to authenticate API with a key