久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何使用 Drive SDK 列出域中的所有 Google 文檔?

How to list all Google document from the Domain using Drive SDK?(如何使用 Drive SDK 列出域中的所有 Google 文檔?)
本文介紹了如何使用 Drive SDK 列出域中的所有 Google 文檔?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我想列出來自谷歌域的所有文檔.我已經(jīng)嘗試過谷歌文檔中提到的:https://developers.google.com/drive/v2/reference/files/list#examples

I want to list all the document from google domain.I have tried the as per mention in google documentation : https://developers.google.com/drive/v2/reference/files/list#examples

我創(chuàng)建了如下服務(wù):

 HttpTransport httpTransport = new NetHttpTransport();
  JacksonFactory jsonFactory = new JacksonFactory();
  GoogleCredential credential = new GoogleCredential.Builder()
      .setTransport(httpTransport)
      .setJsonFactory(jsonFactory)
      .setServiceAccountId(SERVICE_ACCOUNT_EMAIL)
      .setServiceAccountScopes(Arrays.asList(DriveScopes.DRIVE))
      .setServiceAccountUser(userEmail)
      .setServiceAccountPrivateKeyFromP12File(
          new java.io.File(SERVICE_ACCOUNT_PKCS12_FILE_PATH))
      .build();
  Drive service = new Drive.Builder(httpTransport, jsonFactory, null)
      .setHttpRequestInitializer(credential).build();

  Files.List request = service.files().list();

當(dāng)我按如下方式執(zhí)行此請求時:

When i am executing this request as follows :

 FileList files = request.execute();

我只有userEmail"(創(chuàng)建服務(wù)時提供)文件.

I got only 'userEmail' (Provided while creating service) files.

如何獲取所有域 google 驅(qū)動器文件?我使用了超級管理員,但我無法獲得.

How i can get all domain google drive files ?? i have used super admin but i couldn't get.

推薦答案

要獲取您的 Google Apps 域中的所有文件,您需要:

To get all files in your Google Apps domain you would need to:

  1. 使用您的服務(wù)帳戶和應(yīng)用設(shè)置域范圍的授權(quán).李>
  2. 使用目錄 API users.list() API 調(diào)用以確定 Google Apps 域中的所有用戶.
  3. 作為每個用戶,調(diào)用 files.list(q='"me" in owner') 獲取用戶擁有的所有文件的列表.
  1. Setup domain-wide delegation of authority with your Service Account and Apps.
  2. Use the Directory API users.list() API call to determine all users in the Google Apps domain.
  3. As each user, call files.list(q='"me" in owners') to get a list of all files the user owns.

所有這些調(diào)用的組合結(jié)果將是您的 Google Apps 域中的所有文件.

The combined results of all these calls would be all files in your Google Apps domain.

這篇關(guān)于如何使用 Drive SDK 列出域中的所有 Google 文檔?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Upload progress listener not fired (Google drive API)(上傳進度偵聽器未觸發(fā)(Google 驅(qū)動器 API))
Save file in specific folder with Google Drive SDK(使用 Google Drive SDK 將文件保存在特定文件夾中)
Google Drive Android API - Invalid DriveId and Null ResourceId(Google Drive Android API - 無效的 DriveId 和 Null ResourceId)
Google drive api services account view uploaded files to google drive using java(谷歌驅(qū)動api服務(wù)賬戶查看上傳文件到谷歌驅(qū)動使用java)
Google Drive service account returns 403 usageLimits(Google Drive 服務(wù)帳號返回 403 usageLimits)
com.google.api.client.json.jackson.JacksonFactory; missing in Google Drive example(com.google.api.client.json.jackson.JacksonFactory;Google Drive 示例中缺少)
主站蜘蛛池模板: 日本激情视频在线播放 | 色资源在线 | 国产一区久久久 | 一区二区久久精品 | 成人水多啪啪片 | 狠狠躁夜夜躁人人爽天天高潮 | 香蕉视频黄色 | 国产福利视频网站 | 亚洲精品欧美 | 一区二区av| 视频一区二区三区四区五区 | 自拍视频一区二区三区 | 久久久激情视频 | 亚洲理论在线观看电影 | 欧美在线观看一区 | 91av视频在线观看 | 国产一区二区三区免费视频 | 91五月天 | 久草.com| www.五月婷婷.com | 毛片高清 | 久久国产高清视频 | 国产精品久久久久久久毛片 | 久久在线视频 | 久久免费高清视频 | 免费永久av | 亚洲女人天堂网 | 国产伦一区二区三区 | 男人的天堂中文字幕 | av网站在线免费观看 | 国产剧情一区 | 91久操视频 | 色婷婷综合久久久中文字幕 | 97精品超碰一区二区三区 | 欧美精品啪啪 | 欧美日韩精品国产 | caoporn国产精品免费公开 | 国产女人叫床高潮大片免费 | 欧美激情第一区 | 亚洲一区二区视频在线播放 | 日韩免费 |