node-samples icon indicating copy to clipboard operation
node-samples copied to clipboard

Update sheets snippets to use the latest Node client library version

Open YOEL311 opened this issue 5 years ago • 6 comments

  • 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));

YOEL311 avatar Dec 19 '18 19:12 YOEL311

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.

erickoledadevrel avatar Dec 21 '18 20:12 erickoledadevrel

Older than NODE 8? Today there is already NODE 11   The world is progressing   Do not stay behind

YOEL311 avatar Dec 23 '18 21:12 YOEL311

An older version of the googleapis dependency is what I should have said.

erickoledadevrel avatar Jan 02 '19 18:01 erickoledadevrel

Hi, do you know for which method this snippet is or where to find it in the docs? Thanks.

fhinkel avatar Mar 15 '19 14:03 fhinkel

@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.

grant avatar Apr 03 '19 07:04 grant

https://github.com/gsuitedevs/node-samples/blob/master/sheets/snippets/snippets.js#L213

Here also seems outdated, currently the property is called requestBody.

anantakrishna avatar Aug 29 '19 09:08 anantakrishna