Skip to content
Rasmus Wulff Jensen edited this page Nov 1, 2023 · 4 revisions

Back to Search Features

Search Trello for Cards, Boards, and/or Organizations

Search-Tips: https://blog.trello.com/the-secrets-of-superior-trello-searches

Signature

/// <summary>
/// Search Trello for Cards, Boards, and/or Organizations
/// </summary>
/// <remarks>
/// Search-tips: https://blog.trello.com/the-secrets-of-superior-trello-searches
/// </remarks>
/// <param name="searchRequest">The Search Request</param>
/// <param name="cancellationToken">CancellationToken</param>
public async Task<SearchResult> SearchAsync(SearchRequest searchRequest, CancellationToken cancellationToken = default)

Examples

var _trelloClient = TrelloClient;

//Search Cards only for the word 'issue'
var searchRequest = new SearchRequest("issue", partialSearch: true)
{
    SearchCards = true,
    SearchBoards = false,
    SearchOrganizations = false,
    CardLimit = 1000,
    CardFields = new SearchRequestCardFields("id", "name")
};

SearchResult result = await _trelloClient.SearchAsync(searchRequest);
List<Card> resultCards = result.Cards;

Clone this wiki locally