c# - Trello.Net: How to get the Actions data? -
I am able to get a list of actions for a card. However, the action card has only limited information, so how do I get the actual content of the action?
var actionList = trello.Actions.ForCard (card); In the form of foreach (Trailonnet action action in action list) I go through every action in the list, I can only see the member who has act, date, member and verb Type (such as Tralonate .UpdateCardAction). How do I get the actual context of the action, e.g. Was this card transferred to the board?
If this is not the right way to get information about actual action, please tell me about the correct logical path.
Thanks,
each The type of action is a sub class of action class is a property of subclasses called data , which contains specific information for that type of action. For example, if you want to print, create card actions for the board, you can do this like this:
var board = trello.Boards WithId ("A Board ID"); Various verbs in forehack (trello.Actions.ForBoard (board)). OpenType & Create; CreateCardAction & gt; ()) {Console.WriteLine (action.Date + "+ action.Data.Card.Name);} This will get all the board actions from Tralo and then filter it into memory. For the reasons of performance, you can ask for a specific parameter for a specific parameter by giving an additional parameter like this:
foreach (trello.Actions.erctions.ForBoard (board, new [] {ActionType.CreateCard}. OfType & lt; CreateCardAction & gt; ()) {Console.WriteLi Ne (action.Date + "-" + action.Data.Card.Name);} Since Trelow Paging can be a lot of work, you can add trelow to the page index and page You can pass a paging parameter to give the following meaning that each page has 100 actions and you want the first page (0). foreach (Var action in trello.Actions.ForBoard (board, new [] {ActionType.CreateCard}, paging: new paging (100, 0)). OfType & lt; CreateCardAction & gt; ()) {Console.WriteLine (an action.Date + "- + action.Data.Card.Name);} An extension method named Autopad () Using the Trailonnet extension; ... and Autopozed ) . Trello.NET will automatically obtain new pages. >> action in foreach (trello.Actions.AutoPaged (). , New [] {ActionType.CreateCard}. OfType & lt; CreateCardAction & gt; ()) {Console.WriteLine (action.Date + "-" + action.Data.Card Note: After some time some work types were added to Trello.NET, so they may not be recognized ....
Comments
Post a Comment