I want to fetch cards by date, for example:
list.Cards.Filter(CardFilter.Closed).Since("someDate").toList()
but there is no extension for cards like actions.
I want to fetch cards by date, for example:
list.Cards.Filter(CardFilter.Closed).Since("someDate").toList()
but there is no extension for cards like actions.
There is aFilter ()
overload that takes start and end dates.Edit 1
This is wrong. I was thinking action collections. I'll check the API and come back.
Edit 2
As per the Trello docs there is no "get cards by date" function. However, there are a couple ways to do this:
By creation date
list.Cards.Filter(CardFilter.Closed) .Where(c => c.CreationDate >= someDate);
By last modified date
list.Cards.Filter(CardFilter.Closed) .Where(c => c.LastActivity >= someDate);
Also, remember that you can get cards for lists (as you're doing and above) as well as all of the cards for an entire board.
Edit 3
Manatee.Trello v1.16.0 provides this functionality as a new overload of the
Filter()
extension method on theReadOnlyCardCollection
object. You can use it like this:to get all cards in a list that were created after 1 Jan 2017. The other parameter is an end date.