-
Notifications
You must be signed in to change notification settings - Fork 4
UpdateStickerAsync
Rasmus Wulff Jensen edited this page Nov 1, 2023
·
2 revisions
Update a sticker
/// <summary>
/// Update a sticker
/// </summary>
/// <param name="cardId">Id of the Card</param>
/// <param name="stickerWithUpdates">The Sticker to update</param>
/// <param name="cancellationToken"></param>
/// <returns>The Updated Sticker</returns>
public async Task<Sticker> UpdateStickerAsync(string cardId, Sticker stickerWithUpdates, CancellationToken cancellationToken = default) {...}
string cardId = "63c939a5cea0cb006dc9e9dd";
List<Sticker> stickers = await _trelloClient.GetStickersOnCardAsync(cardId);
//Grab the first sticker
Sticker? firstSticker = stickers.FirstOrDefault();
if (firstSticker != null)
{
firstSticker.ImageId = Sticker.DefaultImageToString(StickerDefaultImageId.Heart);
firstSticker.Rotation = 45;
firstSticker.Left = 10;
firstSticker.Top = 3;
Sticker updatedSticker = await _trelloClient.UpdateStickerAsync(cardId, firstSticker);
}
If you are looking for info on a specific method in TrelloDotNet then expand the Pages above and input the 'MethodName' (Example: 'AddCardAsync')