@methodus/google-spreadsheet
Google Spreadsheets V4 Data API -- simple interface to read/write rows/cells, manage sheets
Last updated 9 days ago by nodulus .
BSD-3-Clause · Repository · Original npm · Tarball · package.json
$ cnpm install @methodus/google-spreadsheet 
SYNC missed versions from official npm registry.

V4 Google Spreadsheet Access (node.js)

Quality Gate Status Maintainability Rating

This is a CRUD based operations package for Google sheets.

API

import { Sheet, getSheet, SheetDataResult } from '@methodus/google-spreadsheet';

const sheet:Sheet = getSheet(sheetId, {client_email: 'test@gmail.com',  private_key: 'XXXXXXXXXXXX'});

Get filtered rows

function filter(row: SpreadsheetRow<Model>){
    return row.data.email === email
}

const result = sheet.query<Model>('Sheet1', filter, start, end, sorts);

Insert

 
const data = new Model();
const result = sheet.insert<Model>('Sheet1',data);

const result = sheet.insertMany<Model>('Sheet1',[data]);

Update

 
const data = new Model();
data.keyid = keyvalue;
const result = sheet.update<Model>('Sheet1',data);

function filter(row: SpreadsheetRow<Model>){
    return row.data.email === email
}

const result = sheet.updateBy<Model>('Sheet1',filter, data);

Delete

 
const data = new Model();
data.keyid = keyvalue;
const result = sheet.delete<Model>('Sheet1',data);

const result = sheet.deleteMany<Model>('Sheet1',[keyvalue,keyvalue,keyvalue]);

Current Tags

  • 1.0.26                                ...           latest (9 days ago)

30 Versions

  • 1.0.26                                ...           9 days ago
  • 1.0.25                                ...           a month ago
  • 1.0.24                                ...           a month ago
  • 1.0.23                                ...           a month ago
  • 1.0.21                                ...           a month ago
  • 1.0.19                                ...           2 months ago
  • 1.0.18                                ...           2 months ago
  • 1.0.17                                ...           2 months ago
  • 1.0.16                                ...           2 months ago
  • 1.0.15                                ...           3 months ago
  • 1.0.14                                ...           3 months ago
  • 1.0.12                                ...           3 months ago
  • 1.0.11                                ...           3 months ago
  • 1.0.10                                ...           3 months ago
  • 1.0.9                                ...           3 months ago
  • 1.0.8                                ...           3 months ago
  • 1.0.6                                ...           3 months ago
  • 1.0.5                                ...           4 months ago
  • 1.0.4                                ...           4 months ago
  • 1.0.3                                ...           4 months ago
  • 1.0.2                                ...           4 months ago
  • 1.0.1                                ...           4 months ago
  • 1.0.0                                ...           4 months ago
  • 0.0.7                                ...           5 months ago
  • 0.0.6                                ...           6 months ago
  • 0.0.5                                ...           7 months ago
  • 0.0.4                                ...           7 months ago
  • 0.0.3                                ...           7 months ago
  • 0.0.2                                ...           7 months ago
  • 0.0.1                                ...           7 months ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 49
Dependencies (2)
Dev Dependencies (12)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |