【问题标题】:Inserting comment using Drive API 2.0, but dont send mail to the owner of file?使用 Drive API 2.0 插入评论,但不向文件所有者发送邮件?
【发布时间】:2016-08-01 10:20:43
【问题描述】:

我正在使用Drive comment API 在电子表格中插入评论。但它会将邮件发送给工作表的所有者。我在我的应用程序中明确地这样做。所以所有者收到了两封关于此评论的邮件(一封来自谷歌,一封来自我的应用程序)。我在google appscript while adding a commenter 做了同样的事情。我想知道是否有任何我可以在 ajax 调用或使用 gapi

这是我的代码:

   $.ajax({
                url: 'https://www.googleapis.com/drive/v2/files/' + fileId + '/comments',
                method: 'POST',
                headers: {
                    'Authorization': 'Bearer ' + accessToken
                },
                data: JSON.stringify(body),
                dataType: 'json',
                contentType: 'application/json; charset=utf-8'
            })

【问题讨论】:

  • 您打算在哪里插入 cmets,是在评论部分还是附加到电子表格单元格/内部?
  • @noogui 我正在评论部分插入 cmets。

标签: javascript google-api google-drive-api google-drive-realtime-api


【解决方案1】:

我使用了您提供的链接,Comments: insert Drive v2 中的指南。我可以使用Try it! 框在我的电子表格中插入评论。 只需在filedId中填写您的电子表格Id。选择一个或所有可选字段,依此类推。当我执行呼叫时,评论已发布在我的电子表格上。

我没有收到任何电子邮件。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-02-02
    • 1970-01-01
    • 2012-10-11
    • 2020-03-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多