Skip to content

GetActionsOfBoardAsync

Rasmus Wulff Jensen edited this page May 13, 2023 · 9 revisions

Get the most recent Actions (Changelog Events) of a board

Tip: Use this video to find the Id of a Board

Signature

/// <summary>
/// Get the most recent Actions (Changelog Events) of a board
/// </summary>
/// <param name="boardId">The Id of the Board</param>
/// <param name="filter">A set of event-types to filter by (You can see a list of event in TrelloDotNet.Model.Webhook.WebhookActionTypes)</param>
/// <param name="limit">How many recent events to get back; Default 50, Max 1000</param>
/// <param name="cancellationToken">Cancellation Token</param>
/// <returns>List of most Recent Trello Actions</returns>
public async Task<List<TrelloAction>> GetActionsOfBoardAsync(string boardId, List<string> filter = null, int limit = 50, CancellationToken cancellationToken = default) {...}

Examples

var boardId = "63c939a5cea0cb006dc9e88b";

//Get last 50 actions of the board
List<TrelloAction> last50ActionsOfBoard = await _trelloClient.GetActionsOfBoardAsync(boardId);

//Get last 200 actions of the board
List<TrelloAction> last200ActionsOfBoard = await _trelloClient.GetActionsOfBoardAsync(boardId, limit: 200);

//Get last 100 actions of type 'updateCard' and 'addLabelToCard'
var filter = new List<string>
{
    TrelloDotNet.Model.Webhook.WebhookActionTypes.UpdateCard,
    TrelloDotNet.Model.Webhook.WebhookActionTypes.AddLabelToCard    
};
List<TrelloAction> last100ActionsOfBoardOfSpecificTypes = await _trelloClient.GetActionsOfBoardAsync(boardId, filter, limit: 100);
Clone this wiki locally