【问题标题】:Can I execute code on Google Drive server infra?我可以在 Google Drive 服务器基础设施上执行代码吗?
【发布时间】:2013-06-22 01:57:10
【问题描述】:

Google Drive API 是否提供了一种在 Google Drive 服务器基础架构上执行我的代码的方法?

假设我想编写基于 grep 的 Google Dirve,让客户搜索他们的文件。 我希望能够写出这样的东西:(非常简化以使其简短)

/* define the function for grep */
var grep = function(params, callback) {
  // 1) find all text files using `gapi.client.drive.files.list`
  // 2) open each file with `gapi.client.drive.files.get`
  // 3) scan for the serach string occurance
  callback(search_result);
}

/* register the code on the server with imaginary API */
gapi.client.drive.server.register('myapp.grep', grep);

/* execute from Browser */
gapi.client.drive.server.myapp.grep({searchString: 'Abrakadabra', mimeType: 'application/javascript'},
  function(resutls) {
    console.log(results)
  }
);

有大量的应用程序类型可以利用这种方法。 简单的数据库管理器是另一个例子。

【问题讨论】:

    标签: google-apps-script google-drive-api


    【解决方案1】:

    Google Apps ScriptGoogle App Engine 安静地接近你想要的。我不认为 Google Drive 有这个功能。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-03-19
      • 2010-11-25
      • 2017-05-08
      • 2011-01-05
      • 1970-01-01
      • 1970-01-01
      • 2021-04-27
      • 1970-01-01
      相关资源
      最近更新 更多