新しい Picker API と Library API の重要な変更点について説明します。詳しくは、
こちらをご覧ください。
REST Resource: sessions
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
リソース: PickingSession
ユーザーが Google フォトを使用して写真や動画を選択できるユーザー セッションを表します。
JSON 表現 |
{
"id": string,
"pickerUri": string,
"pollingConfig": {
object (PollingConfig )
},
"expireTime": string,
"mediaItemsSet": boolean
} |
フィールド |
id |
string
出力専用。このセッションの Google 生成 ID。
|
pickerUri |
string
出力専用。ユーザーを Google フォト(ウェブ)にリダイレクトして、現在のセッションの写真や動画を選択できるようにするために使用される URI。 このページを正常に表示するには、ユーザーがウェブブラウザでこのセッションを所有する Google アカウントにログインしている必要があります。 セキュリティ上の理由から、pickerUri を iframe で開くことはできません。
|
pollingConfig |
object (PollingConfig )
出力専用。アプリケーションが sessions.get をポーリングする際に使用することをおすすめする構成。 このフィールドは、このセッションでメディア アイテムがまだ選択されていない場合にのみ入力されます(mediaItemsSet は false です)。
|
expireTime |
string (Timestamp format)
出力専用。このセッション(および選択したメディア アイテム)へのアクセスが期限切れになる日時。 RFC3339 UTC「Zulu」形式のタイムスタンプ。精度はナノ秒まで、小数点以下は最大 9 桁。例: "2014-10-02T15:01:23Z" 、"2014-10-02T15:01:23.045123456Z" 。
|
mediaItemsSet |
boolean
出力専用。true に設定されている場合、このセッション用にメディア アイテムが選択されており、アプリは mediaItems.list を介して選択されたメディア アイテムのリストをリクエストできます。
|
PollingConfig
JSON 表現 |
{
"pollInterval": string,
"timeoutIn": string
} |
フィールド |
pollInterval |
string (Duration format)
出力専用。ポーリング リクエスト間の推奨時間。 s で終わる小数 9 桁までの秒単位の期間。例: "3.5s" 。
|
timeoutIn |
string (Duration format)
出力専用。クライアントがポーリングを停止するまでの時間。 値 0 は、クライアントがまだポーリングを停止していない場合は停止する必要があることを示します。 s で終わる小数 9 桁までの秒単位の期間。例: "3.5s" 。
|
メソッド |
|
新しいセッションを生成します。このセッション中に、ユーザーはサードパーティによるアクセス対象の写真や動画を選択できます。 |
|
指定されたセッションを削除します。 |
|
指定されたセッションに関する情報を取得します。 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-11-21 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2024-11-21 UTC。"],[[["Google Photos Picker API provides sessions for users to select photos and videos."],["`PickingSession` resource represents the user's selection session, including a URI to redirect users to Google Photos for picking media."],["Applications can poll the API using the recommended `PollingConfig` to check for session updates and retrieve selected media items."],["Sessions have an expiration time and can be programmatically created, retrieved, and deleted using the API methods."]]],["A `PickingSession` represents a user's photo/video selection process in Google Photos, identified by a unique ID. It provides a `pickerUri` to direct users to Google Photos for media selection. `PollingConfig` defines API polling parameters with `pollInterval` and `timeoutIn`. A session expires at a specified `expireTime`, after which access ends. Once `mediaItemsSet` is true, selected media can be requested. Methods allow to `create`, `get` and `delete` sessions.\n"]]