No commit activity in last 3 years
No release in over 3 years
Store Ruboty's memory in Google Spreadsheet.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.7
>= 0
~> 10.0

Runtime

 Project Readme

Ruboty::GoogleSpreadsheet

Store Ruboty's memory in Google Spreadsheet.

Installation

# Gemfile
gem "ruboty-google_spreadsheet"

ENV

GOOGLE_CLIENT_ID       - Client ID
GOOGLE_CLIENT_SECRET   - Client secret
GOOGLE_REDIRECT_URI    - Redirect URI
GOOGLE_REFRESH_TOKEN   - Refresh token issued with access token
GOOGLE_SPREADSHEET_KEY - Spreadsheet key (e.g. https://docs.google.com/spreadsheets/d/<key>/edit#gid=0)

Refresh token

% open "https://accounts.google.com/o/oauth2/auth\
?access_type=offline\
&client_id=${CLIENT_ID}\
&redirect_uri=${REDIRECT_URI}\
&response_type=code\
&scope=https://www.googleapis.com/auth/drive"
% curl \
> -d "client_id=${CLIENT_ID}" \
> -d "client_secret=${CLIENT_SECRET}" \
> -d "redirect_uri=${REDIRECT_URI}" \
> -d "grant_type=authorization_code" \
> -d "code=${CODE}" \
> "https://accounts.google.com/o/oauth2/token"
{
  "access_token" : "...",
  "token_type" : "Bearer",
  "expires_in" : 3600,
  "refresh_token" : "..."
}