Method: photo.get
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\u003cp\u003eRetrieves metadata for a specified Photo using its ID.\u003c/p\u003e\n"],["\u003cp\u003eAllows specifying the view (including download URL) and language code.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with the \u003ccode\u003estreetviewpublish\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eReturns a Photo object on success, or an error if permissions are lacking, the photo is not found, or is still being indexed.\u003c/p\u003e\n"]]],["This describes retrieving photo metadata using a GET request to `https://streetviewpublish.googleapis.com/v1/photo/{photoId}`. The `photoId` (required) must be specified as a path parameter. Optional query parameters include `view` (required) and `languageCode`. The request body must be empty, while a successful response will contain a Photo instance. Specific error codes are returned for permission issues, non-existent photos, or photos being indexed. The request requires `https://www.googleapis.com/auth/streetviewpublish` authorization.\n"],null,["# Method: photo.get\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nGets the metadata of the specified [Photo](/streetview/publish/reference/rest/v1/photo#Photo).\n\nThis method returns the following error codes:\n\n- [google.rpc.Code.PERMISSION_DENIED](/streetview/publish/reference/rest/v1/Code#ENUM_VALUES.PERMISSION_DENIED) if the requesting user did not create the requested [Photo](/streetview/publish/reference/rest/v1/photo#Photo).\n- [google.rpc.Code.NOT_FOUND](/streetview/publish/reference/rest/v1/Code#ENUM_VALUES.NOT_FOUND) if the requested [Photo](/streetview/publish/reference/rest/v1/photo#Photo) does not exist.\n- [google.rpc.Code.UNAVAILABLE](/streetview/publish/reference/rest/v1/Code#ENUM_VALUES.UNAVAILABLE) if the requested [Photo](/streetview/publish/reference/rest/v1/photo#Photo) is still being indexed.\n\n### HTTP request\n\n`GET https://streetviewpublish.googleapis.com/v1/photo/{photoId}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|-----------|------------------------------------------------------------------------------------------|\n| `photoId` | `string` Required. ID of the [Photo](/streetview/publish/reference/rest/v1/photo#Photo). |\n\n### Query parameters\n\n| Parameters ||\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `view` | `enum (`[PhotoView](/streetview/publish/reference/rest/v1/PhotoView)`)` Required. Specifies if a download URL for the photo bytes should be returned in the [Photo](/streetview/publish/reference/rest/v1/photo#Photo) response. |\n| `languageCode` | `string` The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see \u003chttp://www.unicode.org/reports/tr35/#Unicode_locale_identifier\u003e. If languageCode is unspecified, the user's language preference for Google services is used. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [Photo](/streetview/publish/reference/rest/v1/photo#Photo).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/streetviewpublish`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]