### Installing TrelloDotNet NuGet Package via CLI Source: https://github.com/rwjdk/trellodotnet/blob/main/README.md This command installs the TrelloDotNet NuGet package into your .NET project. It is the first step to integrate the TrelloDotNet library, enabling access to its features for interacting with the Trello REST API. ```Shell dotnet add package TrelloDotNet ``` -------------------------------- ### Getting All Accessible Boards in C# Source: https://github.com/rwjdk/trellodotnet/blob/main/README.md Retrieves a list of all Trello boards that the authenticated token owner can access. This asynchronous operation returns a collection of Board objects. ```C# List boards = await client.GetBoardsCurrentTokenCanAccessAsync(); ``` -------------------------------- ### Getting Cards on a Board in C# Source: https://github.com/rwjdk/trellodotnet/blob/main/README.md Fetches all cards present on a specified Trello board. This provides a comprehensive view of all tasks or items across all lists on that board. ```C# List cardsOnBoard = await trelloClient.GetCardsOnBoardAsync(""); ``` -------------------------------- ### Getting Lists on a Board in C# Source: https://github.com/rwjdk/trellodotnet/blob/main/README.md Retrieves all lists associated with a specified Trello board. This operation is essential for navigating the structure of a board and accessing its contained lists. ```C# List lists = await client.GetListsOnBoardAsync(""); ``` -------------------------------- ### Getting a Specific Board by ID in C# Source: https://github.com/rwjdk/trellodotnet/blob/main/README.md Fetches a single Trello board using its unique identifier. This method is useful for retrieving detailed information about a particular board. ```C# Board board = await client.GetBoardAsync(""); ``` -------------------------------- ### Updating a Card in C# Source: https://github.com/rwjdk/trellodotnet/blob/main/README.md Updates an existing Trello card by specifying its ID and a list of `CardUpdate` operations. This example shows how to change the card's name, description, and remove its due date. ```C# var updateCard = await TrelloClient.UpdateCardAsync("", [ CardUpdate.Name("New Name"), CardUpdate.Description("New Description"), CardUpdate.DueDate(null), ]); ``` -------------------------------- ### Getting a Specific Card by ID in C# Source: https://github.com/rwjdk/trellodotnet/blob/main/README.md Fetches a single Trello card using its unique identifier. This allows for detailed inspection and manipulation of a specific task or item. ```C# Card card = await client.GetCardAsync(""); ``` -------------------------------- ### Getting Cards in a Specific List in C# Source: https://github.com/rwjdk/trellodotnet/blob/main/README.md Retrieves all cards contained within a particular Trello list. This is useful for focusing on tasks within a specific stage or category on a board. ```C# List cardsInList = await trelloClient.GetCardsInListAsync(""); ``` -------------------------------- ### Initializing TrelloClient in C# Source: https://github.com/rwjdk/trellodotnet/blob/main/README.md Initializes a new instance of the TrelloClient with the provided API key and token. It is crucial to avoid hardcoding sensitive credentials directly in the code. ```C# TrelloClient client = new TrelloDotNet.TrelloClient("APIKEY", "TOKEN"); //IMPORTANT: Remember to NOT leave Key and Token in clear text! ``` -------------------------------- ### Adding a Simple Card in C# Source: https://github.com/rwjdk/trellodotnet/blob/main/README.md Demonstrates how to add a new Trello card with basic options, including the target list ID, card name, and description. This provides a straightforward way to create new tasks. ```C# AddCardOptions newCardOptions = new AddCardOptions("", "My Card", "My Card description"); Card newCard = await client.AddCardAsync(newCardOptions); ``` -------------------------------- ### Adding an Advanced Card with All Options in C# Source: https://github.com/rwjdk/trellodotnet/blob/main/README.md Illustrates how to add a new Trello card with a comprehensive set of options, including description, start/due dates, cover, labels, members, checklists, attachments (URL and file upload), and custom fields. This allows for highly detailed card creation. ```C# Card newAdvancedCard = await client.AddCardAsync(new AddCardOptions { //Required options ListId = "", Name = "My Card", //Optional options Description = "Description of My Card", Start = DateTimeOffset.Now, Due = DateTimeOffset.Now.AddDays(3), Cover = new CardCover(CardCoverColor.Blue, CardCoverSize.Normal), LabelIds = new List { "", "", }, MemberIds = new List { "", "" }, Checklists = new List { new Checklist("Checklist 1", new List { new ChecklistItem("Item 1"), new ChecklistItem("Item 2"), new ChecklistItem("Item 3") }), new Checklist("Checklist 2", new List { new ChecklistItem("Item A"), new ChecklistItem("Item B"), new ChecklistItem("Item C") }), }, AttachmentUrlLinks = new List { new AttachmentUrlLink("https://www.google.com", "Google") }, AttachmentFileUploads = new List { new AttachmentFileUpload(File.OpenRead(@""), "", "") }, CustomFields = new List { new AddCardOptionsCustomField(customField1OnBoard, "ABC"), new AddCardOptionsCustomField(customField2OnBoard, 123), } }); ``` -------------------------------- ### Adding a Checklist to a Card in C# Source: https://github.com/rwjdk/trellodotnet/blob/main/README.md Demonstrates how to create and add a new checklist with predefined items to an existing Trello card. This enhances card functionality by allowing for sub-tasks or progress tracking. ```C# var checklistItems = new List { new("ItemA"), new("ItemB"), new("ItemC") }; Checklist newChecklist = new Checklist("Sample Checklist", checklistItems); Checklist addedChecklist = await client.AddChecklistAsync("", newChecklist); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.