Skip to content

GetActionsForOrganizationsAsync

Rasmus Wulff Jensen edited this page May 29, 2023 · 6 revisions

Back to Action Features

Get the most recent Actions (Changelog Events) for a Organization (Workspace)

Note: Only organization-specific actions will be returned. For the actions on the boards, see GetActionsOfBoardAsync

Signature

/// <summary>
/// Get the most recent Actions (Changelog Events) for an Organization
/// </summary>
/// <param name="organizationId">The Id of the Organization</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>> GetActionsForOrganizationsAsync(string organizationId, List<string> filter = null, int limit = 50, CancellationToken cancellationToken = default) {...}

Examples

var organizationId = "63c939a5cea0cb006dc9e88c";

//Get last 50 actions
List<TrelloAction> last50Actions = await _trelloClient.GetActionsForOrganizationsAsync(organizationId);

//Get last 200 actions
List<TrelloAction> last200Actions = await _trelloClient.GetActionsForOrganizationsAsync(organizationId, limit: 200);

//Get last 100 actions of type 'updateOrganization'
var filter = new List<string>
{
    TrelloDotNet.Model.Webhook.WebhookActionTypes.UpdateOrganization,
};
List<TrelloAction> last100ActionsOfSpecificTypes = await _trelloClient.GetActionsForOrganizationsAsync(organizationId, filter, limit: 100);

See Also

Clone this wiki locally