Class: GoogleSpreadsheetFetcher::Fetcher
- Inherits:
-
Object
- Object
- GoogleSpreadsheetFetcher::Fetcher
- Defined in:
- lib/google_spreadsheet_fetcher/fetcher.rb
Instance Method Summary collapse
- #fetch_all_rows_by!(index: nil, sheet_id: nil, title: nil, skip: 0, structured: false) ⇒ Object
-
#initialize(spreadsheet_id, user_id, config: nil, application_name: nil) ⇒ Fetcher
constructor
A new instance of Fetcher.
- #service ⇒ Object
Constructor Details
#initialize(spreadsheet_id, user_id, config: nil, application_name: nil) ⇒ Fetcher
Returns a new instance of Fetcher.
7 8 9 10 11 12 |
# File 'lib/google_spreadsheet_fetcher/fetcher.rb', line 7 def initialize(spreadsheet_id, user_id, config: nil, application_name: nil) @spreadsheet_id = spreadsheet_id @user_id = user_id @config = config @application_name = application_name end |
Instance Method Details
#fetch_all_rows_by!(index: nil, sheet_id: nil, title: nil, skip: 0, structured: false) ⇒ Object
14 15 16 17 |
# File 'lib/google_spreadsheet_fetcher/fetcher.rb', line 14 def fetch_all_rows_by!(index: nil, sheet_id: nil, title: nil, skip: 0, structured: false) sheet = fetch_sheet_by!(index: index, sheet_id: sheet_id, title: title) fetch_all_rows(sheet, skip: skip, structured: structured) end |
#service ⇒ Object
19 20 21 |
# File 'lib/google_spreadsheet_fetcher/fetcher.rb', line 19 def service @service ||= GoogleSpreadsheetFetcher::SheetsServiceBuilder.new(@user_id, config: @config, application_name: @application_name).build end |