I'm using photo.update request for panos(360 panoramic images) connection in python. I'm able to do only connect one pano to another pano but I want to connect one pano to multiple panos. I'm not getting a successful result.
I have sent the following photoUpdate request using Python:
update_photo_url = 'https://streetviewpublish.googleapis.com/v1/photo/{}?key={}&updateMask=connections'.format("pano_1","AIzdesdfyxscvvvvvvvvvvvvvvv")
headers = {"Authorization": "Bearer {}".format("ya29.Glx6BO91jWbjzLQKYPvP16fhT-jyOEnIdnoRcZcU9uYCqzwH3Dkuf-qf_kzUc2ykYOyVTZCfaGjOEAScsJK7WgS4NE9gfS6bSobWDIMdfpfY7SPzRMmxi4kfTrmsRQ"), "Content-Length": "0", "Content-Type": "application/json"}
update_body = {
[
{
"photo": {
"photoId": {
"id": "pano_1"
},
"connections": {
"target": {
"id": "pano_2"
},
"target": {
"id": "pano_3"
}
},
}
}
]
}
update_response = requests.put(update_photo_url,headers=headers,json=update_body)
update_response.text
Error:
{
"error": {
"code": 400,
"message": "Invalid JSON payload received. Unknown name \"\": Root element must be a message.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"description": "Invalid JSON payload received. Unknown name \"\": Root element must be a message."
}
]
}
]
}
}
Anyone know about, How to connect multiple 360 panos from the source pano? It would be really great if someone could clarify on the possibility of it.Thanks in advance.