Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- metadata_upload_url = "https://streetviewpublish.googleapis.com/v1/photo?key={}".format(API_KEY)
- headers = {"Authorization": "Bearer {}".format(ACCESS_KEY), "Content-Length": "0",
- "Content-Type": "application/json"}
- data = {
- "uploadReference": {
- "uploadUrl": upload_link
- },
- "pose": {
- "latLngPair": {
- "latitude": latitude,
- "longitude": longitude
- },
- # "altitude": 500,
- "heading": heading,
- "pitch": pitch,
- "level": {
- "number": 1,
- "name": "arr"
- }
- },
- "places": [{
- "placeId": place_id,
- }],
- }
- meta_photo_request = requests.post(metadata_upload_url, json=data, headers=headers)
- photoid = meta_photo_request.json()['photoId']['id']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement