node-samples
node-samples copied to clipboard
Update sheets snippets to use the latest Node client library version
- Node version (
node -v
)8 - OS (Mac/Linux/Windows)heroku
In this part
console.log(`${result.updates.updatedCells} cells appended.`);
There is a mistake He gives Jason a circular I opened it by
var CircularJSON = require('circular-json');
console.log(CircularJSON.stringify(result));
That's the only way it works for me now
console.log(JSON.stringify(result.data.updates));
The problem is that the sheets snippets are written against an older version of the Node.js library, which didn't use the data
field. I've updated the issue accordingly.
Older than NODE 8? Today there is already NODE 11 The world is progressing Do not stay behind
An older version of the googleapis dependency is what I should have said.
Hi, do you know for which method this snippet is or where to find it in the docs? Thanks.
@fhinkel This issue is referring to the sheets snippets: sheets/snippets/snippets.js
Search: https://github.com/gsuitedevs/node-samples/search?q=console.log%28%60%24%7Bresult.updates.updatedCells%7D+cells+appended.&unscoped_q=console.log%28%60%24%7Bresult.updates.updatedCells%7D+cells+appended.
https://github.com/gsuitedevs/node-samples/blob/master/sheets/snippets/snippets.js#L213
Here also seems outdated, currently the property is called requestBody
.