【发布时间】:2020-02-11 16:57:55
【问题描述】:
我刚刚从 Google Apps Script 过渡到 node.js 和 Google Cloud Functions,我不理解现有帖子中的部分代码。
在这篇文章中:How to use Google sheets API while inside a google cloud function,@domdomegg 列出了一个代码示例,该示例从 Google Cloud Function 调用 Google Sheets API。我已经让该代码在 Google Cloud Function 中运行。
但是,我不明白代码的特定部分:
// This just prints out all Worksheet names as an example
.then(({ data: { sheets } }) => {
res.status(200).send({ sheets });
这是我不明白的data: { sheets } 位。我在想这是我需要将代码写入 Google 表格的地方,但这对我来说有点神秘。我已经够菜鸟了,我还不能对原始帖子发表评论。对菜鸟有什么帮助吗?
【问题讨论】:
标签: javascript node.js google-cloud-platform google-cloud-functions google-sheets-api