Skip to content

Add Google Sheets client and context helper - #21

Merged
zewelor merged 3 commits into
mainfrom
implement_google_sheet
Mar 22, 2026
Merged

Add Google Sheets client and context helper#21
zewelor merged 3 commits into
mainfrom
implement_google_sheet

Conversation

@zewelor

@zewelor zewelor commented Mar 21, 2026

Copy link
Copy Markdown
Contributor
  • Add R3x::Client::GoogleSheets::Client to read spreadsheet rows via API
  • Implement header-to-hash mapping in read_rows for convenient rows
  • Add google_sheets helper to Workflow::Context to build client from env
  • Load credentials with MultiJson and R3x::Env.secure_fetch; readonly scope

zewelor added 3 commits March 21, 2026 18:23
- Add R3x::Client::GoogleSheets::Client to read spreadsheet rows via API
- Implement header-to-hash mapping in `read_rows` for convenient rows
- Add `google_sheets` helper to Workflow::Context to build client from env
- Load credentials with MultiJson and R3x::Env.secure_fetch; readonly scope
- Replace nested `R3x::Client::GoogleSheets::Client` with
  `R3x::Client::GoogleSheets` to simplify the client API
- Add `read_rows(range:, headers: true)` that returns hashes when
  `headers` is true for easier row consumption in workflows
- Ensure header names are made unique on duplicates and pad short
  rows with `nil` so zipped hashes stay aligned
- Switch to `R3x::Client::GoogleAuth.from_json` for service auth setup
- Update `R3x::Workflow::Context#google_sheets` to use the new client
- Add `# frozen_string_literal: true` to `lib/r3x/workflow/context.rb`
- Rename planned class to `R3x::Client::GoogleSheets` for clarity
- Switch to `R3x::Client::GoogleAuth.from_json` in service setup
- Inline credential parsing in `ClientProxy` with `MultiJson.load`
- Remove doc's `fetch_google_credentials` helper function
- Update `docs/todo/plan-google-sheets-client.md`
@zewelor
zewelor merged commit 91b00b7 into main Mar 22, 2026
4 checks passed
@zewelor
zewelor deleted the implement_google_sheet branch March 22, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant