Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
Method: photos.list
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
列出使用者擁有的所有 Photos。
注意:系統不會在回應中傳回仍在建立索引的近期建立相片。
HTTP 要求
GET https://streetviewpublish.googleapis.com/v1/photos
這個網址使用 gRPC 轉碼語法。
查詢參數
| 參數 |
view |
enum (PhotoView)
必填。指定是否應在相片回應中傳回相片位元組的下載網址。
|
pageSize |
integer
(選用步驟) 要傳回的相片數量上限。pageSize 不得為負數。如果 pageSize 為零或未提供,系統會使用預設的頁面大小 100。如果使用者擁有的相片數量少於 pageSize,回應中傳回的相片數量可能少於 pageSize。
|
pageToken |
string
(選用步驟) 先前的 photos.list 要求 (如有) 傳回的 nextPageToken 值。
|
filter |
string
(選用步驟) 篩選運算式。例如 placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw。 支援的篩選器包括:placeId、min_latitude、max_latitude、min_longitude、max_longitude。詳情請參閱 https://google.aip.dev/160。
|
languageCode |
string
(選用步驟) BCP-47 語言代碼,例如「en-US」或「sr-Latn」。詳情請參閱 http://www.unicode.org/reports/tr35/#Unicode_locale_identifier。如未指定 languageCode,系統會使用使用者在 Google 服務中的語言偏好設定。
|
回應主體
回應會列出使用者擁有的所有相片。
如果成功,回應主體會含有以下結構的資料:
| JSON 表示法 |
{
"photos": [
{
object (Photo)
}
],
"nextPageToken": string
} |
| 欄位 |
photos[] |
object (Photo)
相片清單。要求中的 pageSize 欄位會決定傳回的項目數量。
|
nextPageToken |
string
用來擷取下一頁結果的符記;如果清單中沒有其他結果,這個欄位會留空。
|
授權範圍
需要下列 OAuth 範圍:
https://www.googleapis.com/auth/streetviewpublish
詳情請參閱OAuth 2.0 Overview。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-11-20 (世界標準時間)。
[[["容易理解","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"]],["上次更新時間:2025-11-20 (世界標準時間)。"],[],["This document details how to retrieve a user's photos using the Street View Publish API. A `GET` request to `https://streetviewpublish.googleapis.com/v1/photos` is used. Key parameters include `view`, `pageSize`, `pageToken`, `filter`, and `languageCode`. The request body is empty. A successful response returns a JSON object containing a list of `photos`, and a `nextPageToken` for pagination. Access requires the `https://www.googleapis.com/auth/streetviewpublish` authorization scope.\n"]]