public Task Delete(DeletePhotoRequest request, CancellationToken cancellationToken = default) { return(_amazonS3Client.DeleteObjectAsync(new DeleteObjectRequest { BucketName = BucketName, Key = request.PhotoName }, cancellationToken)); }
public async Task DeletePhoto(DeletePhotoRequest request, CancellationToken cancellationToken) { var ad = await _repository.FindById(request.Id, cancellationToken); if (ad == null) { throw new NoPhotoFoundException(request.Id); } await _repository.DeleteById(request.Id, cancellationToken); }
public IActionResult DeletePhoto(DeletePhotoRequest request) { var messageClientId = new MessageClientId(request.ClientId); var messageChainId = new MessageChainId(Guid.NewGuid().ToString()); var inputMessage = new DeletePhotoInputMessage(messageClientId, messageChainId) { PhotoId = request.PhotoId }; _queueManager.SendMessage(PhotoSettings.PhotoInputQueue, inputMessage); return(Ok()); }
public void DeletePhoto_RequestObject() { // Snippet: DeletePhoto(DeletePhotoRequest,CallSettings) // Create client StreetViewPublishServiceClient streetViewPublishServiceClient = StreetViewPublishServiceClient.Create(); // Initialize request argument(s) DeletePhotoRequest request = new DeletePhotoRequest { PhotoId = "", }; // Make the request streetViewPublishServiceClient.DeletePhoto(request); // End snippet }
public async Task DeletePhotoAsync_RequestObject() { // Snippet: DeletePhotoAsync(DeletePhotoRequest,CallSettings) // Create client StreetViewPublishServiceClient streetViewPublishServiceClient = await StreetViewPublishServiceClient.CreateAsync(); // Initialize request argument(s) DeletePhotoRequest request = new DeletePhotoRequest { PhotoId = "", }; // Make the request await streetViewPublishServiceClient.DeletePhotoAsync(request); // End snippet }