方法 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
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],[],null,["# Method PickerBuilder.setAppId\n\nSets the Id of the application needing to access the user's files via the\n[Drive API](/workspace/drive/api).\n\nThis is required for the `https://www.googleapis.com/auth/drive.file` scope.\n\nExamples\n--------\n\nBasic usage \n\n const builder = new google.pickerPickerBuilder()\n .setAppId('1234567890');\n\nSignature\n---------\n\n setAppId(appId: string): PickerBuilder;\n\nDetails\n-------\n\n| Optional | No |\n| Final | No |\n| Protected | No |\n| Static | No |\n|-----------|----|\n\nParameters\n----------\n\n| Name | Type | Optional | Description |\n|---------|----------|----------|---------------------------|\n| `appId` | `string` | No | The Cloud project number. |\n\nReturns\n-------\n\n[PickerBuilder](./picker.pickerbuilder)"]]