方法 PickerBuilder.setAppId
設定需要透過 Drive API 存取使用者檔案的應用程式 ID。
這是 https://www.googleapis.com/auth/drive.file
範圍的必要條件。
範例
基本用法
const builder = new google.pickerPickerBuilder()
.setAppId('1234567890');
簽名
setAppId(appId: string): PickerBuilder;
詳細資料
參數
名稱 |
類型 |
選用 |
說明 |
appId |
string |
否 |
Cloud 專案編號。 |
傳回
PickerBuilder
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-11-07 (世界標準時間)。
[null,null,["上次更新時間:2024-11-07 (世界標準時間)。"],[[["Sets the application ID, which is needed for the `https://www.googleapis.com/auth/drive.file` scope, allowing access to user files via the Drive API."],["This method is used within the `google.pickerPickerBuilder` and takes the Cloud project number as a string parameter."],["The `setAppId` method is not optional, final, protected, or static."],["Upon execution, it returns a `PickerBuilder` object for further configuration."]]],[]]