/spreadsheet-lib

CommonDB implementation backed by a Google Spreadsheet

Primary LanguageTypeScript

@naturalcycles/spreadsheet-lib

CommonDB implementation backed by a Google Spreadsheet

npm code style: prettier

Example

// Setup SpreadsheetDB
const db = new SpreadsheetDB({
  gcpServiceAccount: {
    client_email: 'lalala@lololo.iam.gserviceaccount.com'
    private_key: 'verysecret',
  },
  spreadsheetId: '17meRABNrr4Pik9FF5HRQgRxxi4kjY2_dCHg3k2nqGGE',
})

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