Method: photo.get
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
รับข้อมูลเมตาของ Photo
ที่ระบุ
เมธอดนี้จะแสดงรหัสข้อผิดพลาดต่อไปนี้
คำขอ HTTP
GET https://streetviewpublish.googleapis.com/v1/photo/{photoId}
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
photoId |
string
ต้องระบุ รหัสของ Photo
|
พารามิเตอร์การค้นหา
พารามิเตอร์ |
view |
enum (PhotoView )
ต้องระบุ ระบุว่าควรแสดงผล URL การดาวน์โหลดสําหรับไบต์ของรูปภาพในการตอบสนอง Photo หรือไม่
|
languageCode |
string
รหัสภาษา BCP-47 เช่น "en-US" หรือ "sr-Latn" ดูข้อมูลเพิ่มเติมได้ที่ http://www.unicode.org/reports/tr35/#Unicode_locale_identifier หากไม่ได้ระบุ languageCode ระบบจะใช้ค่ากำหนดภาษาของผู้ใช้สำหรับบริการของ Google
|
เนื้อหาของคำขอ
เนื้อหาของคำขอต้องว่างเปล่า
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ Photo
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/streetviewpublish
ดูข้อมูลเพิ่มเติมได้ที่ภาพรวมของ OAuth 2.0
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\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)."]]