Google Picker API のリソースの概要
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Google Picker API は、PickerBuilder
と Picker
を含むビルダー パターンを使用します。
const picker = new google.picker.PickerBuilder()
.setOAuthtoken('TOKEN_FOR_USER')
.setAppId('1234567890') // Cloud Project number
.addView(google.picker.ViewId.DOCS)
.setCallback((data) => {
console.log(data);
})
.build();
picker.setVisible(true);
クラス
名前 |
説明 |
DocsUploadView |
DocsUploadView を使用して Google ドライブにファイルをアップロードします。 |
DocsView |
DocsView を使用して Google ドライブからファイルを選択します。 |
Picker |
Picker は、ユーザーとの UI アクションを表す最上位オブジェクトです。これらのオブジェクトは直接作成されず、代わりに PickerBuilder クラスが使用されます。 |
PickerBuilder |
PickerBuilder は Picker オブジェクトの作成に使用されます。特に明記されていない限り、以下のメソッドの戻り値の型は PickerBuilder 型です。これにより、呼び出しを連結できます。 |
ResourceId |
ResourceId は、ドキュメントのリソース ID を生成するユーティリティ クラスです。 |
View |
すべてのビューの抽象クラス。 |
ViewGroup |
ViewGroup は、ナビゲーション パネル内のビューの視覚的なグループ化です。 |
列挙型
名前 |
説明 |
Action |
ResponseObject のアクション タイプ。 |
Audience |
Audience は、DocumentObject のオーディエンスを記述するために使用される列挙型です。 |
DocsViewMode |
DocsViewMode は、DocsView 内にデータを表示するための列挙型です。これらの値は、DocsView.setMode の呼び出しで使用します。 |
Document |
Document は、DocumentObject のフィールドの記述に使用される列挙型です。 |
Feature |
Feature は、さまざまなビューの機能をオンまたはオフにするための列挙型です。これらの値は、PickerBuilder.enableFeature と PickerBuilder.disableFeature の呼び出しで使用します。 |
Response |
Response は、ResponseObject のフィールドの記述に使用される列挙型です。 |
ServiceId |
ServiceId は、アイテムが選択されたサービスを記述するために使用される列挙型です。 |
Thumbnail |
Thumbnail は、ThumbnailObject のフィールドを記述する列挙型です。 |
Type |
選択したアイテムのタイプ。 |
ViewId |
ViewId は、Picker で使用できるさまざまなビューの列挙型です。これらの値は、DocsView と PickerBuilder の呼び出しで使用します。 |
ViewToken |
ViewToken は、ResponseObject.viewToken の要素を記述するために使用される列挙型です。 |
インターフェース
タイプ エイリアス
名前 |
説明 |
Locales |
PickerBuilder.setLocale でサポートされている ISO 639 言語コード。 |
ParentDocumentObject |
ParentDocumentObject は、選択したアイテムの親フォルダの属性を記述するインターフェースです。 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[],[],null,["# Resource summary for Google Picker API\n\nThe Google Picker API uses a builder pattern with\n[`PickerBuilder`](./picker.pickerbuilder) and [`Picker`](./picker.picker). \n\n const picker = new google.picker.PickerBuilder()\n .setOAuthtoken('TOKEN_FOR_USER')\n .setAppId('1234567890') // Cloud Project number\n .addView(google.picker.ViewId.DOCS)\n .setCallback((data) =\u003e {\n console.log(data);\n })\n .build();\n\n picker.setVisible(true);\n\nClasses\n-------\n\n| Name | Description |\n|---------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [`DocsUploadView`](./picker.docsuploadview) | Use `DocsUploadView` to upload files to Google Drive. |\n| [`DocsView`](./picker.docsview) | Use `DocsView` to select files from Google Drive. |\n| [`Picker`](./picker.picker) | `Picker` is the top level object representing the UI action with the user. These objects are not created directly, but instead use the `PickerBuilder` class. |\n| [`PickerBuilder`](./picker.pickerbuilder) | `PickerBuilder` is used to create `Picker` objects. Except where noted otherwise, the return type of methods below is of type `PickerBuilder`, allowing you to chain one call after another. |\n| [`ResourceId`](./picker.resourceid) | `ResourceId` is a utility class for generating resource IDs for documents. |\n| [`View`](./picker.view) | An abstract class for all views. |\n| [`ViewGroup`](./picker.viewgroup) | A `ViewGroup` is a visual grouping of views in the navigation pane. |\n\nEnums\n-----\n\n| Name | Description |\n|-----------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [`Action`](./picker.action) | The action type for the `ResponseObject`. |\n| [`Audience`](./picker.audience) | `Audience` is an enumerated type used to describe the audience of the `DocumentObject`. |\n| [`DocsViewMode`](./picker.docsviewmode) | `DocsViewMode` is an enumerated type for displaying data within a DocsView. Use these values in calls to `DocsView.setMode`. |\n| [`Document`](./picker.document) | `Document` is an enumerated type used to describe the fields of a `DocumentObject`. |\n| [`Feature`](./picker.feature) | `Feature` is an enumerated type, for turning on/off features for various views. Use these values in calls to `PickerBuilder.enableFeature` and `PickerBuilder.disableFeature`. |\n| [`Response`](./picker.response) | `Response` is an enumerated type used to describe the fields of a `ResponseObject`. |\n| [`ServiceId`](./picker.serviceid) | `ServiceId` is an enumerated type used to describe the service the item was selected from. |\n| [`Thumbnail`](./picker.thumbnail) | `Thumbnail` is an enumerated type describing the fields of a `ThumbnailObject`. |\n| [`Type`](./picker.type) | The type of the selected item. |\n| [`ViewId`](./picker.viewid) | `ViewId` is an enumerated type for the various views available in the Picker. Use these values in calls to `DocsView` and `PickerBuilder`. |\n| [`ViewToken`](./picker.viewtoken) | `ViewToken` is an enumerated type used to describe the elements of a `ResponseObject.viewToken`. |\n\nInterfaces\n----------\n\n| Name | Description |\n|-----------------------------------------------|----------------------------------------------------------------------------------|\n| [`DocumentObject`](./picker.documentobject) | `DocumentObject` is an interface describing the attributes of a selected item. |\n| [`ResponseObject`](./picker.responseobject) | The response object passed to the callback method. |\n| [`ThumbnailObject`](./picker.thumbnailobject) | `ThumbnailObject` is an interface describing the attributes of a photo or video. |\n\nType aliases\n------------\n\n| Name | Description |\n|---------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [`Locales`](./picker.locales) | The supported ISO 639 language codes for `PickerBuilder.setLocale`. |\n| [`ParentDocumentObject`](./picker.parentdocumentobject) | `ParentDocumentObject` is an interface describing the attributes of a parent folder for a selected item. |"]]