I just started using Manatee.Trello but I managed to get most everything I need working including adding new cards and updating existing.
I'm attempting to add a label that already exists on Trello to a card using Manatee.Trello.
CardID = "cardIDHere";
var card = new Card(CardID);
card.Name = strCardTitle;
card.Description = strCardDesc;
var list = new List("listIDHere");
card.List = list;
var member = new Member("MemberIDHere");
var label = new Label(board,"blue",DateTime.Now,"ID-Here","ProdIssues",1);
card.Labels.Add(label);
Can someone show the proper way to create an instance of that Label class for an existing label?
Label
has an internal constructor. The only way to get an instance of a label is through theBoard.Labels
collection.I did this because a label only makes sense in the context of a board. Each board defines its labels, and a label without a board is meaningless.
To get your code working, you just need to access the board's label collection and select the one you want to apply to the card.
Hope that helps!