Method: photo.update
อัปเดตข้อมูลเมตาของ Photo
เช่น ท่าทาง การเชื่อมโยงสถานที่ การเชื่อมต่อ ฯลฯ ไม่รองรับการเปลี่ยนพิกเซลของรูปภาพ
ใช้เฉพาะช่องที่ระบุในช่อง updateMask
เท่านั้น หากไม่มี updateMask
การอัปเดตจะมีผลกับทุกช่อง
เมธอดนี้จะแสดงรหัสข้อผิดพลาดต่อไปนี้
คำขอ HTTP
PUT https://streetviewpublish.googleapis.com/v1/photo/{photo.photoId.id}
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
photo.photoId.id |
string
ตัวระบุที่ไม่ซ้ำกันสำหรับรูปภาพ
|
พารามิเตอร์การค้นหา
พารามิเตอร์ |
updateMask |
string (FieldMask format)
ต้องระบุ มาสก์ที่ระบุช่องในข้อมูลเมตาของรูปภาพที่จะอัปเดต หากไม่มี ระบบจะแทนที่ข้อมูลเมตา Photo เดิมทั้งหมดด้วยข้อมูลเมตา Photo ใหม่ในคำขอนี้ การอัปเดตจะไม่สำเร็จหากระบุช่องไม่ถูกต้อง โดยระบุหลายฟิลด์ในรายการที่คั่นด้วยเครื่องหมายจุลภาค ช่องต่อไปนี้ถูกต้อง
pose.heading
pose.lat_lng_pair
pose.pitch
pose.roll
pose.level
pose.altitude
connections
places
หมายเหตุ: เมื่อ updateMask มีช่องที่ซ้ำ ระบบจะแทนที่ชุดค่าที่ซ้ำกันด้วยเนื้อหาใหม่ ตัวอย่างเช่น หาก updateMask มี connections และ UpdatePhotoRequest.photo.connections ว่างเปล่า ระบบจะนำการเชื่อมต่อทั้งหมดออก
|
เนื้อหาของคำขอ
เนื้อความของคำขอมีอินสแตนซ์ของ Photo
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ Photo
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/streetviewpublish
ดูข้อมูลเพิ่มเติมได้ที่ภาพรวมของ OAuth 2.0
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2023-12-01 UTC
[null,null,["อัปเดตล่าสุด 2023-12-01 UTC"],[[["Updates a Photo's metadata, such as pose, connections, and places, but not the image pixels themselves."],["Uses an `updateMask` to specify which fields to update; if omitted, all fields are updated."],["Requires the `https://www.googleapis.com/auth/streetviewpublish` OAuth scope for authorization."],["Returns the updated Photo object if successful."],["May return errors if permissions are lacking, the request is invalid, the Photo doesn't exist, or is still being indexed."]]],["This describes how to update a photo's metadata using the Street View Publish API. It uses a `PUT` request to a specific URL with a photo ID in the path. The `updateMask` query parameter specifies which metadata fields to modify. The request body contains the new metadata, and the response body returns the updated photo. Key metadata includes pose, connections, and places. Authorization requires a specific OAuth scope. Possible errors include permission, invalid argument, not found, or unavailability.\n"]]