예제 #1
0
 public void BatchDeletePhotos_RequestObject()
 {
     // Snippet: BatchDeletePhotos(BatchDeletePhotosRequest,CallSettings)
     // Create client
     StreetViewPublishServiceClient streetViewPublishServiceClient = StreetViewPublishServiceClient.Create();
     // Initialize request argument(s)
     BatchDeletePhotosRequest request = new BatchDeletePhotosRequest
     {
         PhotoIds = { },
     };
     // Make the request
     BatchDeletePhotosResponse response = streetViewPublishServiceClient.BatchDeletePhotos(request);
     // End snippet
 }
예제 #2
0
        public async Task BatchDeletePhotosAsync_RequestObject()
        {
            // Snippet: BatchDeletePhotosAsync(BatchDeletePhotosRequest,CallSettings)
            // Create client
            StreetViewPublishServiceClient streetViewPublishServiceClient = await StreetViewPublishServiceClient.CreateAsync();

            // Initialize request argument(s)
            BatchDeletePhotosRequest request = new BatchDeletePhotosRequest
            {
                PhotoIds = { },
            };
            // Make the request
            BatchDeletePhotosResponse response = await streetViewPublishServiceClient.BatchDeletePhotosAsync(request);

            // End snippet
        }
예제 #3
0
        /// <summary>
        /// Deletes a list of Photos and theirmetadata.Note that ifBatchDeletePhotosfails, either critical fields are missing or there was an authenticationerror. Even ifBatchDeletePhotossucceeds, there may have been failures for single photos in the batch.These failures will be specified in eachPhotoResponse.statusinBatchDeletePhotosResponse.results.SeeDeletePhotofor specific failures that can occur per photo.
        /// Documentation https://developers.google.com/streetviewpublish/v1/reference/photos/batchDelete
        /// 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>BatchDeletePhotosResponseResponse</returns>
        public static BatchDeletePhotosResponse BatchDelete(StreetviewpublishService service, BatchDeletePhotosRequest body)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }

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