-
Notifications
You must be signed in to change notification settings - Fork 2
DeleteAttachmentOnCardAsync
Rasmus Wulff Jensen edited this page Nov 1, 2023
·
4 revisions
Delete an Attachments on a card
/// <summary>
/// Delete an Attachments on a card
/// </summary>
/// <param name="cardId">Id of the Card</param>
/// <param name="attachmentId">Id of Attachment</param>
/// <param name="cancellationToken">Cancellation Token</param>
public async Task DeleteAttachmentOnCardAsync(string cardId, string attachmentId, CancellationToken cancellationToken = default) {...}
var cardId = "63c939a5cea0cb006dc9e88c";
//Delete all attachments on a card
List<Attachment> attachments = await _trelloClient.GetAttachmentsOnCardAsync(cardId);
foreach (var attachment in attachments)
{
await _trelloClient.DeleteAttachmentOnCardAsync(cardId, attachment.Id);
}
If you are looking for info on a specific method in TrelloDotNet then expand the Pages above and input the 'MethodName' (Example: 'AddCardAsync')