Skip to content

CommonDB implementation backed by a Google Spreadsheet

Notifications You must be signed in to change notification settings

NaturalCycles/spreadsheet-lib

Repository files navigation

@naturalcycles/spreadsheet-lib

CommonDB implementation backed by a Google Spreadsheet

npm code style: prettier

Example

// Setup SpreadsheetDB
const db = new SpreadsheetDB({
  gcpServiceAccount: {
    client_email: '[email protected]'
    private_key: 'verysecret',
  },
  spreadsheetId: '17meRABNrr4Pik9FF5HRQgRxxi4kjY2_dCHg3k2nqGGE',
})

// Use it as CommonDB
const items = await db.getByIds('TEST_TABLE', ['id1', 'id2'])
// ...