g_sheets 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/lib/g_sheets.rb +0 -2
- data/lib/g_sheets/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e563187900d605fd53b30d2c8bd24179d70ca6e8
|
4
|
+
data.tar.gz: f3dc844101f302aa6370915cde425751e353c4a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39621a6612ee5f7885ba0d43c323888329bdccbff6da010c0253206caf48c79f704672b7c9e5b24ceb64b9cb4d1eb2b105f224fa814cdd717cc7e1997fdbc250
|
7
|
+
data.tar.gz: 0253f3bd9e6f0ee63868c19c0aca782b1ea9cc20d44385babb8143bb54475bc9842dad086a8b01c3ab0e24928fd75575e4adf37faeace33c6313fa007a427002
|
data/README.md
CHANGED
@@ -44,6 +44,16 @@ In order to make operations on a user's Google Spreadsheet you will need an auth
|
|
44
44
|
|
45
45
|
Save the `refresh_token` somewhere safe, as it would be used later to create a new `get_access_token` when that expires.
|
46
46
|
|
47
|
+
After that, you can now create a `Session` object from the `access_token` and instantiate a `SpreadSheet` object from the session:
|
48
|
+
|
49
|
+
```ruby
|
50
|
+
session = GSheets::Session.new(access_token: access_token)
|
51
|
+
# you need a spreadsheet id; try "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms"
|
52
|
+
# which is the sample db from the official docs
|
53
|
+
ss = GSheets::SpreadSheet.new(session: session, id: id)
|
54
|
+
ss.sheets.first.rows # returns all the rows in the first sheet of this spreadsheet
|
55
|
+
```
|
56
|
+
|
47
57
|
## Development
|
48
58
|
|
49
59
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/lib/g_sheets.rb
CHANGED
data/lib/g_sheets/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: g_sheets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- parasquid
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -197,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
197
197
|
version: '0'
|
198
198
|
requirements: []
|
199
199
|
rubyforge_project:
|
200
|
-
rubygems_version: 2.
|
200
|
+
rubygems_version: 2.6.8
|
201
201
|
signing_key:
|
202
202
|
specification_version: 4
|
203
203
|
summary: Database like API for Google Spreadsheets
|