Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/naturalcycles/spreadsheet-lib

CommonDB implementation backed by a Google Spreadsheet
https://github.com/naturalcycles/spreadsheet-lib

commondb gdrive spreadsheet

Last synced: 28 days ago
JSON representation

CommonDB implementation backed by a Google Spreadsheet

Awesome Lists containing this project

README

        

## @naturalcycles/spreadsheet-lib

> [CommonDB](https://github.com/NaturalCycles/db-lib) implementation backed by a Google Spreadsheet

[![npm](https://img.shields.io/npm/v/@naturalcycles/spreadsheet-lib/latest.svg)](https://www.npmjs.com/package/@naturalcycles/spreadsheet-lib)
[![](https://circleci.com/gh/NaturalCycles/spreadsheet-lib.svg?style=shield&circle-token=123)](https://circleci.com/gh/NaturalCycles/spreadsheet-lib)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)

# Example

```typescript
// 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'])
// ...
```