节点:使用查询列出所有文件的Google Drive API
我是否可以知道如何使用GoogleAPIS库在Google云端硬盘中查询使用查询的所有文件?
https://github.com/google/google-api-nodejs-client/
我不知道,如何使用这个库!
我不知道我应该把我的查询,我已经尝试了下面的代码,但我没有得到任何回应..
testing1:
drive.files.list("mimeType='image/jpg'", function(data){ //I am getting all the data, the query is not working.. ));
testing2:
drive.files.list({ media: { mimeType: 'application/vnd.google-apps.folder' } }, function(err, data){ //I am getting all the data, the query is not working.. });
testing3:
drive.files.list({ resource: { mimeType: 'application/vnd.google-apps.folder' } }, function(err, data){ //This returns error not working at all! });
var drive = google.drive({ version: 'v2', auth: oauth2Client }); drive.files.list({ q='mimeType='image/jpg'' }, callback);
有关列表function的input参数的详细信息,请参见https://developers.google.com/drive/v2/reference/files/list