jpillora/node-edit-google-spreadsheet

Feature: Row API (List-based Feeds)

Open

#59 建立於 2015年2月12日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)JavaScript (98 fork)github user discovery
enhancementhelp wanted

倉庫指標

Star
 (302 star)
PR 合併指標
 (PR 指標待抓取)

描述

Looking for Contributors Please look through these notes and then the source and if you decide to give this a shot, mention that you're working on this in the comments below and I'll give you push access.


Currently, this module only uses cell-based feeds, though there is also a row-based REST API: https://developers.google.com/google-apps/spreadsheets/#working_with_list-based_feeds. I haven't researched too deep into the REST API, though I think it would result in a module API like:

//add a new 'row' property
spreadsheet.rows.get(function(err, rows) {
  //get all rows
});

spreadsheet.rows.query({my:"query"}, function(err, rows) {
  //get specific rows
});

spreadsheet.rows.add({name:"foo",age:25}, function(err, newRow) {
  //insert a row
});

//each of the row objects above have:
row.update({name:"bar"}, function(err) {
   //updates this row inplace
});
row.delete(function(err) {
  //deletes this row and shifts up
});

Read through the docs and comment on the proposed API above, I may have missed something.

If the worksheets API feature is also being done, the rows object would a go inside each worksheet, and then be aliased from spreadsheet.

貢獻者指南