Class: GoogleSpreadsheetFetcher::Fetcher

Inherits:
Object
  • Object
show all
Defined in:
lib/google_spreadsheet_fetcher/fetcher.rb

Constant Summary collapse

OOB_URI =
'urn:ietf:wg:oauth:2.0:oob'

Instance Method Summary collapse

Constructor Details

#initialize(credential_store_file, user_id, sheet_key) ⇒ Fetcher

Returns a new instance of Fetcher.



11
12
13
14
15
16
# File 'lib/google_spreadsheet_fetcher/fetcher.rb', line 11

def initialize(credential_store_file, user_id, sheet_key)
  @client_secret_file = GoogleSpreadsheetFetcher.config.client_secrets_file_path
  @credential_store_file = credential_store_file
  @user_id = user_id
  @sheet_key = sheet_key
end

Instance Method Details

#fetch_by_gid(gid) ⇒ Object



26
27
28
# File 'lib/google_spreadsheet_fetcher/fetcher.rb', line 26

def fetch_by_gid(gid)
  fetch_worksheet_by(gid: gid)
end

#fetch_by_index(index) ⇒ Object



18
19
20
# File 'lib/google_spreadsheet_fetcher/fetcher.rb', line 18

def fetch_by_index(index)
  fetch_worksheet_by(index: index)
end

#fetch_by_title(title) ⇒ Object



22
23
24
# File 'lib/google_spreadsheet_fetcher/fetcher.rb', line 22

def fetch_by_title(title)
  fetch_worksheet_by(title: title)
end