Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Row API (List-based Feeds) #59

Open
jpillora opened this issue Feb 12, 2015 · 0 comments
Open

Feature: Row API (List-based Feeds) #59

jpillora opened this issue Feb 12, 2015 · 0 comments

Comments

@jpillora
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant