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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c85033de590976ff3bc361972aa2e635e13da8e4
4
- data.tar.gz: 29435f9306488155d643f2d234f3a527782c3b60
3
+ metadata.gz: e563187900d605fd53b30d2c8bd24179d70ca6e8
4
+ data.tar.gz: f3dc844101f302aa6370915cde425751e353c4a8
5
5
  SHA512:
6
- metadata.gz: 4aff6638a034c4f1c20f1d9cc216f8066c8122465e20a3b74bd0d511445116903b5a8a1c128498070f5ef33815b0250496492c9b5955b6ae86ad83aad68a1611
7
- data.tar.gz: 800c0ab8d9a3a2c0cc10057c57652c7156ac9ac24cb1864cb4534c643a2b79c320e35afc8018999543047f02dc93ff8fc7777c53bc93586e55a26434a57dac5f
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.
@@ -1,5 +1,3 @@
1
- require "dotenv/load"
2
-
3
1
  require "faraday"
4
2
  require "google/apis/sheets_v4"
5
3
 
@@ -1,3 +1,3 @@
1
1
  module GSheets
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
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.0
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-17 00:00:00.000000000 Z
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.5.1
200
+ rubygems_version: 2.6.8
201
201
  signing_key:
202
202
  specification_version: 4
203
203
  summary: Database like API for Google Spreadsheets