-
Notifications
You must be signed in to change notification settings - Fork 4
GetActionsForListAsync
Rasmus Wulff Jensen edited this page May 13, 2023
·
7 revisions
Get the most recent Actions (Changelog Events) of a List
Tip: Use this video to find the Id of a List
/// <summary>
/// Get the most recent Actions (Changelog Events) for a List
/// </summary>
/// <param name="listId">The Id of the List</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>> GetActionsForListAsync(string listId, List<string> filter = null, int limit = 50, CancellationToken cancellationToken = default) {...}
var listId = "63c939a5cea0cb006dc9e88c";
//Get last 50 actions on a list (Default filter 'commentCard, updateCard:idList')
List<TrelloAction> last50Actions = await _trelloClient.GetActionsForListAsync(listId);
//Get last 200 actions on a list (Default filter 'commentCard, updateCard:idList')
List<TrelloAction> last200Actions = await _trelloClient.GetActionsForListAsync(listId, limit: 200);
//Get last 100 actions of type 'updateCard:idList' (Move card to List)
var filter = new List<string>
{
TrelloDotNet.Model.Webhook.WebhookActionTypes.MoveCardToList,
};
List<TrelloAction> last100ActionsOfSpecificTypes = await _trelloClient.GetActionsForListAsync(listId, filter, limit: 100);
If you are looking for info on a specific method in TrelloDotNet then expand the Pages above and input the 'MethodName' (Example: 'AddCardAsync')