Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/naoty/ruboty-google_spreadsheet
Store Ruboty's memory in Google Spreadsheet.
https://github.com/naoty/ruboty-google_spreadsheet
Last synced: about 1 month ago
JSON representation
Store Ruboty's memory in Google Spreadsheet.
- Host: GitHub
- URL: https://github.com/naoty/ruboty-google_spreadsheet
- Owner: naoty
- License: mit
- Created: 2015-02-15T13:18:58.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-13T12:44:18.000Z (almost 10 years ago)
- Last Synced: 2024-10-22T13:58:59.362Z (3 months ago)
- Language: Ruby
- Size: 172 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Ruboty::GoogleSpreadsheet
Store [Ruboty](https://github.com/r7kamura/ruboty/)'s memory in Google Spreadsheet.
## Installation
```ruby
# Gemfile
gem "ruboty-google_spreadsheet"
```## ENV
```bash
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//edit#gid=0)
```## Refresh token
```bash
% 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"
``````bash
% 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" : "..."
}
```