public IEnumerable <Card> GetCardsForBoard(string boardId) { var cardsJson = _trelloRestGateway.GetCardsForBoard(boardId); var cards = _jsonParser.GetCards(cardsJson).ToArray(); var lists = _jsonParser.GetLists(cardsJson).ToArray(); var listLookupFunction = List.CreateLookupFunction(lists); foreach (var card in cards) { var cardJson = _trelloRestGateway.GetCardWithHistory(card.Id); _jsonParser.ProcessCardHistory(card, cardJson, listLookupFunction); } return(cards); }