I am able to get the list of actions for a card. However, the action card has only the limited information so how do I get to the actual content of the action?
var actionList = trello.Actions.ForCard(card);
foreach (TrelloNet.Action action in actionList)
as I go through each action in the list, I can only see the member who originated the action, date, member and action type (e.g. TrelloNet.UpdateCardAction). How can I get to the actual context of the action, e.g. had transfered this card to board ?
If this is not the right way to get to the actual Action information, please point me to the right logical path.
Thanks,
Chi
Each type of action is a sub class of the
Actionclass. The subclasses have a property calledDatawhich contains specific information for that type of action.As an example, if you want print all create card actions for a board you could do it like this:
That will fetch all board actions from trello and then filter in memory. For performance reasons you can tell Trello.NET to only ask for specific action types by passing an additional parameter like this:
Since there can be a lot of actions trello uses paging. You can pass a
Pagingparameter to tell trello the page index and the page size. The following means that each page is 100 actions and you want the first page (0).There is an extension method called
AutoPaged()that will help with the paging. Add a using statement......and use
AutoPaged(). Trello.NET will automatically fetch new pages as needed.Note: There has been a while since new action types were added to Trello.NET so there might be new ones that are not recognized...