-
Notifications
You must be signed in to change notification settings - Fork 4
UpdateLabelAsync
Rasmus Wulff Jensen edited this page Nov 1, 2023
·
4 revisions
Update the definition of a label (Name and Color)
/// <summary>
/// Update the definition of a label (Name and Color)
/// </summary>
/// <param name="labelWithUpdates">The label with updates</param>
/// <param name="cancellationToken">Cancellation Token</param>
public async Task<Label> UpdateLabelAsync(Label labelWithUpdates, CancellationToken cancellationToken = default) {...}
var boardId = "63c939a5cea0cb006dc9e88b";
List<Label> labelsOnBoard = await _trelloClient.GetLabelsOfBoardAsync(boardId);
//Get the label up update and set its properties
Label labelBug = labelsOnBoard.First(x => x.Name == "Bug");
labelBug.Color = "red";
var updatedLabel = await _trelloClient.UpdateLabelAsync(labelBug);
If you are looking for info on a specific method in TrelloDotNet then expand the Pages above and input the 'MethodName' (Example: 'AddCardAsync')