-2
Google雲端硬盤API是否提供了在Google雲端硬盤服務器上執行我的代碼的方法?我可以在Google雲端硬盤服務器上執行代碼嗎?
假設我想寫一個基於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)
}
);
有噸的應用程序類型都可以採取這種方法的優勢。 簡單的DB管理器是另一個例子。
謝謝! Apps腳本非常接近我所需要的.. – arkadiy