Reputation: 502
I've been trying to search for information on how use the copyCard trello action, it looks like I should use Card.ApplyAction, but I am not sure if thats the correct way. I have not found how to set the needed data on the action to copy the card.
Is there a method in Manatee.Trello to copy a card or do I just do it all myself? If there is how do you use it?
Upvotes: 1
Views: 128
Reputation: 8428
To copy a card, you'll need the destination list. If you're just trying to put it in the same list, that's card.List
.
Then you can just add a new card using the existing card as a source:
var card = new Card("<card ID>");
var copy = Card.List.Cards.Add(card);
Done!
The ActionTypes
enum serves two purposes:
card.Actions
) for objects that expose them (boards, lists, cards, etc.)Filter()
extension method.You can find out more on the Manatee.Trello wiki
The card.ApplyAction()
method is for web hooks. When a request is received, the content is deserialized as a string and passed to this method. It is an alternative updating mechanism from the default on-demand polling.
Upvotes: 0