Пример #1
0
 public void BatchUpdatePhotos_RequestObject()
 {
     // Snippet: BatchUpdatePhotos(BatchUpdatePhotosRequest,CallSettings)
     // Create client
     StreetViewPublishServiceClient streetViewPublishServiceClient = StreetViewPublishServiceClient.Create();
     // Initialize request argument(s)
     BatchUpdatePhotosRequest request = new BatchUpdatePhotosRequest
     {
         UpdatePhotoRequests = { },
     };
     // Make the request
     BatchUpdatePhotosResponse response = streetViewPublishServiceClient.BatchUpdatePhotos(request);
     // End snippet
 }
Пример #2
0
        public async Task BatchUpdatePhotosAsync_RequestObject()
        {
            // Snippet: BatchUpdatePhotosAsync(BatchUpdatePhotosRequest,CallSettings)
            // Create client
            StreetViewPublishServiceClient streetViewPublishServiceClient = await StreetViewPublishServiceClient.CreateAsync();

            // Initialize request argument(s)
            BatchUpdatePhotosRequest request = new BatchUpdatePhotosRequest
            {
                UpdatePhotoRequests = { },
            };
            // Make the request
            BatchUpdatePhotosResponse response = await streetViewPublishServiceClient.BatchUpdatePhotosAsync(request);

            // End snippet
        }
Пример #3
0
        /// <summary>
        /// Updates the metadata of Photos, suchas pose, place association, connections, etc. Changing the pixels of photosis not supported.Note that ifBatchUpdatePhotosfails, either critical fields are missing or there was an authenticationerror. Even ifBatchUpdatePhotossucceeds, there may have been failures for single photos in the batch.These failures will be specified in eachPhotoResponse.statusinBatchUpdatePhotosResponse.results.SeeUpdatePhotofor specific failures that can occur per photo.Only the fields specified inupdateMaskfield are used. If `updateMask` is not present, the update applies to allfields.<aside class="note"><b>Note:</b> To updatePose.altitude,Pose.latLngPair has to befilled as well. Otherwise, the request will fail.</aside>
        /// Documentation https://developers.google.com/streetviewpublish/v1/reference/photos/batchUpdate
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated Streetviewpublish service.</param>
        /// <param name="body">A valid Streetviewpublish v1 body.</param>
        /// <returns>BatchUpdatePhotosResponseResponse</returns>
        public static BatchUpdatePhotosResponse BatchUpdate(StreetviewpublishService service, BatchUpdatePhotosRequest body)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }

                // Make the request.
                return(service.Photos.BatchUpdate(body).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Photos.BatchUpdate failed.", ex);
            }
        }