2.0.0 • Published 6 years ago
@cryptosheet/sheet v2.0.0
@cryptosheet/sheet
Utility functions to interact with Google Spreadsheets
Usage
const {toSheetRows, sheetFor} = require('@cryptosheet/sheet')
const columns = ['createdAt', 'exchange', 'currencyPair', 'balance']
const accounts = [{
createdAt: '...',
exchange: 'coinbase',
currencyPair: 'ltc-eur',
balance: 0.123
}]
const rows = toSheetRows(accounts, columns)
const {
clearSpreadsheetValues,
getSpreadsheetValues,
getSpreadsheet,
updateSpreadsheetValues
} = sheetFor(`ACCOUNTS!A:${endColumn}`, config)
updateSpreadsheetValues(rows).then(() => log('updated sheet'))